/* ============================================================
   网络技术知识站  |  全局样式表
   科技感深色主题 · 玻璃拟态 · 渐变高光
   ============================================================ */

:root {
  --bg: #02030a;
  --bg-2: #060a17;
  --panel: rgba(18, 27, 48, 0.55);
  --panel-solid: #111a30;
  --border: rgba(120, 160, 255, 0.14);
  --border-strong: rgba(120, 180, 255, 0.35);
  --text: rgba(232, 238, 252, 0.86);
  --text-dim: rgba(147, 162, 196, 0.72);
  --text-mute: rgba(95, 111, 146, 0.62);
  --accent: #6fa3d8;
  --accent-2: #7c84cf;
  --accent-3: #7ab8cc;
  --cyan: #7ab8cc;
  --blue: #6f93d2;
  --violet: #9a8fd0;
  --green: #34d399;
  --amber: #fbbf24;
  --red: #fb7185;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.65);
  --glow: 0 0 40px -8px rgba(111, 163, 216, 0.28);
  --font: "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
  --font-display: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --mono: "JetBrains Mono", "Fira Code", "SF Mono", Consolas, monospace;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ---------- 背景装饰 ---------- */
/* 底色由 sky.js Canvas 绘制（深空蓝+体积星云），这里仅作深蓝兜底 */
.bg-decor {
  position: fixed; inset: 0; z-index: -3;
  background: #06163e;
}
.bg-grid { display: none; } /* 星空模式不需要网格 */

/* ---------- 容器 ---------- */
.container { width: min(1180px, 92vw); margin: 0 auto; }

/* ---------- 顶部导航 ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(7, 11, 22, 0.72);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 66px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.3px;
  color: var(--text);
  text-decoration: none;
}
.brand .logo {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: var(--glow);
}
.brand .logo svg { width: 20px; height: 20px; }
.brand b { color: var(--accent); }
.nav-links { display: flex; gap: 6px; align-items: center; }
.nav-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 14.5px;
  padding: 8px 14px;
  border-radius: 8px;
  transition: all 0.2s;
}
.nav-links a:hover { color: var(--text); background: rgba(120, 160, 255, 0.08); }
.nav-links a.active { color: var(--accent); background: rgba(56, 189, 248, 0.1); }

.nav-toggle { display: none; background: none; border: 0; color: var(--text); cursor: pointer; }

/* ---------- Hero ---------- */
.hero { padding: 84px 0 56px; text-align: center; position: relative; }
.hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent-3);
  padding: 6px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.06);
  margin-bottom: 26px;
}
.hero .eyebrow .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
  animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.4} }
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(34px, 6vw, 60px);
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: 1px;
  margin-bottom: 22px;
}
.hero h1 .grad {
  background: linear-gradient(110deg,
    rgba(212, 228, 252, 0.93) 0%,
    rgba(150, 186, 226, 0.89) 25%,
    rgba(224, 198, 168, 0.87) 50%,
    rgba(150, 186, 226, 0.89) 75%,
    rgba(212, 228, 252, 0.93) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow:
    0 0 10px rgba(206, 224, 250, 0.16),
    0 0 24px rgba(150, 186, 226, 0.10),
    0 0 48px rgba(224, 198, 168, 0.06);
  animation: textFlow 3s linear infinite;
}
.hero p {
  max-width: 620px;
  margin: 0 auto;
  color: var(--text-dim);
  font-size: 17px;
}
.hero .stats {
  display: flex;
  justify-content: center;
  gap: 42px;
  margin-top: 44px;
  flex-wrap: wrap;
}
.hero .stat { text-align: center; }
.hero .stat .num {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
  background: linear-gradient(120deg, rgba(210, 228, 255, 0.92), rgba(150, 192, 230, 0.9) 50%, rgba(225, 200, 175, 0.85));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow:
    0 0 8px rgba(225, 240, 255, 0.40),
    0 0 20px rgba(150, 185, 230, 0.28),
    0 0 44px rgba(170, 150, 215, 0.18),
    0 0 68px rgba(225, 200, 170, 0.10);
}
.hero .stat .lbl { font-size: 13px; color: var(--text-mute); letter-spacing: 0.5px; }

/* ---------- 着陆页（首页） ---------- */
.landing-hero {
  min-height: calc(100vh - 66px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 0 80px;
  position: relative;
}
.landing-hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent-3);
  padding: 7px 16px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.08);
  backdrop-filter: blur(8px);
  margin-bottom: 30px;
}
.landing-hero .eyebrow .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
  animation: pulse 2s infinite;
}
.landing-hero h1 {
  font-size: clamp(44px, 8vw, 92px);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: 1px;
  margin-bottom: 24px;
  text-shadow: 0 0 60px rgba(111, 163, 216, 0.25);
}
.landing-hero h1 .grad {
  background: linear-gradient(110deg,
    rgba(212, 228, 252, 0.93) 0%,
    rgba(150, 186, 226, 0.89) 25%,
    rgba(224, 198, 168, 0.87) 50%,
    rgba(150, 186, 226, 0.89) 75%,
    rgba(212, 228, 252, 0.93) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow:
    0 0 10px rgba(206, 224, 250, 0.16),
    0 0 24px rgba(150, 186, 226, 0.10),
    0 0 48px rgba(224, 198, 168, 0.06);
  animation: textFlow 3s linear infinite;
}
.landing-hero p {
  max-width: 560px;
  margin: 0 auto;
  color: var(--text-dim);
  font-size: 17.5px;
}
.landing-cta { margin-top: 46px; display: flex; justify-content: center; }

/* 立刻进入：深色玻璃胶囊 + 蓝金流体光边框，与星空背景协调 */
.start-btn-glow {
  position: relative;
  display: inline-flex;
  padding: 2px;
  border-radius: 999px;
  background: conic-gradient(from var(--angle, 0deg),
    rgba(111, 163, 216, 0) 0%,
    rgba(111, 163, 216, 0.85) 20%,
    rgba(224, 198, 168, 0.85) 40%,
    rgba(111, 163, 216, 0.85) 60%,
    rgba(224, 198, 168, 0.85) 80%,
    rgba(111, 163, 216, 0) 100%);
  animation: cardFlow 4s linear infinite;
}
.start-btn-glow::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 999px;
  background: inherit;
  filter: blur(10px);
  opacity: 0.55;
  z-index: -1;
}
.start-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 22px 64px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--text);
  text-decoration: none;
  border-radius: 999px;
  background: rgba(8, 16, 34, 0.78);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(120, 170, 230, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  transition: transform 0.3s cubic-bezier(.2,.8,.2,1), box-shadow 0.3s, color 0.3s;
}
.start-btn svg { width: 26px; height: 26px; transition: transform 0.3s; }
.start-btn:hover {
  transform: translateY(-3px) scale(1.03);
  color: #fff;
  box-shadow: 0 0 30px -8px rgba(111, 163, 216, 0.4), inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}
.start-btn:hover svg { transform: translateX(6px); }
.landing-meta {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 40px;
  color: var(--text-mute);
  font-size: 13.5px;
  font-family: var(--mono);
  letter-spacing: 0.5px;
}
.landing-meta i {
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--accent);
  opacity: 0.6;
}
.scroll-hint {
  position: absolute;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  width: 26px; height: 42px;
  border: 2px solid rgba(160, 190, 255, 0.35);
  border-radius: 14px;
}
.scroll-hint span {
  position: absolute;
  top: 7px; left: 50%;
  width: 4px; height: 9px;
  margin-left: -2px;
  border-radius: 3px;
  background: var(--accent);
  animation: scrollDot 1.8s ease-in-out infinite;
}
@keyframes scrollDot { 0%{transform:translateY(0);opacity:1} 70%{transform:translateY(16px);opacity:0} 100%{opacity:0} }

/* 着陆页：极光氛围层 */
.landing-aurora {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(58% 48% at 50% 36%, rgba(56,189,248,.20), transparent 70%),
    radial-gradient(42% 36% at 20% 62%, rgba(139,92,246,.16), transparent 72%),
    radial-gradient(42% 36% at 82% 56%, rgba(52,211,153,.12), transparent 72%);
  filter: blur(8px);
  animation: auroraFloat 12s ease-in-out infinite;
}
@keyframes auroraFloat { 0%,100%{opacity:.85;transform:translateY(0)} 50%{opacity:1;transform:translateY(-10px)} }
.landing-hero > *:not(.landing-aurora) { position: relative; z-index: 1; }

/* ---------- 章节标题 ---------- */
.section { padding: 40px 0 20px; }
.section-head { margin-bottom: 30px; }
.section-head .tag {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 2px;
  text-transform: uppercase;
}
.section-head h2 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-top: 6px;
}
.section-head p { color: var(--text-dim); margin-top: 8px; }

/* ---------- 模块卡片网格 ---------- */
.modules {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
  padding-bottom: 40px;
}
.mod-card {
  position: relative;
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 34px 30px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  background:
    linear-gradient(rgba(15, 22, 46, 0.16), rgba(15, 22, 46, 0.16)) padding-box,
    linear-gradient(135deg, rgba(140, 180, 255, 0.26), rgba(99, 102, 241, 0.10) 40%,
      rgba(120, 160, 255, 0.03) 70%, rgba(139, 92, 246, 0.2)) border-box;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  overflow: hidden;
  transform: perspective(1100px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--ty, 0));
  transition: transform 0.22s ease-out, box-shadow 0.4s, background 0.3s;
  will-change: transform;
}
.mod-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(420px 220px at var(--mx, 50%) var(--my, 0%), var(--c1), transparent 70%);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}
.mod-card:hover {
  --ty: -9px;
  box-shadow: 0 34px 70px -22px rgba(0, 0, 0, 0.75), 0 0 46px -10px var(--c1);
}
.mod-card:hover::before { opacity: 0.16; }

/* 数字水印 */
.mod-num {
  position: absolute;
  top: 16px; right: 22px;
  font-family: var(--mono);
  font-size: 68px;
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(135deg, var(--c1), var(--c2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  opacity: 0.16;
  pointer-events: none;
  transition: opacity 0.35s, transform 0.35s;
}
.mod-card:hover .mod-num { opacity: 0.32; transform: translateY(-4px); }

/* 图标 + 脉动光环 */
.mod-card .icon {
  position: relative;
  width: 58px; height: 58px;
  border-radius: 16px;
  display: grid; place-items: center;
  margin-bottom: 22px;
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--c1) 28%, transparent),
    color-mix(in srgb, var(--c2) 22%, transparent));
  border: 1px solid color-mix(in srgb, var(--c1) 40%, transparent);
  box-shadow: 0 8px 22px -12px color-mix(in srgb, var(--c1) 50%, transparent),
              inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: transform 0.35s cubic-bezier(.2,.8,.2,1);
}
.mod-card:hover .icon { transform: scale(1.08) rotate(-4deg); }
.mod-card .icon svg { width: 28px; height: 28px; stroke: color-mix(in srgb, var(--c1) 55%, #ffffff 45%); position: relative; z-index: 1; }
.icon-ring {
  position: absolute;
  inset: -6px;
  border-radius: 20px;
  border: 1px solid var(--c1);
  opacity: 0.35;
  pointer-events: none;
  animation: ringPulse 3s ease-in-out infinite;
}
@keyframes ringPulse {
  0%, 100% { opacity: 0.1; transform: scale(1); }
  50% { opacity: 0.3; transform: scale(1.05); }
}

/* 光泽扫过 */
.shine {
  position: absolute;
  top: 0; left: -80%;
  width: 55%; height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.14), transparent);
  transform: skewX(-20deg);
  transition: left 0.7s ease;
  pointer-events: none;
}
.mod-card:hover .shine { left: 135%; }

/* ---------- 流体光边框 + 环绕星 + 设备背景 ---------- */
/* 可动画的角度变量（用于 conic 渐变流动） */
@property --angle { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
@keyframes cardFlow { to { --angle: 360deg; } }

/* 沿圆角边框流动的彗星光（流体光） */
.mod-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.6px;
  background: conic-gradient(from var(--angle),
    transparent 0deg,
    color-mix(in srgb, var(--c1) 55%, transparent) 35deg,
    color-mix(in srgb, var(--c2) 70%, transparent) 65deg,
    transparent 120deg,
    transparent 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
  z-index: 3;
  animation: cardFlow 7s linear infinite;
}
.mod-card:hover::after { animation-duration: 3.6s; }

/* 设备蓝图：交换机 + 路由器，随模块色淡显，hover 略亮 */
.mod-bg {
  position: absolute;
  right: 0; top: 50%;
  transform: translateY(-50%);
  width: 52%; height: 82%;
  color: var(--c1);
  opacity: 0.13;
  z-index: 0;
  pointer-events: none;
  transition: opacity 0.4s;
}
.mod-bg svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 0 4px color-mix(in srgb, var(--c1) 32%, transparent)); }
.mod-card:hover .mod-bg { opacity: 0.24; }
/* 卡片文字内容置于设备背景之上，避免被盖住 */
.mod-card .icon, .mod-card h3, .mod-card .desc, .mod-card .meta, .mod-card .arrow {
  position: relative; z-index: 2;
}

/* 沿边框轨道环绕的星点（offset-path 走圆角矩形路径） */
.mod-orbit {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 1;
  offset-path: rect(0 0 100% 100% round 16px);
  offset-anchor: 0% 0%;
  animation: orbitStar 11s linear infinite;
}
.mod-orbit.b { animation-duration: 15s; animation-delay: -5s; }
.mod-orbit.c { animation-duration: 19s; animation-delay: -11s; }
.mod-orbit::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--c1) 85%, #ffffff 15%);
  box-shadow: 0 0 7px 1px color-mix(in srgb, var(--c1) 75%, transparent);
  transform: translate(2px, 2px);
}
@keyframes orbitStar { from { offset-distance: 0%; } to { offset-distance: 100%; } }

/* ---------- 正文插图 ---------- */
.rich-img { max-width: 100%; height: auto; border-radius: 12px; margin: 14px 0; display: block; border: 1px solid var(--border); box-shadow: 0 8px 30px -12px rgba(0,0,0,.5); }
.rich-fig { margin: 16px 0; text-align: center; }
.rich-fig .rich-img { display: inline-block; margin: 0; }
.rich-fig figcaption { margin-top: 8px; font-size: 12.5px; color: var(--text-mute); font-family: var(--mono); }

/* ---------- 知识点附件 ---------- */
.topic-files { padding: 14px 24px 20px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; border-top: 1px dashed var(--border); }
.tf-label { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-mute); font-family: var(--mono); }
.tf-label svg { width: 15px; height: 15px; }
.tf-chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; text-decoration: none; color: var(--text); font-size: 13px; background: rgba(120,160,255,.08); border: 1px solid var(--border); transition: .25s; }
.tf-chip:hover { background: rgba(120,160,255,.16); border-color: var(--accent); transform: translateY(-2px); }
.tf-chip svg { width: 16px; height: 16px; color: var(--accent); }

/* 尊重“减少动态”偏好：关闭流动与环绕 */
@media (prefers-reduced-motion: reduce) {
  .mod-card::after, .mod-orbit, .start-btn-glow { animation: none; }
}

/* ============================================================
   护眼模式（暖色 · 降蓝 · 降亮）
   ============================================================ */
html.eye-care {
  --bg: #0b0d09;
  --bg-2: #0f120c;
  --panel: rgba(30, 33, 24, 0.55);
  --panel-solid: #1b1e15;
  --border: rgba(160, 168, 125, 0.16);
  --border-strong: rgba(170, 178, 135, 0.34);
  --text: rgba(214, 218, 196, 0.80);
  --text-dim: rgba(158, 166, 138, 0.68);
  --text-mute: rgba(120, 128, 104, 0.58);
  --accent: #c8a45f;
  --accent-2: #c69a5c;
  --accent-3: #b89a5c;
  --cyan: #b89a5c;
  --blue: #b89a5c;
  --violet: #b89a86;
  --green: #9bbf6a;
  --amber: #d9a94f;
  --red: #d2836f;
  --glow: 0 0 36px -10px rgba(200, 164, 95, 0.20);
}
html.eye-care .nav { background: rgba(14, 16, 11, 0.74); }
html.eye-care .bg-decor { background: #0c100a; }
/* 暖色叠加层：统一暖化包括深空 Canvas 与正文，降低蓝光 */
.eye-care-overlay {
  position: fixed; inset: 0; z-index: 40; pointer-events: none;
  background: rgba(255, 168, 70, 0.10);
  mix-blend-mode: multiply;
  opacity: 0; transition: opacity .4s ease;
}
html.eye-care .eye-care-overlay { opacity: 1; }
/* 导航护眼按钮 */
.eye-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: transparent; border: 1px solid var(--border);
  color: var(--text-dim); border-radius: 999px;
  padding: 7px 14px; font-size: 13px; cursor: pointer;
  font-family: var(--mono); transition: all .25s;
}
.eye-btn svg { width: 17px; height: 17px; }
.eye-btn:hover { color: var(--text); border-color: var(--border-strong); }
.eye-btn.active {
  color: #e8c98a; border-color: rgba(232, 201, 138, .55);
  background: rgba(232, 201, 138, .12);
  box-shadow: 0 0 14px -2px rgba(232, 201, 138, .35);
}

.mod-card h3 { font-family: var(--font-display); font-size: 22px; font-weight: 700; margin-bottom: 8px; letter-spacing: 0.5px; }
.mod-card .desc { color: var(--text-dim); font-size: 14.5px; min-height: 44px; }
.mod-card .meta {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}
.mod-card .count {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-mute);
}
.mod-card .arrow {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  transition: gap 0.2s;
}
.mod-card:hover .arrow { gap: 12px; }

/* ---------- 页脚 ---------- */
.footer {
  margin-top: 60px;
  border-top: 1px solid var(--border);
  padding: 34px 0;
}
.footer-inner {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 14px;
  color: var(--text-mute);
  font-size: 13.5px;
}
.footer a { color: var(--text-dim); text-decoration: none; }
.footer a:hover { color: var(--accent); }

/* ============================================================
   模块详情页
   ============================================================ */
.page-hero {
  padding: 56px 0 30px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 36px;
}
.breadcrumb {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-mute);
  margin-bottom: 18px;
}
.breadcrumb a { color: var(--text-dim); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); }
.page-hero h1 { font-family: var(--font-display); font-size: 36px; font-weight: 800; display: flex; align-items: center; gap: 16px; letter-spacing: 0.5px; }
.page-hero h1 .icon {
  width: 48px; height: 48px; border-radius: 12px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--c1, var(--accent)), var(--c2, var(--accent-2)));
}
.page-hero h1 .icon svg { width: 26px; height: 26px; stroke: #fff; }
.page-hero p { color: var(--text-dim); margin-top: 14px; max-width: 700px; }

/* ---------- 详情页布局 ---------- */
.layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 40px;
  align-items: start;
  padding-bottom: 70px;
}
.sidebar {
  position: sticky;
  top: 90px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  backdrop-filter: blur(8px);
  padding: 18px;
}
.sidebar .side-title {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-mute);
  padding: 4px 10px 12px;
}
.sidebar .toc-link {
  display: block;
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 14px;
  border-left: 2px solid transparent;
  transition: all 0.2s;
}
.sidebar .toc-link:hover { color: var(--text); background: rgba(120, 160, 255, 0.06); }
.sidebar .toc-link.active {
  color: var(--accent);
  background: rgba(56, 189, 248, 0.08);
  border-left-color: var(--accent);
}

.content { min-width: 0; }

/* ---------- 知识点条目 ---------- */
.topic {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  backdrop-filter: blur(6px);
  margin-bottom: 22px;
  overflow: hidden;
  scroll-margin-top: 90px;
}
.topic-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 24px;
  cursor: pointer;
  user-select: none;
  transition: background 0.2s;
}
.topic-head:hover { background: rgba(120, 160, 255, 0.05); }
.topic-head .idx {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent);
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  padding: 3px 9px;
  flex-shrink: 0;
}
.topic-head h3 { font-family: var(--font-display); font-size: 18px; font-weight: 600; flex: 1; letter-spacing: 0.3px; }
.topic-head .chev {
  transition: transform 0.3s;
  color: var(--text-mute);
  flex-shrink: 0;
}
.topic.open .topic-head .chev { transform: rotate(180deg); }
.topic-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.topic-tag {
  font-family: var(--mono);
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(56, 189, 248, 0.1);
  color: var(--accent-3);
}

.topic-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}
.topic.open .topic-body { max-height: 4000px; }
.topic-body-inner {
  padding: 4px 24px 26px;
  border-top: 1px solid var(--border);
  margin-top: 0;
}

/* ---------- Markdown 风格富文本 ---------- */
.rich { color: var(--text-dim); font-size: var(--content-fs, 15px); }
.rich h4 {
  color: var(--text);
  font-size: 16px;
  margin: 22px 0 10px;
  padding-left: 12px;
  border-left: 3px solid var(--accent);
}
.rich p { margin: 12px 0; }
.rich ul, .rich ol { margin: 12px 0 12px 22px; }
.rich li { margin: 7px 0; }
.rich strong { color: var(--text); font-weight: 650; }
.rich a { color: var(--accent); text-decoration: none; border-bottom: 1px dashed var(--border-strong); }
.rich code {
  font-family: var(--mono);
  font-size: 13px;
  background: rgba(120, 160, 255, 0.1);
  color: var(--accent-3);
  padding: 2px 7px;
  border-radius: 6px;
}
.rich pre {
  background: #060a15;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  overflow-x: auto;
  margin: 16px 0;
}
.rich pre code {
  background: none;
  color: #cdd9f5;
  padding: 0;
  font-size: 13px;
  line-height: 1.7;
}
.rich blockquote {
  border-left: 3px solid var(--amber);
  background: rgba(251, 191, 36, 0.06);
  padding: 12px 18px;
  border-radius: 0 8px 8px 0;
  margin: 16px 0;
  color: var(--text-dim);
}
.rich table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 14px;
}
.rich th, .rich td {
  border: 1px solid var(--border);
  padding: 9px 14px;
  text-align: left;
}
.rich th { background: rgba(120, 160, 255, 0.07); color: var(--text); }

/* ---------- 空状态 ---------- */
.empty {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-mute);
}
.empty svg { width: 48px; height: 48px; opacity: 0.4; margin-bottom: 16px; }

/* ---------- 淡入动画 ---------- */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.6s, transform 0.6s; }
.reveal.in { opacity: 1; transform: none; }

/* ============================================================
   全站搜索
   ============================================================ */
.search-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 10px;
  padding: 7px 14px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: rgba(120, 160, 255, 0.06);
  color: var(--text-dim);
  font-size: 13.5px;
  font-family: var(--font);
  cursor: pointer;
  transition: all 0.2s;
}
.search-btn:hover { border-color: var(--border-strong); color: var(--text); }
.search-btn svg { width: 15px; height: 15px; }
.search-btn kbd {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-mute);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1px 6px;
}

.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(4, 7, 15, 0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 12vh 16px 0;
}
.search-overlay.show { display: flex; }
.search-panel {
  width: min(640px, 100%);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--panel-solid);
  box-shadow: var(--shadow), var(--glow);
  overflow: hidden;
  animation: searchIn 0.22s cubic-bezier(.2,.8,.2,1);
}
@keyframes searchIn { from { opacity: 0; transform: translateY(-14px) scale(0.98); } }
.search-input-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.search-input-wrap svg { width: 19px; height: 19px; color: var(--accent); flex-shrink: 0; }
.search-input {
  flex: 1;
  background: none;
  border: 0;
  outline: 0;
  color: var(--text);
  font-size: 16px;
  font-family: var(--font);
}
.search-input::placeholder { color: var(--text-mute); }
.search-esc {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-mute);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 2px 7px;
  cursor: pointer;
}
.search-random {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: rgba(150, 186, 226, 0.07);
  color: var(--accent);
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease, box-shadow .2s ease, transform .25s ease;
}
.search-random svg { width: 17px; height: 17px; }
.search-random:hover {
  background: rgba(150, 186, 226, 0.16);
  border-color: rgba(150, 186, 226, 0.5);
  box-shadow: 0 0 14px rgba(150, 186, 226, 0.32);
  transform: rotate(72deg);
}
.search-results { max-height: 52vh; overflow-y: auto; padding: 10px; }
.search-hint { padding: 30px 20px; text-align: center; color: var(--text-mute); font-size: 14px; }
.s-item {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 13px 15px;
  border-radius: var(--radius-sm);
  transition: background 0.15s;
}
.s-item:hover, .s-item.sel { background: rgba(56, 189, 248, 0.09); }
.s-item .s-top { display: flex; align-items: center; gap: 10px; }
.s-item .s-mod {
  font-family: var(--mono);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 6px;
  color: #fff;
  background: linear-gradient(135deg, var(--c1, var(--accent)), var(--c2, var(--accent-2)));
  flex-shrink: 0;
}
.s-item .s-title { font-size: 15px; font-weight: 600; color: var(--text); }
.s-item .s-snippet {
  margin-top: 5px;
  font-size: 13px;
  color: var(--text-dim);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.s-item mark {
  background: rgba(56, 189, 248, 0.25);
  color: var(--accent-3);
  border-radius: 3px;
  padding: 0 2px;
}

@media (max-width: 860px) {
  .search-btn span, .search-btn kbd { display: none; }
  .search-btn { padding: 7px 10px; }
}

/* ---------- 响应式 ---------- */
@media (max-width: 860px) {
  .modules { grid-template-columns: 1fr; }
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: static; display: block; max-height: 44vh; overflow-y: auto; margin-bottom: 24px; }
  .nav-links {
    position: absolute; top: 66px; left: 0; right: 0;
    flex-direction: column; align-items: stretch;
    background: rgba(9, 14, 28, 0.97);
    backdrop-filter: blur(14px);
    padding: 12px;
    gap: 4px;
    border-bottom: 1px solid var(--border);
    display: none;
  }
  .nav-links.show { display: flex; }
  .nav-toggle { display: block; }
  .hero { padding: 56px 0 40px; }
  .hero .stats { gap: 28px; }
  .content-tools { flex-direction: column; align-items: stretch; }
  .tools-btns { justify-content: flex-end; }
}

/* ============================== 新功能样式 ============================== */
/* ---------- 阅读进度条 ---------- */
#read-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0;
  z-index: 70;
  background: linear-gradient(90deg, var(--accent-3), var(--accent), var(--violet));
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.7);
  transition: width 0.1s linear;
}

/* ---------- 返回顶部 ---------- */
#toTop {
  position: fixed;
  right: 26px; bottom: 26px;
  width: 48px; height: 48px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: rgba(15, 22, 46, 0.7);
  backdrop-filter: blur(12px);
  color: var(--accent);
  cursor: pointer;
  display: grid; place-items: center;
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s, box-shadow 0.3s;
  z-index: 65;
}
#toTop svg { width: 22px; height: 22px; }
#toTop.show { opacity: 1; transform: none; pointer-events: auto; }
#toTop:hover { box-shadow: 0 0 24px -4px var(--accent); transform: translateY(-3px); }

/* ---------- 代码块 + 复制按钮 ---------- */
.code-wrap { position: relative; margin: 14px 0; }
.code-wrap pre { margin: 0; }
.copy-btn {
  position: absolute;
  top: 10px; right: 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--mono);
  font-size: 12px;
  padding: 5px 10px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: rgba(10, 16, 34, 0.8);
  color: var(--text-dim);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s, color 0.2s, border-color 0.2s;
  z-index: 2;
}
.copy-btn svg { width: 14px; height: 14px; }
.code-wrap:hover .copy-btn { opacity: 1; }
.copy-btn:hover { color: var(--accent); border-color: var(--border-strong); }
.copy-btn.done { color: var(--green); border-color: rgba(52, 211, 153, 0.5); }

/* ---------- 阅读时长 ---------- */
.read-time {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-mute);
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(120, 160, 255, 0.07);
}

/* ---------- 收藏星标 ---------- */
.fav-btn {
  flex-shrink: 0;
  background: none;
  border: 0;
  cursor: pointer;
  color: var(--text-mute);
  padding: 6px;
  border-radius: 8px;
  display: grid; place-items: center;
  transition: color 0.2s, transform 0.2s, background 0.2s;
}
.fav-btn svg { width: 18px; height: 18px; }
.fav-btn:hover { color: var(--amber); transform: scale(1.15); background: rgba(251, 191, 36, 0.08); }
.fav-btn.active { color: var(--amber); }
.fav-btn.active svg { fill: var(--amber); }

/* ---------- 模块页工具条（标签筛选 + 展开收起） ---------- */
.content-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.tag-filter { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  font-family: var(--mono);
  font-size: 12.5px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(15, 22, 46, 0.5);
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.2s;
}
.chip:hover { color: var(--text); border-color: var(--border-strong); }
.chip.active {
  color: #fff;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  border-color: transparent;
  box-shadow: 0 4px 16px -4px var(--accent);
}
.tools-btns { display: flex; gap: 8px; }
.tool-btn {
  font-size: 12.5px;
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(15, 22, 46, 0.5);
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.2s;
}
.tool-btn:hover { color: var(--accent); border-color: var(--border-strong); }

/* ---------- 我的收藏（模块总览页） ---------- */
.fav-section { padding-top: 10px; }
.fav-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  padding-bottom: 40px;
}
.fav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(15, 22, 46, 0.34);
  backdrop-filter: blur(12px);
  text-decoration: none;
  color: var(--text);
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.fav-item:hover { transform: translateY(-3px); border-color: var(--c1); box-shadow: 0 12px 30px -12px var(--c1); }
.fav-star { color: var(--amber); flex-shrink: 0; display: grid; place-items: center; }
.fav-star svg { width: 17px; height: 17px; fill: var(--amber); }
.fav-title { flex: 1; font-size: 14.5px; font-weight: 600; }
.fav-mod {
  font-family: var(--mono);
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 6px;
  background: rgba(56, 189, 248, 0.1);
  color: var(--accent-3);
  flex-shrink: 0;
}
@media (max-width: 860px) {
  .fav-list { grid-template-columns: 1fr; }
}

/* ============================== 第二批功能样式 ============================== */
/* ---------- 知识点操作按钮组 ---------- */
.topic-actions { display: flex; gap: 3px; flex-shrink: 0; }
.ta-btn {
  background: none; border: 0; cursor: pointer;
  color: var(--text-mute);
  padding: 6px; border-radius: 8px;
  display: grid; place-items: center;
  transition: color 0.2s, transform 0.2s, background 0.2s;
}
.ta-btn svg { width: 17px; height: 17px; }
.ta-btn:hover { transform: scale(1.12); background: rgba(120, 160, 255, 0.08); }
.read-btn:hover { color: var(--green); }
.read-btn.active { color: var(--green); }
.link-btn:hover { color: var(--accent); }
.link-btn.copied { color: var(--green); }
.fav-btn:hover { color: var(--amber); }
.fav-btn.active { color: var(--amber); }
.fav-btn.active svg { fill: var(--amber); }

/* 已读状态：标题变淡 + 序号变绿 */
.topic.is-read .topic-head h3 { color: var(--text-mute); }
.topic.is-read .topic-head .idx { color: var(--green); border-color: rgba(52, 211, 153, 0.5); }

/* ---------- 目录已读勾 ---------- */
.toc-check { display: none; color: var(--green); flex-shrink: 0; }
.toc-check svg { width: 13px; height: 13px; }
.toc-link { display: flex; align-items: center; gap: 8px; }
.toc-link.done .toc-check { display: inline-grid; }
.toc-link.done .toc-t { color: var(--text-mute); }

/* ---------- 模块页头学习进度 ---------- */
.hero-progress { margin-top: 24px; max-width: 480px; }
.hero-progress-info { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--text-dim); margin-bottom: 9px; }
.hero-progress-info svg { width: 14px; height: 14px; vertical-align: -2px; margin-right: 4px; }
.hero-progress-num { font-family: var(--mono); color: var(--accent-3); font-weight: 700; }
.hero-progress-bar { height: 8px; border-radius: 999px; background: rgba(120, 160, 255, 0.12); overflow: hidden; }
.hero-progress-bar span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--c1, #38bdf8), var(--c2, #6366f1)); box-shadow: 0 0 12px var(--c1, #38bdf8); transition: width 0.4s; }

/* ---------- 字号控制 ---------- */
.font-ctrl { display: flex; align-items: center; gap: 2px; padding: 2px 6px; border: 1px solid var(--border); border-radius: 9px; background: rgba(15, 22, 46, 0.5); }
.font-ctrl .tool-btn { border: 0; background: none; padding: 4px 7px; display: grid; place-items: center; }
.font-ctrl .tool-btn svg { width: 15px; height: 15px; }
.font-size-val { font-family: var(--mono); font-size: 12.5px; color: var(--text-dim); min-width: 20px; text-align: center; }
.tool-btn { display: inline-flex; align-items: center; gap: 6px; }
.tool-btn svg { width: 15px; height: 15px; }

/* ---------- 上一模块 / 下一模块 ---------- */
.mod-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 34px; }
.mod-nav-btn {
  display: flex; flex-direction: column; gap: 6px;
  padding: 18px 22px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(15, 22, 46, 0.34);
  backdrop-filter: blur(12px);
  text-decoration: none;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.mod-nav-btn:hover { transform: translateY(-3px); border-color: var(--c1); box-shadow: 0 14px 34px -14px var(--c1); }
.mod-nav-btn.next { text-align: right; align-items: flex-end; }
.mod-nav-dir { font-family: var(--mono); font-size: 12px; color: var(--text-mute); }
.mod-nav-name { font-size: 16px; font-weight: 700; color: var(--text); display: inline-flex; align-items: center; gap: 8px; }
.mod-nav-name svg { width: 20px; height: 20px; color: var(--c1); }

/* ---------- 模块卡片已读进度 ---------- */
.card-progress { margin-top: 16px; display: flex; align-items: center; gap: 12px; }
.card-progress-bar { flex: 1; height: 5px; border-radius: 999px; background: rgba(120, 160, 255, 0.12); overflow: hidden; }
.card-progress-bar span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--c1), var(--c2)); transition: width 0.4s; }
.card-progress-lbl { font-family: var(--mono); font-size: 11px; color: var(--text-mute); flex-shrink: 0; }

/* ---------- 专注阅读模式 ---------- */
body.focus-mode .nav,
body.focus-mode .sidebar,
body.focus-mode .content-tools,
body.focus-mode .page-hero,
body.focus-mode .footer,
body.focus-mode .mod-nav,
body.focus-mode #toTop { display: none !important; }
body.focus-mode .layout { grid-template-columns: 1fr; }
body.focus-mode .content { max-width: 780px; margin: 0 auto; padding: 60px 0; }
body.focus-mode::after {
  content: "按 ESC 退出专注模式";
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%);
  font-family: var(--mono); font-size: 12px; color: var(--text-mute);
  padding: 7px 18px; border-radius: 999px;
  border: 1px solid var(--border); background: rgba(10, 16, 34, 0.85);
  z-index: 80;
}
@media (max-width: 860px) {
  .mod-nav { grid-template-columns: 1fr; }
}

/* ============================== 译辰Learning 品牌 Logo ============================== */
.brand-logo { display: inline-flex; align-items: center; gap: 14px; }
.yc-logo { display: block; flex-shrink: 0; overflow: visible; }
.yc-star { transform-origin: 60px 60px; animation: ycPulse 3.2s ease-in-out infinite; }
@keyframes ycPulse { 0%, 100% { transform: scale(1); opacity: 0.92; } 50% { transform: scale(1.07); opacity: 1; } }
.logo-word { display: flex; flex-direction: column; align-items: flex-start; line-height: 1; }
.logo-cn {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 3px;
  background: linear-gradient(120deg, #8cc0ef, #ecd0a4);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 14px rgba(140, 192, 239, 0.45), 0 0 22px rgba(236, 208, 164, 0.3);
  opacity: 0.96;
}
.logo-en {
  font-family: var(--mono);
  letter-spacing: 6px;
  color: var(--text-mute);
  text-transform: uppercase;
}

/* 着陆页大 logo */
.hero-logo { gap: 22px; margin-bottom: 40px; }
.hero-logo .yc-logo { width: 92px; height: 92px; filter: drop-shadow(0 0 12px rgba(140, 192, 239, 0.24)) drop-shadow(0 0 18px rgba(236, 208, 164, 0.15)); }
.hero-logo .logo-cn { font-size: 46px; }
.hero-logo .logo-en { font-size: 13px; margin-top: 9px; }

/* 导航小 logo */
.nav-logo { gap: 10px; }
.nav-logo .yc-logo { width: 30px; height: 30px; }
.nav-logo .logo-cn { font-size: 17px; letter-spacing: 2px; }
.nav-logo .logo-en { display: none; }
@media (max-width: 560px) {
  .hero-logo { gap: 14px; }
  .hero-logo .yc-logo { width: 64px; height: 64px; }
  .hero-logo .logo-cn { font-size: 32px; }
  .hero-logo .logo-en { font-size: 11px; letter-spacing: 4px; }
}

/* ============================== 新增功能样式 ============================== */
/* 随机一星（首页次级按钮） */
.ghost-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px; font-size: 15px; font-weight: 600; letter-spacing: .5px;
  color: var(--text-dim); text-decoration: none; cursor: pointer;
  border-radius: 999px; border: 1px solid var(--border-strong);
  background: rgba(15, 22, 46, 0.4); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transition: color .25s, border-color .25s, box-shadow .25s, transform .25s;
}
.ghost-btn svg { width: 17px; height: 17px; }
.ghost-btn:hover { color: var(--text); border-color: var(--accent); box-shadow: 0 0 22px -6px var(--accent); transform: translateY(-2px); }
.landing-hint { margin-top: 26px; font-size: 12.5px; color: var(--text-mute); font-family: var(--mono); letter-spacing: .5px; }
.landing-hint kbd, .shortcut-list kbd {
  font-family: var(--mono); font-size: 11px; color: var(--text-dim);
  border: 1px solid var(--border); border-radius: 5px; padding: 1px 7px; background: rgba(120, 160, 255, .06);
}

/* 最近浏览与收藏紧邻时的间距 */
.fav-section + .fav-section { padding-top: 2px; }

/* 键盘快捷键帮助面板 */
.shortcut-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(4, 7, 15, 0.7); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: none; align-items: center; justify-content: center; padding: 16px;
}
.shortcut-overlay.show { display: flex; }
.shortcut-panel {
  width: min(420px, 100%); border: 1px solid var(--border-strong); border-radius: var(--radius);
  background: var(--panel-solid); box-shadow: var(--shadow), var(--glow); overflow: hidden;
  animation: searchIn .22s cubic-bezier(.2,.8,.2,1);
}
.shortcut-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; border-bottom: 1px solid var(--border);
  font-weight: 700; font-size: 15px; color: var(--text);
}
.shortcut-esc {
  font-family: var(--mono); font-size: 11px; color: var(--text-mute);
  border: 1px solid var(--border); border-radius: 5px; padding: 2px 7px; cursor: pointer;
}
.shortcut-list { list-style: none; margin: 0; padding: 8px; }
.shortcut-list li { display: flex; align-items: center; gap: 12px; padding: 9px 12px; font-size: 14px; color: var(--text-dim); }
.shortcut-list li > span { margin-left: auto; color: var(--text-mute); font-size: 13px; }
.shortcut-list kbd + kbd { margin-left: -4px; }

/* 知识点移动高亮 */
.topic.flash { box-shadow: 0 0 0 1px var(--accent), 0 0 36px -6px var(--accent); }

/* ============================================================
   界面优化（2026-07-27）：视觉细节 · 响应式 · 动效
   ============================================================ */

/* 导航：滚动后加深背景 + 阴影，提升层次 */
.nav.scrolled {
  background: rgba(6, 10, 20, 0.9);
  box-shadow: 0 10px 34px -16px rgba(0, 0, 0, 0.7);
  border-bottom-color: var(--border-strong);
}

/* 章节标题：左侧渐变竖条，强化信息层级 */
.section-head h2 { position: relative; padding-left: 16px; }
.section-head h2::before {
  content: ""; position: absolute; left: 0; top: 7px; bottom: 7px; width: 4px; border-radius: 4px;
  background: linear-gradient(180deg, var(--accent-3), var(--violet));
}

/* 统计数字：渐变描边 */
.hero .stat .num {
  background: linear-gradient(120deg, var(--accent-3), var(--accent), var(--violet));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* 进场动画：柔和模糊淡入（非卡片元素） */
.reveal:not(.mod-card) {
  opacity: 0; transform: translateY(22px); filter: blur(7px);
  transition: opacity 0.7s cubic-bezier(.2,.8,.2,1), transform 0.7s cubic-bezier(.2,.8,.2,1), filter 0.7s;
}
.reveal.in:not(.mod-card) { opacity: 1; transform: none; filter: none; }
/* 卡片：进场只做渐显 + 模糊，transform 留给 hover 3D 倾斜 */
.mod-card.reveal { opacity: 0; filter: blur(7px); transition: opacity 0.6s ease, filter 0.6s ease, box-shadow 0.4s; }
.mod-card.reveal.in { opacity: 1; filter: none; }
/* 修复：卡片进场后 hover 倾斜需高于 .reveal.in 的 transform:none */
.mod-card.reveal.in:hover {
  transform: perspective(1100px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-9px);
}

/* 窄屏：知识点标题行换行重排、弹层留白收敛 */
@media (max-width: 600px) {
  .topic-head { flex-wrap: wrap; gap: 10px; align-items: center; padding: 16px; }
  .topic-head .idx { order: 1; }
  .topic-head h3 { order: 2; flex: 1 1 auto; font-size: 16px; }
  .topic-actions { order: 3; margin-left: auto; }
  .topic-head .chev { order: 4; }
  .topic-tags { order: 5; flex-basis: 100%; margin-top: 2px; }
  .topic-body-inner { padding: 4px 16px 22px; }
  .content-tools { gap: 12px; }
  .search-overlay { padding: 8vh 12px 0; }
  .shortcut-panel, .search-panel { max-height: 86vh; overflow-y: auto; }
}

/* ============================================================
   透明发光字体（霓虹玻璃质感）：字为镂空，边缘带渐变光晕
   ============================================================ */
.hero h1,
.landing-hero h1,
.page-hero h1,
.section-head h2,
.mod-card h3,
.topic-head h3,
.hero .stat .num {
  background: linear-gradient(110deg,
    rgba(204, 222, 248, 0.78) 0%,
    rgba(148, 184, 224, 0.80) 25%,
    rgba(222, 196, 166, 0.78) 50%,
    rgba(148, 184, 224, 0.80) 75%,
    rgba(204, 222, 248, 0.86) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow:
    0 0 10px rgba(204, 222, 248, 0.12),
    0 0 24px rgba(148, 184, 224, 0.08),
    0 0 46px rgba(222, 196, 166, 0.05);
  animation: textFlow 4s linear infinite;
}

/* 正文保持中性，仅标题做透明发光，避免全站偏色（色差） */
body { text-shadow: none; }

/* Logo 图标：暗黑色 + 微光，作为深空背景中沉稳的暗色徽标 */
.yc-logo { filter: drop-shadow(0 0 5px rgba(140, 192, 239, 0.26)) drop-shadow(0 0 9px rgba(236, 208, 164, 0.16)); }

/* ============================================================
   标题动态流体光：渐变沿文字流动（蓝白 ↔ 蓝 ↔ 暖金，与背景星云同色）
   ============================================================ */
@keyframes textFlow {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

/* 尊重系统“减少动态效果”偏好：关闭流动，保留静态柔光 */
@media (prefers-reduced-motion: reduce) {
  .hero h1, .landing-hero h1, .page-hero h1,
  .section-head h2, .mod-card h3, .topic-head h3,
  .hero .stat .num,
  .hero h1 .grad, .landing-hero h1 .grad {
    animation: none;
  }
}
