:root {
    --black: #121212;
    --dark-black: #0a0a0a;
    --darker-black: #050505;
    --white: #f5f5f5;
    --light-white: #ffffff;
    --gold: #D4AF37;
    --light-gold: #f0e6c5;
    --dark-gold: #b38f2b;
    --gray: #888;
    --light-gray: #e0e0e0;
    --dark-gray: #333;
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cormorant Garamond', serif;
    background-color: var(--black);
    color: var(--white);
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    background: none;
    border: none;
    font-family: inherit;
    cursor: pointer;
}

.gold-accent {
    color: var(--gold);
}

.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    background: var(--dark-black);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}

.nav-logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--gold);
    letter-spacing: 2px;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: var(--white);
    font-size: 1.1rem;
    transition: color 0.3s ease;
    position: relative;
    padding: 0.5rem 0;
}

.nav-link:hover {
    color: var(--gold);
}

.nav-link.active {
    color: var(--gold);
}

.nav-link.active:after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--gold);
}

.nav-actions {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-icon {
    color: var(--white);
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

.nav-icon:hover {
    color: var(--gold);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Search Bar */
.search-bar {
    height: 0;
    overflow: hidden;
    background: var(--darker-black);
    transition: height 0.3s ease;
}

.search-bar.active {
    height: 70px;
    padding: 0 2rem;
}

.search-form {
    display: flex;
    align-items: center;
    height: 100%;
    position: relative;
}

.search-form input {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--gray);
    padding: 0.8rem 0;
    color: var(--white);
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
}

.search-form input:focus {
    outline: none;
    border-color: var(--gold);
}

.search-button {
    position: absolute;
    right: 0;
    color: var(--gray);
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

.search-button:hover {
    color: var(--gold);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(rgba(10, 10, 10, 0.7), rgba(10, 10, 10, 0.9)), 
                url('https://images.unsplash.com/photo-1507842217343-583bb7270b66?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80') no-repeat center center/cover;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 2rem;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-content p {
    font-size: 1.5rem;
    color: var(--light-gold);
}

/* Collection Section */
.collection-section {
    padding: 4rem 2rem;
}

.filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 2rem;
}

.search-container {
    flex: 1;
    min-width: 300px;
}

.search-box {
    display: flex;
    background: var(--dark-black);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 30px;
    overflow: hidden;
}

.search-box input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 0.8rem 1.5rem;
    color: var(--white);
    font-family: 'Montserrat', sans-serif;
}

.search-box input:focus {
    outline: none;
}

.search-btn {
    padding: 0 1.5rem;
    color: var(--gray);
    transition: color 0.3s ease;
}

.search-btn:hover {
    color: var(--gold);
}

.filter-options {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-label {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.8rem;
    color: var(--light-gold);
    letter-spacing: 1px;
}

.filter-select {
    background: var(--dark-black);
    border: 1px solid rgba(212, 175, 55, 0.3);
    color: var(--white);
    padding: 0.8rem 1.2rem;
    font-family: 'Montserrat', sans-serif;
    border-radius: 30px;
    min-width: 200px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-select:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.2);
}

.collection-stats {
    font-family: 'Montserrat', sans-serif;
    color: var(--light-gold);
    font-size: 0.9rem;
    margin-bottom: 2rem;
    text-align: right;
}

.collection-stats span {
    color: var(--gold);
    font-weight: 600;
}

/* Collection Grid */
.collection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.book-card {
    background: var(--dark-black);
    border: 1px solid rgba(212, 175, 55, 0.1);
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s ease forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.book-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    border-color: var(--gold);
}

.book-cover {
    height: 350px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.book-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    padding: 1.5rem;
}

.book-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--white);
}

.book-author {
    color: var(--light-gold);
    font-style: italic;
}

.book-meta {
    padding: 1.5rem;
}

.book-genre {
    display: inline-block;
    background: rgba(212, 175, 55, 0.2);
    color: var(--gold);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    margin-bottom: 1rem;
    font-family: 'Montserrat', sans-serif;
}

.book-description {
    color: #ccc;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    border: 1px solid var(--gold);
    color: var(--gold);
    padding: 0.6rem 1.2rem;
    font-family: 'Montserrat', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.8rem;
    border-radius: 4px;
}

.action-btn:hover {
    background: var(--gold);
    color: var(--black);
}

.book-actions {
    display: flex;
    gap: 0.5rem;
}

.secondary-btn {
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.secondary-btn:hover {
    background: rgba(212, 175, 55, 0.2);
}

/* Loading Indicator */
.loading-indicator {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 2rem 0;
    color: var(--light-gold);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(212, 175, 55, 0.2);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* No Results */
.no-results {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    padding: 4rem 0;
    text-align: center;
}

.no-results i {
    font-size: 3rem;
    color: var(--gold);
}

.no-results h3 {
    font-size: 1.5rem;
    color: var(--light-gold);
}

.no-results p {
    color: var(--gray);
}

/* Footer */
.footer {
    background: var(--darker-black);
    padding: 4rem 0 2rem;
    color: var(--light-gold);
}

.footer-container {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-logo {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gold);
    letter-spacing: 2px;
}

.footer-logo p {
    font-size: 1rem;
    color: var(--light-gold);
    margin-top: 0.5rem;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.footer-link {
    color: var(--light-gold);
    transition: color 0.3s ease;
    font-size: 0.9rem;
}

.footer-link:hover {
    color: var(--gold);
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.social-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(212, 175, 55, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
}

.social-icon:hover {
    background: var(--gold);
    color: var(--black);
    transform: translateY(-3px);
}

.footer-bottom {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(212, 175, 55, 0.1);
    text-align: center;
}

.copyright {
    font-size: 0.8rem;
    color: var(--gray);
    font-family: 'Montserrat', sans-serif;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .hero-content h1 {
        font-size: 3rem;
    }
}

@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        padding: 1rem;
    }
    
    .nav-links {
        flex-direction: column;
        gap: 0.5rem;
        display: none;
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .nav-actions {
        display: none;
        margin-top: 1rem;
    }
    
    .nav-actions.active {
        display: flex;
    }
    
    .mobile-menu-btn {
        display: block;
        position: absolute;
        top: 1rem;
        right: 1rem;
    }
    
    .search-bar.active {
        height: 70px;
        padding: 0 1rem;
    }
    
    .hero-section {
        height: 250px;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-container {
        min-width: 100%;
    }
    
    .filter-options {
        flex-direction: column;
        gap: 1rem;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .filter-select {
        width: 100%;
    }
    
    .collection-stats {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .collection-grid {
        grid-template-columns: 1fr;
    }
}