/* ===== CSS Variables & Reset ===== */
:root {
    /* Light theme */
    --bg-primary: #FBF8F3;
    --bg-secondary: #F3EDE4;
    --bg-sidebar: #141015;
    --bg-sidebar-hover: #1E1820;
    --bg-sidebar-active: #2D2530;
    --bg-card: #FFFFFF;
    --bg-card-alt: rgba(255, 255, 255, 0.7);
    --text-primary: #2A2018;
    --text-secondary: #7A6E60;
    --text-muted: #A89880;
    --text-sidebar: #B8A898;
    --text-sidebar-active: #F5E8D8;
    --accent: #C49A2A;
    --accent-dark: #9A7820;
    --accent-light: #E0B840;
    --accent-glow: rgba(196, 154, 42, 0.15);
    --accent-soft: rgba(196, 154, 42, 0.08);
    --accent-border: rgba(196, 154, 42, 0.18);
    --border: rgba(44, 32, 24, 0.06);
    --border-strong: rgba(44, 32, 24, 0.12);
    --shadow-sm: 0 1px 4px rgba(28, 22, 18, 0.04), 0 0 1px rgba(28, 22, 18, 0.06);
    --shadow-md: 0 4px 20px rgba(28, 22, 18, 0.06), 0 1px 3px rgba(28, 22, 18, 0.04);
    --shadow-lg: 0 12px 48px rgba(28, 22, 18, 0.1), 0 2px 8px rgba(28, 22, 18, 0.04);
    --shadow-glow: 0 0 40px rgba(196, 154, 42, 0.12);
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 24px;
    --radius-xl: 40px;
    --sidebar-width: 300px;
    --font-serif: 'EB Garamond', Georgia, 'Times New Roman', serif;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    --glass-bg: rgba(255, 255, 255, 0.6);
    --glass-border: rgba(255, 255, 255, 0.4);
    --glass-blur: blur(16px);
}

/* Dark Mode */
[data-theme="dark"] {
    --bg-primary: #0F0D12;
    --bg-secondary: #171419;
    --bg-sidebar: #0A0810;
    --bg-sidebar-hover: #151220;
    --bg-sidebar-active: #201A30;
    --bg-card: #1A1720;
    --bg-card-alt: rgba(26, 23, 32, 0.8);
    --text-primary: #E8E0D8;
    --text-secondary: #9890A0;
    --text-muted: #685E70;
    --text-sidebar: #8878A0;
    --text-sidebar-active: #E8D8F0;
    --accent: #DAA520;
    --accent-dark: #C49A2A;
    --accent-light: #F0C848;
    --accent-glow: rgba(218, 165, 32, 0.12);
    --accent-soft: rgba(218, 165, 32, 0.06);
    --accent-border: rgba(218, 165, 32, 0.15);
    --border: rgba(255, 255, 255, 0.04);
    --border-strong: rgba(255, 255, 255, 0.08);
    --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 12px 48px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 60px rgba(218, 165, 32, 0.08);
    --glass-bg: rgba(20, 16, 25, 0.7);
    --glass-border: rgba(255, 255, 255, 0.06);
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    min-height: 100vh;
    transition: background var(--transition-slow), color var(--transition-slow);
}

/* Subtle background texture */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 50%, var(--accent-glow) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(196, 154, 42, 0.04) 0%, transparent 40%),
        radial-gradient(ellipse at 50% 80%, rgba(196, 154, 42, 0.03) 0%, transparent 40%);
    pointer-events: none;
    z-index: 0;
}

/* ===== Sidebar ===== */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: transform var(--transition);
    overflow: hidden;
    border-right: 1px solid rgba(255, 255, 255, 0.03);
}

/* Sidebar gradient overlay */
.sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(180deg, rgba(196, 154, 42, 0.06) 0%, transparent 100%);
    pointer-events: none;
    z-index: 0;
}

.sidebar>* {
    position: relative;
    z-index: 1;
}

.sidebar-header {
    padding: 32px 24px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.logo {
    font-family: var(--font-serif);
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--accent-light);
    letter-spacing: -0.01em;
}

.logo-sub {
    font-size: 0.65rem;
    color: rgba(196, 154, 42, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-top: 4px;
}

/* Theme Toggle */
.theme-toggle {
    position: absolute;
    top: 32px;
    right: 20px;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all var(--transition);
    color: var(--text-sidebar);
    z-index: 10;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--accent-light);
    transform: rotate(20deg);
}

.sidebar-search {
    padding: 12px 16px;
}

.sidebar-search input {
    width: 100%;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-sm);
    color: var(--text-sidebar-active);
    font-family: var(--font-sans);
    font-size: 0.82rem;
    outline: none;
    transition: all var(--transition);
}

.sidebar-search input::placeholder {
    color: rgba(196, 184, 168, 0.35);
}

.sidebar-search input:focus {
    border-color: var(--accent-dark);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 20px rgba(196, 154, 42, 0.08);
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.08) transparent;
}

.testament-title {
    font-family: var(--font-sans);
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--accent);
    padding: 20px 24px 8px;
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color var(--transition);
}

.testament-title:hover {
    color: var(--accent-light);
}

.testament-title::before {
    content: '\25BE';
    font-size: 0.65rem;
    transition: transform var(--transition);
    opacity: 0.6;
}

.testament-title.collapsed::before {
    transform: rotate(-90deg);
}

.book-list {
    list-style: none;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.book-list.collapsed {
    max-height: 0 !important;
}

.book-item {
    display: flex;
    align-items: center;
    gap: 0;
}

.book-item a {
    flex: 1;
    display: block;
    padding: 8px 24px 8px 28px;
    color: var(--text-sidebar);
    text-decoration: none;
    font-size: 0.84rem;
    font-weight: 400;
    transition: all var(--transition);
    cursor: pointer;
    border-left: 2px solid transparent;
    position: relative;
}

.book-item a:hover {
    background: var(--bg-sidebar-hover);
    color: var(--text-sidebar-active);
    padding-left: 32px;
}

.book-item a.active {
    background: var(--bg-sidebar-active);
    color: var(--accent-light);
    border-left-color: var(--accent);
    font-weight: 500;
}

.book-item a.active::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background: var(--accent);
    border-radius: 2px 0 0 2px;
    opacity: 0.5;
}

.book-item .read-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent-light);
    margin-right: 18px;
    flex-shrink: 0;
    opacity: 0;
    transition: opacity var(--transition);
    box-shadow: 0 0 8px rgba(196, 154, 42, 0.4);
}

.book-item .read-dot.visible {
    opacity: 1;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    background: rgba(0, 0, 0, 0.15);
}


.progress-info {
    font-size: 0.7rem;
    color: var(--text-sidebar);
    letter-spacing: 0.02em;
    margin-bottom: 8px;
}

.disclaimer {
    font-size: 0.6rem;
    color: rgba(196, 184, 168, 0.4);
    line-height: 1.5;
    margin-top: 16px;
    font-style: italic;
}

.copyright {
    font-size: 0.6rem;
    color: rgba(196, 184, 168, 0.25);
    margin-top: 12px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.progress-bar {
    height: 2px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 2px;
    margin-top: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-dark), var(--accent-light));
    border-radius: 2px;
    width: 0%;
    transition: width 0.8s ease;
    box-shadow: 0 0 12px rgba(196, 154, 42, 0.3);
}

/* ===== Main Content ===== */
.content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

/* ===== Welcome Screen ===== */
.welcome {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 40px;
}

.welcome-inner {
    text-align: center;
    max-width: 600px;
    animation: welcomeFade 1.2s ease;
}

/* Ornamental cross/star */
.welcome-icon {
    font-size: 2rem;
    color: var(--accent);
    margin-bottom: 24px;
    opacity: 0.8;
    animation: gentlePulse 4s ease-in-out infinite;
    filter: drop-shadow(0 0 12px rgba(196, 154, 42, 0.3));
}

/* Ornamental line above title */
.welcome-inner::before {
    content: '';
    display: block;
    width: 60px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    margin: 0 auto 24px;
}

.welcome h1 {
    font-family: var(--font-serif);
    font-size: 3.5rem;
    font-weight: 500;
    color: var(--text-primary);
    letter-spacing: -0.03em;
    margin-bottom: 8px;
    line-height: 1.15;
}

.welcome-subtitle {
    font-family: var(--font-serif);
    font-size: 1.15rem;
    color: var(--text-secondary);
    font-style: italic;
    font-weight: 400;
    margin-bottom: 12px;
}

/* Ornamental flourish */
.welcome-subtitle::after {
    content: '';
    display: block;
    width: 120px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-strong), transparent);
    margin: 20px auto 0;
}

.welcome-desc {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.9;
    margin: 24px 0 40px;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

.welcome-stats {
    display: flex;
    justify-content: center;
    gap: 56px;
    margin-bottom: 44px;
}

.stat {
    text-align: center;
}

.stat-num {
    display: block;
    font-family: var(--font-serif);
    font-size: 2.6rem;
    font-weight: 600;
    color: var(--accent);
    line-height: 1.2;
    filter: drop-shadow(0 2px 8px rgba(196, 154, 42, 0.2));
}

.stat-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--text-muted);
    margin-top: 4px;
}

.btn-start {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 16px 48px;
    background: linear-gradient(135deg, var(--accent-dark), var(--accent), var(--accent-light));
    color: #fff;
    border: none;
    border-radius: var(--radius-xl);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: all var(--transition);
    box-shadow: 0 4px 24px rgba(196, 154, 42, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    position: relative;
    overflow: hidden;
}

.btn-start::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent);
    opacity: 0;
    transition: opacity var(--transition);
}

.btn-start:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 36px rgba(196, 154, 42, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-start:hover::before {
    opacity: 1;
}

.btn-start:active {
    transform: translateY(-1px);
}

.welcome-note {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 20px;
    font-style: italic;
}

/* ===== Reader ===== */
.reader {
    max-width: 760px;
    margin: 0 auto;
    padding: 32px 48px 100px;
    animation: readerFade 0.5s ease;
}

.reader-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    margin-bottom: 4px;
}

.reader-nav-bottom {
    border-top: 1px solid var(--border);
    margin-top: 48px;
    padding-top: 24px;
}

.nav-btn {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-strong);
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition);
}

.nav-btn:hover {
    border-color: var(--accent-border);
    color: var(--accent);
    background: var(--accent-soft);
    box-shadow: 0 2px 12px rgba(196, 154, 42, 0.08);
    transform: translateY(-1px);
}

.nav-btn:disabled {
    opacity: 0.25;
    cursor: default;
    pointer-events: none;
}

.reader-position {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 500;
    letter-spacing: 0.05em;
}

/* Book Header */
.book-header {
    text-align: center;
    padding: 56px 0 36px;
    position: relative;
}

/* Decorative element above badge */
.book-header::before {
    content: '\2727  \2727  \2727';
    display: block;
    color: var(--accent);
    opacity: 0.3;
    font-size: 0.7rem;
    letter-spacing: 0.5em;
    margin-bottom: 20px;
}

.book-testament-badge {
    display: inline-block;
    padding: 5px 18px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    border-radius: var(--radius-xl);
    margin-bottom: 20px;
    border: 1px solid var(--accent-border);
}

.book-title {
    font-family: var(--font-serif);
    font-size: 3.2rem;
    font-weight: 500;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    margin-bottom: 10px;
    line-height: 1.15;
}

.book-full-title {
    font-family: var(--font-serif);
    font-size: 0.95rem;
    color: var(--text-muted);
    font-style: italic;
}

/* Ornamental divider after title */
.book-header::after {
    content: '';
    display: block;
    width: 80px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    margin: 28px auto 0;
}

/* Book Summary - Glass Card */
.book-summary {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 32px 36px;
    margin-top: 20px;
    margin-bottom: 56px;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: visible;
}

/* Accent line at top of summary card */
.book-summary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 24px;
    right: 24px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0.4;
}

.summary-icon {
    position: absolute;
    top: -16px;
    left: 32px;
    background: linear-gradient(135deg, var(--accent-dark), var(--accent-light));
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    box-shadow: 0 4px 16px rgba(196, 154, 42, 0.3);
}

.book-summary p {
    font-family: var(--font-serif);
    font-size: 1.18rem;
    line-height: 1.9;
    color: var(--text-primary);
}

/* ===== Passages ===== */
.passage-section {
    margin-bottom: 56px;
    animation: passageFade 0.6s ease both;
}

.passage-title {
    font-family: var(--font-sans);
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--accent);
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--accent-border);
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
}

.passage-title::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(196, 154, 42, 0.4);
}

/* Accent dot on border */
.passage-title::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--accent);
    border-radius: 1px;
}

.passage-ref {
    font-weight: 500;
    color: var(--text-muted);
    font-size: 0.62rem;
    margin-left: auto;
    letter-spacing: 0.1em;
}

/* Drop Cap on first verse of each passage */
.passage-verses .verse:first-child .verse-text::first-letter {
    font-family: var(--font-serif);
    float: left;
    font-size: 3.2em;
    line-height: 0.8;
    padding-right: 8px;
    padding-top: 6px;
    color: var(--accent);
    font-weight: 600;
    filter: drop-shadow(0 2px 4px rgba(196, 154, 42, 0.15));
}

.verse {
    margin-bottom: 6px;
    line-height: 2;
}

.verse-num {
    font-family: var(--font-sans);
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--accent);
    vertical-align: super;
    margin-right: 4px;
    opacity: 0.5;
}

.verse-text {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    color: var(--text-primary);
    line-height: 2;
}

/* ===== Takeaway - Premium Card ===== */
.book-takeaway {
    background: linear-gradient(135deg, var(--accent-soft), rgba(196, 154, 42, 0.04));
    border: 1px solid var(--accent-border);
    border-radius: var(--radius-md);
    padding: 36px 36px 32px;
    margin-top: 56px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm), var(--shadow-glow);
}

/* Decorative corner flourish */
.book-takeaway::before {
    content: '\2726';
    position: absolute;
    top: 12px;
    right: 16px;
    font-size: 1.2rem;
    color: var(--accent);
    opacity: 0.15;
}

.takeaway-title {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--accent);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.takeaway-icon {
    font-size: 1.1rem;
    filter: drop-shadow(0 0 6px rgba(196, 154, 42, 0.3));
}


.book-takeaway p {
    font-family: var(--font-serif);
    font-size: 1.12rem;
    line-height: 2;
    color: var(--text-primary);
}

.takeaway-image {
    width: 100%;
    height: auto;
    margin-bottom: 24px;
    border-radius: var(--radius-sm);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--accent-border);
    transition: transform var(--transition);
    display: block;
    aspect-ratio: 16/9;
    object-fit: cover;
}

.takeaway-image:hover {
    transform: scale(1.01);
}


/* ===== Mark as Read Button ===== */
.btn-mark-read {
    padding: 11px 28px;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    color: var(--accent);
    border: 1px solid var(--accent-border);
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    letter-spacing: 0.02em;
}

.btn-mark-read:hover {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 4px 20px rgba(196, 154, 42, 0.25);
    transform: translateY(-1px);
}

.btn-mark-read.read {
    background: linear-gradient(135deg, var(--accent-dark), var(--accent));
    color: #fff;
    border-color: var(--accent);
    box-shadow: 0 2px 12px rgba(196, 154, 42, 0.2);
}

/* ===== Mobile Menu Toggle ===== */
.menu-toggle {
    display: none;
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 200;
    width: 44px;
    height: 44px;
    background: var(--bg-sidebar);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    box-shadow: var(--shadow-lg);
    backdrop-filter: var(--glass-blur);
}

.menu-toggle span {
    display: block;
    width: 18px;
    height: 1.5px;
    background: var(--text-sidebar-active);
    border-radius: 1px;
    transition: all var(--transition);
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(4.5px, 4.5px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(4.5px, -4.5px);
}

.overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 90;
    opacity: 0;
    transition: opacity var(--transition);
}

.overlay.active {
    opacity: 1;
}

/* ===== Animations ===== */
@keyframes welcomeFade {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes readerFade {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes passageFade {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes gentlePulse {

    0%,
    100% {
        opacity: 0.8;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(1.05);
    }
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .content {
        margin-left: 0;
    }

    .menu-toggle {
        display: flex;
    }

    .overlay.active {
        display: block;
    }

    .reader {
        padding: 24px 24px 60px;
    }

    .book-title {
        font-size: 2.2rem;
    }

    .welcome h1 {
        font-size: 2.4rem;
    }

    .welcome-stats {
        gap: 32px;
    }

    .passage-verses .verse:first-child .verse-text::first-letter {
        font-size: 2.4em;
    }
}

@media (max-width: 500px) {
    .welcome {
        padding: 24px 16px;
    }

    .reader {
        padding: 16px 16px 60px;
    }

    .book-title {
        font-size: 1.8rem;
    }

    .book-summary {
        padding: 24px 20px;
    }

    .book-takeaway {
        padding: 24px 20px;
    }

    .verse-text {
        font-size: 1.05rem;
    }

    .reader-nav {
        flex-wrap: wrap;
        gap: 8px;
        justify-content: center;
    }

    .reader-position {
        width: 100%;
        text-align: center;
        order: -1;
        margin-bottom: 4px;
    }

    .stat-num {
        font-size: 2rem;
    }
}

/* ===== Scrollbar ===== */
.sidebar-content::-webkit-scrollbar {
    width: 3px;
}

.sidebar-content::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 2px;
}

/* Selection color */
::selection {
    background: rgba(196, 154, 42, 0.2);
    color: var(--text-primary);
}