/* ═══════════════════════════════════════════════════════
   Claude Code 学习网站 — 公共样式
   设计方向：暗色奢华 · 编辑感 · 结构化
   ═══════════════════════════════════════════════════════ */

/* ── Design Tokens ── */
:root {
  /* Core palette */
  --bg: #0d1117;
  --bg-raised: #131820;
  --surface: #161b22;
  --surface-hover: #1c2330;
  --border: #30363d;
  --border-light: #21262d;

  /* Text */
  --text: #c9d1d9;
  --text-high: #e6edf3;
  --text-muted: #8b949e;
  --text-faint: #484f58;

  /* Accent colors */
  --accent: #58a6ff;
  --accent-dim: #1a3a5c;
  --green: #3fb950;
  --green-dim: #1a2e1a;
  --orange: #d2991d;
  --orange-dim: #2e2a1a;
  --red: #f85149;
  --red-dim: #2e1a1a;
  --purple: #a371f7;
  --purple-dim: #2e1a2e;
  --pink: #db61a2;
  --pink-dim: #2e1a22;
  --cyan: #39c5cf;
  --cyan-dim: #1a2e2e;

  /* Level-specific — semantic */
  --lv-prebasics: #f0a860;
  --lv-prebasics-bg: #2e2218;
  --lv-beginner: #3fb950;
  --lv-beginner-bg: #1a2e1a;
  --lv-intermediate: #d2991d;
  --lv-intermediate-bg: #2e2a1a;
  --lv-expert: #a371f7;
  --lv-expert-bg: #2e1a2e;
  --lv-applied: #2eaadc;
  --lv-applied-bg: #1a2a2e;

  /* Spacing scale */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  --space-section: 80px;

  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans SC', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', 'Consolas', monospace;

  /* Radii */
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;

  /* Motion */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --duration-fast: 150ms;
  --duration: 280ms;
  --duration-slow: 400ms;
}

/* ── Reset ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* ── Typography ── */
h1 { font-size: 2.6em; font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; }
h2 { font-size: 1.7em; font-weight: 700; letter-spacing: -0.01em; }
h3 { font-size: 1.25em; font-weight: 600; }
h4 { font-size: 1.05em; font-weight: 600; }

a { color: var(--accent); text-decoration: none; transition: color var(--duration-fast); }
a:hover { color: var(--text-high); }

/* ── Layout ── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* ── Navigation ── */
.site-nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(13, 17, 23, 0.88);
  backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--border);
  height: 56px;
  display: flex; align-items: center;
}
.site-nav .nav-inner {
  max-width: 1100px; width: 100%; margin: 0 auto;
  padding: 0 var(--space-lg);
  display: flex; align-items: center; gap: var(--space-lg);
}
.site-nav .logo {
  font-weight: 800; font-size: 1.05em; color: var(--accent);
  white-space: nowrap; letter-spacing: -0.01em;
}
.site-nav .logo span { color: var(--text-muted); font-weight: 400; }
.site-nav .nav-links {
  display: flex; align-items: center; gap: var(--space-sm);
  overflow-x: auto; flex: 1;
}
.site-nav .nav-links a {
  color: var(--text-muted); font-size: 0.88em; padding: 6px 12px;
  border-radius: var(--radius-sm); white-space: nowrap;
  transition: color var(--duration-fast), background var(--duration-fast);
}
.site-nav .nav-links a:hover,
.site-nav .nav-links a.active {
  color: var(--text);
  background: var(--surface);
}
.site-nav .nav-cta {
  padding: 6px 18px; border-radius: var(--radius-xl);
  background: var(--accent); color: #000 !important;
  font-size: 0.85em; font-weight: 700; white-space: nowrap;
  letter-spacing: 0.01em;
}
.site-nav .nav-cta:hover {
  background: #79b8ff;
}

/* ── Hamburger Menu ── */
.nav-toggle {
  display: none;
  flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer;
  padding: 8px 4px; z-index: 110;
}
.nav-toggle span {
  display: block; width: 22px; height: 2px;
  background: var(--text-muted); border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  display: none;
  position: fixed; top: 56px; left: 0; right: 0; bottom: 0;
  background: rgba(13, 17, 23, 0.97);
  backdrop-filter: blur(12px);
  z-index: 105; padding: var(--space-lg);
  flex-direction: column; gap: var(--space-sm);
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  display: block; padding: 14px 20px; border-radius: var(--radius);
  color: var(--text); font-size: 1.05em; font-weight: 600;
  transition: background var(--duration-fast);
}
.mobile-menu a:hover { background: var(--surface-hover); }
.mobile-menu .mobile-cta {
  margin-top: var(--space-md); text-align: center;
  background: var(--accent); color: #000 !important;
  font-weight: 700; border-radius: var(--radius-xl);
}

/* ── Hero ── */
.hero {
  text-align: center;
  padding: var(--space-3xl) var(--space-lg) var(--space-2xl);
  background: linear-gradient(180deg, #131e2e 0%, #0f1a26 40%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; top: -180px; left: 50%; transform: translateX(-50%);
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(88, 166, 255, 0.06) 0%, transparent 70%);
  pointer-events: none;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.2em);
  margin-bottom: var(--space-md);
  position: relative;
}
.hero h1 .accent { color: var(--accent); }
.hero .subtitle {
  color: var(--text-muted); font-size: 1.15em;
  max-width: 600px; margin: 0 auto var(--space-lg);
  line-height: 1.6;
}
.hero .badge-row {
  display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-sm);
}
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 16px; border-radius: var(--radius-xl);
  font-size: 0.85em; font-weight: 600;
  background: var(--surface); border: 1px solid var(--border);
}
.badge.lv-prebasics { border-color: var(--lv-prebasics); color: var(--lv-prebasics); }
.badge.lv-beginner { border-color: var(--lv-beginner); color: var(--lv-beginner); }
.badge.lv-intermediate { border-color: var(--lv-intermediate); color: var(--lv-intermediate); }
.badge.lv-applied { border-color: var(--lv-applied); color: var(--lv-applied); }
.badge.lv-expert { border-color: var(--lv-expert); color: var(--lv-expert); }

/* ── Cards ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-lg);
  transition: border-color var(--duration-fast), transform var(--duration-fast),
              box-shadow var(--duration-fast);
}
.card:hover {
  border-color: var(--text-faint);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}
.card-link { display: block; color: inherit !important; text-decoration: none; }

/* ── Analogy Cards (生活类比卡片) ── */
.analogy-card {
  background: linear-gradient(135deg, #1a2e2e 0%, var(--surface) 50%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  margin: var(--space-lg) 0;
}
.analogy-card h3 { color: var(--cyan); }

/* ── Topic Cards ── */
.topic-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  transition: border-color var(--duration-fast), transform var(--duration-fast);
  position: relative; overflow: hidden;
}
.topic-card:hover {
  border-color: var(--text-faint);
  transform: translateY(-3px);
}
.topic-card .level-stripe {
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.topic-card.lv-prebasics .level-stripe { background: var(--lv-prebasics); }
.topic-card.lv-beginner .level-stripe { background: var(--lv-beginner); }
.topic-card.lv-intermediate .level-stripe { background: var(--lv-intermediate); }
.topic-card.lv-expert .level-stripe { background: var(--lv-expert); }
.topic-card.lv-applied .level-stripe { background: var(--lv-applied); }
.topic-card .level-tag {
  display: inline-block; padding: 3px 10px; border-radius: var(--radius-sm);
  font-size: 0.72em; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
  margin-bottom: var(--space-sm);
}
.topic-card.lv-prebasics .level-tag { background: var(--lv-prebasics-bg); color: var(--lv-prebasics); }
.topic-card.lv-beginner .level-tag { background: var(--lv-beginner-bg); color: var(--lv-beginner); }
.topic-card.lv-intermediate .level-tag { background: var(--lv-intermediate-bg); color: var(--lv-intermediate); }
.topic-card.lv-expert .level-tag { background: var(--lv-expert-bg); color: var(--lv-expert); }
.topic-card.lv-applied .level-tag { background: var(--lv-applied-bg); color: var(--lv-applied); }
.topic-card .topic-icon { font-size: 1.6em; margin-bottom: var(--space-sm); }
.topic-card h3 { font-size: 1.1em; margin-bottom: var(--space-xs); }
.topic-card p { color: var(--text-muted); font-size: 0.88em; line-height: 1.5; }

/* ── Code Block ── */
.code-block {
  background: #0d1117;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin: var(--space-md) 0;
  font-family: var(--font-mono);
  font-size: 0.88em;
  color: var(--green);
  overflow-x: auto;
  white-space: pre-wrap;
  position: relative;
}
.code-block .copy-btn {
  position: absolute; top: 8px; right: 8px;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text-muted); padding: 3px 10px; border-radius: var(--radius-sm);
  cursor: pointer; font-size: 0.72em; font-family: var(--font-sans);
  transition: all var(--duration-fast);
}
.code-block .copy-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ── Tables ── */
table {
  width: 100%; border-collapse: collapse;
  margin: var(--space-md) 0; font-size: 0.9em;
}
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border); }
th { color: var(--text-muted); font-size: 0.78em; text-transform: uppercase; letter-spacing: 0.03em; }
tr:hover td { background: rgba(255,255,255,0.02); }

/* ── Tip / Warn / Info ── */
.tip, .warn, .info {
  border-radius: var(--radius);
  padding: 14px 20px;
  margin: var(--space-md) 0;
  font-size: 0.9em;
  line-height: 1.6;
}
.tip { background: var(--green-dim); border: 1px solid #2a4a2a; }
.tip::before { content: '💡 '; font-weight: 700; color: var(--green); }
.warn { background: var(--orange-dim); border: 1px solid #4a3a1a; }
.warn::before { content: '⚠️ '; font-weight: 700; color: var(--orange); }
.info { background: var(--accent-dim); border: 1px solid #2a3a5c; }
.info::before { content: 'ℹ️ '; font-weight: 700; color: var(--accent); }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: var(--space-sm);
  padding: 10px 24px; border-radius: var(--radius);
  font-size: 0.9em; font-weight: 600; font-family: var(--font-sans);
  cursor: pointer; transition: all var(--duration-fast);
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
}
.btn:hover { border-color: var(--text-faint); background: var(--surface-hover); }
.btn-primary {
  background: var(--accent); color: #000; border-color: var(--accent); font-weight: 700;
}
.btn-primary:hover { background: #79b8ff; border-color: #79b8ff; }
.btn-success {
  background: var(--green); color: #000; border-color: var(--green); font-weight: 700;
}
.btn-success:hover { background: #4cc960; border-color: #4cc960; }

/* ── Footer ── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: var(--space-2xl) var(--space-lg);
  margin-top: var(--space-section);
  text-align: center;
  color: var(--text-muted); font-size: 0.85em;
}
.site-footer a { color: var(--text-muted); }
.site-footer a:hover { color: var(--text); }

/* ── Module Step Nav (horizontal scroll) ── */
.module-nav {
  display: flex; flex-wrap: nowrap; gap: var(--space-xs);
  margin: var(--space-lg) 0; padding: var(--space-md);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.module-nav::-webkit-scrollbar { display: none; }
.module-nav a {
  padding: 6px 14px; border-radius: var(--radius-sm);
  font-size: 0.82em; color: var(--text-muted); white-space: nowrap;
  transition: all var(--duration-fast); flex-shrink: 0;
}
.module-nav a:hover, .module-nav a.active { background: var(--accent); color: #fff; }

/* ── Cheat Sheet (print) ── */
.cheat-sheet {
  background: #fff; color: #111; border: 2px solid #000;
  border-radius: 0; padding: var(--space-lg); margin: var(--space-lg) 0;
  font-size: 0.88em; page-break-inside: avoid;
}
.cheat-sheet h2 { color: #000; border-bottom-color: #000; }
.cheat-sheet .code-block { background: #f5f5f5; color: #000; border: 1px solid #ccc; }

/* ── Module ⑨ Summary ── */
.summary-section {
  border-top: 2px solid var(--accent);
  padding-top: var(--space-xl);
  margin-top: var(--space-2xl);
}
.summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  margin: var(--space-lg) 0;
}
.summary-grid h3 { display: flex; align-items: center; gap: 8px; }
.summary-grid ul { list-style: none; padding: 0; }
.summary-grid li {
  padding: 8px 0; border-bottom: 1px solid var(--border-light);
  font-size: 0.9em; line-height: 1.5;
}
.summary-grid li:last-child { border-bottom: none; }
.summary-grid .scene li::before { content: '🎯 '; }
.summary-grid .mistake li::before { content: '⚠️ '; }
@media (max-width: 768px) {
  .summary-grid { grid-template-columns: 1fr; }
}

/* ── Payment Page Specific ── */
.pay-layout {
  display: grid; grid-template-columns: 3fr 2fr; gap: var(--space-xl);
  align-items: start;
}
.qr-box {
  background: #fff; border-radius: var(--radius-lg);
  padding: var(--space-xl); text-align: center;
  border: 2px solid var(--border);
}
.qr-box .price {
  font-size: 2.4em; font-weight: 800; color: #000;
  margin-bottom: var(--space-md);
}
.qr-box .price .unit { font-size: 0.4em; color: #666; }
.qr-box img { max-width: 240px; border: 1px solid #eee; border-radius: var(--radius-sm); }

/* ── Video Player ── */
.video-wrap {
  position: relative; width: 100%;
  margin: var(--space-lg) 0;
  border-radius: var(--radius); overflow: hidden;
  background: #000;
  box-shadow: 0 4px 24px rgba(0,0,0,0.4);
}
/* 16:9 响应式容器 */
.video-16x9 {
  position: relative; padding-bottom: 56.25%; height: 0;
}
.video-16x9 iframe,
.video-16x9 video {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%; border: 0;
}
/* 本地 mp4 控件美化 */
.video-wrap video {
  display: block; width: 100%; max-height: 70vh;
}
.video-caption {
  text-align: center; font-size: 0.82em; color: var(--text-muted);
  margin-top: var(--space-sm);
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .pay-layout { grid-template-columns: 1fr; }
  .site-nav .nav-links { display: none; }
  .site-nav .nav-cta { display: none; }
  .nav-toggle { display: flex; }
  .hero h1 { font-size: 1.8em; }
  .container { padding: 0 var(--space-md); }
  .topic-card { padding: var(--space-md); }
  h1 { font-size: 2em; }
  /* Badge row: horizontal scroll */
  .badge-row { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
  .badge-row .badge { flex-shrink: 0; font-size: 0.75em; }
  /* Stats: 3 cols tight */
  .hero .stats { gap: 12px; }
  .hero .stat-num { font-size: 1.4em; }
  .hero .stat-label { font-size: 0.72em; }
  /* Breadcrumbs scrollable */
  .breadcrumb { overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 1.45em; }
  .hero .subtitle { font-size: 0.9em; }
  .hero .stats { gap: 8px; }
  .hero .stat-label { font-size: 0.7em; }
  .topic-grid { grid-template-columns: 1fr !important; }
}

/* ═══════════════════════════════════════════════════════
   Pre-Basics Level Styles
   ═══════════════════════════════════════════════════════ */

.lv-prebasics-header .level-icon {
  background: var(--lv-prebasics-bg); color: var(--lv-prebasics);
}

/* ── Screenshot Component ── */
.screenshot {
  margin: var(--space-lg) 0;
  text-align: center;
}
.screenshot-frame {
  position: relative;
  display: inline-block;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  max-width: 100%;
  box-shadow: 0 4px 24px rgba(0,0,0,0.4);
}
.screenshot-frame img,
.screenshot-frame video {
  display: block;
  max-width: 100%;
  height: auto;
}
.screenshot figcaption {
  margin-top: var(--space-sm);
  font-size: 0.88em;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Screenshot annotation overlays */
.annotate-box {
  position: absolute;
  border: 2px solid var(--red);
  border-radius: 4px;
  pointer-events: none;
  animation: annotate-pulse 2s ease-in-out infinite;
}
.annotate-box::after {
  content: attr(data-label);
  position: absolute;
  top: -22px;
  left: -2px;
  background: var(--red);
  color: #fff;
  font-size: 0.72em;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 3px;
  white-space: nowrap;
  font-family: var(--font-sans);
}
.annotate-arrow {
  position: absolute;
  width: 24px; height: 24px;
  pointer-events: none;
}
.annotate-arrow::before {
  content: '↓';
  color: var(--red);
  font-size: 1.5em;
  font-weight: 700;
  animation: arrow-bounce 0.8s ease-in-out infinite;
}
@keyframes annotate-pulse {
  0%, 100% { border-color: var(--red); }
  50% { border-color: #ff6b6b; }
}
@keyframes arrow-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

/* ── Step-by-Step Walkthrough ── */
.step-list {
  list-style: none;
  padding: 0;
  counter-reset: step;
}
.step-item {
  counter-increment: step;
  display: flex;
  gap: var(--space-lg);
  margin-bottom: var(--space-2xl);
  padding-bottom: var(--space-2xl);
  border-bottom: 1px solid var(--border-light);
  align-items: flex-start;
}
.step-item:last-child { border-bottom: none; margin-bottom: 0; }
.step-num {
  flex-shrink: 0;
  width: 42px; height: 42px;
  background: var(--lv-prebasics-bg);
  color: var(--lv-prebasics);
  border: 2px solid var(--lv-prebasics);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.1em;
  font-family: var(--font-mono);
}
.step-body { flex: 1; min-width: 0; }
.step-body h3 {
  font-size: 1.15em;
  margin-bottom: var(--space-xs);
  color: var(--text-high);
}
.step-body .step-action {
  font-size: 0.82em;
  color: var(--lv-prebasics);
  font-weight: 700;
  margin-bottom: var(--space-sm);
  display: flex; align-items: center; gap: 6px;
}
.step-body .step-action::before { content: '👆'; }
.step-body p { color: var(--text-muted); font-size: 0.9em; }

/* ── Checkpoint (你应该看到...) ── */
.checkpoint {
  background: var(--green-dim);
  border: 1px solid #2a4a2a;
  border-left: 4px solid var(--green);
  border-radius: var(--radius);
  padding: 14px 20px;
  margin: var(--space-md) 0;
  font-size: 0.9em;
}
.checkpoint::before {
  content: '✅ 你应该看到：';
  display: block;
  font-weight: 700;
  color: var(--green);
  margin-bottom: 6px;
}
.checkpoint p { margin: 0; color: var(--text); }

/* ── Celebration Banner ── */
.celebration {
  text-align: center;
  padding: var(--space-xl);
  margin: var(--space-xl) 0;
  background: linear-gradient(135deg, var(--lv-prebasics-bg), #1a1a2e);
  border: 2px solid var(--lv-prebasics);
  border-radius: var(--radius-lg);
  animation: celebrate-in 0.6s var(--ease-out-expo);
}
.celebration .celebration-emoji {
  font-size: 3em;
  display: block;
  margin-bottom: var(--space-sm);
}
.celebration h3 {
  font-size: 1.4em;
  color: var(--lv-prebasics);
  margin-bottom: var(--space-xs);
}
.celebration p { color: var(--text-muted); font-size: 0.9em; }
@keyframes celebrate-in {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

/* ── Pitfall Box (常见坑) ── */
.pitfall {
  background: var(--orange-dim);
  border: 1px solid #4a3a1a;
  border-left: 4px solid var(--orange);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: var(--space-md) 0;
}
.pitfall::before {
  content: '⚠️ 常见坑：';
  display: block;
  font-weight: 700;
  color: var(--orange);
  margin-bottom: 8px;
  font-size: 0.92em;
}
.pitfall .pitfall-title {
  font-weight: 700;
  color: var(--text-high);
  margin-bottom: 4px;
}
.pitfall .pitfall-fix {
  color: var(--green);
  font-size: 0.88em;
}
.pitfall .pitfall-fix::before { content: '👉 解决方法：'; color: var(--text-muted); }

/* ── Video/GIF Wrapper ── */
.video-wrap {
  margin: var(--space-lg) 0;
  text-align: center;
}
.video-wrap video {
  max-width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 4px 24px rgba(0,0,0,0.4);
}
.video-wrap .video-label {
  display: inline-flex; align-items: center; gap: 6px;
  margin-bottom: var(--space-sm);
  font-size: 0.85em;
  color: var(--text-muted);
  font-weight: 600;
}
.video-wrap .video-label::before { content: '🎬'; }

/* ── Practice Section ── */
.practice-box {
  background: var(--surface);
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  margin: var(--space-xl) 0;
  text-align: center;
}
.practice-box h3 {
  font-size: 1.2em;
  margin-bottom: var(--space-sm);
}
.practice-box h3::before { content: '✋ '; }
.practice-box .practice-task {
  font-size: 1.05em;
  color: var(--text-high);
  margin: var(--space-md) 0;
  font-weight: 600;
}
.practice-box .practice-hint {
  font-size: 0.85em;
  color: var(--text-muted);
}

/* ── Checkmark List (学到了什么) ── */
.learned-list {
  list-style: none;
  padding: 0;
  margin: var(--space-md) 0;
}
.learned-list li {
  padding: 10px 16px;
  margin-bottom: var(--space-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; gap: var(--space-sm);
  font-size: 0.95em;
  transition: border-color var(--duration-fast);
}
.learned-list li::before {
  content: '☐';
  font-size: 1.2em;
  color: var(--lv-prebasics);
  font-weight: 700;
}
.learned-list li:hover { border-color: var(--lv-prebasics); }

/* ── Prerequisite Badge ── */
.prereq-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  font-size: 0.82em;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
}
.prereq-badge a { color: var(--accent); font-weight: 600; }

/* ── Try Again Prompt ── */
.try-again {
  text-align: center;
  padding: var(--space-lg);
  margin: var(--space-lg) 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.95em;
  color: var(--text-muted);
}
.try-again strong { color: var(--lv-prebasics); }

/* ── Comparison Image Pair ── */
.img-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  margin: var(--space-lg) 0;
}
.img-compare .img-compare-item {
  text-align: center;
}
.img-compare .img-compare-item img {
  max-width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.img-compare .img-compare-item .label {
  font-size: 0.82em;
  color: var(--text-muted);
  margin-top: var(--space-xs);
}
@media (max-width: 768px) {
  .img-compare { grid-template-columns: 1fr; }
  .step-item { flex-direction: column; gap: var(--space-sm); }
}

/* ═══════════════════════════════════════════════════════
   CSS Illustration Components (替代截图)
   ═══════════════════════════════════════════════════════ */

/* ── Terminal / PowerShell Simulation (Win10 style) ── */
.terminal-screenshot {
  background: #0c0c0c;
  border: 1px solid #555;
  border-radius: 0;
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 0.85em;
  line-height: 1.6;
  text-align: left;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}
.terminal-screenshot .term-titlebar {
  background: #f0f0f0;
  padding: 0 0 0 10px;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 0.8em;
  color: #333;
  font-family: 'Segoe UI', var(--font-sans);
  border-bottom: 1px solid #ccc;
  user-select: none;
}
.terminal-screenshot .term-titlebar .term-title {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.terminal-screenshot .term-titlebar .term-btns {
  display: flex; flex-shrink: 0;
}
.terminal-screenshot .term-titlebar .term-btn {
  width: 40px; height: 28px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10px; color: #333;
  font-family: 'Segoe UI', sans-serif;
  line-height: 1;
  transition: background 0.1s;
}
.terminal-screenshot .term-titlebar .term-btn:hover {
  background: #d4d4d4;
}
.terminal-screenshot .term-titlebar .term-btn.close:hover {
  background: #e81123; color: #fff;
}
.terminal-screenshot .term-body {
  padding: 14px 18px;
  color: #c0c0c0;
}
.terminal-screenshot .term-body .term-prompt { color: var(--green); }
.terminal-screenshot .term-body .term-cmd    { color: #fff; }
.terminal-screenshot .term-body .term-output { color: #c0c0c0; }
.terminal-screenshot .term-body .term-highlight {
  background: rgba(255,255,0,0.15);
  border: 1px dashed #f0a860;
  border-radius: 2px;
  padding: 1px 4px;
  margin: 0 1px;
}
.terminal-screenshot .term-body .term-cursor {
  display: inline-block; width: 8px; height: 15px;
  background: #fff; vertical-align: middle;
  animation: cursor-blink 0.8s step-end infinite;
}
@keyframes cursor-blink {
  0%, 100% { opacity: 1; } 50% { opacity: 0; }
}
.terminal-screenshot .term-body .term-note {
  color: var(--text-muted); font-size: 0.85em;
  font-family: var(--font-sans); font-style: italic;
  margin-top: 6px; padding-top: 6px;
  border-top: 1px dashed #333;
}

/* ── Windows Desktop Illustration ── */
.win-desktop {
  background: linear-gradient(135deg, #1a3a6e 0%, #2d6aa0 40%, #1a5276 100%);
  border: 1px solid #555;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  min-height: 240px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}
.win-desktop .desktop-icons {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 16px; padding: 24px;
  max-width: 400px;
}
.win-desktop .desk-icon {
  text-align: center; color: #fff; font-size: 0.78em;
  cursor: default; text-shadow: 0 1px 2px rgba(0,0,0,0.6);
}
.win-desktop .desk-icon .icon-img {
  font-size: 2.2em; display: block; margin-bottom: 4px;
}
.win-desktop .desk-icon.highlight .icon-img {
  filter: drop-shadow(0 0 8px rgba(240,168,96,0.8));
}
.win-desktop .desk-icon.highlight {
  color: var(--lv-prebasics); font-weight: 700;
}
/* Taskbar at bottom */
.win-taskbar {
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 40px; background: #1a1a2e;
  border-top: 1px solid #444;
  display: flex; align-items: center; padding: 0 12px; gap: 12px;
}
.win-taskbar .tb-start {
  font-size: 1.2em; color: #58a6ff; cursor: default;
}
.win-taskbar .tb-search {
  flex: 1; max-width: 300px; height: 26px;
  background: #fff; border-radius: 13px;
  display: flex; align-items: center; padding: 0 12px;
  font-size: 0.75em; color: #666;
  font-family: var(--font-sans);
}
.win-taskbar .tb-search::before { content: '🔍 '; margin-right: 6px; }
.win-taskbar .tb-time {
  color: #fff; font-size: 0.75em; margin-left: auto;
  font-family: var(--font-sans);
}

/* ── Window Frame Illustration ── */
.win-window {
  background: #fff;
  border: 1px solid #999;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  max-width: 600px;
  margin: 0 auto;
}
.win-window .win-titlebar {
  padding: 8px 14px;
  display: flex; align-items: center; gap: 8px;
  font-size: 0.82em; color: #333;
  font-family: var(--font-sans);
  border-bottom: 1px solid #ddd;
  background: #f0f0f0;
  user-select: none;
}
.win-window .win-titlebar .win-btns {
  display: flex; gap: 6px; margin-right: 8px;
}
.win-window .win-titlebar .win-btn {
  width: 12px; height: 12px; border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.15);
}
.win-window .win-titlebar .win-btn.min  { background: #ffbd2e; }
.win-window .win-titlebar .win-btn.max  { background: #27c93f; }
.win-window .win-titlebar .win-btn.close { background: #ff5f56; }
.win-window .win-body {
  padding: 20px; color: #333;
  font-family: var(--font-sans);
  min-height: 120px;
}
.win-window .win-body p { color: #555; font-size: 0.9em; }
.win-window .win-body .win-folder {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; background: #fff7d6; border: 1px solid #e0d5a0;
  border-radius: 4px; font-size: 0.88em; color: #333; margin: 4px;
}

/* ── Smart Placeholder (upgraded from img-placeholder) ── */
.smart-placeholder {
  background: #0d1117;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.smart-placeholder .ph-header {
  background: var(--surface);
  padding: 8px 14px;
  font-size: 0.78em; color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-sans);
  display: flex; align-items: center; gap: 8px;
}
.smart-placeholder .ph-header .ph-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--lv-prebasics);
}
.smart-placeholder .ph-body {
  padding: 20px;
  text-align: center;
  color: var(--text-muted);
  font-family: var(--font-sans);
}
.smart-placeholder .ph-body .ph-preview {
  background: #1a1f2e;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin: 12px 0;
  font-family: var(--font-mono);
  font-size: 0.85em;
  color: var(--text);
  text-align: left;
  line-height: 1.6;
}
.smart-placeholder .ph-body .ph-note {
  font-size: 0.82em; color: var(--text-faint);
  font-style: italic; margin-top: 8px;
}

/* ═══════════════════════════════════════════════
   防盗毒药样式 — 人眼不可见，爬虫全抓走
   ═══════════════════════════════════════════════ */
.poison-only {
  position: absolute !important;
  left: -99999px !important;
  top: -99999px !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  clip: rect(0,0,0,0) !important;
}

.poison-crawl {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  aria-hidden: true;
}
