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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #333;
    color: white;
    padding: 15px 0;
    z-index: 1000;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.cookie-banner.show {
    transform: translateY(0);
}

.cookie-banner .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.cookie-banner p {
    margin: 0;
    flex: 1;
}

.cookie-banner a {
    color: #4CAF50;
    text-decoration: underline;
}

.cookie-banner button {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    white-space: nowrap;
}

/* Header */
.header {
    background: #fff;
    border-bottom: 1px solid #e5e5e5;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #333;
    font-weight: 600;
    font-size: 18px;
}

.logo img {
    width: 32px;
    height: 32px;
}

.nav {
    display: flex;
    gap: 30px;
}

.nav-link {
    text-decoration: none;
    color: #666;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #333;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
}

/* Hero Section */
.hero {
    padding: 80px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-content h1 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-content p {
    font-size: 18px;
    color: #666;
    margin-bottom: 30px;
}

.hero-image img {
    width: 100%;
    max-width: 500px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 16px;
}

.btn-primary {
    background: #007bff;
    color: white;
}

.btn-primary:hover {
    background: #0056b3;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #545b62;
}

/* Featured Books Section */
.featured-books {
    padding: 80px 0;
}

.featured-books h2 {
    text-align: center;
    font-size: 36px;
    margin-bottom: 50px;
}

/* Books Grid */
.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.book-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.book-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.book-image {
    width: 100%;
    height: 200px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.book-image img {
    max-width: 80%;
    max-height: 80%;
}

.book-card h3 {
    font-size: 20px;
    margin-bottom: 8px;
    line-height: 1.3;
}

.book-author {
    color: #666;
    margin-bottom: 12px;
    font-weight: 500;
}

.book-category {
    display: inline-block;
    background: #e9ecef;
    color: #495057;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 14px;
    margin-bottom: 12px;
}

.book-description {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

/* Categories Preview */
.categories-preview {
    padding: 80px 0;
    background: #f8f9fa;
}

.categories-preview h2 {
    text-align: center;
    font-size: 36px;
    margin-bottom: 50px;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
}

.categories-grid.large {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.category-card {
    background: white;
    padding: 30px 24px;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.category-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.category-card h3 {
    font-size: 24px;
    margin-bottom: 12px;
    color: #333;
}

.category-card p {
    color: #666;
    margin-bottom: 16px;
}

.category-card.large {
    padding: 40px 30px;
    text-align: center;
}

.category-card.large h2 {
    font-size: 28px;
    margin-bottom: 16px;
    color: #333;
}

.book-count {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
}

/* Page Header */
.page-header {
    padding: 60px 0;
    background: #f8f9fa;
    text-align: center;
}

.page-header h1 {
    font-size: 42px;
    margin-bottom: 16px;
}

.page-header p {
    font-size: 18px;
    color: #666;
}

/* Directory Controls */
.directory-controls {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
    justify-content: center;
    flex-wrap: wrap;
}

.search-box input,
.filter-box select {
    padding: 12px 16px;
    border: 2px solid #e5e5e5;
    border-radius: 6px;
    font-size: 16px;
    min-width: 250px;
}

.search-box input:focus,
.filter-box select:focus {
    outline: none;
    border-color: #007bff;
}

/* Book Details */
.book-details {
    padding: 40px 0;
}

.book-detail-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 60px;
    margin-bottom: 60px;
}

.book-detail-image {
    text-align: center;
}

.book-detail-image img {
    max-width: 300px;
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
}

.book-detail-info h1 {
    font-size: 36px;
    margin-bottom: 12px;
    line-height: 1.2;
}

.book-detail-author {
    font-size: 20px;
    color: #666;
    margin-bottom: 16px;
}

.book-detail-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.book-detail-category {
    background: #007bff;
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

.book-detail-year {
    background: #6c757d;
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
}

.book-description {
    font-size: 18px;
    line-height: 1.7;
    margin-bottom: 30px;
}

.purchase-links {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.purchase-link {
    padding: 10px 20px;
    background: #28a745;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: background 0.3s ease;
}

.purchase-link:hover {
    background: #218838;
}

.third-party-notice {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    padding: 16px;
    border-radius: 6px;
    margin-bottom: 40px;
}

.third-party-notice p {
    margin: 0;
    color: #856404;
    font-weight: 500;
}

.book-sections {
    display: grid;
    gap: 40px;
}

.book-section {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.book-section h2 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #333;
}

.book-section ul {
    padding-left: 20px;
}

.book-section li {
    margin-bottom: 8px;
    line-height: 1.6;
}

/* Content Sections */
.content-section {
    padding: 60px 0;
}

.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 60px;
}

.content-main h2 {
    font-size: 28px;
    margin-bottom: 20px;
    margin-top: 40px;
}

.content-main h2:first-child {
    margin-top: 0;
}

.content-main h3 {
    font-size: 22px;
    margin-bottom: 16px;
    margin-top: 30px;
}

.content-main p {
    margin-bottom: 16px;
    line-height: 1.7;
}

.content-main ul {
    margin-bottom: 20px;
    padding-left: 20px;
}

.content-main li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.sidebar-card {
    background: #f8f9fa;
    padding: 24px;
    border-radius: 12px;
    margin-bottom: 30px;
}

.sidebar-card h3 {
    font-size: 20px;
    margin-bottom: 16px;
}

.sidebar-card ul {
    list-style: none;
    padding: 0;
}

.sidebar-card li {
    margin-bottom: 8px;
}

.sidebar-card a {
    color: #007bff;
    text-decoration: none;
}

.sidebar-card a:hover {
    text-decoration: underline;
}

/* Contact Section */
.contact-section {
    padding: 60px 0;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.contact-form h2,
.contact-info h2 {
    font-size: 28px;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e5e5e5;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #007bff;
}

.contact-card {
    background: #f8f9fa;
    padding: 24px;
    border-radius: 12px;
    margin-bottom: 24px;
}

.contact-card h3 {
    font-size: 20px;
    margin-bottom: 12px;
    color: #333;
}

.contact-card p {
    margin-bottom: 8px;
    line-height: 1.6;
}

.contact-card a {
    color: #007bff;
    text-decoration: none;
}

.contact-card a:hover {
    text-decoration: underline;
}

.form-message {
    padding: 16px;
    border-radius: 6px;
    margin-top: 20px;
}

.form-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Legal Content */
.legal-content {
    max-width: 800px;
    margin: 0 auto;
}

.legal-content h2 {
    font-size: 28px;
    margin-bottom: 20px;
    margin-top: 40px;
    color: #333;
}

.legal-content h2:first-child {
    margin-top: 0;
}

.legal-content h3 {
    font-size: 22px;
    margin-bottom: 16px;
    margin-top: 30px;
    color: #333;
}

.legal-content p {
    margin-bottom: 16px;
    line-height: 1.7;
}

.legal-content ul {
    margin-bottom: 20px;
    padding-left: 20px;
}

.legal-content li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.legal-content a {
    color: #007bff;
    text-decoration: none;
}

.legal-content a:hover {
    text-decoration: underline;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 60px 0;
    color: #666;
}

.book-not-found {
    text-align: center;
    padding: 80px 0;
}

.book-not-found h1 {
    font-size: 36px;
    margin-bottom: 20px;
}

.book-not-found p {
    font-size: 18px;
    color: #666;
    margin-bottom: 30px;
}

/* Footer */
.footer {
    background: #333;
    color: white;
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 20px;
    color: white;
}

.footer-section p {
    margin-bottom: 12px;
    color: #ccc;
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 8px;
}

.footer-section a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid #555;
    padding-top: 20px;
    text-align: center;
    color: #ccc;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }
    
    .nav {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .hero .container {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
    
    .hero-content h1 {
        font-size: 36px;
    }
    
    .books-grid {
        grid-template-columns: 1fr;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
    }
    
    .book-detail-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .content-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .directory-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .search-box input,
    .filter-box select {
        min-width: 100%;
    }
    
    .purchase-links {
        justify-content: center;
    }
    
    .cookie-banner .container {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 28px;
    }
    
    .page-header h1 {
        font-size: 32px;
    }
    
    .book-card {
        padding: 20px;
    }
    
    .category-card.large {
        padding: 30px 20px;
    }
    
    .book-section {
        padding: 20px;
    }
    
    .contact-card,
    .sidebar-card {
        padding: 20px;
    }
}