* {
    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 Notice */
.cookie-notice {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #333;
    color: white;
    z-index: 1000;
    padding: 15px 0;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.cookie-notice:not(.hidden) {
    transform: translateY(0);
}

.cookie-notice.hidden {
    display: none;
}

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

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

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

.nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

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

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

.nav-menu {
    display: flex;
    gap: 30px;
    align-items: center;
}

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

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

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    right: 0;
    height: 2px;
    background: #2563eb;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

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

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

.btn-primary {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}

.btn-primary:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
}

.btn-secondary {
    background: #64748b;
    color: white;
    border-color: #64748b;
}

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

.btn-outline {
    background: transparent;
    color: #2563eb;
    border-color: #2563eb;
}

.btn-outline:hover {
    background: #2563eb;
    color: white;
}

/* Hero Section */
.hero {
    padding: 80px 0;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    display: flex;
    align-items: center;
    min-height: 500px;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-content h1 {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
    color: #1e293b;
}

.hero-content p {
    font-size: 1.25rem;
    color: #64748b;
    margin-bottom: 30px;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.hero-image img {
    width: 100%;
    height: auto;
    border-radius: 12px;
}

/* Sections */
.featured-section,
.categories-preview {
    padding: 80px 0;
}

.featured-section h2,
.categories-preview h2 {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: #1e293b;
}

.section-subtitle {
    text-align: center;
    font-size: 1.125rem;
    color: #64748b;
    margin-bottom: 50px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.section-footer {
    text-align: center;
    margin-top: 50px;
}

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

.book-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
}

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

.book-image {
    padding: 20px;
    text-align: center;
    background: #f8fafc;
}

.book-image img {
    width: 160px;
    height: 220px;
    object-fit: cover;
    border-radius: 8px;
}

.book-info {
    padding: 20px;
}

.book-info h3 {
    margin-bottom: 8px;
    font-size: 1.25rem;
    font-weight: 700;
}

.book-info h3 a {
    text-decoration: none;
    color: #1e293b;
    transition: color 0.3s ease;
}

.book-info h3 a:hover {
    color: #2563eb;
}

.book-author {
    color: #64748b;
    font-weight: 600;
    margin-bottom: 8px;
}

.book-category {
    background: #dbeafe;
    color: #1e40af;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 12px;
}

.book-description {
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* Categories Grid */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    max-width: 1000px;
    margin: 0 auto;
}

.category-card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    text-decoration: none;
    color: #333;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    text-align: center;
}

.category-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
    color: #333;
}

.category-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: #1e293b;
}

.category-card p {
    color: #64748b;
    line-height: 1.5;
}

/* Search and Filter */
.search-filters {
    background: #f8fafc;
    padding: 30px 0;
    border-bottom: 1px solid #e2e8f0;
}

.search-form {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.search-input {
    flex: 1;
    min-width: 250px;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 16px;
    background: white;
}

.search-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

.filter-select {
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: white;
    font-size: 16px;
    min-width: 150px;
}

.filter-select:focus {
    outline: none;
    border-color: #2563eb;
}

.search-results {
    padding: 40px 0;
}

.search-results h2 {
    margin-bottom: 30px;
    font-size: 1.875rem;
    font-weight: 700;
    color: #1e293b;
}

/* Book Detail */
.book-detail {
    padding: 40px 0;
}

.book-detail-content {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 50px;
    align-items: start;
}

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

.book-detail-image img {
    width: 100%;
    max-width: 280px;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.book-detail-info h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 16px;
    color: #1e293b;
    line-height: 1.2;
}

.book-detail-meta {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 30px;
}

.book-author {
    font-size: 1.25rem;
    color: #64748b;
    font-weight: 600;
}

.book-year {
    color: #64748b;
}

.book-description {
    font-size: 1.125rem;
    line-height: 1.7;
    margin-bottom: 30px;
    color: #4b5563;
}

.book-section {
    margin-bottom: 30px;
}

.book-section h3 {
    font-size: 1.375rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: #1e293b;
}

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

.book-section li {
    padding: 8px 0;
    padding-left: 24px;
    position: relative;
    line-height: 1.6;
    color: #4b5563;
}

.book-section li::before {
    content: '•';
    color: #2563eb;
    font-weight: bold;
    position: absolute;
    left: 0;
}

.book-links {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.disclaimer-notice {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}

.disclaimer-notice p {
    color: #0369a1;
    font-weight: 600;
    margin: 0;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

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

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

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

/* Content Pages */
.content-page {
    padding: 40px 0;
}

.content-page .container {
    max-width: 800px;
}

.content-page h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    color: #1e293b;
}

.content-page h2 {
    font-size: 1.875rem;
    font-weight: 700;
    margin: 40px 0 20px;
    color: #1e293b;
}

.content-page h3 {
    font-size: 1.375rem;
    font-weight: 600;
    margin: 30px 0 15px;
    color: #374151;
}

.content-page p {
    margin-bottom: 20px;
    line-height: 1.7;
    color: #4b5563;
}

.content-page ul,
.content-page ol {
    margin-bottom: 20px;
    padding-left: 30px;
    color: #4b5563;
}

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

.contact-info {
    background: #f8fafc;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 40px;
}

.contact-info h3 {
    margin-top: 0;
    margin-bottom: 20px;
}

.contact-info p {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.contact-info strong {
    min-width: 80px;
    color: #374151;
}

/* Footer */
.footer {
    background: #1e293b;
    color: white;
    padding: 50px 0 20px;
    margin-top: 80px;
}

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

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    font-weight: 700;
    font-size: 1.125rem;
}

.footer-section h4 {
    margin-bottom: 20px;
    font-size: 1.125rem;
    font-weight: 700;
    color: white;
}

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

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

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

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

.footer-section p {
    color: #cbd5e1;
    line-height: 1.6;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        gap: 15px;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-toggle {
        display: flex;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }

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

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

    .book-detail-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .search-form {
        flex-direction: column;
        align-items: stretch;
    }

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

    .hero-actions {
        justify-content: center;
    }

    .book-links {
        justify-content: center;
    }

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

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

    .nav {
        padding: 0 15px;
    }

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

    .hero-content p {
        font-size: 1.125rem;
    }

    .book-detail-info h1 {
        font-size: 2rem;
    }

    .btn {
        padding: 10px 20px;
        font-size: 14px;
    }
}

/* RTL Support */
[dir="rtl"] {
    text-align: right;
}

[dir="rtl"] .nav-menu {
    flex-direction: row-reverse;
}

[dir="rtl"] .nav-logo {
    flex-direction: row-reverse;
}

[dir="rtl"] .hero-actions {
    justify-content: flex-end;
}

[dir="rtl"] .book-section li {
    padding-left: 0;
    padding-right: 24px;
}

[dir="rtl"] .book-section li::before {
    left: auto;
    right: 0;
}