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

:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --text-color: #333;
    --text-light: #666;
    --text-lighter: #999;
    --border-color: #e1e8ed;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --shadow-light: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-medium: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-heavy: 0 8px 25px rgba(0,0,0,0.15);
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-white);
}

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

/* Header */
.header {
    background: var(--bg-white);
    box-shadow: var(--shadow-light);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

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

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

.brand-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
}

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

.nav-link {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: var(--transition);
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
}

.nav-link:hover,
.nav-link.active {
    color: var(--secondary-color);
    border-bottom-color: var(--secondary-color);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-color);
    margin: 3px 0;
    transition: var(--transition);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    opacity: 0.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: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

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

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
    font-size: 1rem;
}

.btn-primary {
    background: var(--secondary-color);
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.btn-secondary {
    background: var(--text-light);
    color: white;
}

.btn-secondary:hover {
    background: var(--text-color);
}

.btn-outline {
    background: transparent;
    color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.btn-outline:hover {
    background: var(--secondary-color);
    color: white;
}

/* Sections */
.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--primary-color);
}

.page-header {
    background: var(--bg-light);
    padding: 3rem 0;
    text-align: center;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.page-subtitle {
    font-size: 1.25rem;
    color: var(--text-light);
}

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

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

.book-card {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    overflow: hidden;
    transition: var(--transition);
}

.book-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-heavy);
}

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

.book-content {
    padding: 1.5rem;
}

.book-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.book-author {
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.book-category {
    display: inline-block;
    background: var(--bg-light);
    color: var(--text-color);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.book-description {
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.5;
}

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

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Categories */
.categories-preview {
    background: var(--bg-light);
    padding: 4rem 0;
}

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

.category-card {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
}

.category-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-medium);
}

.category-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.category-count {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.category-link {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
}

.category-link:hover {
    text-decoration: underline;
}

/* Books Directory */
.books-directory {
    padding: 2rem 0 4rem;
}

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

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

.search-input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
}

.search-input:focus {
    outline: none;
    border-color: var(--secondary-color);
}

.category-filter {
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    background: var(--bg-white);
}

.no-results {
    text-align: center;
    padding: 3rem 0;
    color: var(--text-light);
}

/* 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: 400px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
}

.book-detail-info h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.book-detail-author {
    font-size: 1.25rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

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

.meta-item {
    background: var(--bg-light);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    font-size: 0.875rem;
}

.book-description-long {
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 2rem;
}

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

.disclaimer-notice {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--secondary-color);
    margin-bottom: 2rem;
}

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

.book-section {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
}

.book-section h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

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

.book-section li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
    position: relative;
    padding-left: 1.5rem;
}

.book-section li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--secondary-color);
    font-weight: bold;
}

.book-section li:last-child {
    border-bottom: none;
}

.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;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Categories Page */
.categories-page {
    padding: 2rem 0 4rem;
}

.categories-detailed {
    display: grid;
    gap: 2rem;
}

.category-detailed {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
}

.category-detailed h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.75rem;
}

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

.category-book {
    background: var(--bg-light);
    padding: 1rem;
    border-radius: var(--border-radius);
    text-align: center;
}

.category-book-title {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.category-book-author {
    color: var(--text-light);
    font-size: 0.75rem;
}

/* Content Pages */
.content-grid {
    display: grid;
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.content-section {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
}

.content-section h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.75rem;
}

.feature-list {
    list-style: none;
    padding: 0;
}

.feature-list li {
    padding: 0.5rem 0;
    position: relative;
    padding-left: 1.5rem;
}

.feature-list li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--secondary-color);
    font-weight: bold;
}

/* Contact Page */
.contact-content {
    padding: 2rem 0 4rem;
}

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

.contact-info h2,
.contact-form-section h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.75rem;
}

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

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

.contact-item h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.contact-item a {
    color: var(--secondary-color);
    text-decoration: none;
}

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

.contact-form {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-color);
}

.form-input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-family: inherit;
}

.form-input:focus {
    outline: none;
    border-color: var(--secondary-color);
}

.form-message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: var(--border-radius);
    font-weight: 500;
}

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

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

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

.legal-text {
    max-width: 800px;
    margin: 0 auto;
    background: var(--bg-white);
    padding: 3rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
}

.legal-text h2 {
    color: var(--primary-color);
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

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

.legal-text h3 {
    color: var(--primary-color);
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.legal-text ul {
    margin: 1rem 0;
    padding-left: 2rem;
}

.legal-text li {
    margin-bottom: 0.5rem;
}

/* Footer */
.footer {
    background: var(--primary-color);
    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 h3 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.footer-desc {
    opacity: 0.8;
    line-height: 1.6;
}

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

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

.footer-links a {
    color: white;
    text-decoration: none;
    opacity: 0.8;
    transition: var(--transition);
}

.footer-links a:hover {
    opacity: 1;
    text-decoration: underline;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.2);
    padding-top: 1rem;
    text-align: center;
    opacity: 0.8;
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--primary-color);
    color: white;
    padding: 1rem;
    z-index: 10000;
    box-shadow: var(--shadow-heavy);
}

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

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

/* Utility Classes */
.hidden {
    display: none !important;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .books-grid {
        grid-template-columns: 1fr;
    }
    
    .book-detail-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .directory-controls {
        flex-direction: column;
    }
    
    .external-links {
        flex-direction: column;
    }
    
    .book-sections {
        grid-template-columns: 1fr;
    }
    
    .cookie-content {
        flex-direction: column;
        text-align: center;
    }
    
    .legal-text {
        padding: 2rem 1rem;
    }
    
    .container {
        padding: 0 15px;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 2rem 0;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .book-actions {
        flex-direction: column;
    }
    
    .meta-item {
        font-size: 0.75rem;
    }
}