/* ========== 重置与基础样式 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f5f9;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial,
        sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

/* ========== 首页样式 ========== */
.home-page {
    min-height: 100vh;
}

.hero-section {
    position: relative;
    min-height: 520px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(255, 255, 255, 0.08) 0%, transparent 40%);
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: white;
    padding: 60px 20px;
    max-width: 800px;
}

.hero-badge {
    display: inline-block;
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    font-size: 14px;
    margin-bottom: 24px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.hero-content h1 {
    font-size: 52px;
    font-weight: 800;
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.hero-content .highlight {
    background: linear-gradient(90deg, #fde68a, #fca5a5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-desc {
    font-size: 18px;
    opacity: 0.9;
    margin-bottom: 40px;
    line-height: 1.8;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
}

.stat-num {
    font-size: 36px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 14px;
    opacity: 0.8;
}

.start-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 16px 40px;
    background: white;
    color: #667eea;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.start-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
}

/* 章节网格 */
.chapters-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 20px;
}

.section-header {
    text-align: center;
    margin-bottom: 48px;
}

.section-header h2 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 12px;
}

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

.chapter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.chapter-card {
    position: relative;
    padding: 28px;
    border-radius: var(--radius-lg);
    color: white;
    transition: var(--transition);
    overflow: hidden;
    cursor: pointer;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: var(--shadow-md);
}

.chapter-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.chapter-card::before {
    content: "";
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: var(--transition);
}

.chapter-card:hover::before {
    transform: scale(1.5);
}

.chapter-num {
    font-size: 13px;
    opacity: 0.85;
    margin-bottom: 8px;
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.chapter-badge {
    background: rgba(255, 255, 255, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 999px;
    padding: 1px 9px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
    color: #fff;
    backdrop-filter: blur(2px);
}

.chapter-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 6px;
    position: relative;
}

.chapter-sub {
    font-size: 14px;
    opacity: 0.85;
    position: relative;
}

.chapter-arrow {
    position: absolute;
    bottom: 24px;
    right: 24px;
    opacity: 0.8;
    transition: var(--transition);
}

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

/* 渐变颜色类 */
.from-pink-500 { background: linear-gradient(135deg, #ec4899 0%, #f43f5e 100%); }
.from-rose-500 { background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%); }
.from-orange-500 { background: linear-gradient(135deg, #f97316 0%, #f59e0b 100%); }
.from-amber-500 { background: linear-gradient(135deg, #f59e0b 0%, #eab308 100%); }
.from-yellow-500 { background: linear-gradient(135deg, #eab308 0%, #84cc16 100%); }
.from-lime-500 { background: linear-gradient(135deg, #84cc16 0%, #22c55e 100%); }
.from-green-500 { background: linear-gradient(135deg, #22c55e 0%, #10b981 100%); }
.from-emerald-500 { background: linear-gradient(135deg, #10b981 0%, #14b8a6 100%); }
.from-teal-500 { background: linear-gradient(135deg, #14b8a6 0%, #06b6d4 100%); }
.from-cyan-500 { background: linear-gradient(135deg, #06b6d4 0%, #0ea5e9 100%); }
.from-sky-500 { background: linear-gradient(135deg, #0ea5e9 0%, #3b82f6 100%); }
.from-blue-500 { background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%); }
.from-indigo-500 { background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%); }
.from-violet-500 { background: linear-gradient(135deg, #8b5cf6 0%, #a855f7 100%); }
.from-purple-500 { background: linear-gradient(135deg, #a855f7 0%, #d946ef 100%); }
.from-fuchsia-500 { background: linear-gradient(135deg, #d946ef 0%, #ec4899 100%); }
.from-pink-500 { background: linear-gradient(135deg, #ec4899 0%, #f43f5e 100%); }
.from-red-500 { background: linear-gradient(135deg, #ef4444 0%, #ec4899 100%); }

.footer {
    text-align: center;
    padding: 30px 20px;
    color: var(--text-muted);
    font-size: 14px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

/* ========== 章节详情页布局 ========== */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* 侧边栏 */
.sidebar {
    width: 260px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    overflow-y: auto;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid var(--border-color);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 700;
}

.logo-icon {
    font-size: 24px;
}

.nav-list {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 4px;
    transition: var(--transition);
    color: var(--text-secondary);
    font-size: 14px;
}

.nav-item:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.nav-item.active {
    color: white;
    font-weight: 600;
}

.nav-num {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: var(--bg-tertiary);
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}

.nav-item.active .nav-num {
    background: rgba(255, 255, 255, 0.25);
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
}

.back-home {
    color: var(--text-secondary);
    font-size: 14px;
    transition: var(--transition);
}

.back-home:hover {
    color: var(--text-primary);
}

/* 移动端菜单按钮 */
.mobile-menu-btn {
    display: none;
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 200;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    box-shadow: var(--shadow-md);
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
}

/* 主内容区 */
.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 32px;
    max-width: 100%;
}

/* 章节头部 */
.chapter-header {
    padding: 40px;
    border-radius: var(--radius-xl);
    color: white;
    margin-bottom: 32px;
    position: relative;
    overflow: hidden;
}

.chapter-header::before {
    content: "";
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.chapter-header::after {
    content: "";
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
}

.chapter-badge {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    font-size: 13px;
    margin-bottom: 16px;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.chapter-header h1 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 8px;
    position: relative;
}

.chapter-subtitle {
    font-size: 16px;
    opacity: 0.9;
    position: relative;
}

/* 数据源下载条 */
.data-download {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 12px;
    position: relative;
    font-size: 14px;
}

.dd-label {
    font-weight: 600;
}

.dd-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    background: #ffffff;
    color: #334155;
    border-radius: 8px;
    font-weight: 600;
    font-size: 13px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.dd-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
    background: #f8fafc;
}

.dd-hint {
    opacity: 0.85;
    font-size: 13px;
}

/* 三卡片布局 */
.cards-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 32px;
}

.card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-tertiary);
}

.card-icon {
    font-size: 24px;
}

.card-header h2 {
    font-size: 18px;
    font-weight: 600;
}

.card-body {
    padding: 20px 24px;
    flex: 1;
    overflow-y: auto;
    max-height: 600px;
}

/* 概念说明 */
.concept-item {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.concept-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.concept-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.concept-content p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 4px;
}

/* 代码块 */
.code-block-wrapper {
    margin-bottom: 20px;
}

.code-block-wrapper:last-child {
    margin-bottom: 0;
}

.code-block-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background: #1e293b;
    border-top-left-radius: var(--radius-sm);
    border-top-right-radius: var(--radius-sm);
}

.code-title {
    font-size: 13px;
    color: #94a3b8;
    font-weight: 500;
}

.copy-btn {
    color: #94a3b8;
    padding: 4px 8px;
    border-radius: 4px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
}

.copy-btn:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.copy-btn.copied {
    color: #22c55e;
}

.code-block {
    background: #0f172a;
    color: #e2e8f0;
    padding: 16px;
    border-bottom-left-radius: var(--radius-sm);
    border-bottom-right-radius: var(--radius-sm);
    overflow-x: auto;
    font-family: "SF Mono", "Fira Code", "Consolas", "Monaco", "Courier New", monospace;
    font-size: 13px;
    line-height: 1.6;
    counter-reset: line;
}

.code-block code {
    display: block;
    white-space: pre;
}

/* 代码语法高亮 */
.code-block code .keyword { color: #c084fc; }
.code-block code .string { color: #86efac; }
.code-block code .comment { color: #64748b; font-style: italic; }
.code-block code .number { color: #fbbf24; }
.code-block code .function { color: #60a5fa; }
.code-block code .builtin { color: #f472b6; }
.code-block code .operator { color: #94a3b8; }

/* 练习题 */
.exercise-item {
    margin-bottom: 24px;
    padding: 16px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
}

.exercise-item:last-child {
    margin-bottom: 0;
}

.exercise-num {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
    display: inline-block;
    padding: 4px 12px;
    background: var(--bg-secondary);
    border-radius: 20px;
    border: 1px solid var(--border-color);
}

.exercise-question p {
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.7;
    margin-bottom: 6px;
}

.exercise-hint {
    margin-top: 12px;
    padding: 10px 14px;
    background: #fef3c7;
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: #92400e;
    line-height: 1.6;
}

.answer-btn {
    width: 100%;
    margin-top: 14px;
    padding: 10px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
}

.answer-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.btn-arrow {
    transition: transform 0.3s ease;
}

.answer-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, margin-top 0.3s ease;
    margin-top: 0;
}

.answer-content.show {
    max-height: 1000px;
    margin-top: 14px;
}

.answer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background: #1e293b;
    border-top-left-radius: var(--radius-sm);
    border-top-right-radius: var(--radius-sm);
}

.answer-label {
    font-size: 13px;
    color: #86efac;
    font-weight: 500;
}

.answer-code {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    margin: 0;
}

/* 代码编写区 */
.code-editor-section {
    margin-top: 14px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 14px;
    background: #f1f5f9;
    border-bottom: 1px solid var(--border-color);
}

.editor-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}

.editor-actions {
    display: flex;
    gap: 6px;
}

.editor-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    transition: var(--transition);
    color: var(--text-secondary);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
}

.editor-btn:hover:not(:disabled) {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.editor-btn.run-btn {
    background: linear-gradient(135deg, #22c55e 0%, #10b981 100%);
    color: white;
    border: none;
}

.editor-btn.run-btn:hover:not(:disabled) {
    filter: brightness(1.05);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.3);
}

.editor-btn.run-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.editor-btn.reset-btn:hover:not(:disabled) {
    color: #ef4444;
    border-color: #fca5a5;
}

.spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.code-editor {
    width: 100%;
    min-height: 140px;
    padding: 12px 14px;
    border: none;
    outline: none;
    resize: vertical;
    font-family: "SF Mono", "Fira Code", "Consolas", monospace;
    font-size: 13px;
    line-height: 1.6;
    color: #e2e8f0;
    background: #0f172a;
    tab-size: 4;
}

.code-editor::placeholder {
    color: #475569;
}

/* 模拟输入区 */
.mock-input-section {
    border-bottom: 1px solid var(--border-color);
    max-height: 300px;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.mock-input-section.collapsed {
    max-height: 0;
    border-bottom: none;
}

.mock-input-header {
    padding: 6px 14px;
    background: #1e293b;
}

.mock-input-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #fbbf24;
    font-weight: 600;
}

.mock-input-editor {
    width: 100%;
    min-height: 56px;
    max-height: 120px;
    padding: 8px 14px;
    border: none;
    outline: none;
    resize: vertical;
    font-family: "SF Mono", "Fira Code", "Consolas", monospace;
    font-size: 12.5px;
    line-height: 1.5;
    color: #fbbf24;
    background: #1e293b;
    tab-size: 4;
}

.mock-input-editor::placeholder {
    color: #475569;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif;
    font-size: 11px;
}

.input-toggle-btn.active {
    background: #fef3c7;
    color: #92400e;
    border-color: #fcd34d;
}

/* 运行结果 */
.run-result {
    border-top: 1px solid var(--border-color);
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 14px;
    background: #f8fafc;
}

.result-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}

.result-status {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
}

.result-status.running { color: #f59e0b; }
.result-status.success { color: #10b981; }
.result-status.error { color: #ef4444; }

.result-output {
    padding: 12px 14px;
    min-height: 48px;
    max-height: 200px;
    overflow-y: auto;
    font-family: "SF Mono", "Fira Code", "Consolas", monospace;
    font-size: 12.5px;
    line-height: 1.6;
    background: #0f172a;
    color: #e2e8f0;
    white-space: pre-wrap;
    word-break: break-all;
}

.result-output.success { color: #86efac; }
.result-output.error { color: #fca5a5; }

/* 章节底部导航 */
.chapter-nav {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 40px;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 28px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    transition: var(--transition);
    flex: 1;
    max-width: 400px;
    box-shadow: var(--shadow-sm);
}

.nav-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--text-muted);
}

.next-btn {
    margin-left: auto;
    flex-direction: row;
    justify-content: flex-end;
}

.prev-btn {
    margin-right: auto;
}

.nav-btn-right {
    text-align: right;
}

.nav-btn-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.nav-btn-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.nav-btn-placeholder {
    flex: 1;
    max-width: 400px;
}

/* ========== 响应式 ========== */
@media (max-width: 1200px) {
    .cards-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .card-body {
        max-height: none;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
        box-shadow: var(--shadow-xl);
    }

    .mobile-menu-btn {
        display: flex;
    }

    .main-content {
        margin-left: 0;
        padding: 70px 16px 24px;
    }

    .chapter-header {
        padding: 28px 24px;
    }

    .chapter-header h1 {
        font-size: 26px;
    }

    .hero-content h1 {
        font-size: 36px;
    }

    .hero-desc {
        font-size: 16px;
    }

    .hero-stats {
        gap: 24px;
    }

    .stat-num {
        font-size: 28px;
    }

    .chapters-section {
        padding: 48px 16px;
    }

    .section-header h2 {
        font-size: 28px;
    }

    .chapter-nav {
        flex-direction: column;
    }

    .nav-btn {
        max-width: 100%;
    }

    .prev-btn,
    .next-btn {
        margin: 0;
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.card-body::-webkit-scrollbar {
    width: 4px;
}

.card-body::-webkit-scrollbar-thumb {
    background: #e2e8f0;
}
