* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f5f1e8 0%, #e8dcc8 100%);
    color: #333;
    min-height: 100vh;
}

header {
    background: linear-gradient(135deg, #8B4513 0%, #A0522D 100%);
    color: white;
    padding: 1.5rem 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    position: sticky;
    top: 0;
    z-index: 100;
}

header nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    font-size: 1.8rem;
    margin: 0;
}

header ul {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    flex-wrap: wrap;
}

header a {
    color: white;
    text-decoration: none;
    transition: all 0.3s;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    font-size: 0.95rem;
}

header a:hover {
    background-color: rgba(255,255,255,0.2);
    transform: translateY(-2px);
}

main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
}

section {
    background: white;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

h1 {
    color: #8B4513;
    margin-bottom: 1.5rem;
    font-size: 2rem;
}

h2 {
    color: #8B4513;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

h3 {
    color: #A0522D;
}

.hero {
    background: linear-gradient(135deg, #8B4513 0%, #D2B48C 100%);
    color: white;
    text-align: center;
    padding: 4rem 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.hero h2 {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 0.9rem 2rem;
    background-color: #8B4513;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
    font-size: 1rem;
    font-weight: 500;
}

.btn:hover {
    background-color: #6b3410;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(139, 69, 19, 0.3);
}

.btn-secondary {
    background-color: #D2B48C;
    color: #333;
}

.btn-secondary:hover {
    background-color: #c9a876;
}

.btn-success {
    background-color: #27ae60;
}

.btn-success:hover {
    background-color: #229954;
}

.btn-danger {
    background-color: #e74c3c;
}

.btn-danger:hover {
    background-color: #c0392b;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.feature {
    background: linear-gradient(135deg, #f9f9f9 0%, #f0f0f0 100%);
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    border-left: 5px solid #8B4513;
    transition: all 0.3s;
}

.feature:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.feature h3 {
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.feature a {
    color: #8B4513;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.feature a:hover {
    color: #6b3410;
}

.filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filters input,
.filters select {
    padding: 0.75rem;
    border: 2px solid #D2B48C;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s;
}

.filters input:focus,
.filters select:focus {
    outline: none;
    border-color: #8B4513;
    box-shadow: 0 0 8px rgba(139, 69, 19, 0.2);
}

.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 2rem;
}

.book-card {
    background: white;
    border: 2px solid #f0f0f0;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s;
    cursor: pointer;
}

.book-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
    border-color: #D2B48C;
}

.book-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #D2B48C 0%, #8B4513 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 4rem;
}

.book-info {
    padding: 1.5rem;
}

.book-title {
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: #8B4513;
    font-size: 1.1rem;
}

.book-author {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.book-price {
    font-size: 1.3rem;
    color: #27ae60;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.book-condition {
    display: inline-block;
    background-color: #D2B48C;
    color: #333;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.book-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.book-actions button {
    flex: 1;
    padding: 0.6rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 600;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.9rem;
    border: 2px solid #D2B48C;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #8B4513;
    box-shadow: 0 0 8px rgba(139, 69, 19, 0.2);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.stores-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.store-card {
    background: white;
    border: 2px solid #f0f0f0;
    border-radius: 10px;
    padding: 2rem;
    transition: all 0.3s;
}

.store-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
    border-color: #D2B48C;
}

.store-name {
    font-size: 1.3rem;
    color: #8B4513;
    margin-bottom: 1rem;
    font-weight: bold;
}

.store-info {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.transaction-card {
    background: linear-gradient(135deg, #f9f9f9 0%, #f0f0f0 100%);
    border-left: 5px solid #8B4513;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.transaction-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.transaction-title {
    font-weight: bold;
    color: #8B4513;
    font-size: 1.1rem;
}

.transaction-status {
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-pending {
    background-color: #f39c12;
    color: white;
}

.status-completed {
    background-color: #27ae60;
    color: white;
}

.status-cancelled {
    background-color: #e74c3c;
    color: white;
}

.transaction-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.detail-item {
    font-size: 0.9rem;
}

.detail-label {
    color: #666;
    font-weight: 600;
}

.detail-value {
    color: #333;
    margin-top: 0.3rem;
}

.cart-summary {
    background: linear-gradient(135deg, #f9f9f9 0%, #f0f0f0 100%);
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 2rem;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid #ddd;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    font-size: 1.2rem;
    font-weight: bold;
    color: #8B4513;
    border-top: 2px solid #8B4513;
    margin-top: 1rem;
}

footer {
    background-color: #8B4513;
    color: white;
    text-align: center;
    padding: 2rem;
    margin-top: 3rem;
}

@media (max-width: 768px) {
    header nav {
        flex-direction: column;
        gap: 1rem;
    }

    header ul {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

    .hero h2 {
        font-size: 1.8rem;
    }

    .cta-buttons {
        flex-direction: column;
    }

    .books-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .filters {
        flex-direction: column;
    }

    .filters input,
    .filters select {
        width: 100%;
    }
}


.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    animation: fadeIn 0.3s ease-in;
}

.modal.show {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    animation: slideUp 0.3s ease-out;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close {
    color: #aaa;
    float: left;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close:hover {
    color: #8B4513;
}

.book-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

.book-details-image {
    width: 100%;
    height: 300px;
    background: linear-gradient(135deg, #D2B48C 0%, #8B4513 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.book-details-info h2 {
    color: #8B4513;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.detail-label {
    font-weight: 600;
    color: #666;
    flex: 0 0 40%;
}

.detail-value {
    color: #333;
    flex: 1;
    text-align: right;
}

.detail-value.price {
    color: #27ae60;
    font-size: 1.3rem;
    font-weight: bold;
}

.condition-badge {
    display: inline-block;
    background-color: #D2B48C;
    color: #333;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
}

.book-details-info .btn {
    width: 100%;
    margin-top: 1.5rem;
    padding: 1rem;
}

@media (max-width: 600px) {
    .book-details {
        grid-template-columns: 1fr;
    }

    .modal-content {
        width: 95%;
        margin: 20% auto;
    }

    .book-details-image {
        height: 200px;
        font-size: 3rem;
    }
}


.store-details {
    padding: 1rem 0;
}

.store-details h2 {
    color: #8B4513;
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.store-details h3 {
    color: #8B4513;
    font-size: 1.3rem;
}

.store-description {
    background: #f9f9f9;
    padding: 1.5rem;
    border-radius: 8px;
    border-right: 4px solid #8B4513;
    line-height: 1.8;
}

.store-description p {
    margin: 0;
    color: #333;
}

.store-books-list {
    margin-top: 1.5rem;
}

.store-book-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f9f9f9;
    border-radius: 8px;
    margin-bottom: 1rem;
    border-left: 4px solid #D2B48C;
}

.store-book-info {
    flex: 1;
    color: #333;
}

.store-book-info strong {
    color: #8B4513;
    display: block;
    margin-bottom: 0.3rem;
}

.store-book-info small {
    color: #666;
    display: block;
    margin-bottom: 0.2rem;
}

.store-book-item .btn {
    margin-right: 1rem;
    white-space: nowrap;
}


.admin-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid #ddd;
    flex-wrap: wrap;
}

.admin-tabs .tab-btn {
    padding: 0.75rem 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    color: #666;
    font-size: 1rem;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
}

.admin-tabs .tab-btn.active {
    color: #8B4513;
    border-bottom-color: #8B4513;
}

.admin-tabs .tab-btn:hover {
    color: #8B4513;
}

.admin-tab-content {
    display: none;
}

.admin-tab-content.active {
    display: block;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.admin-list {
    margin-top: 1.5rem;
}

.admin-item {
    background: #f9f9f9;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    border-left: 4px solid #8B4513;
}

.admin-item strong {
    color: #8B4513;
}

.admin-item small {
    color: #666;
    display: block;
    margin-top: 0.3rem;
}
