/* ==========================================================================
   1. CORE VARIABLES & SHARED BRAND TOKENS
   ========================================================================== */
:root {
    --bg-dark-main: #0F1115;
    --color-ice-blue: #A8D8FF;
    --color-misty-slate: #B7C6D9;
    --color-soft-amber: #EBA16C;
    --color-golden-glow: #F5B97A;
    
    --font-serif: 'Cormorant Garamond', serif;
    --font-sans: 'Inter', sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 40px 0;
    background-color: var(--bg-dark-main);
    color: var(--color-misty-slate);
    font-family: var(--font-sans);
    font-size: 18px;
    line-height: 1.75;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.back-link {
    display: inline-block;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--color-misty-slate);
    text-decoration: none;
    margin-bottom: 2em;
    transition: color 0.3s ease, transform 0.3s ease;
}

.back-link:hover {
    color: var(--color-soft-amber);
    transform: translateX(-4px);
}

/* ==========================================================================
   2. BOOK PAGE CONTAINERS (Physical Page Illusion)
   ========================================================================== */
.book-container {
    max-width: 720px;
    margin: 40px auto;
    padding: 60px 50px;
    border-radius: 8px;
    position: relative;
    
    /* Paper light depth & subtle drop shadow */
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5), 
                0 0 1px rgba(255, 255, 255, 0.1);
    
    transition: background 0.4s ease, border-color 0.4s ease;
}

/* Page Spine Effect (subtle left gutter highlight) */
.book-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
    background: linear-gradient(180deg, rgba(235, 161, 108, 0.3), rgba(168, 216, 255, 0.1));
}

/* ==========================================================================
   3. TYPOGRAPHY & HEADINGS
   ========================================================================== */
h1 {
    font-family: var(--font-serif);
    font-size: 2.8rem;
    font-style: italic;
    font-weight: 400;
    line-height: 1.25;
    margin-bottom: 0.4em;
    letter-spacing: 0.5px;
}

h2 {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    font-style: italic;
    font-weight: 500;
    margin-top: 1.8em;
    margin-bottom: 0.6em;
}

h3 {
    font-family: var(--font-serif);
    font-size: 1.3rem;
    font-style: italic;
    opacity: 0.85;
}

p {
    margin-top: 0;
    margin-bottom: 1.5em;
    letter-spacing: 0.2px;
}

.scene-break {
    text-align: center;
    margin: 2.5em 0;
    font-size: 1.5em;
    letter-spacing: 0.4em;
    color: var(--color-soft-amber);
    opacity: 0.7;
}

/* ==========================================================================
   4. THEMES & SCHEMES (Paper Light Gradients + Accent Unification)
   ========================================================================== */

/* Theme 1: Love / Warm Papyrus */
.theme-love {
    background: linear-gradient(145deg, #fdfbf7 0%, #f4eee5 100%);
    color: #241f1c;
    border: 1px solid rgba(235, 161, 108, 0.2);
}
.theme-love h1, .theme-love h2 {
    color: #8a3343;
}

/* Theme 2: Detective / Cold Vellum */
.theme-detective {
    background: linear-gradient(145deg, #f5f7fa 0%, #e4e8ee 100%);
    color: #1a1e24;
    border: 1px solid rgba(168, 216, 255, 0.3);
}
.theme-detective h1, .theme-detective h2 {
    color: #1f3144;
}

/* Theme 3: Career / Crisp Paper */
.theme-career {
    background: linear-gradient(145deg, #ffffff 0%, #f1f3f5 100%);
    color: #111111;
    border: 1px solid rgba(183, 198, 217, 0.3);
}
.theme-career h1, .theme-career h2 {
    color: #114278;
}

/* ==========================================================================
   5. READING & INTERACTIVE COMPONENTS
   ========================================================================== */

/* Reading Time Header */
.reading-time {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--color-soft-amber);
    background: rgba(235, 161, 108, 0.1);
    border: 1px solid rgba(235, 161, 108, 0.3);
    padding: 6px 14px;
    border-radius: 20px;
    margin-bottom: 2em;
}

/* CSS Tooltips */
.tooltip {
    position: relative;
    border-bottom: 1px dashed var(--color-soft-amber);
    cursor: help;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 130%;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--bg-dark-main);
    color: var(--color-misty-slate);
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-family: var(--font-sans);
    line-height: 1.4;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25 ease, transform 0.25s ease;
    z-index: 10;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
    border: 1px solid rgba(235, 161, 108, 0.3);
}

.tooltip:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-4px);
}

/* Page Navigation (Previous / Next) */
.page-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 3.5em 0 1.5em 0;
    padding-top: 2em;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.page-nav-link {
    display: inline-block;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: inherit;
    text-decoration: none;
    opacity: 0.8;
    transition: color 0.3s ease, transform 0.3s ease, opacity 0.3s ease;
}

.page-nav-link:hover {
    color: var(--color-soft-amber);
    opacity: 1;
}

.page-nav-link.prev:hover {
    transform: translateX(-4px);
}

.page-nav-link.next:hover {
    transform: translateX(4px);
}
/* Author Profile Section */
.author-profile {
    margin-top: 4em;
    padding-top: 2em;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    gap: 20px;
    align-items: center;
    font-size: 0.9em;
}

.author-avatar {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background-color: var(--color-misty-slate);
    border: 2px solid var(--color-soft-amber);
    flex-shrink: 0;
}

.author-info h4 {
    margin: 0 0 0.4em 0;
    font-size: 1.1em;
    font-family: var(--font-serif);
}

.author-info p {
    margin: 0;
    opacity: 0.8;
    line-height: 1.5;
}

/* Accordion / Cross Topics */
.cross-topics {
    margin-top: 3em;
}

.topic-accordion {
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    margin-bottom: 12px;
    background: rgba(255, 255, 255, 0.4);
}

.topic-accordion summary {
    padding: 14px 18px;
    font-weight: 600;
    cursor: pointer;
    outline: none;
}

.topic-accordion[open] summary {
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.topic-content {
    padding: 16px 18px;
}

.related-book-item {
    margin-bottom: 12px;
}

.related-book-item:last-child {
    margin-bottom: 0;
}

.related-book-item a {
    font-weight: 600;
    color: inherit;
    text-decoration: none;
}

.related-book-item a:hover {
    color: var(--color-soft-amber);
}

.related-book-item p {
    margin: 4px 0 0 0;
    font-size: 0.85em;
    opacity: 0.75;
}

/* ========================================================
   6. FOOTER INTERFACE
   ======================================================== */
footer {
    padding: 60px 20px;
    text-align: center;
    border-top: 1px solid rgba(168, 216, 255, 0.05);
}

.footer-social {
    margin-bottom: 20px;
}

.tiktok-link {
    display: inline-block;
    width: 24px;
    transition: transform 0.3s ease;
}

.tiktok-icon {
    fill: var(--color-misty-slate);
    transition: fill 0.3s ease;
}

.tiktok-link:hover .tiktok-icon {
    fill: var(--color-soft-amber);
}

.tiktok-link:hover {
    transform: translateY(-3px);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 20px;
}

.footer-links a {
    font-size: 0.8rem;
    color: var(--color-misty-slate);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    transition: color 0.4s ease, text-shadow 0.4s ease;
}

.footer-links a:hover {
    color: var(--color-soft-amber);
    text-shadow: 0 0 10px rgba(235, 161, 108, 0.4), 
                 0 0 20px rgba(235, 161, 108, 0.2);
}

/* ========================================================
   7. RESPONSIVE ADJUSTMENTS
   ======================================================== */
@media (max-width: 768px) {
    body {
        padding: 20px 10px;
    }

    .book-container {
        padding: 35px 22px;
        margin: 20px auto;
    }

    h1 {
        font-size: 2.1rem;
    }

    .next-page-nav {
        text-align: center;
    }
}

/* ==========================================================================
   Story Disclaimer Style
   ========================================================================== */
.story-disclaimer {
    font-family: var(--font-sans);
    font-size: 0.8rem;
    line-height: 1.5;
    letter-spacing: 0.3px;
    opacity: 0.6;
    font-style: italic;
    border-left: 2px solid rgba(0, 0, 0, 0.15);
    padding-left: 14px;
    margin-top: 1.5em;
    margin-bottom: 2.5em;
}

/* ==========================================================================
   Chapter Page Style
   ========================================================================== */

           .chapter-header {
            text-align: center;
            margin: 2rem 0 3rem;
        }
        .chapter-badge {
            font-size: 0.85rem;
            text-transform: uppercase;
            letter-spacing: 2px;
            color: var(--color-ice-blue, #A8D8FF);
            margin-bottom: 0.5rem;
            display: block;
        }
        .chapter-title {
            font-family: 'Cormorant Garamond', serif;
            font-size: 2.5rem;
            color: #ffffff;
            margin: 0.5rem 0 1rem;
        }
        .chapter-synopsis {
            font-size: 1.05rem;
            line-height: 1.7;
            color: var(--color-misty-slate, #B7C6D9);
            max-width: 620px;
            margin: 0 auto 2rem;
        }
        .start-reading-btn {
            display: inline-block;
            background-color: var(--color-soft-amber, #EBA16C);
            color: #0F1115;
            font-weight: 600;
            padding: 14px 28px;
            border-radius: 4px;
            text-decoration: none;
            text-transform: uppercase;
            letter-spacing: 1px;
            transition: all 0.3s ease;
        }
        .start-reading-btn:hover {
            background-color: var(--color-golden-glow, #F5B97A);
            transform: translateY(-2px);
            box-shadow: 0 4px 15px rgba(235, 161, 108, 0.3);
        }
        .stories-grid {
            display: flex;
            flex-direction: column;
            gap: 2.5rem;
            margin-top: 3.5rem;
        }
        .story-card {
            display: flex;
            flex-direction: column;
            background: rgba(255, 255, 255, 0.03);
            border: 1px solid rgba(168, 216, 255, 0.1);
            border-radius: 8px;
            overflow: hidden;
            transition: transform 0.3s ease, border-color 0.3s ease;
        }
        .story-card:hover {
            transform: translateY(-4px);
            border-color: rgba(235, 161, 108, 0.4);
        }
        .story-image {
            width: 100%;
            height: 220px;
            object-fit: cover;
            background-color: #1a1e26;
        }
        .story-content {
            padding: 1.5rem;
            display: flex;
            flex-direction: column;
            flex-grow: 1;
        }
        .story-meta {
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-size: 0.8rem;
            color: var(--color-ice-blue, #A8D8FF);
            margin-bottom: 0.5rem;
        }
        .story-card-title {
            font-family: 'Cormorant Garamond', serif;
            font-size: 1.6rem;
            margin: 0.3rem 0 0.8rem;
            color: #ffffff;
        }
        .story-card-desc {
            font-size: 0.95rem;
            line-height: 1.6;
            color: var(--color-misty-slate, #B7C6D9);
            margin-bottom: 1.5rem;
            flex-grow: 1;
        }
        .story-link {
            align-self: flex-start;
            color: var(--color-soft-amber, #EBA16C);
            text-decoration: none;
            font-weight: 600;
            font-size: 0.9rem;
            letter-spacing: 0.5px;
            transition: color 0.3s ease;
        }
        .story-link:hover {
            color: var(--color-golden-glow, #F5B97A);
        }
        @media (min-width: 600px) {
            .story-card {
                flex-direction: row;
            }
            .story-image {
                width: 40%;
                height: auto;
            }
            .story-content {
                width: 60%;
            }
        }
