/* Pandas 数据分析实战训练营 - 全局样式 */
:root {
  --bg-primary: #0b1220;
  --bg-secondary: #111a2e;
  --bg-card: #18223f;
  --bg-card-hover: #1e2c4f;
  --border: #2a3a5c;
  --text-primary: #e6ecff;
  --text-secondary: #9aa8c7;
  --text-muted: #6e7b99;
  --accent: #3b82f6;
  --accent-light: #60a5fa;
  --accent-glow: rgba(59, 130, 246, 0.35);
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --purple: #a78bfa;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.5);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
               "Microsoft YaHei", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: linear-gradient(180deg, #0b1220 0%, #0a0f1d 100%);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
  font-size: 15px;
}

a { color: var(--accent-light); text-decoration: none; }
a:hover { color: var(--accent); }

/* ===== Hero / Header ===== */
.hero {
  padding: 72px 20px 56px;
  background: radial-gradient(ellipse at top, rgba(59, 130, 246, 0.22), transparent 60%),
              radial-gradient(ellipse at bottom right, rgba(167, 139, 250, 0.15), transparent 50%),
              linear-gradient(180deg, #0e1830 0%, transparent 100%);
  text-align: center;
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(59,130,246,0.12) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(167,139,250,0.1) 0%, transparent 40%);
  pointer-events: none;
}
.hero > * { position: relative; z-index: 1; }

.hero .logo {
  font-size: 13px;
  color: var(--accent-light);
  letter-spacing: 4px;
  margin-bottom: 20px;
  text-transform: uppercase;
  font-weight: 700;
  display: inline-block;
  padding: 6px 16px;
  background: rgba(59,130,246,0.1);
  border: 1px solid rgba(59,130,246,0.3);
  border-radius: 999px;
}
.hero h1 {
  font-size: 46px;
  margin: 0 0 16px;
  background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 50%, #f472b6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.2;
}
.hero .subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  margin: 0 0 16px;
  font-weight: 500;
}
.hero .slogan {
  color: var(--text-muted);
  font-size: 14px;
  margin: 0 auto 32px;
  max-width: 600px;
  line-height: 1.8;
}
.progress-stat {
  display: inline-block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px 32px;
  box-shadow: var(--shadow);
}
.progress-stat .num {
  font-size: 32px;
  font-weight: 800;
  background: linear-gradient(135deg, #60a5fa, #a78bfa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.progress-stat .label {
  color: var(--text-muted);
  margin-left: 8px;
  font-size: 14px;
  font-weight: 500;
}
.progress-bar {
  width: 300px;
  height: 8px;
  background: var(--bg-secondary);
  border-radius: 4px;
  margin-top: 12px;
  overflow: hidden;
}
.progress-bar > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #a78bfa, #f472b6);
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 10px rgba(59,130,246,0.5);
}

/* ===== Navbar ===== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 18, 32, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 14px 20px;
}
.navbar .inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.navbar .brand {
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
}
.navbar .brand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #3b82f6, #a78bfa);
  border-radius: 8px;
  font-size: 15px;
}
.navbar .nav-links {
  display: flex;
  gap: 20px;
  align-items: center;
}
.navbar .nav-links a {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}
.navbar .nav-links a:hover { color: var(--accent-light); }
.navbar .nav-progress {
  background: var(--bg-card);
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 13px;
  color: var(--accent-light);
  font-weight: 600;
}
@media (max-width: 640px) {
  .navbar .nav-links { display: none; }
}

/* ===== Container ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}
.section {
  padding: 64px 0;
}
.section h2 {
  font-size: 32px;
  margin: 0 0 12px;
  text-align: center;
  font-weight: 700;
  background: linear-gradient(135deg, #e6ecff 0%, #93c5fd 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.section .sub {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 40px;
  font-size: 15px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* ===== Feature cards (课程介绍区) ===== */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 26px 22px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}
.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 14px 40px var(--accent-glow);
}
.feature-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--purple));
  opacity: 0;
  transition: opacity 0.3s;
}
.feature-card:hover::before { opacity: 1; }
.feature-card .icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(59,130,246,0.15), rgba(167,139,250,0.15));
  border: 1px solid rgba(59,130,246,0.3);
  border-radius: 12px;
  font-size: 24px;
  margin-bottom: 14px;
}
.feature-card h3 {
  margin: 0 0 10px;
  font-size: 17px;
  font-weight: 700;
}
.feature-card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.7;
}

/* ===== Cards grid (项目卡片) ===== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 26px;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.card:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
  box-shadow: 0 14px 40px var(--accent-glow);
}
.card .card-num {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 48px;
  font-weight: 800;
  color: rgba(59, 130, 246, 0.15);
  line-height: 1;
  font-family: ui-monospace, Menlo, monospace;
}
.card .card-title {
  font-size: 19px;
  font-weight: 700;
  margin: 0 0 10px;
  color: var(--text-primary);
  padding-right: 40px;
}
.card .card-desc {
  color: var(--text-secondary);
  font-size: 14px;
  margin: 0 0 18px;
  line-height: 1.7;
  flex: 1;
}
.card .tag {
  display: inline-block;
  padding: 4px 12px;
  font-size: 12px;
  border-radius: 999px;
  font-weight: 600;
  margin-right: 6px;
}
.card .tag-row { margin-bottom: 14px; }
.tag-入门 { background: rgba(16, 185, 129, 0.15); color: #6ee7b7; border: 1px solid rgba(16, 185, 129, 0.3); }
.tag-基础 { background: rgba(59, 130, 246, 0.15); color: #93c5fd; border: 1px solid rgba(59, 130, 246, 0.3); }
.tag-进阶 { background: rgba(168, 85, 247, 0.15); color: #c4b5fd; border: 1px solid rgba(168, 85, 247, 0.3); }
.tag-高阶 { background: rgba(245, 158, 11, 0.15); color: #fcd34d; border: 1px solid rgba(245, 158, 11, 0.3); }
.tag-专家 { background: rgba(239, 68, 68, 0.15); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.3); }

.card .btn {
  margin-top: 16px;
  width: 100%;
}
.card .badge {
  position: absolute;
  top: 20px;
  right: 20px;
  background: linear-gradient(135deg, #10b981, #34d399);
  color: #062d20;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
  z-index: 2;
}
.card .skill-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.skill-chip {
  display: inline-block;
  padding: 3px 10px;
  font-size: 11.5px;
  background: rgba(110, 123, 153, 0.12);
  border: 1px solid rgba(110, 123, 153, 0.25);
  color: var(--text-secondary);
  border-radius: 6px;
  font-weight: 500;
}

/* ===== Path timeline ===== */
.path-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  position: relative;
}
@media (max-width: 900px) {
  .path-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 500px) {
  .path-row { grid-template-columns: 1fr; }
}
.path-cell {
  padding: 26px 20px;
  border-radius: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  text-align: center;
  transition: all 0.25s;
  position: relative;
}
.path-cell:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 10px 30px var(--accent-glow);
}
.path-cell .level-num {
  display: inline-block;
  width: 36px;
  height: 36px;
  line-height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #a78bfa);
  color: white;
  font-weight: 800;
  font-size: 16px;
  margin-bottom: 12px;
}
.path-cell h4 { margin: 0 0 8px; font-size: 17px; font-weight: 700; }
.path-cell p { margin: 4px 0; font-size: 13px; color: var(--text-secondary); line-height: 1.6; }

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  padding: 11px 20px;
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  text-align: center;
  letter-spacing: 0.3px;
  text-decoration: none;
}
.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px var(--accent-glow);
  color: #fff;
}
.btn:active { transform: translateY(0); }
.btn-secondary {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-primary);
}
.btn-secondary:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 14px var(--accent-glow);
  color: var(--accent-light);
}
.btn-success {
  background: linear-gradient(135deg, #10b981, #34d399);
}
.btn-success:hover {
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.3);
  color: #fff;
}
.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }

/* ===== Project page ===== */
.project-header {
  max-width: 1100px;
  margin: 28px auto 0;
  padding: 40px 24px 20px;
}
.project-header .breadcrumbs {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.project-header .breadcrumbs a {
  color: var(--accent-light);
  font-weight: 500;
}
.project-header h1 {
  font-size: 34px;
  margin: 0 0 12px;
  font-weight: 800;
  line-height: 1.3;
  background: linear-gradient(135deg, #e6ecff 0%, #93c5fd 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.project-header .meta-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  align-items: center;
}
.project-header .project-num {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 13px;
  color: var(--accent-light);
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.3);
  padding: 5px 12px;
  border-radius: 8px;
  font-weight: 600;
}
.project-header .description {
  color: var(--text-secondary);
  margin-top: 10px;
  font-size: 15px;
  line-height: 1.8;
  max-width: 800px;
}

.project-main {
  max-width: 1100px;
  margin: 20px auto 80px;
  padding: 0 24px;
}

/* ===== Panel (课程内容通用面板) ===== */
.panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 26px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}
.panel h3 {
  margin: 0 0 18px;
  font-size: 19px;
  color: var(--accent-light);
  letter-spacing: 0.3px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}
.panel h3 .panel-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, rgba(59,130,246,0.15), rgba(167,139,250,0.15));
  border: 1px solid rgba(59,130,246,0.3);
  border-radius: 8px;
  font-size: 16px;
}

/* ===== Knowledge point cards (知识点卡片) ===== */
.knowledge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}
.knowledge-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  transition: all 0.2s;
}
.knowledge-card:hover {
  border-color: var(--accent);
}
.knowledge-card .kp-title {
  font-weight: 700;
  color: var(--accent-light);
  font-size: 15px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.knowledge-card .kp-title::before {
  content: '📖';
  font-size: 14px;
}
.knowledge-card .kp-desc {
  color: var(--text-secondary);
  font-size: 13.5px;
  line-height: 1.7;
}

/* ===== 代码示例 (带语法高亮的文本块) ===== */
.code-block {
  background: #0a0f1d;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  margin: 14px 0;
  overflow-x: auto;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, "Courier New", monospace;
  font-size: 13px;
  line-height: 1.7;
  color: #d1d5db;
}
.code-block .code-keyword { color: #c792ea; font-weight: 600; }
.code-block .code-string { color: #c3e88d; }
.code-block .code-comment { color: #6e7b99; font-style: italic; }
.code-block .code-func { color: #82aaff; }
.code-block .code-num { color: #f78c6c; }

.inline-code {
  display: inline;
  font-family: ui-monospace, Menlo, monospace;
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.25);
  padding: 1px 6px;
  border-radius: 5px;
  font-size: 13px;
  color: #93c5fd;
  font-weight: 500;
}

/* ===== Tabs 切换 ===== */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.tab-btn {
  padding: 12px 20px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s;
  font-family: inherit;
}
.tab-btn:hover { color: var(--accent-light); }
.tab-btn.active {
  color: var(--accent-light);
  border-bottom-color: var(--accent);
}
.tab-content { display: none; }
.tab-content.active { display: block; animation: fadeIn 0.4s ease; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== 课程内容小节 ===== */
.lesson-section {
  margin-bottom: 28px;
}
.lesson-section h4 {
  font-size: 16px;
  color: var(--text-primary);
  margin: 20px 0 10px;
  font-weight: 700;
  padding-left: 12px;
  border-left: 3px solid var(--accent);
}
.lesson-section h4:first-child { margin-top: 0; }
.lesson-section p {
  color: var(--text-secondary);
  font-size: 14.5px;
  line-height: 1.85;
  margin: 0 0 12px;
}
.lesson-section ul, .lesson-section ol {
  color: var(--text-secondary);
  font-size: 14.5px;
  line-height: 1.85;
  padding-left: 22px;
  margin: 0 0 12px;
}
.lesson-section li { margin-bottom: 4px; }
.lesson-section strong { color: var(--accent-light); font-weight: 700; }

/* ===== 提示/警告/信息 卡片 ===== */
.info-box {
  background: rgba(59, 130, 246, 0.08);
  border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0;
  padding: 12px 18px;
  margin: 14px 0;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.7;
}
.info-box::before {
  content: '💡 ';
  font-weight: 700;
}
.warning-box {
  background: rgba(245, 158, 11, 0.08);
  border-left: 3px solid var(--warning);
  border-radius: 0 8px 8px 0;
  padding: 12px 18px;
  margin: 14px 0;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.7;
}
.warning-box::before {
  content: '⚠️ ';
  font-weight: 700;
}
.success-box {
  background: rgba(16, 185, 129, 0.08);
  border-left: 3px solid var(--success);
  border-radius: 0 8px 8px 0;
  padding: 12px 18px;
  margin: 14px 0;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.7;
}
.success-box::before {
  content: '✅ ';
  font-weight: 700;
}

/* ===== Data table ===== */
.data-scroll {
  overflow-x: auto;
  max-height: 380px;
  border-radius: 10px;
  border: 1px solid var(--border);
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: var(--bg-secondary);
}
.data-table th, .data-table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.data-table thead th {
  position: sticky;
  top: 0;
  background: var(--bg-card);
  color: var(--accent-light);
  font-weight: 700;
  border-bottom: 2px solid var(--accent);
  z-index: 2;
}
.data-table tbody tr:hover { background: rgba(59, 130, 246, 0.08); }

/* ===== CodeMirror container ===== */
.cm-container {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 14px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.cm-editor { height: 420px; font-size: 13.5px; }
.cm-editor.cm-focused { outline: none; }

/* ===== Output console ===== */
.output-console {
  background: #0a0f1d;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  min-height: 160px;
  font-family: ui-monospace, Menlo, Consolas, "Courier New", monospace;
  font-size: 13px;
  line-height: 1.6;
  overflow-x: auto;
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.3);
}
.output-console .text-output {
  margin: 0 0 10px;
  padding: 0;
  white-space: pre-wrap;
  color: #d1d5db;
}
.output-console .text-output.muted { color: var(--text-muted); }
.output-console .output-error {
  color: #fca5a5;
  margin-bottom: 10px;
  font-weight: 600;
}
.output-console .output-running {
  color: var(--accent-light);
  font-style: italic;
  display: flex;
  align-items: center;
  gap: 8px;
}
.output-console .output-running::before {
  content: '';
  width: 10px;
  height: 10px;
  background: var(--accent-light);
  border-radius: 50%;
  animation: pulse 1.2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 0.3; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.1); }
}

/* ===== DataFrame rendered table ===== */
.df-wrapper {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  margin: 12px 0;
}
.df-title {
  font-size: 13px;
  color: var(--accent-light);
  font-weight: 700;
  margin-bottom: 10px;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}
.df-title .df-shape {
  color: var(--text-muted);
  font-weight: 400;
  font-size: 12px;
  margin-left: 8px;
}
.df-scroll {
  overflow-x: auto;
  max-height: 400px;
}
.df-table {
  border-collapse: collapse;
  font-size: 12.5px;
  font-family: ui-monospace, Menlo, Consolas, monospace;
}
.df-table th, .df-table td {
  padding: 6px 12px;
  border: 1px solid var(--border);
  text-align: right;
  white-space: nowrap;
}
.df-table thead th {
  background: var(--bg-card);
  color: var(--accent-light);
  text-align: right;
  font-weight: 700;
  position: sticky;
  top: 0;
}
.df-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}
.df-table tbody tr:hover {
  background: rgba(59, 130, 246, 0.08);
}
.df-table .df-index-head, .df-table .df-index {
  background: var(--bg-card);
  color: var(--text-muted);
  text-align: left;
  font-weight: 600;
  position: sticky;
  left: 0;
}
.df-truncated {
  color: var(--text-muted);
  font-size: 12px;
  margin-top: 8px;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ===== Field list ===== */
.field-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
.field-item {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13px;
  transition: border-color 0.2s;
}
.field-item:hover { border-color: var(--accent); }
.field-item .f-name {
  color: var(--accent-light);
  font-weight: 700;
  margin-right: 6px;
  font-family: ui-monospace, monospace;
  font-size: 13px;
}
.field-item .f-type {
  color: var(--text-muted);
  font-size: 11.5px;
  margin-left: 6px;
  font-family: ui-monospace, monospace;
}
.field-item .f-desc {
  color: var(--text-secondary);
  display: block;
  margin-top: 4px;
  font-size: 12.5px;
  line-height: 1.6;
}

/* ===== Footer ===== */
.footer {
  margin-top: 60px;
  padding: 36px 20px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}
.footer a { color: var(--accent-light); font-weight: 500; }
.footer .footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  max-width: 900px;
  margin: 0 auto 20px;
  text-align: left;
}
.footer .footer-col h5 {
  margin: 0 0 10px;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 700;
}
.footer .footer-col p {
  margin: 4px 0;
  font-size: 13px;
  line-height: 1.7;
}

/* ===== Completion celebration ===== */
.celebrate {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(59, 130, 246, 0.12));
  border: 1px solid var(--success);
  border-radius: 14px;
  padding: 20px 24px;
  text-align: center;
  margin-bottom: 24px;
  color: var(--success);
  font-weight: 600;
  font-size: 16px;
}

/* ===== Small utilities ===== */
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.spacer { flex: 1; }
.muted { color: var(--text-muted); }
.hidden { display: none !important; }
.center { text-align: center; }

/* ===== 统计卡片 ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 24px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  text-align: center;
  transition: all 0.2s;
}
.stat-card:hover { border-color: var(--accent); }
.stat-card .stat-num {
  font-size: 36px;
  font-weight: 800;
  background: linear-gradient(135deg, #60a5fa, #a78bfa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1;
}
.stat-card .stat-label {
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 8px;
}

/* 响应式调整 */
@media (max-width: 760px) {
  .hero h1 { font-size: 30px; }
  .hero { padding: 48px 16px 40px; }
  .section { padding: 48px 0; }
  .section h2 { font-size: 24px; }
  .project-header h1 { font-size: 26px; }
  .project-header { padding: 30px 16px 10px; }
  .project-main { padding: 0 16px; }
  .panel { padding: 20px; }
  .cm-editor { height: 340px; }
  .navbar { padding: 12px 16px; }
}
