/* 人生之书 - 主样式文件 */
/* 苹果设计精神：简洁、优雅、高密度设计 */

:root {
    /* Apple × MUJI 极简美学色彩系统 - 纯净而温暖 */

    /* 石墨系列 - 主色调（苹果系统灰的精髓） */
    --graphite-dark: #1D1D1F;      /* 深石墨 - 苹果系统黑 */
    --graphite-medium: #2C2C2E;    /* 中石墨 */
    --graphite-light: #3A3A3C;     /* 浅石墨 */
    --graphite-soft: #48484A;      /* 柔和石墨 */

    /* 银色系列 - 辅助色（苹果经典银色） */
    --silver-pure: #F2F2F7;        /* 纯银 - 苹果系统背景 */
    --silver-warm: #F5F5F7;        /* 温银 */
    --silver-light: #F8F9FA;       /* 浅银 */
    --silver-mist: #FAFAFA;        /* 银雾 */

    /* 蓝宝石系列 - 强调色（苹果系统蓝的优化版） */
    --sapphire-pure: #007AFF;      /* 纯蓝宝石 - 保持问题标题色 */
    --sapphire-deep: #0056CC;      /* 深蓝宝石 */
    --sapphire-soft: #4A90E2;      /* 柔和蓝宝石 */
    --sapphire-mist: #E3F2FD;      /* 蓝宝石雾 */

    /* 暖灰系列 - MUJI灵感（温暖的中性色） */
    --warm-gray-50: #FAFAF9;       /* 极浅暖灰 */
    --warm-gray-100: #F5F5F4;      /* 浅暖灰 */
    --warm-gray-200: #E7E5E4;      /* 中浅暖灰 */
    --warm-gray-300: #D6D3D1;      /* 中暖灰 */
    --warm-gray-400: #A8A29E;      /* 深中暖灰 */
    --warm-gray-500: #78716C;      /* 深暖灰 */
    --warm-gray-600: #57534E;      /* 很深暖灰 */
    --warm-gray-700: #44403C;      /* 极深暖灰 */

    /* 橙色系列 - 温暖强调色（MUJI木质感） */
    --orange-soft: #FB923C;        /* 柔和橙 */
    --orange-warm: #EA580C;        /* 温暖橙 */
    --orange-deep: #C2410C;        /* 深橙 */

    /* 应用色彩映射 */
    --primary-color: var(--graphite-dark);
    --primary-hover: var(--graphite-medium);
    --accent-color: var(--sapphire-pure);
    --success-color: var(--orange-soft);
    --warning-color: var(--orange-warm);
    --error-color: #DC2626;

    --text-primary: var(--graphite-dark);
    --text-secondary: var(--warm-gray-600);
    --text-tertiary: var(--warm-gray-500);
    --text-quaternary: var(--warm-gray-400);

    --bg-primary: var(--silver-mist);
    --bg-secondary: var(--silver-light);
    --bg-elevated: var(--warm-gray-50);

    --border-light: var(--warm-gray-200);
    --border-medium: var(--warm-gray-300);
    --separator: rgba(120, 113, 108, 0.06);

    /* 精致阴影系统 */
    --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow-elevated: 0 8px 24px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.04);
    --shadow-modal: 0 32px 64px rgba(0, 0, 0, 0.12), 0 8px 16px rgba(0, 0, 0, 0.08);

    /* 完整字体系统规范 */
    --font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif;

    /* 桌面端字体系统 */
    --font-micro: 0.75rem;         /* 12px - 微小文字 */
    --font-tiny: 0.8125rem;        /* 13px - 极小文字 */
    --font-small: 0.875rem;        /* 14px - 小文字 */
    --font-base: 1rem;             /* 16px - 基础文字 */
    --font-medium: 1.125rem;       /* 18px - 中等文字 */
    --font-large: 1.25rem;         /* 20px - 大文字 */
    --font-xl: 1.375rem;           /* 22px - 超大文字 */
    --font-2xl: 1.5rem;            /* 24px - 标题3 */
    --font-3xl: 1.75rem;           /* 28px - 标题2 */
    --font-4xl: 2.25rem;           /* 36px - 标题1 */
    --font-5xl: 2.75rem;           /* 44px - 大标题 */
    --font-6xl: 3.5rem;            /* 56px - 超大标题 */

    /* 移动端字体系统 */
    --font-mobile-micro: 0.8125rem;    /* 13px */
    --font-mobile-tiny: 0.875rem;      /* 14px */
    --font-mobile-small: 1rem;         /* 16px */
    --font-mobile-base: 1.125rem;      /* 18px */
    --font-mobile-medium: 1.25rem;     /* 20px */
    --font-mobile-large: 1.375rem;     /* 22px */
    --font-mobile-xl: 1.5rem;          /* 24px */
    --font-mobile-2xl: 1.75rem;        /* 28px */
    --font-mobile-3xl: 2rem;           /* 32px */
    --font-mobile-4xl: 2.5rem;         /* 40px */

    /* 间距系统 - 基于4px网格 */
    --space-0: 0;
    --space-1: 0.25rem;   /* 4px */
    --space-2: 0.5rem;    /* 8px */
    --space-3: 0.75rem;   /* 12px */
    --space-4: 1rem;      /* 16px */
    --space-5: 1.25rem;   /* 20px */
    --space-6: 1.5rem;    /* 24px */
    --space-7: 1.75rem;   /* 28px */
    --space-8: 2rem;      /* 32px */
    --space-10: 2.5rem;   /* 40px */
    --space-12: 3rem;     /* 48px */
    --space-14: 3.5rem;   /* 56px */
    --space-16: 4rem;     /* 64px */
    --space-20: 5rem;     /* 80px */

    /* 圆角系统 */
    --radius-xs: 3px;
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-2xl: 20px;
    --radius-3xl: 24px;

    /* 自然动画系统 */
    --ease-natural: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
    --ease-smooth: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-fast: 0.15s var(--ease-natural);
    --transition-base: 0.25s var(--ease-natural);
    --transition-smooth: 0.35s var(--ease-smooth);
    --transition-bounce: 0.4s var(--ease-bounce);
}

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

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

body {
    font-family: var(--font-family);
    font-size: var(--font-large);
    line-height: 1.6;
    color: var(--text-primary);
    background:
        radial-gradient(circle at 20% 80%, rgba(29, 29, 31, 0.01) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(120, 113, 108, 0.008) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(0, 122, 255, 0.005) 0%, transparent 50%),
        linear-gradient(135deg, var(--silver-light) 0%, var(--warm-gray-50) 100%);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
    font-variant-ligatures: common-ligatures;
}

/* 容器 - 精确控制 */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--space-6);
}

/* 全局增强 */
::selection {
    background: rgba(0, 122, 255, 0.15);
    color: var(--text-primary);
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-medium);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Header - 极致精美设计 */
.header {
    background:
        radial-gradient(ellipse at 50% 0%, rgba(29, 29, 31, 0.01) 0%, transparent 70%),
        linear-gradient(135deg, rgba(250, 250, 250, 0.98) 0%, rgba(248, 249, 250, 0.95) 100%);
    border-bottom: 1px solid var(--separator);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: saturate(200%) blur(40px);
    -webkit-backdrop-filter: saturate(200%) blur(40px);
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.04),
        0 1px 3px rgba(0, 0, 0, 0.02),
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        0 0 0 0.5px rgba(120, 113, 108, 0.08);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-4) 0;
    min-height: 64px;
}

.logo {
    flex: 1;
}

.logo-title {
    font-size: var(--font-3xl);
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: var(--space-1);
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.logo-subtitle {
    font-size: var(--font-small);
    color: var(--text-secondary);
    font-weight: 500;
    line-height: 1.3;
}

.header-actions {
    display: flex;
    align-items: center;
}

.menu-toggle {
    background: none;
    border: none;
    padding: var(--space-3);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-quick);
    display: none;
    flex-direction: column;
    gap: 3px;
    width: 44px;
    height: 44px;
    justify-content: center;
    align-items: center;
}

.menu-toggle:hover {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

.menu-toggle span {
    width: 18px;
    height: 2px;
    background-color: currentColor;
    border-radius: 1px;
    transition: all var(--transition-smooth);
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* 移除搜索功能，专注阅读体验 */

/* 主内容区域 - 高密度布局 */
.main {
    min-height: calc(100vh - 64px);
}

.content-wrapper {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: var(--space-6);
    padding: var(--space-6) 0;
    max-width: 1400px;
    margin: 0 auto;
}

/* 侧边栏 - 极致精美设计 */
.sidebar {
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 249, 250, 0.9) 100%);
    border-radius: var(--radius-3xl);
    padding: var(--space-8);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.06),
        0 2px 8px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        0 0 0 1px rgba(120, 113, 108, 0.08);
    height: fit-content;
    position: sticky;
    top: calc(64px + var(--space-5));
    border: 1px solid var(--warm-gray-200);
    /* 调整最大高度以优化滚动条长度 */
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    /* 改进滚动行为 */
    scroll-behavior: smooth;
    backdrop-filter: saturate(180%) blur(30px);
    -webkit-backdrop-filter: saturate(180%) blur(30px);
}

.book-intro {
    margin-bottom: var(--space-5);
    padding-bottom: var(--space-4);
    border-bottom: 1px solid var(--separator);
}

.book-intro h2 {
    font-size: var(--font-xl);
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: var(--space-3);
    letter-spacing: -0.03em;
}

.book-intro p {
    font-size: var(--font-base);
    color: var(--text-secondary);
    line-height: 1.5;
    font-weight: 500;
}

/* 导航系统 - 极致层次设计 */
.navigation {
    position: relative;
}

.navigation::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background:
        radial-gradient(circle at 20% 20%, rgba(120, 113, 108, 0.01) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(0, 122, 255, 0.008) 0%, transparent 50%);
    border-radius: var(--radius-2xl);
    z-index: -1;
}

.nav-part {
    margin-bottom: var(--space-2);
}

.nav-part:last-child {
    margin-bottom: 0;
}

/* 部分标题 - 简洁优雅设计 */
.nav-part-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-4) var(--space-5);
    background: var(--silver-warm);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-base);
    font-weight: 700;
    font-size: var(--font-medium);
    color: var(--text-primary);
    border: none;
    width: 100%;
    text-align: left;
    letter-spacing: -0.02em;
    border: 1px solid var(--border-light);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-card);
}

.nav-part-title:hover {
    background: var(--warm-gray-100);
    color: var(--graphite-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-elevated);
    border-color: var(--warm-gray-200);
}

.nav-part-title.active {
    background: var(--graphite-dark);
    color: var(--silver-mist);
    border-color: var(--graphite-medium);
    box-shadow: var(--shadow-elevated);
}

.nav-part-title svg {
    transition: transform var(--transition-smooth);
}

.nav-part-title.active svg {
    transform: rotate(180deg);
}

.nav-themes {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-smooth);
    margin-top: var(--space-1);
}

.nav-themes.expanded {
    max-height: none;
    /* 使用足够大的值来容纳所有内容，避免固定限制 */
    max-height: 9999px;
}

.nav-theme {
    margin-bottom: var(--space-1);
    padding-left: var(--space-3);
}

/* 主题标题 - 简洁设计 */
.nav-theme-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-3) var(--space-4);
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
    font-weight: 600;
    font-size: var(--font-base);
    background: var(--warm-gray-50);
    border: 1px solid var(--border-light);
    width: 100%;
    text-align: left;
    letter-spacing: -0.01em;
    position: relative;
    overflow: hidden;
}

.nav-theme-title:hover {
    background: var(--warm-gray-100);
    color: var(--graphite-dark);
    border-color: var(--warm-gray-200);
    transform: translateY(-1px);
    box-shadow: var(--shadow-card);
}

.nav-theme-title.active {
    background: var(--warm-gray-600);
    color: var(--silver-mist);
    border-color: var(--warm-gray-700);
    font-weight: 700;
    box-shadow: var(--shadow-card);
}

/* 问题列表 - 简洁设计 */
.nav-questions {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-smooth);
    padding-left: var(--space-3);
    margin-top: var(--space-1);
    background: var(--warm-gray-50);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
}

.nav-questions.expanded {
    /* 使用足够大的值来容纳所有问题，避免固定限制 */
    max-height: 9999px;
    padding: var(--space-2) var(--space-3);
}

.nav-question {
    padding: var(--space-2) var(--space-3);
    margin: 1px 0;
    color: var(--text-tertiary);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all var(--transition-base);
    font-size: var(--font-small);
    line-height: 1.4;
    position: relative;
    font-weight: 500;
    letter-spacing: -0.01em;
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid transparent;
    width: 100%;
    margin-left: 0;
    margin-right: 0;
}

.nav-question:hover {
    background: var(--warm-gray-100);
    color: var(--graphite-dark);
    transform: translateX(0);
    font-weight: 600;
    box-shadow:
        var(--shadow-card),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border-color: var(--warm-gray-200);
    margin-left: -1px;
    margin-right: -1px;
    width: calc(100% + 2px);
}

.nav-question.active {
    background: var(--warm-gray-200);
    color: var(--graphite-dark);
    font-weight: 600;
    box-shadow:
        var(--shadow-card),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    border-color: var(--warm-gray-300);
    margin-left: -1px;
    margin-right: -1px;
    width: calc(100% + 2px);
}

/* 移除阅读进度，专注内容本身 */

/* 内容区域 - 极致精美设计 */
.content {
    background:
        radial-gradient(circle at 10% 20%, rgba(120, 113, 108, 0.015) 0%, transparent 50%),
        radial-gradient(circle at 90% 80%, rgba(0, 122, 255, 0.01) 0%, transparent 50%),
        linear-gradient(145deg, rgba(250, 250, 250, 0.98) 0%, rgba(245, 245, 247, 0.95) 100%);
    border-radius: var(--radius-3xl);
    box-shadow:
        0 16px 48px rgba(0, 0, 0, 0.08),
        0 4px 16px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.95),
        0 0 0 1px rgba(120, 113, 108, 0.04);
    min-height: 700px;
    border: 1px solid rgba(120, 113, 108, 0.08);
    overflow: hidden;
    position: relative;
}

.content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(120, 113, 108, 0.12) 20%,
        rgba(120, 113, 108, 0.2) 50%,
        rgba(0, 122, 255, 0.15) 80%,
        transparent 100%);
}

.content::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(120, 113, 108, 0.1), transparent);
}

/* 欢迎屏幕 - 游戏级设计美学 */
.welcome-screen {
    padding: var(--space-12) var(--space-8);
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 700px;
    position: relative;
    overflow: hidden;
}

.welcome-screen::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(circle at 30% 20%, rgba(120, 113, 108, 0.02) 0%, transparent 50%),
        radial-gradient(circle at 70% 80%, rgba(0, 122, 255, 0.015) 0%, transparent 50%);
    animation: float 20s ease-in-out infinite;
    z-index: 0;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(-20px, -20px) rotate(1deg); }
    66% { transform: translate(20px, -10px) rotate(-1deg); }
}

.welcome-content {
    position: relative;
    z-index: 1;
}

.welcome-header {
    margin-bottom: var(--space-12);
}

.welcome-header h1 {
    font-size: var(--font-6xl);
    font-weight: 900;
    background: linear-gradient(135deg, var(--graphite-dark) 0%, var(--warm-gray-600) 50%, var(--sapphire-pure) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--space-5);
    letter-spacing: -0.05em;
    line-height: 1.05;
    position: relative;
}

.welcome-ornament {
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 2px;
    margin: 0 auto;
    position: relative;
}

.welcome-ornament::before,
.welcome-ornament::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--primary-color);
    border-radius: 50%;
    top: -2px;
}

.welcome-ornament::before {
    left: -12px;
}

.welcome-ornament::after {
    right: -12px;
}

.welcome-intro {
    margin: var(--space-12) 0;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

.welcome-intro p {
    font-size: var(--font-xl);
    color: var(--text-primary);
    line-height: 1.75;
    font-weight: 400;
    letter-spacing: -0.015em;
    text-align: justify;
    padding: var(--space-10) var(--space-12);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 249, 250, 0.9) 100%);
    border-radius: var(--radius-3xl);
    border: 1px solid rgba(120, 113, 108, 0.06);
    position: relative;
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    box-shadow:
        var(--shadow-elevated),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.welcome-parts {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: var(--space-4);
    margin: var(--space-12) 0;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.part-card {
    background:
        radial-gradient(circle at 30% 30%, rgba(120, 113, 108, 0.02) 0%, transparent 70%),
        linear-gradient(145deg, rgba(250, 250, 250, 0.95) 0%, rgba(245, 245, 247, 0.9) 100%);
    border: 1px solid rgba(120, 113, 108, 0.06);
    border-radius: var(--radius-2xl);
    padding: var(--space-8) var(--space-5);
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-bounce);
    position: relative;
    overflow: hidden;
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.06),
        0 1px 4px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.8),
        0 0 0 0.5px rgba(120, 113, 108, 0.025);
}

.part-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(circle, rgba(120, 113, 108, 0.04) 0%, transparent 70%);
    transition: all 0.8s var(--ease-smooth);
    opacity: 0;
    transform: scale(0.5);
}

.part-card:hover::before {
    opacity: 1;
    transform: scale(1);
}

.part-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.3) 30%,
        rgba(255, 255, 255, 0.5) 50%,
        rgba(255, 255, 255, 0.3) 70%,
        transparent 100%);
    transition: left 1s var(--ease-smooth);
}

.part-card:hover::after {
    left: 100%;
}

.part-card:hover {
    transform: translateY(-6px) scale(1.03);
    box-shadow:
        0 20px 40px rgba(120, 113, 108, 0.1),
        0 8px 24px rgba(0, 0, 0, 0.08),
        0 0 0 1px var(--warm-gray-300),
        inset 0 1px 0 rgba(255, 255, 255, 0.95);
    border-color: var(--warm-gray-300);
}

.part-card:active {
    transform: translateY(-2px) scale(1.01);
    transition-duration: 0.1s;
}

.part-icon {
    font-size: 2.5rem;
    margin-bottom: var(--space-4);
    filter: grayscale(0.2) brightness(1.1);
    transition: all var(--transition-bounce);
    position: relative;
    z-index: 2;
}

.part-card:hover .part-icon {
    filter: grayscale(0) brightness(1.2);
    transform: scale(1.1) rotate(5deg);
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.part-card h3 {
    font-size: var(--font-large);
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: var(--space-2);
    letter-spacing: -0.03em;
}

.part-card p {
    font-size: var(--font-small);
    color: var(--text-secondary);
    font-weight: 600;
    letter-spacing: 0.01em;
}

.welcome-footer {
    margin-top: var(--space-12);
}

.welcome-stats {
    margin-bottom: var(--space-8);
}

.stat-text {
    font-size: var(--font-size-footnote);
    color: var(--text-secondary);
    font-weight: 500;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.start-reading-btn {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: white;
    border: none;
    padding: var(--space-5) var(--space-10);
    border-radius: var(--radius-2xl);
    font-size: var(--font-size-headline);
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-quick);
    display: inline-flex;
    align-items: center;
    gap: var(--space-3);
    box-shadow:
        var(--shadow-elevated),
        0 0 0 1px rgba(120, 113, 108, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    letter-spacing: -0.02em;
    min-width: 200px;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.start-reading-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.8s ease-out;
}

.start-reading-btn:hover::before {
    left: 100%;
}

.start-reading-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow:
        0 8px 32px rgba(120, 113, 108, 0.15),
        0 0 0 1px rgba(120, 113, 108, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.start-reading-btn:active {
    transform: translateY(0) scale(1);
    transition-duration: 0.1s;
}

/* 问题内容 - 极致精密排版 */
.question-content {
    padding: var(--space-10) var(--space-8);
}

.question-header-nav {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin-bottom: var(--space-6);
}

.home-btn {
    background: linear-gradient(135deg, var(--silver-light) 0%, var(--silver-warm) 100%);
    border: 1px solid var(--border-light);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-xl);
    color: var(--text-secondary);
    font-size: var(--font-small);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    gap: var(--space-2);
    letter-spacing: -0.01em;
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
}

.home-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(120, 113, 108, 0.06), transparent);
    transition: left 0.6s var(--ease-smooth);
}

.home-btn:hover::before {
    left: 100%;
}

.home-btn:hover {
    background: var(--warm-gray-100);
    color: var(--graphite-dark);
    border-color: var(--warm-gray-200);
    transform: translateY(-1px);
    box-shadow:
        var(--shadow-elevated),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.home-btn:active {
    transform: translateY(0);
    transition-duration: 0.1s;
}

.breadcrumb {
    font-size: var(--font-base);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-weight: 600;
    letter-spacing: 0.01em;
    flex: 1;
}

.breadcrumb-item {
    color: var(--text-tertiary);
    transition: color var(--transition-quick);
}

.breadcrumb-item.active {
    color: var(--primary-color);
}

.breadcrumb-separator {
    color: var(--text-quaternary);
    font-weight: 300;
    margin: 0 var(--space-1);
}

.question-header {
    margin-bottom: var(--space-10);
    padding-bottom: var(--space-8);
    border-bottom: 2px solid var(--separator);
    position: relative;
}

.question-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, var(--warm-gray-400), var(--sapphire-pure));
    border-radius: 1px;
}

.question-title {
    font-size: var(--font-4xl);
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: var(--space-5);
    letter-spacing: -0.04em;
    max-width: 95%;
    background: linear-gradient(135deg, var(--graphite-dark) 0%, #007AFF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.question-meta {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.question-number {
    background: var(--primary-color);
    color: white;
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-lg);
    font-size: var(--font-small);
    font-weight: 700;
    letter-spacing: 0.01em;
    box-shadow: var(--shadow-card);
}

.question-part {
    color: var(--text-secondary);
    font-size: var(--font-base);
    font-weight: 600;
    letter-spacing: 0.01em;
}

.question-answer {
    font-size: var(--font-large);
    line-height: 1.8;
    color: var(--text-primary);
    margin-bottom: var(--space-12);
    font-weight: 400;
    letter-spacing: -0.015em;
}

.question-answer p {
    margin-bottom: var(--space-6);
    text-align: justify;
}

.question-answer p:last-child {
    margin-bottom: 0;
}

.question-answer strong {
    font-weight: 700;
    color: var(--text-primary);
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.question-answer blockquote {
    margin: var(--space-10) 0;
    padding: var(--space-8) var(--space-10);
    background:
        radial-gradient(circle at 20% 20%, rgba(120, 113, 108, 0.025) 0%, transparent 70%),
        linear-gradient(135deg, rgba(254, 254, 254, 0.9) 0%, rgba(250, 250, 249, 0.8) 100%);
    border-left: 5px solid var(--sapphire-pure);
    border-radius: 0 var(--radius-2xl) var(--radius-2xl) 0;
    font-style: normal;
    color: var(--text-primary);
    font-weight: 500;
    font-size: var(--font-xl);
    line-height: 1.7;
    position: relative;
    box-shadow:
        0 8px 24px rgba(120, 113, 108, 0.04),
        0 2px 8px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    border-top: 1px solid rgba(120, 113, 108, 0.06);
    border-bottom: 1px solid rgba(120, 113, 108, 0.06);
    border-right: 1px solid rgba(120, 113, 108, 0.06);
}

/* 问题页脚 - 极致精美导航 */
.question-footer {
    padding-top: var(--space-16);
    border-top: 2px solid var(--separator);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.question-footer::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 2px;
    background: linear-gradient(90deg,
        transparent 0%,
        var(--warm-gray-400) 30%,
        var(--sapphire-pure) 70%,
        transparent 100%);
    border-radius: 1px;
}

.question-navigation {
    display: flex;
    gap: var(--space-6);
    width: 100%;
    max-width: 500px;
}

.nav-btn {
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-elevated));
    border: 1px solid var(--border-light);
    padding: var(--space-5) var(--space-8);
    border-radius: var(--radius-2xl);
    color: var(--text-primary);
    font-size: var(--font-size-body);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-quick);
    display: flex;
    align-items: center;
    gap: var(--space-3);
    letter-spacing: -0.02em;
    min-height: 56px;
    position: relative;
    overflow: hidden;
    flex: 1;
    justify-content: center;
    box-shadow: var(--shadow-card);
}

.nav-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(120, 113, 108, 0.06), transparent);
    transition: left 0.6s ease-out;
}

.nav-btn:hover::before {
    left: 100%;
}

.nav-btn:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-elevated);
}

.nav-btn:disabled {
    opacity: 0.2;
    cursor: not-allowed;
    transform: none;
    background: var(--bg-secondary);
}

.nav-btn:disabled:hover {
    background: var(--bg-secondary);
    border-color: var(--border-light);
    color: var(--text-primary);
    transform: none;
    box-shadow: var(--shadow-card);
}

.nav-btn:disabled::before {
    display: none;
}

.prev-btn {
    border-radius: var(--radius-2xl) var(--radius-lg) var(--radius-lg) var(--radius-2xl);
}

.next-btn {
    border-radius: var(--radius-lg) var(--radius-2xl) var(--radius-2xl) var(--radius-lg);
}

/* 移动端遮罩 */
.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 90;
    opacity: 0;

    /* 默认状态下不可见且不响应事件 */
    visibility: hidden;
    pointer-events: none;

    /* 让 visibility 的变化与 opacity 同步 */
    transition: opacity var(--transition-base), visibility 0s var(--transition-base);
}

.mobile-overlay.active {
    opacity: 1;

    /* active 状态下恢复可见和事件响应 */
    visibility: visible;
    pointer-events: auto;

    /* 优化 transition */
    transition: opacity var(--transition-base);
}

/* 移动端手势支持 */
.swipe-indicator {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-lg);
    font-size: var(--font-size-xs);
    opacity: 0;
    transition: opacity var(--transition-base);
    z-index: 1000;
    pointer-events: none;
}

.swipe-indicator.show {
    opacity: 1;
}

/* 增强的按钮样式 - 苹果式状态反馈 */
.action-btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: var(--shadow-card);
}

/* 游戏级微交互系统 */
.nav-part-title:active,
.nav-theme-title:active,
.nav-question:active,
.start-reading-btn:active,
.nav-btn:active,
.home-btn:active,
.part-card:active {
    transform: scale(0.96);
    transition-duration: 0.1s;
}

/* 精致的悬停光效 */
.nav-part-title,
.nav-theme-title,
.nav-question {
    background-clip: padding-box;
}

.nav-part-title:hover,
.nav-theme-title:hover,
.nav-question:hover {
    animation: shimmer 1.5s ease-in-out;
}

@keyframes shimmer {
    0% { box-shadow: var(--shadow-card); }
    50% { box-shadow:
        var(--shadow-elevated),
        0 0 20px rgba(120, 113, 108, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.4); }
    100% { box-shadow: var(--shadow-card); }
}

/* 呼吸动画 */
.part-card {
    animation: breathe 4s ease-in-out infinite;
}

@keyframes breathe {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-1px) scale(1.005); }
}

.part-card:hover {
    animation: none;
}

/* 选中状态的精致设计 */
.nav-question.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, white, rgba(255, 255, 255, 0.8));
    border-radius: 0 2px 2px 0;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
}

/* 游戏级微交互效果 - 自然光影 */
.nav-part-title::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
        transparent,
        rgba(255, 255, 255, 0.4) 30%,
        rgba(255, 255, 255, 0.6) 50%,
        rgba(255, 255, 255, 0.4) 70%,
        transparent);
    transition: left 1s var(--ease-smooth);
}

.nav-part-title:hover::after {
    left: 100%;
}

.nav-theme-title::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
        transparent,
        rgba(255, 255, 255, 0.3) 30%,
        rgba(255, 255, 255, 0.5) 50%,
        rgba(255, 255, 255, 0.3) 70%,
        transparent);
    transition: left 0.8s var(--ease-smooth);
}

.nav-theme-title:hover::after {
    left: 100%;
}

.nav-question::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
        transparent,
        rgba(255, 255, 255, 0.2) 40%,
        rgba(255, 255, 255, 0.4) 50%,
        rgba(255, 255, 255, 0.2) 60%,
        transparent);
    transition: left 0.6s var(--ease-smooth);
}

.nav-question:hover::after {
    left: 100%;
}

/* 精致的滚动条 */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(120, 113, 108, 0.02);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: var(--warm-gray-300);
    border-radius: 3px;
    box-shadow: none;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--warm-gray-400);
}

/* 平滑滚动增强 */
.question-answer {
    scroll-margin-top: 120px;
}

/* 加载状态 */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

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

/* 工具类 */
.hidden {
    display: none !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* 无障碍增强 */
.focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}
