/* ========================================
   解剖学学习网页 - 全局样式
   ======================================== */

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

:root {
    --primary: #2563eb;
    --primary-light: #dbeafe;
    --primary-dark: #1e40af;
    --accent: #059669;
    --accent-light: #d1fae5;
    --warning: #d97706;
    --warning-light: #fef3c7;
    --danger: #dc2626;
    --danger-light: #fee2e2;
    --purple: #7c3aed;
    --purple-light: #ede9fe;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --radius: 12px;
    --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", sans-serif;
    line-height: 1.8;
    color: var(--gray-800);
    background: var(--gray-50);
}

/* ===== 顶部导航 ===== */
.top-nav {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: white;
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-md);
}
.top-nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}
.top-nav .logo {
    font-size: 1.2rem;
    font-weight: 700;
    text-decoration: none;
    color: white;
    display: flex;
    align-items: center;
    gap: 8px;
}
.top-nav .logo:hover { opacity: 0.9; }
.top-nav .nav-links {
    display: flex;
    gap: 4px;
    list-style: none;
    flex-wrap: wrap;
}
.top-nav .nav-links a {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    transition: all 0.2s;
}
.top-nav .nav-links a:hover,
.top-nav .nav-links a.active {
    background: rgba(255,255,255,0.2);
    color: white;
}

/* ===== 面包屑 ===== */
.breadcrumb {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem 0;
    font-size: 0.85rem;
    color: var(--gray-500);
}
.breadcrumb a {
    color: var(--primary);
    text-decoration: none;
}
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { margin: 0 6px; }

/* ===== 页面标题区 ===== */
.page-hero {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 2rem 1rem;
}
.page-hero h1 {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}
.page-hero .subtitle {
    font-size: 1.1rem;
    color: var(--gray-500);
    max-width: 700px;
}
.page-hero .chapter-badge {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 12px;
}

/* ===== 主内容区 ===== */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem 3rem;
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 2rem;
    align-items: start;
}
.main-content.full-width {
    grid-template-columns: 1fr;
}
.content-body {
    min-width: 0;
}
.content-body h2 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--gray-900);
    margin: 2.5rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid var(--primary);
    display: inline-block;
}
.content-body h2:first-child { margin-top: 0; }
.content-body h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-800);
    margin: 1.8rem 0 0.8rem;
}
.content-body h4 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--gray-700);
    margin: 1.2rem 0 0.5rem;
}
.content-body p {
    margin-bottom: 1rem;
    color: var(--gray-700);
}
.content-body ul, .content-body ol {
    margin: 0.5rem 0 1rem 1.5rem;
    color: var(--gray-700);
}
.content-body li { margin-bottom: 0.4rem; }

/* ===== 侧边栏 ===== */
.sidebar {
    position: sticky;
    top: 80px;
}
.sidebar-card {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}
.sidebar-card h3 {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.sidebar-card .toc-list {
    list-style: none;
    padding: 0;
}
.sidebar-card .toc-list li {
    margin-bottom: 2px;
}
.sidebar-card .toc-list a {
    display: block;
    padding: 6px 10px;
    color: var(--gray-600);
    text-decoration: none;
    font-size: 0.85rem;
    border-radius: 6px;
    border-left: 3px solid transparent;
    transition: all 0.2s;
}
.sidebar-card .toc-list a:hover {
    background: var(--primary-light);
    color: var(--primary);
    border-left-color: var(--primary);
}

/* ===== 卡片 ===== */
.card {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s;
}
.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}
.card h3 {
    margin-top: 0;
}

/* ===== 章节网格（首页用） ===== */
.chapter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}
.chapter-card {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s;
    border-left: 4px solid var(--primary);
    display: block;
}
.chapter-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}
.chapter-card .ch-num {
    display: inline-block;
    background: var(--primary);
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    text-align: center;
    line-height: 36px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 10px;
}
.chapter-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 6px;
}
.chapter-card p {
    font-size: 0.9rem;
    color: var(--gray-500);
    margin: 0;
    line-height: 1.5;
}
.chapter-card .tag {
    display: inline-block;
    background: var(--gray-100);
    color: var(--gray-600);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    margin-top: 8px;
}

/* 不同系统颜色 */
.chapter-card.green { border-left-color: var(--accent); }
.chapter-card.green .ch-num { background: var(--accent); }
.chapter-card.orange { border-left-color: var(--warning); }
.chapter-card.orange .ch-num { background: var(--warning); }
.chapter-card.red { border-left-color: var(--danger); }
.chapter-card.red .ch-num { background: var(--danger); }
.chapter-card.purple { border-left-color: var(--purple); }
.chapter-card.purple .ch-num { background: var(--purple); }

/* ===== 知识卡片 ===== */
.info-box {
    border-radius: var(--radius);
    padding: 1.2rem 1.5rem;
    margin: 1.5rem 0;
}
.info-box.blue {
    background: var(--primary-light);
    border-left: 4px solid var(--primary);
}
.info-box.green {
    background: var(--accent-light);
    border-left: 4px solid var(--accent);
}
.info-box.yellow {
    background: var(--warning-light);
    border-left: 4px solid var(--warning);
}
.info-box.red {
    background: var(--danger-light);
    border-left: 4px solid var(--danger);
}
.info-box.purple {
    background: var(--purple-light);
    border-left: 4px solid var(--purple);
}
.info-box .box-title {
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.info-box p { margin-bottom: 0.5rem; }
.info-box p:last-child { margin-bottom: 0; }

/* ===== 对比表格 ===== */
.compare-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}
.compare-table th {
    background: var(--primary);
    color: white;
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
}
.compare-table td {
    padding: 10px 16px;
    border-bottom: 1px solid var(--gray-200);
    font-size: 0.9rem;
    color: var(--gray-700);
}
.compare-table tr:last-child td { border-bottom: none; }
.compare-table tr:hover td { background: var(--gray-50); }

/* ===== 流程图（纯CSS） ===== */
.flow-steps {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 1.5rem 0;
}
.flow-step {
    background: var(--primary-light);
    color: var(--primary-dark);
    padding: 8px 18px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
}
.flow-arrow {
    color: var(--gray-400);
    font-size: 1.2rem;
}

/* ===== 关键数字高亮 ===== */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}
.stat-item {
    background: white;
    border-radius: var(--radius);
    padding: 1.2rem;
    text-align: center;
    box-shadow: var(--shadow);
}
.stat-item .num {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    display: block;
}
.stat-item .label {
    font-size: 0.85rem;
    color: var(--gray-500);
    margin-top: 4px;
}

/* ===== 章节导航（底部） ===== */
.chapter-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--gray-200);
    gap: 1rem;
}
.chapter-nav a {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--primary);
    font-weight: 600;
    padding: 12px 20px;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: all 0.2s;
    max-width: 48%;
}
.chapter-nav a:hover {
    box-shadow: var(--shadow-md);
    background: var(--primary-light);
}
.chapter-nav a.next { margin-left: auto; }
.chapter-nav .nav-label {
    font-size: 0.75rem;
    color: var(--gray-500);
    font-weight: 400;
    display: block;
}

/* ===== 页脚 ===== */
.site-footer {
    background: var(--gray-800);
    color: var(--gray-300);
    text-align: center;
    padding: 2rem;
    font-size: 0.85rem;
    margin-top: 2rem;
}
.site-footer a {
    color: var(--primary-light);
    text-decoration: none;
}

/* ===== 生活案例 ===== */
.life-example {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border-radius: var(--radius);
    padding: 1.2rem 1.5rem;
    margin: 1.2rem 0;
    position: relative;
}
.life-example::before {
    content: "💡 生活案例";
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--warning);
    display: block;
    margin-bottom: 6px;
}

/* ===== 临床链接 ===== */
.clinical-link {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    border-radius: var(--radius);
    padding: 1.2rem 1.5rem;
    margin: 1.2rem 0;
}
.clinical-link::before {
    content: "🏥 临床联系";
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--danger);
    display: block;
    margin-bottom: 6px;
}

/* ===== 记忆口诀 ===== */
.mnemonic {
    background: linear-gradient(135deg, #ede9fe, #ddd6fe);
    border-radius: var(--radius);
    padding: 1.2rem 1.5rem;
    margin: 1.2rem 0;
}
.mnemonic::before {
    content: "🧠 记忆技巧";
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--purple);
    display: block;
    margin-bottom: 6px;
}

/* ===== 关键概念 ===== */
.key-concept {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    border-radius: var(--radius);
    padding: 1.2rem 1.5rem;
    margin: 1.2rem 0;
}
.key-concept::before {
    content: "🔑 关键概念";
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--primary);
    display: block;
    margin-bottom: 6px;
}

/* ===== 图示占位 ===== */
.diagram-box {
    background: white;
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius);
    padding: 2rem;
    text-align: center;
    margin: 1.5rem 0;
    color: var(--gray-500);
    font-size: 0.9rem;
}

/* ===== CS类比框 ===== */
.cs-analogy {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
    color: #e0e7ff;
    border-radius: var(--radius);
    padding: 1.5rem;
    margin: 1.5rem 0;
    position: relative;
    overflow: hidden;
}
.cs-analogy::before {
    content: '💻';
    position: absolute;
    top: -10px;
    right: 10px;
    font-size: 4rem;
    opacity: 0.15;
}
.cs-analogy .cs-title {
    font-weight: 700;
    font-size: 1rem;
    color: #a5b4fc;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.cs-analogy p, .cs-analogy li {
    color: #c7d2fe;
    margin-bottom: 0.3rem;
}
.cs-analogy strong {
    color: #e0e7ff;
}
.cs-analogy code {
    background: rgba(255,255,255,0.12);
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 0.88em;
    color: #a5f3fc;
}

/* ===== 导读框 ===== */
.chapter-intro {
    background: linear-gradient(135deg, var(--primary-light), #eff6ff);
    border-left: 4px solid var(--primary);
    border-radius: 0 var(--radius) var(--radius) 0;
    padding: 1.5rem;
    margin: 0 0 2rem 0;
}
.chapter-intro h3 {
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
    font-size: 1rem;
}
.chapter-intro .intro-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 0.8rem;
}
.chapter-intro .intro-item {
    background: white;
    border-radius: 8px;
    padding: 0.8rem 1rem;
    box-shadow: var(--shadow);
}
.chapter-intro .intro-item .intro-label {
    font-weight: 700;
    color: var(--primary);
    font-size: 0.85rem;
    display: block;
    margin-bottom: 0.3rem;
}

/* ===== FAQ模块 ===== */
.faq-section {
    margin: 1.5rem 0;
}
.faq-item {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    margin-bottom: 0.8rem;
    overflow: hidden;
}
.faq-q {
    background: var(--gray-50);
    padding: 0.8rem 1.2rem;
    font-weight: 700;
    color: var(--gray-800);
    border-bottom: 1px solid var(--gray-200);
}
.faq-q::before {
    content: 'Q: ';
    color: var(--primary);
}
.faq-a {
    padding: 0.8rem 1.2rem;
    color: var(--gray-700);
}
.faq-a::before {
    content: 'A: ';
    color: var(--accent);
    font-weight: 700;
}

/* ===== 误区提示 ===== */
.misconception {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-left: 4px solid var(--danger);
    border-radius: 0 var(--radius) var(--radius) 0;
    padding: 1.2rem 1.5rem;
    margin: 1.2rem 0;
}
.misconception .myth {
    color: var(--danger);
    font-weight: 700;
    text-decoration: line-through;
    display: block;
    margin-bottom: 0.3rem;
}
.misconception .truth {
    color: var(--accent);
    font-weight: 700;
    display: block;
}

/* ===== 跨系统链接卡片 ===== */
.cross-ref {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: var(--purple-light);
    color: var(--purple);
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.85rem;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s;
}
.cross-ref:hover {
    background: #ddd6fe;
}

/* ===== 场景卡片 (daily-scenarios) ===== */
.scenario-card {
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    padding: 2rem;
    margin: 1.5rem 0;
    transition: border-color 0.3s, box-shadow 0.3s;
}
.scenario-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 20px rgba(79,70,229,0.1);
}
.scenario-card .scenario-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}
.scenario-card .scenario-icon {
    font-size: 2.5rem;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border-radius: 16px;
    flex-shrink: 0;
}
.scenario-card .scenario-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--heading-color);
}
.scenario-card .scenario-subtitle {
    font-size: 0.9rem;
    color: #6b7280;
    margin-top: 2px;
}
.scenario-card .system-flow {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
}
.scenario-card .system-tag {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    background: #f3f4f6;
    color: #374151;
}
.scenario-card .system-tag.active { background: #dbeafe; color: #1d4ed8; }
.scenario-card .system-tag.warn { background: #fef3c7; color: #92400e; }
.scenario-card .system-tag.danger { background: #fee2e2; color: #991b1b; }
.scenario-card .system-tag.success { background: #d1fae5; color: #065f46; }
.scenario-card .system-tag.purple { background: #ede9fe; color: #5b21b6; }

/* ===== 信号卡片 (body-signals) ===== */
.signal-card {
    background: #fff;
    border-left: 5px solid #f59e0b;
    border-radius: 0 12px 12px 0;
    padding: 1.5rem 1.5rem 1.5rem 1.8rem;
    margin: 1rem 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.signal-card h4 {
    font-size: 1.15rem;
    color: var(--heading-color);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.signal-card .signal-q {
    font-weight: 600;
    color: #b45309;
    margin-bottom: 0.5rem;
}
.signal-card .signal-a {
    color: #374151;
    line-height: 1.8;
}
.signal-card .anatomy-tag {
    display: inline-block;
    background: #fef3c7;
    color: #92400e;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    margin: 0 2px;
}

/* ===== 动手体验卡片 (hands-on) ===== */
.hands-on-card {
    background: linear-gradient(135deg, #f0fdf4 0%, #fff 60%);
    border: 2px solid #86efac;
    border-radius: 16px;
    padding: 1.5rem 1.8rem;
    margin: 1rem 0;
    position: relative;
}
.hands-on-card::before {
    content: "🖐️";
    position: absolute;
    top: -12px;
    right: 16px;
    font-size: 1.5rem;
    background: #fff;
    padding: 0 6px;
    border-radius: 50%;
}
.hands-on-card h4 {
    color: #166534;
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
}
.hands-on-card .steps {
    counter-reset: step;
    list-style: none;
    padding: 0;
}
.hands-on-card .steps li {
    counter-increment: step;
    padding: 0.5rem 0 0.5rem 2.5rem;
    position: relative;
    line-height: 1.7;
    color: #374151;
}
.hands-on-card .steps li::before {
    content: "步骤" counter(step);
    position: absolute;
    left: 0;
    font-size: 0.75rem;
    font-weight: 700;
    color: #16a34a;
    background: #dcfce7;
    padding: 2px 8px;
    border-radius: 10px;
    top: 0.55rem;
}
.hands-on-card .what-you-feel {
    margin-top: 1rem;
    padding: 0.8rem 1rem;
    background: #dcfce7;
    border-radius: 10px;
    font-size: 0.95rem;
}
.hands-on-card .what-you-feel strong {
    color: #166534;
}
.hands-on-card .caution {
    margin-top: 0.8rem;
    padding: 0.6rem 1rem;
    background: #fef9c3;
    border-radius: 10px;
    font-size: 0.85rem;
    color: #854d0e;
}

/* ===== 学习进度 (learning-path) ===== */
.progress-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}
.progress-stat {
    background: #fff;
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}
.progress-stat .big-num {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color), #7c3aed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.progress-stat .stat-label {
    font-size: 0.9rem;
    color: #6b7280;
    margin-top: 4px;
}
.chapter-progress-list {
    list-style: none;
    padding: 0;
}
.chapter-progress-list li {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.2rem;
    background: #fff;
    border-radius: 12px;
    margin: 0.5rem 0;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}
.chapter-progress-list li:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.chapter-progress-list .ch-status {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
    background: #f3f4f6;
}
.chapter-progress-list .ch-status.done { background: #d1fae5; }
.chapter-progress-list .ch-status.reading { background: #dbeafe; }
.chapter-progress-list .ch-info { flex: 1; }
.chapter-progress-list .ch-name { font-weight: 600; color: var(--heading-color); }
.chapter-progress-list .ch-meta { font-size: 0.8rem; color: #9ca3af; margin-top: 2px; }
.progress-bar-mini {
    width: 100%;
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
    margin-top: 6px;
}
.progress-bar-mini .fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), #7c3aed);
    border-radius: 3px;
    transition: width 0.5s ease;
}

/* ===== 响应式 ===== */
@media (max-width: 900px) {
    .main-content {
        grid-template-columns: 1fr;
        padding: 1rem;
    }
    .sidebar { display: none; }
    .page-hero { padding: 1.5rem 1rem 0.5rem; }
    .page-hero h1 { font-size: 1.6rem; }
    .breadcrumb { padding: 0.8rem 1rem 0; }
    .top-nav-inner { padding: 0 1rem; }
    .top-nav .nav-links { display: none; }
    .chapter-grid {
        grid-template-columns: 1fr;
    }
    .chapter-nav { flex-direction: column; }
    .chapter-nav a { max-width: 100%; }
    .stat-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .flow-steps { justify-content: center; }
    .scenario-card .scenario-header { flex-direction: column; text-align: center; }
    .progress-overview { grid-template-columns: repeat(2, 1fr); }
}

/* ===================================================
   首页专属内容区组件
   =================================================== */

/* ---- 区块容器 ---- */
.home-section {
    margin: 2.8rem 0;
}
.home-section-header {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 1.2rem;
    padding-bottom: 10px;
    border-bottom: 2px solid #e5e7eb;
}
.home-section-header h2 {
    margin: 0;
    font-size: 1.35rem;
    color: var(--heading-color);
}
.section-sub {
    font-size: 0.85rem;
    color: #9ca3af;
}

/* ---- 阶段标签 ---- */
.phase-label {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin: 1.2rem 0 0.8rem;
    letter-spacing: 0.02em;
}
.phase-green  { background: #dcfce7; color: #15803d; }
.phase-yellow { background: #fef9c3; color: #92400e; }
.phase-red    { background: #fee2e2; color: #991b1b; }

/* ---- 工具横条网格 ---- */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 10px;
}
.tool-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 12px;
    text-decoration: none !important;
    border: 1.5px solid transparent;
    transition: all 0.2s;
}
.tool-card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.1); }
.tool-icon { font-size: 1.6rem; flex-shrink: 0; line-height: 1; }
.tool-name { font-weight: 600; font-size: 0.95rem; margin-bottom: 3px; }
.tool-desc { font-size: 0.8rem; opacity: 0.75; }

.tool-green  { background: #f0fdf4; border-color: #86efac; color: #166534 !important; }
.tool-orange { background: #fff7ed; border-color: #fed7aa; color: #9a3412 !important; }
.tool-purple { background: #faf5ff; border-color: #d8b4fe; color: #6b21a8 !important; }
.tool-blue   { background: #eff6ff; border-color: #bfdbfe; color: #1e40af !important; }
.tool-amber  { background: #fffbeb; border-color: #fde68a; color: #92400e !important; }
.tool-teal   { background: #f0fdfa; border-color: #99f6e4; color: #115e59 !important; }
.tool-indigo { background: #eef2ff; border-color: #c7d2fe; color: #3730a3 !important; }

.tool-green:hover  { background: #dcfce7; border-color: #4ade80; }
.tool-orange:hover { background: #ffedd5; border-color: #fb923c; }
.tool-purple:hover { background: #f3e8ff; border-color: #c084fc; }
.tool-blue:hover   { background: #dbeafe; border-color: #93c5fd; }
.tool-amber:hover  { background: #fef3c7; border-color: #fbbf24; }
.tool-teal:hover   { background: #ccfbf1; border-color: #2dd4bf; }
.tool-indigo:hover { background: #e0e7ff; border-color: #818cf8; }

/* ---- 系统联动网格 ---- */
.systems-flow-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}
.sf-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 14px 12px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    transition: all 0.2s;
}
.sf-item:hover { background: #eff6ff; border-color: #bfdbfe; transform: translateY(-2px); }
.sf-icon { font-size: 1.5rem; }
.sf-name { font-weight: 600; font-size: 0.88rem; color: #1e293b; }
.sf-desc { font-size: 0.78rem; color: #64748b; line-height: 1.4; }

/* ---- 响应式 ---- */
@media (max-width: 900px) {
    .systems-flow-grid { grid-template-columns: repeat(2, 1fr); }
    .tools-grid { grid-template-columns: 1fr; }
    .home-section-header { flex-direction: column; gap: 2px; }
}

/* ===================================================
   导航系统升级：下拉菜单 / 汉堡按钮 / 侧边栏 / FAB
   =================================================== */

/* ---- 下拉菜单 ---- */
.nav-dropdown { position: relative; }

.nav-dropdown-toggle {
    display: flex !important;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    user-select: none;
}

.nav-arrow {
    font-size: 0.65em;
    transition: transform 0.2s;
    display: inline-block;
}
.nav-dropdown.open .nav-arrow { transform: rotate(180deg); }

.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.18), 0 0 0 1px rgba(0,0,0,0.06);
    padding: 16px;
    z-index: 1000;
    gap: 12px;
}
.nav-dropdown.open .nav-dropdown-menu { display: flex; }
.chapters-menu { min-width: 540px; }
.tools-menu    { min-width: 360px; }

/* 小三角 */
.nav-dropdown-menu::before {
    content: '';
    position: absolute;
    top: -7px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-bottom: 7px solid white;
}

.dropdown-group { flex: 1; min-width: 0; }

.dropdown-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 4px 10px 6px;
}

.nav-dropdown-menu a {
    display: block;
    padding: 7px 10px;
    border-radius: 7px;
    color: #334155 !important;
    font-size: 0.84rem;
    text-decoration: none !important;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}
.nav-dropdown-menu a:hover  { background: #f1f5f9; color: #1d4ed8 !important; }
.nav-dropdown-menu a.active { background: #eff6ff; color: #2563eb !important; font-weight: 600; }

/* ---- 汉堡按钮 ---- */
.nav-hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 26px;
    height: 18px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    margin-left: 12px;
    flex-shrink: 0;
}
.nav-hamburger span {
    display: block;
    height: 2px;
    background: white;
    border-radius: 2px;
}

/* ---- 遮罩层 ---- */
.nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1100;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}
.nav-overlay.show { display: block; }

/* ---- 侧边栏 ---- */
.nav-sidebar {
    position: fixed;
    top: 0;
    right: -300px;
    width: 280px;
    height: 100vh;
    background: white;
    z-index: 1200;
    overflow-y: auto;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -4px 0 32px rgba(0,0,0,0.2);
}
.nav-sidebar.open { right: 0; }

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    height: 60px;
    background: linear-gradient(135deg, #1e3a8a, #2563eb);
    color: white;
    font-weight: 600;
    font-size: 0.92rem;
    position: sticky;
    top: 0;
    z-index: 1;
}
.sidebar-close {
    background: none;
    border: none;
    color: rgba(255,255,255,0.8);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
    transition: color 0.15s;
    border-radius: 4px;
}
.sidebar-close:hover { color: white; background: rgba(255,255,255,0.15); }

.sidebar-body { padding: 8px 0 32px; }

.sidebar-section {
    padding: 12px 20px 4px;
    font-size: 0.7rem;
    font-weight: 700;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: 4px;
}
.sidebar-link {
    display: block;
    padding: 10px 20px;
    color: #374151;
    text-decoration: none;
    font-size: 0.88rem;
    border-left: 3px solid transparent;
    transition: all 0.15s;
}
.sidebar-link:hover  { background: #f8fafc; color: #1d4ed8; border-left-color: #bfdbfe; }
.sidebar-link.active { background: #eff6ff; color: #2563eb; border-left-color: #2563eb; font-weight: 600; }

/* ---- FAB 返回首页 ---- */
.fab-home {
    position: fixed;
    bottom: 28px;
    right: 24px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white !important;
    text-decoration: none !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    box-shadow: 0 4px 20px rgba(37,99,235,0.45);
    z-index: 900;
    transition: all 0.22s;
}
.fab-home:hover {
    transform: translateY(-4px) scale(1.08);
    box-shadow: 0 8px 28px rgba(37,99,235,0.55);
}
.fab-home::after {
    content: '返回首页';
    position: absolute;
    right: 58px;
    top: 50%;
    transform: translateY(-50%);
    background: #1e293b;
    color: white;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 0.78rem;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.fab-home:hover::after { opacity: 1; }

/* ===================================================
   首页专属英雄区
   =================================================== */
.index-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 55%, #312e81 100%);
    padding: 64px 24px 52px;
    position: relative;
    overflow: hidden;
}
.index-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(255,255,255,0.04) 1px, transparent 1px);
    background-size: 32px 32px;
    pointer-events: none;
}
.index-hero-inner {
    max-width: 820px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 1;
}
.index-hero-badge {
    display: inline-block;
    background: rgba(96,165,250,0.15);
    border: 1px solid rgba(96,165,250,0.3);
    color: #93c5fd;
    padding: 5px 18px;
    border-radius: 20px;
    font-size: 0.82rem;
    margin-bottom: 20px;
    letter-spacing: 0.02em;
}
.index-hero-title {
    font-size: 3.6rem;
    font-weight: 800;
    margin: 0 0 12px;
    background: linear-gradient(135deg, #ffffff 0%, #93c5fd 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
}
.index-hero-sub {
    font-size: 1.1rem;
    color: #94a3b8;
    margin: 0 0 36px;
}
.index-hero-stats {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    padding: 20px 8px;
    margin-bottom: 32px;
    gap: 0;
}
.ihs-item { text-align: center; padding: 0 24px; }
.ihs-divider {
    width: 1px;
    height: 36px;
    background: rgba(255,255,255,0.15);
    flex-shrink: 0;
}
.ihs-num {
    display: block;
    font-size: 2.2rem;
    font-weight: 800;
    color: #60a5fa;
    line-height: 1;
}
.ihs-label {
    display: block;
    font-size: 0.78rem;
    color: #94a3b8;
    margin-top: 4px;
}
.index-hero-cta {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}
.hero-btn-primary {
    background: #2563eb;
    color: white !important;
    text-decoration: none !important;
    padding: 13px 30px;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.2s;
    box-shadow: 0 4px 20px rgba(37,99,235,0.45);
}
.hero-btn-primary:hover { background: #1d4ed8; transform: translateY(-2px); box-shadow: 0 6px 24px rgba(37,99,235,0.55); }
.hero-btn-outline {
    background: rgba(255,255,255,0.08);
    color: white !important;
    text-decoration: none !important;
    padding: 13px 30px;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    border: 1px solid rgba(255,255,255,0.22);
    transition: all 0.2s;
}
.hero-btn-outline:hover { background: rgba(255,255,255,0.15); transform: translateY(-2px); }
.index-hero-organs {
    display: flex;
    justify-content: center;
    gap: 18px;
    flex-wrap: wrap;
}
.index-hero-organs span {
    font-size: 1.8rem;
    opacity: 0.6;
    display: inline-block;
    transition: all 0.3s;
    cursor: default;
    animation: organFloat 3s ease-in-out infinite;
}
.index-hero-organs span:nth-child(1) { animation-delay: 0s; }
.index-hero-organs span:nth-child(2) { animation-delay: 0.35s; }
.index-hero-organs span:nth-child(3) { animation-delay: 0.7s; }
.index-hero-organs span:nth-child(4) { animation-delay: 1.05s; }
.index-hero-organs span:nth-child(5) { animation-delay: 1.4s; }
.index-hero-organs span:nth-child(6) { animation-delay: 1.75s; }
.index-hero-organs span:nth-child(7) { animation-delay: 2.1s; }
.index-hero-organs span:nth-child(8) { animation-delay: 2.45s; }
.index-hero-organs span:hover { opacity: 1; transform: scale(1.35) translateY(-5px); }
@keyframes organFloat {
    0%, 100% { opacity: 0.5; transform: translateY(0); }
    50%       { opacity: 0.85; transform: translateY(-6px); }
}

/* ===================================================
   响应式补充
   =================================================== */
@media (max-width: 900px) {
    .nav-hamburger { display: flex; }
    .index-hero { padding: 44px 20px 40px; }
    .index-hero-title { font-size: 2.4rem; }
    .index-hero-sub { font-size: 0.95rem; margin-bottom: 24px; }
    .index-hero-stats { padding: 16px 4px; }
    .ihs-item { padding: 0 14px; }
    .ihs-num { font-size: 1.7rem; }
    .fab-home { bottom: 20px; right: 16px; width: 44px; height: 44px; font-size: 1.15rem; }
    .fab-home::after { display: none; }
}

/* ===== 打印样式 ===== */
@media print {
    .top-nav, .sidebar, .chapter-nav, .site-footer { display: none; }
    .main-content { grid-template-columns: 1fr; }
    body { background: white; }
}
