/* ============================================================
   NeuralNet Explorer — Dark Futuristic Theme
   ============================================================ */
:root {
  --bg: #05070f;
  --bg2: #0a0e1d;
  --panel: rgba(255, 255, 255, 0.035);
  --panel-border: rgba(255, 255, 255, 0.08);
  --text: #e8ecf4;
  --text-dim: #8b93a7;
  --cyan: #22d3ee;
  --purple: #a78bfa;
  --magenta: #f472b6;
  --amber: #fbbf24;
  --green: #34d399;
  --red: #f87171;
  --glow-cyan: 0 0 24px rgba(34, 211, 238, 0.35);
  --radius: 16px;
  --sidebar-w: 236px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  line-height: 1.75;
  overflow-x: hidden;
}

/* 背景氛围光 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(600px 400px at 85% -5%, rgba(139, 92, 246, 0.10), transparent 60%),
    radial-gradient(700px 500px at -10% 40%, rgba(34, 211, 238, 0.07), transparent 60%),
    radial-gradient(600px 500px at 90% 95%, rgba(244, 114, 182, 0.06), transparent 60%);
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(34,211,238,.4), rgba(167,139,250,.4));
  border-radius: 5px;
}

::selection { background: rgba(34, 211, 238, 0.3); }

/* ============ 侧边导航 ============ */
#sidebar {
  position: fixed;
  left: 0; top: 0; bottom: 0;
  width: var(--sidebar-w);
  background: rgba(8, 11, 22, 0.85);
  backdrop-filter: blur(18px);
  border-right: 1px solid var(--panel-border);
  z-index: 100;
  display: flex;
  flex-direction: column;
  padding: 22px 0 14px;
  transition: transform 0.3s ease;
}

.logo { display: flex; align-items: center; gap: 12px; padding: 0 20px 20px; border-bottom: 1px solid var(--panel-border); }
.logo-orb {
  width: 38px; height: 38px; border-radius: 50%;
  background: conic-gradient(from 120deg, var(--cyan), var(--purple), var(--magenta), var(--cyan));
  box-shadow: 0 0 18px rgba(34, 211, 238, 0.55);
  animation: orbSpin 6s linear infinite;
}
@keyframes orbSpin { to { filter: hue-rotate(360deg); } }
.logo-title { display: block; font-weight: 800; font-size: 17px; letter-spacing: 0.5px; background: linear-gradient(90deg, var(--cyan), var(--purple)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.logo-sub { font-size: 10px; letter-spacing: 4px; color: var(--text-dim); }

#nav-list { list-style: none; overflow-y: auto; flex: 1; padding: 12px 10px; }
#nav-list::-webkit-scrollbar { width: 4px; }
.nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; margin: 1px 0;
  color: var(--text-dim); text-decoration: none;
  border-radius: 10px; font-size: 13.5px;
  border-left: 2px solid transparent;
  transition: all 0.2s;
}
.nav-link i { font-style: normal; width: 18px; text-align: center; opacity: 0.7; }
.nav-link:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.nav-link.active {
  color: #fff;
  background: linear-gradient(90deg, rgba(34, 211, 238, 0.14), transparent);
  border-left-color: var(--cyan);
  box-shadow: inset 0 0 20px rgba(34, 211, 238, 0.06);
}
.sidebar-foot { padding: 12px 20px 0; border-top: 1px solid var(--panel-border); font-size: 11px; color: var(--text-dim); }

#nav-toggle {
  display: none;
  position: fixed; top: 14px; left: 14px; z-index: 200;
  width: 42px; height: 42px; border-radius: 10px;
  background: rgba(8, 11, 22, 0.9); color: var(--text);
  border: 1px solid var(--panel-border); font-size: 18px; cursor: pointer;
}

/* ============ 主区 ============ */
#content { margin-left: var(--sidebar-w); position: relative; z-index: 1; }

.section { padding: 90px 48px 40px; max-width: 1240px; margin: 0 auto; }

.section-head { margin-bottom: 34px; position: relative; }
.sec-num {
  position: absolute; top: -38px; left: -8px;
  font-size: 110px; font-weight: 900; line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.07);
  user-select: none; pointer-events: none;
}
.section-head h2 { font-size: 34px; font-weight: 800; letter-spacing: 1px; }
.section-head h2 .en, .card h3 .en { font-size: 15px; color: var(--text-dim); font-weight: 500; letter-spacing: 2px; }
.sec-sub { color: var(--text-dim); margin-top: 4px; font-size: 15px; }

.grad-cyan { background: linear-gradient(90deg, var(--cyan), #67e8f9); -webkit-background-clip: text; background-clip: text; color: transparent; }
.grad-purple { background: linear-gradient(90deg, var(--purple), var(--magenta)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ============ HERO ============ */
.hero-section {
  position: relative; height: 100vh; min-height: 620px;
  display: flex; align-items: center; justify-content: center;
  padding: 0; max-width: none;
}
#hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-overlay { position: relative; z-index: 2; text-align: center; padding: 0 24px; }
.hero-badge {
  display: inline-block; padding: 6px 18px; margin-bottom: 22px;
  font-size: 11px; letter-spacing: 5px; color: var(--cyan);
  border: 1px solid rgba(34, 211, 238, 0.4); border-radius: 999px;
  background: rgba(34, 211, 238, 0.06);
  box-shadow: var(--glow-cyan);
  animation: float 4s ease-in-out infinite;
}
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.hero-title {
  font-size: clamp(42px, 7vw, 76px); font-weight: 900; line-height: 1.2;
  text-shadow: 0 0 60px rgba(34, 211, 238, 0.25);
}
.hero-desc { margin: 22px auto 34px; color: var(--text-dim); font-size: 17px; }
.hero-btns { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 44px; justify-content: center; margin-top: 54px; }
.hstat b { display: block; font-size: 30px; background: linear-gradient(90deg, var(--cyan), var(--purple)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hstat span { font-size: 12px; color: var(--text-dim); }

.scroll-hint {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%);
  width: 26px; height: 44px; border: 2px solid rgba(255,255,255,0.25); border-radius: 14px; z-index: 2;
}
.scroll-hint span {
  position: absolute; top: 8px; left: 50%; margin-left: -2px;
  width: 4px; height: 9px; border-radius: 2px; background: var(--cyan);
  animation: scrollDot 1.8s ease-in-out infinite;
}
@keyframes scrollDot { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(16px); } }

/* ============ 按钮 ============ */
.btn {
  display: inline-block; padding: 13px 30px; border-radius: 12px;
  font-size: 15px; font-weight: 600; text-decoration: none; cursor: pointer;
  border: 1px solid var(--panel-border);
  background: var(--panel); color: var(--text);
  transition: all 0.25s;
}
.btn:hover { transform: translateY(-2px); border-color: rgba(34, 211, 238, 0.5); box-shadow: var(--glow-cyan); }
.btn-primary {
  background: linear-gradient(120deg, #0891b2, #7c3aed);
  border: none; color: #fff;
  box-shadow: 0 4px 24px rgba(34, 211, 238, 0.3);
}
.btn-primary:hover { box-shadow: 0 6px 32px rgba(139, 92, 246, 0.5); }
.btn-ghost { background: transparent; }
.btn-sm { padding: 7px 14px; font-size: 12.5px; border-radius: 9px; }

/* ============ 卡片 ============ */
.card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 26px 28px;
  backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
}
.card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(34, 211, 238, 0.5), transparent);
  opacity: 0; transition: opacity 0.3s;
}
.card:hover::before { opacity: 1; }
.card h3 { font-size: 18px; margin-bottom: 12px; font-weight: 700; }
.card h3 small { color: var(--text-dim); font-weight: 400; font-size: 13px; margin-left: 6px; }
.card p { color: #c3cadb; font-size: 14.5px; margin-bottom: 10px; }
.card b { color: #fff; }
.card.wide { margin-top: 22px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 22px; }

.mini-card {
  background: var(--panel); border: 1px solid var(--panel-border);
  border-radius: 14px; padding: 20px 22px;
  transition: all 0.25s;
}
.mini-card:hover { border-color: rgba(167, 139, 250, 0.4); transform: translateY(-3px); box-shadow: 0 8px 28px rgba(139, 92, 246, 0.15); }
.mini-card h4 { font-size: 15px; margin-bottom: 8px; color: var(--purple); }
.mini-card p { font-size: 13.5px; color: var(--text-dim); }

.pretty-list { list-style: none; margin: 10px 0; }
.pretty-list li { padding: 5px 0 5px 22px; position: relative; color: #c3cadb; font-size: 14px; }
.pretty-list li::before {
  content: "▸"; position: absolute; left: 4px; color: var(--cyan);
}

.tip-box {
  margin-top: 14px; padding: 14px 18px;
  background: rgba(251, 191, 36, 0.07);
  border: 1px solid rgba(251, 191, 36, 0.25);
  border-radius: 12px; font-size: 13.5px; color: #e7d9b8;
}
.tip-box b { color: var(--amber); }

.muted { color: var(--text-dim); font-size: 13.5px; }

.block-title { margin: 36px 0 18px; font-size: 20px; }
.block-title small { color: var(--text-dim); font-weight: 400; font-size: 13px; }

/* ============ 公式 ============ */
.formula {
  font-family: "Cambria Math", Georgia, serif; font-style: italic;
  font-size: 18px; color: #eaf6ff;
  background: rgba(34, 211, 238, 0.05);
  border: 1px solid rgba(34, 211, 238, 0.15);
  border-radius: 12px;
  padding: 14px 20px; margin: 12px 0;
  text-align: center;
  overflow-x: auto;
}
.formula-row { display: flex; gap: 14px; flex-wrap: wrap; }
.formula-row .formula { flex: 1; min-width: 220px; }
.frac { display: inline-flex; flex-direction: column; vertical-align: middle; text-align: center; margin: 0 3px; font-size: 0.85em; }
.frac-line { border-top: 1.5px solid currentColor; margin: 2px 0; }

/* ============ 3D 容器 ============ */
.canvas-card { padding: 20px; }
.three-box {
  width: 100%; height: 380px; border-radius: 12px;
  background: radial-gradient(ellipse at center, rgba(15, 22, 44, 0.9), rgba(5, 7, 15, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden; cursor: grab; position: relative;
}
.three-box:active { cursor: grabbing; }
.three-box.tall { height: 440px; }
.three-box canvas { display: block; }

.builder-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; align-items: center; }
.builder-stats {
  display: flex; gap: 28px; margin-top: 12px; font-size: 14px; color: var(--text-dim);
}
.builder-stats b { color: #fff; font-size: 16px; }

/* ============ 时间线 ============ */
.timeline { padding: 0 6px; }
.tl-track {
  display: flex; gap: 0; overflow-x: auto; padding: 20px 0 8px;
  position: relative;
}
.tl-track::before {
  content: ""; position: absolute; top: 34px; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--purple), var(--magenta));
  opacity: 0.4;
}
.tl-item { min-width: 150px; flex: 1; padding: 0 10px; cursor: pointer; position: relative; text-align: center; }
.tl-dot {
  width: 14px; height: 14px; border-radius: 50%; margin: 8px auto 12px;
  background: var(--bg2); border: 2px solid var(--cyan);
  transition: all 0.25s; position: relative; z-index: 1;
}
.tl-item:hover .tl-dot, .tl-item.active .tl-dot { background: var(--cyan); box-shadow: var(--glow-cyan); transform: scale(1.3); }
.tl-year { font-weight: 800; color: var(--cyan); font-size: 15px; }
.tl-name { font-size: 12.5px; color: var(--text-dim); }
.tl-detail {
  margin-top: 10px; padding: 18px 22px;
  background: rgba(139, 92, 246, 0.07); border: 1px solid rgba(139, 92, 246, 0.25);
  border-radius: 12px; font-size: 14px; color: #d9d4f0; display: none;
}
.tl-detail.show { display: block; animation: fadeUp 0.35s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ============ 神经元实验台 ============ */
.neuron-lab { display: grid; grid-template-columns: 300px 1fr; gap: 26px; margin-top: 16px; }
.nl-controls { display: flex; flex-direction: column; gap: 10px; }
.slider-row { display: grid; grid-template-columns: 52px 1fr 52px; align-items: center; gap: 10px; font-size: 13px; }
.slider-row b { color: var(--cyan); text-align: right; font-family: Consolas, monospace; }
input[type="range"] {
  -webkit-appearance: none; width: 100%; height: 5px; border-radius: 3px;
  background: linear-gradient(90deg, rgba(34,211,238,.5), rgba(167,139,250,.5));
  outline: none; cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%;
  background: #fff; border: 3px solid var(--cyan);
  box-shadow: 0 0 10px rgba(34, 211, 238, 0.6); cursor: pointer;
}
.nl-viz { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
#neuron-curve { background: rgba(5,7,15,.6); border-radius: 12px; border: 1px solid rgba(255,255,255,.06); }
.nl-output { display: flex; flex-direction: column; gap: 12px; }
.nl-num { font-size: 17px; font-family: Consolas, monospace; }
.nl-num b { font-size: 24px; }
select {
  background: rgba(10, 14, 29, 0.9); color: var(--text);
  border: 1px solid var(--panel-border); border-radius: 9px;
  padding: 8px 12px; font-size: 13.5px; outline: none; cursor: pointer;
}
select:focus { border-color: var(--cyan); }

/* ============ 前向传播 ============ */
.forward-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 14px; }
.step-bar { display: flex; align-items: center; gap: 10px; }
.step-label { font-family: Consolas, monospace; color: var(--cyan); font-size: 13px; min-width: 90px; text-align: center; }
.forward-body { display: grid; grid-template-columns: 1.5fr 1fr; gap: 20px; }
.forward-explain {
  background: rgba(5, 7, 15, 0.55); border: 1px solid rgba(255,255,255,.06);
  border-radius: 12px; padding: 20px; font-size: 14px; min-height: 200px;
}
.forward-explain h4 { color: var(--cyan); margin-bottom: 10px; font-size: 16px; }
.forward-explain .calc {
  font-family: Consolas, monospace; font-size: 13px;
  background: rgba(34, 211, 238, 0.06); border-radius: 8px;
  padding: 10px 14px; margin: 10px 0; color: #bfefff; line-height: 1.9;
}

/* ============ 激活函数 ============ */
.act-layout { display: grid; grid-template-columns: 300px 1fr; gap: 24px; }
.act-btns { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.act-btn {
  padding: 6px 14px; border-radius: 999px; font-size: 13px; cursor: pointer;
  background: var(--panel); border: 1px solid var(--panel-border); color: var(--text-dim);
  transition: all 0.2s;
}
.act-btn.active { color: #fff; border-color: currentColor; box-shadow: 0 0 14px rgba(255,255,255,.08); font-weight: 600; }
.check-line { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-dim); cursor: pointer; user-select: none; }
.check-line input { accent-color: var(--cyan); }
.act-info {
  margin-top: 14px; padding: 14px 16px; border-radius: 12px;
  background: rgba(5,7,15,.5); border: 1px solid rgba(255,255,255,.06);
  font-size: 13px; color: var(--text-dim); min-height: 120px;
}
.act-info b { color: var(--text); }
.act-right { min-height: 340px; }

/* ============ 损失函数 ============ */
.ce-lab label { font-size: 14px; }
.ce-result { font-family: Consolas, monospace; font-size: 18px; margin: 8px 0; }
.ce-result b { color: var(--amber); }
#ce-chart { width: 100%; max-height: 220px; margin-top: 8px; }

/* ============ 梯度消失 ============ */
.vanish-lab { display: grid; grid-template-columns: 320px 1fr; gap: 26px; align-items: center; }
.vanish-num { font-family: Consolas, monospace; font-size: 24px; margin: 10px 0; }
.vanish-num b { color: var(--red); }
#vanish-chart { width: 100%; max-height: 260px; }

/* ============ 梯度下降 ============ */
.gd-body { display: grid; grid-template-columns: 1fr 300px; gap: 20px; }
.gd-side { display: flex; flex-direction: column; gap: 12px; }
#gd-contour { background: rgba(5,7,15,.6); border-radius: 12px; border: 1px solid rgba(255,255,255,.06); width: 100%; }
.gd-readout { font-family: Consolas, monospace; font-size: 13.5px; color: var(--cyan); text-align: center; }

/* ============ 训练实验室 ============ */
.pg-card { border-color: rgba(34, 211, 238, 0.2); box-shadow: 0 0 50px rgba(34, 211, 238, 0.06); }
.pg-layout { display: grid; grid-template-columns: 250px 1fr; gap: 26px; }
.pg-controls { display: flex; flex-direction: column; gap: 18px; }
.pg-group label { display: block; font-size: 13px; color: var(--text-dim); margin-bottom: 8px; }
.pg-group label b { color: var(--cyan); }
.pg-datasets { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ds-btn {
  padding: 9px 6px; border-radius: 10px; font-size: 13px; cursor: pointer;
  background: var(--panel); border: 1px solid var(--panel-border); color: var(--text-dim);
  transition: all 0.2s;
}
.ds-btn.active { color: #fff; border-color: var(--cyan); background: rgba(34, 211, 238, 0.12); box-shadow: var(--glow-cyan); }
.pg-layer-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.pg-layer-row .cnt { font-family: Consolas, monospace; color: var(--cyan); width: 30px; text-align: center; font-size: 16px; }
.pg-layer-row button {
  width: 28px; height: 28px; border-radius: 8px; cursor: pointer;
  background: var(--panel); border: 1px solid var(--panel-border); color: var(--text);
}
.pg-layer-row .lbl { font-size: 12px; color: var(--text-dim); flex: 1; }
#pg-addlayer {
  width: 100%; padding: 6px; border-radius: 9px; cursor: pointer; font-size: 12.5px;
  background: transparent; border: 1px dashed rgba(255,255,255,.2); color: var(--text-dim);
}
#pg-addlayer:hover { border-color: var(--cyan); color: var(--cyan); }
.pg-btns { display: flex; gap: 10px; }
.pg-btns .btn { flex: 1; text-align: center; padding: 11px 8px; }
.pg-stats { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; text-align: center; }
.pg-stats div { background: rgba(5,7,15,.5); border: 1px solid rgba(255,255,255,.06); border-radius: 10px; padding: 8px 4px; }
.pg-stats span { display: block; font-size: 11px; color: var(--text-dim); }
.pg-stats b { font-size: 16px; font-family: Consolas, monospace; }
.pg-viz { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; align-items: start; }
#pg-canvas { width: 100%; border-radius: 12px; border: 1px solid rgba(255,255,255,.08); background: #0a0e1d; }
#pg-losschart { width: 100%; background: rgba(5,7,15,.5); border-radius: 12px; border: 1px solid rgba(255,255,255,.06); padding: 8px; }

/* ============ 网络家族 ============ */
.family-tabs { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.fam-tab {
  padding: 10px 22px; border-radius: 999px; cursor: pointer; font-size: 14px;
  background: var(--panel); border: 1px solid var(--panel-border); color: var(--text-dim);
  transition: all 0.25s;
}
.fam-tab.active {
  color: #fff; font-weight: 700;
  background: linear-gradient(120deg, rgba(8,145,178,.5), rgba(124,58,237,.5));
  border-color: rgba(34,211,238,.5); box-shadow: var(--glow-cyan);
}
#family-panel h3 { margin-bottom: 6px; }
#family-panel .fam-tag { font-size: 12px; color: var(--amber); letter-spacing: 1px; }
#family-panel .fam-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; margin-top: 14px; align-items: start; }
#family-panel svg { width: 100%; height: auto; }
.fam-points { list-style: none; }
.fam-points li { padding: 6px 0 6px 24px; position: relative; font-size: 13.5px; color: #c3cadb; }
.fam-points li::before { content: "◆"; position: absolute; left: 2px; color: var(--purple); font-size: 10px; top: 11px; }

/* ============ 卷积演示 ============ */
.conv-lab { margin-top: 14px; }
.conv-ctrl { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.conv-grids { display: flex; gap: 26px; flex-wrap: wrap; }
.conv-grids h4 { font-size: 13px; color: var(--text-dim); margin-bottom: 8px; }
.conv-grids canvas { border-radius: 10px; border: 1px solid rgba(255,255,255,.1); background: #0a0e1d; image-rendering: pixelated; }

/* ============ 数学 ============ */
.math-card h3 { margin-top: 22px; color: var(--purple); }
.math-card h3:first-child { margin-top: 0; }
.loop-steps { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.loop-step {
  padding: 10px 16px; border-radius: 10px; font-size: 13px;
  background: rgba(167, 139, 250, 0.08); border: 1px solid rgba(167, 139, 250, 0.3);
}
.loop-arrow { color: var(--cyan); font-weight: 800; }

/* ============ 术语表 ============ */
.glossary-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.gloss-item {
  background: var(--panel); border: 1px solid var(--panel-border); border-radius: 12px;
  padding: 16px 18px; transition: all 0.25s;
}
.gloss-item:hover { border-color: rgba(34, 211, 238, 0.35); transform: translateY(-2px); }
.gloss-term { font-weight: 700; font-size: 14.5px; color: var(--cyan); }
.gloss-en { font-size: 11.5px; color: var(--text-dim); margin-left: 6px; }
.gloss-def { font-size: 13px; color: #b6bdd0; margin-top: 6px; }

/* ============ 学习路径 ============ */
.roadmap { position: relative; padding-left: 34px; }
.roadmap::before {
  content: ""; position: absolute; left: 10px; top: 8px; bottom: 8px; width: 2px;
  background: linear-gradient(180deg, var(--cyan), var(--purple), var(--magenta));
  border-radius: 2px; opacity: 0.5;
}
.rm-stage { position: relative; margin-bottom: 26px; }
.rm-stage::before {
  content: ""; position: absolute; left: -30px; top: 6px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--bg); border: 3px solid var(--cyan);
  box-shadow: var(--glow-cyan);
}
.rm-stage h3 { font-size: 17px; }
.rm-stage h3 span { font-size: 12px; color: var(--amber); margin-left: 10px; letter-spacing: 1px; }
.rm-stage p { font-size: 13.5px; color: var(--text-dim); margin: 6px 0; }
.rm-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.rm-tag { font-size: 12px; padding: 4px 12px; border-radius: 999px; background: rgba(34,211,238,.08); border: 1px solid rgba(34,211,238,.25); color: #a5f3fc; }

/* ============ 测验 ============ */
.quiz-card { max-width: 760px; }
.qz-q { font-size: 17px; font-weight: 700; margin-bottom: 6px; }
.qz-progress { font-size: 12.5px; color: var(--text-dim); margin-bottom: 18px; }
.qz-opt {
  display: block; width: 100%; text-align: left; margin: 8px 0; padding: 13px 18px;
  border-radius: 12px; cursor: pointer; font-size: 14px;
  background: var(--panel); border: 1px solid var(--panel-border); color: var(--text);
  transition: all 0.2s;
}
.qz-opt:hover { border-color: rgba(34, 211, 238, 0.4); }
.qz-opt.correct { background: rgba(52, 211, 153, 0.12); border-color: var(--green); }
.qz-opt.wrong { background: rgba(248, 113, 113, 0.12); border-color: var(--red); }
.qz-opt:disabled { cursor: default; }
.qz-explain { margin-top: 12px; padding: 12px 16px; border-radius: 10px; font-size: 13.5px; background: rgba(34,211,238,.06); border: 1px solid rgba(34,211,238,.2); display: none; }
.qz-explain.show { display: block; animation: fadeUp 0.3s ease; }
.qz-score { text-align: center; padding: 30px 0; }
.qz-score b { font-size: 56px; background: linear-gradient(90deg, var(--cyan), var(--purple)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ============ 页脚 ============ */
.footer { text-align: center; padding: 50px 24px 40px; border-top: 1px solid var(--panel-border); font-size: 13.5px; }

/* ============ 滚动渐显 ============ */
.reveal { opacity: 0; transform: translateY(36px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ============ 响应式 ============ */
@media (max-width: 1100px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .forward-body, .gd-body, .pg-viz, .neuron-lab, .vanish-lab, .act-layout { grid-template-columns: 1fr; }
  #family-panel .fam-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  #sidebar { transform: translateX(-100%); }
  #sidebar.open { transform: none; }
  #nav-toggle { display: block; }
  #content { margin-left: 0; }
  .section { padding: 70px 20px 30px; }
  .grid-2, .grid-3, .pg-layout { grid-template-columns: 1fr; }
  .hero-stats { gap: 24px; }
}
