:root {
    --bg-primary: #0a0a0c;
    --bg-secondary: #12121a;
    --bg-tertiary: #1a1a24;
    --text-primary: #e8e4dc;
    --text-secondary: #9a9590;
    --text-muted: #5a5550;
    --accent-gold: #c9a959;
    --accent-gold-light: #e8d4a0;
    --accent-red: #8b3a3a;
    --accent-red-dark: #5a2828;
    --border-color: #2a2a35;
    --shadow-color: rgba(0, 0, 0, 0.5);
    --font-display: 'Cinzel', serif;
    --font-body: 'Crimson Text', serif;
    --font-heading: 'Playfair Display', serif;
    --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.8;
    font-size: 18px;
    overflow-x: hidden;
    min-height: 100vh;
}

.fog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9998;
    opacity: 0.03;
    background: 
        radial-gradient(ellipse at 20% 80%, rgba(201, 169, 89, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(139, 58, 58, 0.08) 0%, transparent 50%);
}

.grain-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.04;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%' height='100%' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* Ad Containers */
.ad-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 20px;
    position: relative;
    z-index: 10;
}

.ad-placeholder {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    height: 90px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    transition: var(--transition-smooth);
}

.ad-placeholder::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-gold), transparent);
    opacity: 0.5;
}

.ad-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
    position: absolute;
    top: 8px;
    left: 12px;
}

.ad-content {
    font-size: 14px;
    color: var(--text-muted);
    font-style: italic;
}

/* Header */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: linear-gradient(180deg, var(--bg-primary) 0%, rgba(10, 10, 12, 0.95) 100%);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition-smooth);
}

.main-header.scrolled {
    background: rgba(10, 10, 12, 0.98);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-primary);
}

.logo-icon {
    font-size: 24px;
    color: var(--accent-gold);
    animation: flicker 3s infinite;
}

@keyframes flicker {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
    52% { opacity: 1; }
    54% { opacity: 0.8; }
}

.logo-text {
    font-family: var(--font-display);
    font-size: 1.1rem;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 3rem;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    position: relative;
    transition: var(--transition-smooth);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent-gold);
    transition: var(--transition-smooth);
}

.nav-links a:hover {
    color: var(--accent-gold);
}

.nav-links a:hover::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: var(--transition-smooth);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 120px 20px 80px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 30% 20%, rgba(201, 169, 89, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 80%, rgba(139, 58, 58, 0.1) 0%, transparent 50%),
        linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    z-index: -1;
}

.hero-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        repeating-linear-gradient(0deg, transparent, transparent 100px, rgba(201, 169, 89, 0.02) 100px, rgba(201, 169, 89, 0.02) 101px),
        repeating-linear-gradient(90deg, transparent, transparent 100px, rgba(201, 169, 89, 0.02) 100px, rgba(201, 169, 89, 0.02) 101px);
}

.hero-content {
    max-width: 1200px;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.book-cover {
    perspective: 1000px;
}

.cover-inner {
    background: linear-gradient(145deg, var(--bg-tertiary) 0%, var(--bg-secondary) 50%, var(--bg-tertiary) 100%);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 60px 40px;
    text-align: center;
    position: relative;
    transform: rotateY(-15deg) rotateX(5deg);
    transition: var(--transition-smooth);
    box-shadow: 
        -20px 20px 40px rgba(0, 0, 0, 0.5),
        0 0 60px rgba(201, 169, 89, 0.1);
}

.book-cover:hover .cover-inner {
    transform: rotateY(0deg) rotateX(0deg);
}

.cover-inner::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    border: 1px solid var(--accent-gold);
    border-radius: 2px;
    opacity: 0.3;
}

.cover-symbol {
    font-size: 60px;
    color: var(--accent-gold);
    margin-bottom: 30px;
    opacity: 0.8;
}

.cover-title {
    font-family: var(--font-display);
    font-size: 1.8rem;
    letter-spacing: 4px;
    color: var(--accent-gold-light);
    line-height: 1.4;
    margin-bottom: 20px;
}

.cover-author {
    font-size: 1rem;
    color: var(--text-secondary);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.hero-text {
    text-align: left;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 4rem;
    font-weight: 500;
    line-height: 1.1;
    margin-bottom: 24px;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-gold-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
}

.tag {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    border-radius: 2px;
    color: var(--text-secondary);
    transition: var(--transition-smooth);
}

.tag:hover {
    border-color: var(--accent-gold);
    color: var(--accent-gold);
}

.hero-meta .author,
.hero-meta .chapter-count {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-right: 24px;
}

.hero-meta strong {
    color: var(--accent-gold-light);
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: var(--text-muted);
    font-size: 0.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    animation: float 2s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(10px); }
}

.scroll-arrow {
    width: 20px;
    height: 20px;
    border-right: 2px solid var(--text-muted);
    border-bottom: 2px solid var(--text-muted);
    transform: rotate(45deg);
}

/* Section Styles */
.section-divider {
    text-align: center;
    margin: 60px 0 40px;
}

.divider-symbol {
    font-size: 24px;
    color: var(--accent-gold);
    opacity: 0.6;
}

.section-title {
    font-family: var(--font-display);
    font-size: 2rem;
    text-align: center;
    letter-spacing: 6px;
    text-transform: uppercase;
    color: var(--accent-gold-light);
    margin-bottom: 48px;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -16px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 1px;
    background: var(--accent-gold);
}

/* Introduction Section */
.intro-section {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px 80px;
}

.intro-content {
    font-size: 1.2rem;
    line-height: 2;
    color: var(--text-secondary);
}

.intro-content p {
    margin-bottom: 24px;
    text-indent: 2em;
}

.intro-content .highlight-text {
    font-style: italic;
    color: var(--accent-gold-light);
    border-left: 3px solid var(--accent-gold);
    padding-left: 24px;
    margin: 40px 0;
    text-indent: 0;
}

.cta-container {
    text-align: center;
    margin-top: 60px;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    padding: 18px 48px;
    background: linear-gradient(135deg, var(--accent-red-dark) 0%, var(--accent-red) 100%);
    border: 1px solid var(--accent-red);
    color: var(--text-primary);
    text-decoration: none;
    font-family: var(--font-display);
    font-size: 1rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
    transition: var(--transition-smooth);
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: var(--transition-smooth);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(139, 58, 58, 0.3);
}

.cta-button:hover::before {
    left: 100%;
}

.cta-icon {
    font-size: 1.2rem;
    transition: var(--transition-smooth);
}

.cta-button:hover .cta-icon {
    transform: translateX(4px);
}

/* Chapters Section */
.chapters-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px 80px;
}

.chapters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.chapter-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 32px;
    position: relative;
    transition: var(--transition-smooth);
    cursor: pointer;
    overflow: hidden;
}

.chapter-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: var(--accent-gold);
    transform: scaleY(0);
    transition: var(--transition-smooth);
}

.chapter-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-gold);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.chapter-card:hover::before {
    transform: scaleY(1);
}

.chapter-number {
    font-family: var(--font-display);
    font-size: 0.8rem;
    letter-spacing: 3px;
    color: var(--accent-gold);
    margin-bottom: 12px;
}

.chapter-name {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.chapter-preview {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.chapter-arrow {
    position: absolute;
    bottom: 24px;
    right: 24px;
    color: var(--accent-gold);
    opacity: 0;
    transform: translateX(-10px);
    transition: var(--transition-smooth);
}

.chapter-card:hover .chapter-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* Footer */
.main-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 60px 20px 40px;
    margin-top: 80px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

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

.link-group h4 {
    font-family: var(--font-display);
    font-size: 0.9rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--accent-gold);
    margin-bottom: 20px;
}

.link-group a {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    margin-bottom: 12px;
    transition: var(--transition-smooth);
}

.link-group a:hover {
    color: var(--accent-gold-light);
    transform: translateX(4px);
}

.share-section {
    text-align: center;
    margin-bottom: 48px;
    padding: 40px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.share-section h4 {
    font-family: var(--font-display);
    font-size: 0.9rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.share-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.share-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition-smooth);
    cursor: pointer;
}

.share-btn svg {
    width: 18px;
    height: 18px;
}

.share-btn:hover {
    border-color: var(--accent-gold);
    color: var(--accent-gold);
    transform: translateY(-2px);
}

.share-btn.facebook:hover {
    border-color: #1877f2;
    color: #1877f2;
}

.share-btn.twitter:hover {
    border-color: #1da1f2;
    color: #1da1f2;
}

.footer-bottom {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.footer-bottom p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Mobile Responsive */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 60px;
        text-align: center;
    }

    .hero-text {
        text-align: center;
    }

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

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

    .cover-inner {
        transform: rotateY(0deg);
        max-width: 320px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-secondary);
        flex-direction: column;
        padding: 20px;
        gap: 20px;
        border-bottom: 1px solid var(--border-color);
    }

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

    .menu-toggle {
        display: flex;
    }

    .hero {
        padding: 100px 20px 60px;
    }

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

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

    .intro-content {
        font-size: 1.05rem;
    }

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

    .ad-placeholder {
        height: 60px;
    }

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

    .share-buttons {
        flex-direction: column;
        align-items: center;
    }

    .share-btn {
        width: 100%;
        max-width: 250px;
        justify-content: center;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chapter-card {
    animation: fadeInUp 0.6s ease-out backwards;
}

.chapters-grid .chapter-card:nth-child(1) { animation-delay: 0.1s; }
.chapters-grid .chapter-card:nth-child(2) { animation-delay: 0.2s; }
.chapters-grid .chapter-card:nth-child(3) { animation-delay: 0.3s; }
.chapters-grid .chapter-card:nth-child(4) { animation-delay: 0.4s; }
.chapters-grid .chapter-card:nth-child(5) { animation-delay: 0.5s; }
.chapters-grid .chapter-card:nth-child(6) { animation-delay: 0.6s; }
.chapters-grid .chapter-card:nth-child(7) { animation-delay: 0.7s; }
