/* ============================================
   网络钓鱼编年史 - 电子书全局样式
   History of Phishing - E-book Stylesheet
   ============================================ */

/* ===== CSS VARIABLES ===== */
:root {
    /* 主色调 - 深海蓝系，呼应"钓鱼"主题 */
    --primary: #1a3a5c;
    --primary-light: #e8f0f8;
    --primary-mid: #2d5a87;
    --primary-dark: #0d1f33;
    --accent: #c9a227;
    --accent-light: #f5e6b8;
    --accent-gold: #d4af37;

    /* 文字色 */
    --text: #1a1a2e;
    --text-secondary: #4a4a6a;
    --text-light: #8a8aa0;
    --text-muted: #b0b0c0;
    --text-inverse: #ffffff;

    /* 背景色 */
    --bg: #fafbfc;
    --bg-warm: #f5f3ef;
    --bg-card: #ffffff;
    --bg-dark: #0d1f33;
    --bg-overlay: rgba(13, 31, 51, 0.85);

    /* 边框与阴影 */
    --border: #e0e4ec;
    --border-light: #eef1f5;
    --shadow-sm: 0 2px 8px rgba(13, 31, 51, 0.06);
    --shadow: 0 4px 20px rgba(13, 31, 51, 0.08);
    --shadow-lg: 0 12px 40px rgba(13, 31, 51, 0.12);
    --shadow-gold: 0 4px 20px rgba(201, 162, 39, 0.15);

    /* 圆角与过渡 */
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.2s ease;

    /* 排版 */
    --font-display: 'Noto Serif SC', 'Source Han Serif SC', 'SimSun', serif;
    --font-body: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
}

/* ===== RESET & BASE ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    color: var(--text);
    background: var(--bg);
    line-height: 1.8;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection {
    background: var(--accent-light);
    color: var(--primary-dark);
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.3;
    color: var(--text);
}

p { margin-bottom: 1em; }

a {
    color: var(--primary-mid);
    text-decoration: none;
    transition: var(--transition-fast);
}

a:hover { color: var(--primary); }

/* ===== CONTAINER ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.container-narrow {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== NAVIGATION ===== */
.ebook-navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light);
    transition: var(--transition);
}

.ebook-navbar.scrolled {
    box-shadow: var(--shadow);
}

.ebook-navbar .nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.ebook-navbar .nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.ebook-navbar .nav-brand-icon {
    width: 40px; height: 40px;
    background: var(--primary-gradient);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
}

.ebook-navbar .nav-brand-text {
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.3;
}

.ebook-navbar .nav-brand-text span {
    display: block;
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 400;
    color: var(--text-light);
    letter-spacing: 0.5px;
}

.ebook-navbar .nav-links {
    display: flex;
    gap: 4px;
    list-style: none;
}

.ebook-navbar .nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    padding: 6px 14px;
    border-radius: 6px;
    transition: var(--transition-fast);
}

.ebook-navbar .nav-links a:hover,
.ebook-navbar .nav-links a.active {
    color: var(--primary);
    background: var(--primary-light);
}

.ebook-navbar .nav-back {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-light);
    text-decoration: none;
    padding: 6px 14px;
    border-radius: 6px;
    transition: var(--transition-fast);
    border: 1px solid var(--border);
}

.ebook-navbar .nav-back:hover {
    color: var(--primary);
    border-color: var(--primary-mid);
    background: var(--primary-light);
}

/* Mobile toggle */
.mobile-toggle {
    display: none;
    width: 36px; height: 36px;
    border: none;
    background: var(--primary-light);
    border-radius: 8px;
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.mobile-toggle span {
    display: block;
    width: 18px; height: 2px;
    background: var(--primary);
    border-radius: 2px;
    transition: var(--transition);
}

/* ===== COVER HERO ===== */
.cover-hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: var(--primary-dark);
    padding-top: 64px;
}

.cover-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse at 20% 50%, rgba(26, 58, 92, 0.8) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(45, 90, 135, 0.5) 0%, transparent 40%),
        radial-gradient(ellipse at 50% 80%, rgba(201, 162, 39, 0.1) 0%, transparent 40%);
}

.cover-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(201, 162, 39, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(201, 162, 39, 0.03) 1px, transparent 1px);
    background-size: 80px 80px;
    mask-image: radial-gradient(ellipse at center, black 20%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 20%, transparent 70%);
}

.cover-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    text-align: center;
    padding: 0 24px;
}

.cover-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(201, 162, 39, 0.15);
    color: var(--accent-gold);
    font-size: 12px;
    font-weight: 600;
    padding: 8px 20px;
    border-radius: 100px;
    margin-bottom: 40px;
    border: 1px solid rgba(201, 162, 39, 0.25);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.cover-badge::before {
    content: '';
    width: 6px; height: 6px;
    background: var(--accent-gold);
    border-radius: 50%;
    animation: pulse-gold 2s infinite;
}

@keyframes pulse-gold {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(1.5); }
}

.cover-title-main {
    font-family: var(--font-display);
    font-size: clamp(32px, 5vw, 56px);
    font-weight: 900;
    line-height: 1.15;
    color: var(--text-inverse);
    margin-bottom: 16px;
    letter-spacing: 4px;
}

.cover-title-sub {
    font-family: var(--font-display);
    font-size: clamp(20px, 3vw, 32px);
    font-weight: 400;
    color: var(--accent-gold);
    margin-bottom: 32px;
    letter-spacing: 8px;
}

.cover-divider {
    width: 80px;
    height: 2px;
    background: var(--accent-gold);
    margin: 0 auto 32px;
    opacity: 0.6;
}

.cover-desc {
    font-size: clamp(14px, 1.5vw, 17px);
    color: rgba(255, 255, 255, 0.6);
    max-width: 600px;
    margin: 24px auto 24px;
    line-height: 2;
    font-weight: 300;
}

.cover-meta {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
    margin-bottom: 48px;
}

.cover-meta-item {
    text-align: center;
}

.cover-meta-item .label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.35);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 4px;
}

.cover-meta-item .value {
    font-family: var(--font-display);
    font-size: 15px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 600;
}

.cover-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-ebook {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-family: var(--font-body);
}

.btn-ebook-primary {
    background: var(--accent-gold);
    color: var(--primary-dark);
    box-shadow: 0 8px 24px rgba(201, 162, 39, 0.3);
}

.btn-ebook-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(201, 162, 39, 0.4);
    color: var(--primary-dark);
}

.btn-ebook-secondary {
    background: transparent;
    color: rgba(255, 255, 255, 0.8);
    border: 1.5px solid rgba(255, 255, 255, 0.2);
}

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

/* Scroll indicator */
.scroll-indicator {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.3);
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    animation: bounce 2s infinite;
}

.scroll-indicator svg {
    width: 20px; height: 20px;
}

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

/* ===== INTRO SECTION ===== */
.intro-section {
    padding: 100px 0;
    background: var(--bg-warm);
    position: relative;
}

.intro-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border), transparent);
}

.intro-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 64px;
}

.intro-header .section-tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 16px;
    padding: 6px 20px;
    background: var(--accent-light);
    border-radius: 100px;
}

.intro-header h2 {
    font-family: var(--font-display);
    font-size: clamp(24px, 3vw, 32px);
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 16px;
}

.intro-header p {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.9;
}

.intro-quote {
    max-width: 800px;
    margin: 0 auto 64px;
    padding: 40px 48px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border-left: 4px solid var(--accent-gold);
    box-shadow: var(--shadow);
    position: relative;
}

.intro-quote::before {
    content: '"';
    position: absolute;
    top: 16px;
    left: 24px;
    font-family: var(--font-display);
    font-size: 64px;
    color: var(--accent-light);
    line-height: 1;
    pointer-events: none;
}

.intro-quote p {
    font-family: var(--font-display);
    font-size: 17px;
    font-style: italic;
    color: var(--text-secondary);
    line-height: 2;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}

.intro-quote .quote-author {
    font-size: 13px;
    color: var(--text-light);
    text-align: right;
}

/* ===== TIMELINE PREVIEW ===== */
.timeline-preview {
    padding: 100px 0;
    background: var(--bg);
}

.timeline-header {
    text-align: center;
    margin-bottom: 64px;
}

.timeline-header h2 {
    font-family: var(--font-display);
    font-size: clamp(24px, 3vw, 32px);
    color: var(--primary);
    margin-bottom: 12px;
}

.timeline-header p {
    font-size: 15px;
    color: var(--text-secondary);
}

.timeline-track {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
}

.timeline-track::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0; bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--border), var(--accent-gold), var(--border));
    transform: translateX(-50%);
}

.timeline-item {
    display: flex;
    align-items: center;
    margin-bottom: 48px;
    position: relative;
}

.timeline-item:nth-child(odd) { flex-direction: row; }
.timeline-item:nth-child(even) { flex-direction: row-reverse; }

.timeline-item-content {
    width: calc(50% - 40px);
    padding: 24px 28px;
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    transition: var(--transition);
}

.timeline-item-content:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
    border-color: var(--accent-light);
}

.timeline-item-content .year {
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.timeline-item-content .title {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
}

.timeline-item-content .desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.7;
}

.timeline-dot {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 16px; height: 16px;
    background: var(--bg-card);
    border: 3px solid var(--accent-gold);
    border-radius: 50%;
    z-index: 2;
    transition: var(--transition);
}

.timeline-item:hover .timeline-dot {
    transform: translateX(-50%) scale(1.3);
    box-shadow: 0 0 0 6px rgba(201, 162, 39, 0.15);
}

/* ===== CHAPTERS GRID ===== */
.chapters-section {
    padding: 100px 0;
    background: var(--bg-warm);
    position: relative;
}

.chapters-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 64px;
}

.chapters-header .section-tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    color: var(--primary-mid);
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 16px;
    padding: 6px 20px;
    background: var(--primary-light);
    border-radius: 100px;
}

.chapters-header h2 {
    font-family: var(--font-display);
    font-size: clamp(24px, 3vw, 32px);
    color: var(--primary);
    margin-bottom: 12px;
}

.chapters-header p {
    font-size: 15px;
    color: var(--text-secondary);
}

.chapters-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    max-width: 1000px;
    margin: 0 auto;
}

.chapter-card {
    display: flex;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-light);
    transition: var(--transition);
    text-decoration: none;
    position: relative;
}

.chapter-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
    border-color: rgba(201, 162, 39, 0.3);
}

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

.chapter-card:hover::before {
    opacity: 1;
}

.chapter-number {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 80px;
    background: var(--primary-light);
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 900;
    color: var(--primary-mid);
    transition: var(--transition);
}

.chapter-card:hover .chapter-number {
    background: var(--primary);
    color: white;
}

.chapter-info {
    padding: 28px;
    flex: 1;
}

.chapter-info .chapter-tag {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 8px;
    padding: 3px 10px;
    background: var(--accent-light);
    border-radius: 100px;
}

.chapter-info h3 {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 10px;
    line-height: 1.4;
}

.chapter-info p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 12px;
}

.chapter-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 12px;
    color: var(--text-light);
}

.chapter-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.chapter-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 100px;
}

.chapter-status.published {
    background: #dcfce7;
    color: #166534;
}

.chapter-status.writing {
    background: #fef3c7;
    color: #92400e;
}

.chapter-status.planned {
    background: #f3f4f6;
    color: #6b7280;
}

/* ===== READING PROGRESS ===== */
.reading-progress {
    padding: 80px 0;
    background: var(--bg);
}

.progress-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    margin-bottom: 48px;
}

.progress-header h2 {
    font-family: var(--font-display);
    font-size: clamp(22px, 2.5vw, 28px);
    color: var(--primary);
    margin-bottom: 8px;
}

.progress-header p {
    font-size: 14px;
    color: var(--text-secondary);
}

.progress-bar-container {
    max-width: 700px;
    margin: 0 auto;
}

.progress-bar-track {
    width: 100%;
    height: 8px;
    background: var(--border-light);
    border-radius: 100px;
    overflow: hidden;
    margin-bottom: 16px;
}

.progress-bar-fill {
    height: 100%;
    width: 20%;
    background: linear-gradient(90deg, var(--primary-mid), var(--accent-gold));
    border-radius: 100px;
    transition: width 1s ease;
}

.progress-stats {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-light);
}

.progress-stats .highlight {
    color: var(--primary);
    font-weight: 600;
}

/* ===== CTA SECTION ===== */
.cta-section {
    padding: 100px 0;
    background: var(--primary-dark);
    position: relative;
    overflow: hidden;
    text-align: center;
}

.cta-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse at 30% 50%, rgba(45, 90, 135, 0.3) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 50%, rgba(201, 162, 39, 0.1) 0%, transparent 40%);
}

.cta-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
    margin: 0 auto;
    padding: 0 24px;
}

.cta-content h2 {
    font-family: var(--font-display);
    font-size: clamp(22px, 3vw, 32px);
    color: white;
    margin-bottom: 16px;
}

.cta-content p {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 32px;
    line-height: 1.8;
}

/* ===== FOOTER ===== */
.ebook-footer {
    background: var(--primary-dark);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding: 48px 0 32px;
}

.ebook-footer .footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.ebook-footer .footer-brand p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.4);
    line-height: 1.8;
    max-width: 320px;
    margin-top: 12px;
}

.ebook-footer .footer-col h4 {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 16px;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ebook-footer .footer-col ul { list-style: none; }

.ebook-footer .footer-col li { margin-bottom: 8px; }

.ebook-footer .footer-col a {
    color: rgba(255, 255, 255, 0.35);
    text-decoration: none;
    font-size: 13px;
    transition: var(--transition-fast);
}

.ebook-footer .footer-col a:hover { color: var(--accent-gold); }

.ebook-footer .footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 24px;
    text-align: center;
}

.ebook-footer .footer-bottom p {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.25);
}

/* ===== SCROLL REVEAL ===== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .chapters-grid { grid-template-columns: 1fr; }
    .timeline-track::before { left: 20px; }
    .timeline-item,
    .timeline-item:nth-child(odd),
    .timeline-item:nth-child(even) {
        flex-direction: row;
        padding-left: 48px;
    }
    .timeline-item-content { width: 100%; }
    .timeline-dot { left: 20px; transform: translateX(-50%); }
    .timeline-item:hover .timeline-dot { transform: translateX(-50%) scale(1.3); }
    .ebook-footer .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .ebook-navbar .nav-links {
        display: none;
        position: absolute;
        top: 64px;
        left: 0; right: 0;
        background: white;
        flex-direction: column;
        padding: 16px 24px;
        box-shadow: var(--shadow-lg);
        gap: 4px;
        border-bottom: 1px solid var(--border);
    }
    .ebook-navbar .nav-links.active { display: flex; }
    .mobile-toggle { display: flex; }

    .cover-hero { min-height: auto; padding: 100px 0 60px; }
    .cover-title-main { letter-spacing: 2px; }
    .cover-title-sub { letter-spacing: 4px; }
    .cover-meta { gap: 24px; }
    .cover-actions { flex-direction: column; align-items: center; }
    .cover-actions .btn-ebook { width: 100%; max-width: 280px; justify-content: center; }

    .intro-quote { padding: 32px 24px; }
    .intro-quote::before { font-size: 48px; top: 12px; left: 16px; }

    .chapter-card { flex-direction: column; }
    .chapter-number { min-width: 100%; padding: 20px; font-size: 24px; }

    .ebook-footer .footer-grid { grid-template-columns: 1fr; gap: 32px; }

    .section, .intro-section, .timeline-preview, .chapters-section, .reading-progress, .cta-section {
        padding: 60px 0;
    }
}

@media (max-width: 480px) {
    .container, .container-narrow { padding: 0 16px; }
    .chapter-info { padding: 20px; }
    .chapter-info h3 { font-size: 16px; }
}


/* ===== EBOOK SUBNAV (inside hero banner) ===== */
.ebook-subnav {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 32px 0 0;
    flex-wrap: wrap;
    padding: 0 16px;
}

.ebook-subnav-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.55);
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    transition: var(--transition-fast);
    cursor: pointer;
}

.ebook-subnav-item:hover {
    color: rgba(255, 255, 255, 0.9);
    border-color: rgba(201, 162, 39, 0.4);
    background: rgba(201, 162, 39, 0.08);
    transform: translateY(-1px);
}

.ebook-subnav-item.active {
    color: var(--accent-gold);
    border-color: rgba(201, 162, 39, 0.4);
    background: rgba(201, 162, 39, 0.12);
}

.ebook-subnav-item svg {
    width: 14px;
    height: 14px;
    opacity: 0.7;
}

/* ===== OFFICIAL NAVBAR INTEGRATION ===== */
/* Override ebook-navbar for official nav compatibility */
.ebook-navbar {
    display: none; /* Hide the old ebook-specific nav */
}

/* Ensure official navbar styles work in ebook context */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(26, 110, 255, 0.08);
    transition: var(--transition);
}

.navbar.scrolled { box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06); }

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 900;
    font-size: 18px;
}

.logo-icon img { height: 44px; }

.logo-text {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.3;
}

.logo-text span {
    display: block;
    font-size: 11px;
    font-weight: 400;
    color: var(--text-light);
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    gap: 4px;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 8px;
    transition: var(--transition);
}

.nav-links a:hover, .nav-links a.active {
    color: var(--primary);
    background: var(--primary-light);
}

/* ===== OFFICIAL FOOTER INTEGRATION ===== */
.footer {
    background: var(--text);
    color: white;
    padding: 64px 0 32px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 48px;
}

.footer-brand .logo-icon {
    margin-bottom: 16px;
    display: flex;
    align-items: left;
    justify-content: left;
}

.footer-brand .logo-icon img { height: 84px; }

.footer-brand p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.8;
    max-width: 320px;
}

.footer-col h4 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.9);
}

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

.footer-col li { margin-bottom: 10px; }

.footer-col a {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    font-size: 14px;
    transition: var(--transition);
}

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

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-bottom p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.4);
}

/* ===== RESPONSIVE ADJUSTMENTS ===== */
@media (max-width: 1024px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 72px;
        left: 0; right: 0;
        background: white;
        flex-direction: column;
        padding: 16px 24px;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
        gap: 4px;
        border-bottom: 1px solid var(--border);
    }
    .nav-links.active { display: flex; }
    .mobile-toggle { display: flex; }

    .ebook-subnav {
        gap: 6px;
        margin-top: 24px;
    }
    .ebook-subnav-item {
        padding: 6px 12px;
        font-size: 12px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

/* ===== AUTHOR SECTION ===== */
.author-section {
    padding: 100px 0;
    background: var(--bg);
    position: relative;
}

.author-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border), transparent);
}

.author-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 56px;
}

.author-header .section-tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 16px;
    padding: 6px 20px;
    background: var(--accent-light);
    border-radius: 100px;
}

.author-header h2 {
    font-family: var(--font-display);
    font-size: clamp(24px, 3vw, 32px);
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 12px;
}

.author-header p {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.8;
}

.author-card {
    max-width: 900px;
    margin: 0 auto;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.author-avatar {
    display: flex;
    justify-content: center;
    padding: 40px 24px 0;
    background: linear-gradient(180deg, var(--primary-light), transparent);
}

.author-avatar-placeholder {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-mid), var(--primary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 8px 24px rgba(26, 58, 92, 0.2);
    border: 4px solid white;
}

.author-info {
    padding: 32px 48px 48px;
}

.author-bio p {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 2;
    margin-bottom: 0;
    text-align: justify;
}

.author-achievements {
    margin-top: 32px;
    padding-top: 32px;
    border-top: 1px solid var(--border-light);
}

.author-achievements h4 {
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.author-achievements h4::before {
    content: '';
    width: 4px;
    height: 16px;
    background: var(--accent-gold);
    border-radius: 2px;
}

.author-achievements ul {
    margin: 0;
    padding-left: 0;
    list-style: none;
}

.author-achievements li {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 10px;
    padding: 10px 14px;
    background: var(--bg-warm);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--accent-gold);
    transition: var(--transition-fast);
}

.author-achievements li:hover {
    background: var(--primary-light);
    transform: translateX(4px);
}

.author-links {
    display: flex;
    gap: 12px;
    margin-top: 32px;
    padding-top: 32px;
    border-top: 1px solid var(--border-light);
    flex-wrap: wrap;
}

.author-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;   /* 新增：继承 body 字体 */
    color: var(--primary-mid);
    background: var(--primary-light);
    border: 1px solid var(--border-light);
    text-decoration: none;
    transition: var(--transition-fast);
    cursor: pointer;        /* 新增：统一指针样式 */
}
/* 统一 author-link 内所有子元素的字体粗细 */
.author-link,
.author-link * {
    font-weight: 500;
}
.author-link:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-1px);
}

.author-link svg {
    opacity: 0.7;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .author-section { padding: 60px 0; }
    .author-info { padding: 24px 24px 36px; }
    .author-avatar-placeholder { width: 100px; height: 100px; }
    .author-achievements li { font-size: 12px; padding: 8px 12px; }
    .author-links { flex-direction: column; }
    .author-link { justify-content: center; }
}

/* ===== MODAL ===== */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(13, 31, 51, 0.6);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-box {
    background: white;
    border-radius: var(--radius-lg);
    max-width: 520px;
    width: 100%;
    box-shadow: var(--shadow-lg);
    transform: translateY(20px) scale(0.96);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.modal-overlay.active .modal-box {
    transform: translateY(0) scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-light);
}

.modal-header h3 {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
    margin: 0;
}

.modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--bg-warm);
    border-radius: 8px;
    font-size: 20px;
    color: var(--text-light);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.modal-close:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.modal-body {
    padding: 20px 24px;
}

.modal-item {
    display: flex;
    padding: 12px 0;
    border-bottom: 1px dashed var(--border-light);
    gap: 16px;
    align-items: flex-start;
}

.modal-item:last-child {
    border-bottom: none;
}

.modal-label {
    min-width: 80px;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    flex-shrink: 0;
}

.modal-value {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

@media (max-width: 480px) {
    .modal-item { flex-direction: column; gap: 4px; }
    .modal-label { min-width: auto; }
}