* {
    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;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.nav-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.nav-brand a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #333;
}

.logo, .footer-logo {
    width: 40px;
    height: 40px;
    margin-right: 12px;
}

.brand-text, .footer-brand-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c5282;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

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

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

.nav-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    justify-content: space-around;
}

.nav-toggle span {
    width: 100%;
    height: 3px;
    background: #333;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 70vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.1;
    z-index: 1;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* 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: 2px solid transparent;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: #2c5282;
    color: white;
    border-color: #2c5282;
}

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

.btn-secondary {
    background: transparent;
    color: white;
    border-color: white;
}

.btn-secondary:hover {
    background: white;
    color: #2c5282;
}

.btn-outline {
    background: transparent;
    color: #2c5282;
    border-color: #2c5282;
}

.btn-outline:hover {
    background: #2c5282;
    color: white;
}

/* Sections */
.featured-books,
.categories-preview {
    padding: 4rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #2c5282;
}

.section-subtitle {
    font-size: 1.125rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

.section-footer {
    text-align: center;
    margin-top: 3rem;
}

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

.book-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e2e8f0;
}

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

.book-image {
    width: 80px;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.book-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #2c5282;
}

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

.book-category {
    display: inline-block;
    background: #e6fffa;
    color: #234e52;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.book-description {
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.book-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.875rem;
}

/* Categories Grid */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.category-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    border: 1px solid #e2e8f0;
    text-decoration: none;
    color: inherit;
}

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

.category-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.category-name {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #2c5282;
}

.category-count {
    color: #666;
    font-size: 0.875rem;
}

/* Book Directory */
.book-directory {
    padding: 2rem 0;
}

.directory-header {
    margin-bottom: 2rem;
}

.directory-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #2c5282;
}

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

.search-input,
.filter-select {
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-size: 1rem;
    flex: 1;
    min-width: 200px;
}

.search-input:focus,
.filter-select:focus {
    outline: none;
    border-color: #2c5282;
}

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

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

.book-detail-image {
    width: 200px;
    height: 300px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.book-detail-info h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: #2c5282;
}

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

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

.book-year {
    background: #f7fafc;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    color: #666;
}

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

.book-section h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #2c5282;
}

.book-section p,
.book-section ul {
    color: #666;
    line-height: 1.6;
}

.book-section ul {
    list-style: none;
    padding-left: 0;
}

.book-section li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.book-section li:before {
    content: "✓";
    color: #48bb78;
    font-weight: bold;
    margin-right: 0.5rem;
}

.external-links {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e2e8f0;
}

.external-links h3 {
    margin-bottom: 1rem;
}

.external-links-grid {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.external-link {
    display: inline-block;
    padding: 12px 24px;
    background: #f7fafc;
    color: #2c5282;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: background 0.3s ease;
}

.external-link:hover {
    background: #e2e8f0;
}

.disclaimer-note {
    background: #fff5f5;
    border: 1px solid #fed7d7;
    border-radius: 6px;
    padding: 1rem;
    margin: 2rem 0;
    color: #742a2a;
}

/* Pages */
.page-content {
    padding: 2rem 0;
}

.page-header {
    text-align: center;
    margin-bottom: 3rem;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #2c5282;
}

.page-subtitle {
    font-size: 1.125rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

.content-section {
    max-width: 800px;
    margin: 0 auto 3rem;
}

.content-section h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #2c5282;
}

.content-section h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #2c5282;
}

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

.content-section ul {
    margin-bottom: 1rem;
    padding-left: 2rem;
    color: #666;
}

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

/* Contact Form */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
}

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

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

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

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: #2c5282;
}

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

.contact-info {
    background: #f7fafc;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 3rem;
}

.contact-info h3 {
    margin-bottom: 1rem;
    color: #2c5282;
}

.contact-info p {
    margin-bottom: 0.5rem;
    color: #666;
}

.contact-info a {
    color: #2c5282;
    text-decoration: none;
}

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

/* Footer */
.footer {
    background: #2d3748;
    color: white;
    padding: 3rem 0 1rem;
}

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

.footer-section h3 {
    margin-bottom: 1rem;
    color: white;
}

.footer-title {
    font-size: 1.125rem;
    font-weight: 600;
}

.footer-description {
    color: #a0aec0;
    line-height: 1.6;
}

.footer-links {
    list-style: none;
}

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

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

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

.footer-contact p {
    margin-bottom: 0.5rem;
    color: #a0aec0;
}

.footer-contact a {
    color: #a0aec0;
    text-decoration: none;
}

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

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

.footer-brand {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #2d3748;
    color: white;
    padding: 1rem;
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

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

.cookie-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-shrink: 0;
}

.cookie-link {
    color: #a0aec0;
    text-decoration: none;
}

.cookie-link:hover {
    color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 2rem;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-toggle {
        display: flex;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .section-title {
        font-size: 2rem;
    }

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

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

    .book-detail-image {
        width: 150px;
        height: 225px;
        margin: 0 auto;
    }

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

    .search-filters {
        flex-direction: column;
    }

    .search-input,
    .filter-select {
        min-width: auto;
    }

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

    .external-links-grid {
        flex-direction: column;
    }
}

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

    .hero {
        min-height: 60vh;
        text-align: center;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .page-title {
        font-size: 2rem;
    }

    .book-card {
        padding: 1rem;
    }

    .category-card {
        padding: 1.5rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}