/* Reset and Base Styles */
* {
    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;
}

/* Header */
.header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #333;
    font-weight: 700;
    font-size: 1.2rem;
}

.logo img {
    margin-right: 0.5rem;
}

.nav {
    display: flex;
    gap: 2rem;
}

.nav a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s;
}

.nav a:hover {
    color: #007acc;
}

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

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

.cookie-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.cookie-accept {
    background: #007acc;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 4rem 0;
    text-align: center;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #333;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: #666;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-button {
    display: inline-block;
    background: #007acc;
    color: white;
    padding: 1rem 2rem;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: background 0.3s;
}

.cta-button:hover {
    background: #005a99;
}

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

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #333;
}

.page-header p {
    font-size: 1.1rem;
    color: #666;
}

/* Book Grid */
.book-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

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

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

.book-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.book-info {
    padding: 1.5rem;
}

.book-info h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: #333;
}

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

.book-category {
    display: inline-block;
    background: #e9ecef;
    color: #495057;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    margin-bottom: 1rem;
}

.book-desc {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Featured Books Section */
.featured-books {
    padding: 4rem 0;
}

.featured-books h2 {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 3rem;
    color: #333;
}

/* Categories */
.categories-preview {
    background: #f8f9fa;
    padding: 4rem 0;
}

.categories-preview h2 {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 3rem;
    color: #333;
}

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

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

.category-card:hover {
    transform: translateY(-2px);
}

.category-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: #007acc;
}

.category-card p {
    color: #666;
}

/* Directory Controls */
.directory-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.search-box {
    flex: 1;
    min-width: 250px;
}

.search-box input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 1rem;
}

.filter-box select {
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 1rem;
    background: white;
}

/* Book Detail */
.book-detail {
    padding: 2rem 0;
}

.book-detail-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.book-detail-image {
    width: 100%;
    max-width: 300px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.book-detail-info h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #333;
}

.book-detail-author {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 1rem;
}

.book-detail-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.meta-item {
    background: #f8f9fa;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
}

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

.book-link {
    display: inline-block;
    background: #007acc;
    color: white;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: background 0.3s;
}

.book-link:hover {
    background: #005a99;
}

.book-sections {
    display: grid;
    gap: 2rem;
}

.book-section h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #333;
    border-bottom: 2px solid #007acc;
    padding-bottom: 0.5rem;
}

.book-section p, .book-section li {
    line-height: 1.6;
    color: #555;
}

.book-section ul {
    margin-left: 1.5rem;
}

.book-section li {
    margin-bottom: 0.5rem;
}

.third-party-note {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 6px;
    padding: 1rem;
    margin: 2rem 0;
    color: #856404;
}

/* Categories Section */
.categories-section {
    padding: 2rem 0;
}

.category-list {
    display: grid;
    gap: 3rem;
}

.category-item {
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 2rem;
}

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

.category-item h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: #007acc;
}

.category-books {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.category-books .book-card {
    font-size: 0.9rem;
}

.view-all {
    display: inline-block;
    color: #007acc;
    text-decoration: none;
    font-weight: 500;
    border: 2px solid #007acc;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.3s;
}

.view-all:hover {
    background: #007acc;
    color: white;
}

/* Contact Form */
.contact-section {
    padding: 2rem 0;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.contact-info h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: #333;
}

.contact-details {
    margin-top: 2rem;
}

.contact-item {
    margin-bottom: 1.5rem;
}

.contact-item h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: #007acc;
}

.contact-form {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 8px;
}

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

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
}

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

.submit-button {
    background: #007acc;
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.submit-button:hover {
    background: #005a99;
}

.form-message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 6px;
}

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

/* Legal Content */
.legal-content {
    padding: 2rem 0;
}

.content-section {
    margin-bottom: 2.5rem;
}

.content-section h2 {
    font-size: 1.6rem;
    margin-bottom: 1rem;
    color: #333;
    border-bottom: 2px solid #007acc;
    padding-bottom: 0.5rem;
}

.content-section h3 {
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
    color: #007acc;
}

.content-section p {
    margin-bottom: 1rem;
    line-height: 1.6;
    color: #555;
}

.content-section ul {
    margin: 1rem 0 1rem 1.5rem;
}

.content-section li {
    margin-bottom: 0.5rem;
    line-height: 1.5;
    color: #555;
}

.content-section a {
    color: #007acc;
    text-decoration: none;
}

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

/* Footer */
.footer {
    background: #333;
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

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

.footer-section h4 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: #007acc;
}

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

.footer-section ul li {
    margin-bottom: 0.5rem;
}

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

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

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

/* Utility Classes */
.no-results {
    text-align: center;
    padding: 3rem;
    color: #666;
}

.book-not-found {
    padding: 4rem 0;
}

.not-found-content {
    text-align: center;
    max-width: 500px;
    margin: 0 auto;
}

.not-found-content h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #333;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }

    .nav {
        gap: 1rem;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .book-detail-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .directory-controls {
        flex-direction: column;
    }

    .cookie-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .category-overview {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .hero-content h1 {
        font-size: 1.8rem;
    }

    .page-header h1 {
        font-size: 2rem;
    }

    .book-grid {
        grid-template-columns: 1fr;
    }

    .category-grid {
        grid-template-columns: 1fr;
    }
}