/* ============================================================
   恒学练教学研讨系统 · 设计系统 v2.0
   专业 · 学术 · 高级感
   深蓝主调 · 精致排版 · 无emoji
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Noto+Sans+SC:wght@400;500;600;700&display=swap');

:root {
  /* 主色 — 深沉专业的学术蓝 */
  --primary: #1e40af;
  --primary-dark: #1e3a8a;
  --primary-light: #3b82f6;
  --primary-50: #eff6ff;
  --primary-100: #dbeafe;
  --primary-200: #bfdbfe;

  /* 辅色 */
  --accent: #0ea5e9;
  --success: #059669;
  --success-light: #d1fae5;
  --warning: #d97706;
  --warning-light: #fef3c7;
  --danger: #dc2626;
  --danger-light: #fee2e2;
  --purple: #7c3aed;
  --purple-light: #ede9fe;

  /* 文字 — 高对比度 */
  --ink: #0f172a;
  --ink-2: #1e293b;
  --ink-3: #475569;
  --ink-4: #64748b;
  --muted: #94a3b8;

  /* 线条/背景 */
  --line: #e2e8f0;
  --line-2: #f1f5f9;
  --bg: #f8fafc;
  --bg-2: #f1f5f9;
  --card: #ffffff;

  /* 圆角 */
  --radius: 12px;
  --radius-sm: 8px;
  --radius-xs: 6px;

  /* 阴影 — 更克制更精致 */
  --shadow-xs: 0 1px 2px rgba(15,23,42,.05);
  --shadow-sm: 0 1px 3px rgba(15,23,42,.06), 0 1px 2px rgba(15,23,42,.04);
  --shadow: 0 2px 8px rgba(15,23,42,.06), 0 1px 3px rgba(15,23,42,.04);
  --shadow-md: 0 6px 20px rgba(15,23,42,.08);
  --shadow-lg: 0 16px 48px rgba(15,23,42,.12);

  /* 布局 */
  --sidebar-w: 240px;
  --font: 'Inter', 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
  --mono: 'JetBrains Mono', 'Fira Code', 'SF Mono', Consolas, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.01em;
}
a { color: var(--primary); text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* ---------- SVG 图标 ---------- */
.svg-ico { width: 1em; height: 1em; display: inline-block; vertical-align: -0.125em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.svg-ico-lg { width: 22px; height: 22px; }

/* ---------- 布局 ---------- */
.app { display: flex; min-height: 100vh; }

/* 侧边栏 — 深蓝学术风 */
.sidebar {
  width: var(--sidebar-w);
  background: #0f172a;
  color: #94a3b8;
  position: fixed; top: 0; left: 0; bottom: 0;
  display: flex; flex-direction: column;
  z-index: 50;
  transition: transform .25s ease;
}
.sidebar .brand {
  display: flex; align-items: center; gap: 11px;
  padding: 20px 20px 18px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.sidebar .brand img.brand-logo { height: 38px; width: 38px; border-radius: 10px; object-fit: cover; box-shadow: 0 4px 12px rgba(59,130,246,.2); flex-shrink: 0; }
.sidebar .brand .logo-box {
  width: 38px; height: 38px; border-radius: 10px;
  background: linear-gradient(135deg, #3b82f6, #1e40af);
  display: grid; place-items: center;
  box-shadow: 0 4px 12px rgba(59,130,246,.3);
  flex-shrink: 0;
}
.sidebar .brand .logo-box svg { width: 22px; height: 22px; color: #fff; }
.sidebar .brand-text { line-height: 1.2; }
.sidebar .brand-text .name { font-size: 16px; font-weight: 700; color: #f1f5f9; }
.sidebar .brand-text .sub { font-size: 11.5px; color: #64748b; font-weight: 500; }

.nav { flex: 1; padding: 8px 10px; overflow-y: auto; overflow-x: hidden; }
.nav-section { font-size: 11px; color: #475569; letter-spacing: 1.8px; padding: 16px 14px 6px; text-transform: uppercase; font-weight: 700; }
.nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 8px;
  color: #94a3b8; font-weight: 500; font-size: 14px;
  margin-bottom: 1px; transition: all .18s cubic-bezier(.4,0,.2,1);
  text-decoration: none;
}
.nav a .nav-ico { width: 18px; height: 18px; flex-shrink: 0; opacity: .7; transition: opacity .18s; }
.nav a:hover { background: rgba(255,255,255,.05); color: #e2e8f0; }
.nav a:hover .nav-ico { opacity: .95; }
.nav a.active {
  background: rgba(59,130,246,.12);
  color: #93c5fd; font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(59,130,246,.15);
}
.nav a.active .nav-ico { opacity: 1; }
.nav a.active::before {
  content: ''; position: absolute; left: -10px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 18px; background: #3b82f6; border-radius: 0 3px 3px 0;
}
.sidebar .foot {
  padding: 14px 20px; font-size: 10.5px; color: #475569;
  border-top: 1px solid rgba(255,255,255,.06);
  font-weight: 500; letter-spacing: .3px;
}

/* 主区域 */
.main { flex: 1; margin-left: var(--sidebar-w); display: flex; flex-direction: column; min-width: 0; }
.topbar {
  background: rgba(255,255,255,.9); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  padding: 0 28px; height: 60px;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 40;
}
.topbar .page-title { font-size: 17px; font-weight: 700; color: var(--ink); letter-spacing: -0.02em; }
.topbar .right { display: flex; align-items: center; gap: 14px; }
.topbar .avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 14px;
}
.topbar .uname { font-size: 13px; font-weight: 600; color: var(--ink); }
.topbar .urole { font-size: 11px; color: var(--ink-4); }
.content { padding: 24px 28px 48px; flex: 1; max-width: 1400px; width: 100%; }

/* ---------- 卡片 ---------- */
.card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); border: 1px solid var(--line);
  padding: 20px;
}
.card + .card { margin-top: 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.card-head h3 { font-size: 15px; font-weight: 700; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.card-head .sub { font-size: 12px; color: var(--ink-4); font-weight: 400; }

/* 统计卡片 */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat {
  background: var(--card); border-radius: var(--radius); padding: 20px;
  box-shadow: var(--shadow-sm); border: 1px solid var(--line);
  position: relative; overflow: hidden; transition: transform .18s, box-shadow .18s;
}
.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stat .stat-ico { width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; margin-bottom: 12px; }
.stat .stat-ico svg { width: 22px; height: 22px; }
.stat .num { font-size: 28px; font-weight: 800; color: var(--ink); letter-spacing: -0.5px; line-height: 1.1; }
.stat .lbl { font-size: 12.5px; color: var(--ink-4); margin-top: 4px; font-weight: 500; }
.stat .trend { position: absolute; top: 20px; right: 20px; font-size: 11px; font-weight: 600; }
.ico-blue { background: var(--primary-50); color: var(--primary); }
.ico-green { background: var(--success-light); color: var(--success); }
.ico-purple { background: var(--purple-light); color: var(--purple); }
.ico-amber { background: var(--warning-light); color: var(--warning); }
.ico-cyan { background: #cffafe; color: var(--accent); }
.ico-rose { background: var(--danger-light); color: var(--danger); }
.ico-red { background: #fee2e2; color: #dc2626; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: var(--radius-sm); border: none;
  font-size: 13px; font-weight: 600; transition: all .15s; white-space: nowrap;
  background: var(--ink-2); color: #fff;
}
.btn:hover { filter: brightness(1.1); }
.btn-primary { background: var(--primary); box-shadow: 0 2px 8px rgba(30,64,175,.25); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-success { background: var(--success); }
.btn-danger { background: var(--danger); }
.btn-ghost { background: var(--card); color: var(--ink-2); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-50); }
.btn-sm { padding: 5px 11px; font-size: 12px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn svg { width: 15px; height: 15px; }

/* ---------- 表单 ---------- */
.form-row { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-end; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 5px; }
.input, .select, textarea {
  width: 100%; padding: 9px 12px; border: 1.5px solid var(--line);
  border-radius: var(--radius-sm); font-size: 13.5px; font-family: inherit;
  background: #fff; color: var(--ink); transition: border .15s, box-shadow .15s;
}
.input:focus, .select:focus, textarea:focus { outline: none; border-color: var(--primary-light); box-shadow: 0 0 0 3px rgba(59,130,246,.12); }
textarea { resize: vertical; min-height: 90px; line-height: 1.7; }

/* ---------- 标签 / 徽章 ---------- */
.badge {
  display: inline-flex; align-items: center; padding: 2px 9px;
  border-radius: 5px; font-size: 11.5px; font-weight: 600;
  letter-spacing: .01em;
}
.badge-blue { background: var(--primary-100); color: var(--primary-dark); }
.badge-green { background: var(--success-light); color: #065f46; }
.badge-amber { background: var(--warning-light); color: #92400e; }
.badge-purple { background: var(--purple-light); color: #5b21b6; }
.badge-gray { background: var(--line-2); color: var(--ink-3); }
.badge-rose { background: var(--danger-light); color: #991b1b; }

/* 难度条 */
.diff-bar { display: inline-flex; align-items: center; gap: 6px; }
.diff-track { width: 56px; height: 5px; background: var(--line-2); border-radius: 3px; overflow: hidden; }
.diff-fill { height: 100%; border-radius: 3px; }
.diff-label { font-size: 11.5px; font-weight: 600; }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius-sm); }
table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data th { text-align: left; padding: 10px 14px; background: var(--bg-2); color: var(--ink-4); font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: .5px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.data td { padding: 11px 14px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
table.data tr:hover td { background: #fafcff; }
table.data tr:last-child td { border-bottom: none; }

/* ---------- 题目卡 ---------- */
.q-item {
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 15px 17px; margin-bottom: 10px; background: #fff;
  transition: box-shadow .15s, border-color .15s;
}
.q-item:hover { box-shadow: var(--shadow); border-color: var(--primary-200); }
.q-item .q-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.q-item .q-body { font-size: 13.5px; color: var(--ink); line-height: 1.8; }
.q-item .q-opts { margin: 8px 0 6px 18px; }
.q-item .q-opts .opt { padding: 3px 0; font-size: 13px; }
.q-item .q-foot { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }

/* ---------- 弹窗 ---------- */
.modal-mask {
  position: fixed; inset: 0; background: rgba(15,23,42,.5); backdrop-filter: blur(3px);
  z-index: 100; display: none; place-items: center; padding: 20px;
}
.modal-mask.show { display: grid; }
.modal {
  background: #fff; border-radius: 14px; width: 100%; max-width: 560px;
  max-height: 88vh; overflow-y: auto; box-shadow: var(--shadow-lg);
  animation: pop .2s ease;
}
.modal.lg { max-width: 880px; }
@keyframes pop { from { transform: scale(.96); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-head { padding: 18px 22px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; background: #fff; border-radius: 14px 14px 0 0; z-index: 1; }
.modal-head h3 { font-size: 16px; font-weight: 700; }
.modal-body { padding: 20px 22px; }
.modal-foot { padding: 14px 22px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; position: sticky; bottom: 0; background: #fff; border-radius: 0 0 14px 14px; }
.close-x { width: 30px; height: 30px; border-radius: 7px; display: grid; place-items: center; background: var(--line-2); color: var(--ink-4); border: none; }
.close-x:hover { background: var(--danger); color: #fff; }
.close-x svg { width: 16px; height: 16px; }

/* ---------- 工具类 ---------- */
.flex { display: flex; } .between { justify-content: space-between; } .center { align-items: center; }
.gap { gap: 12px; } .gap-sm { gap: 8px; } .wrap { flex-wrap: wrap; }
.mt { margin-top: 14px; } .mt-lg { margin-top: 22px; } .mb { margin-bottom: 14px; }
.text-sm { font-size: 13px; } .text-xs { font-size: 12px; }
.text-muted { color: var(--ink-4); } .text-right { text-align: right; }
.fw-700 { font-weight: 700; }
.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty svg { width: 48px; height: 48px; margin-bottom: 14px; opacity: .35; }
.spinner { width: 18px; height: 18px; border: 2.5px solid var(--line); border-top-color: var(--primary); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* 分页 */
.pagination { display: flex; gap: 5px; justify-content: center; margin-top: 18px; }
.pagination button { min-width: 34px; height: 34px; border-radius: 7px; border: 1px solid var(--line); background: #fff; font-weight: 600; color: var(--ink-2); font-size: 13px; }
.pagination button.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.pagination button:disabled { opacity: .4; }

/* 提示 toast */
.toast { position: fixed; top: 20px; right: 20px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast .t { padding: 11px 18px; border-radius: 9px; color: #fff; font-size: 13px; font-weight: 600; box-shadow: var(--shadow-lg); animation: slideIn .25s; display: flex; align-items: center; gap: 8px; }
.toast .t.ok { background: var(--success); } .toast .t.err { background: var(--danger); } .toast .t.info { background: var(--primary); }
@keyframes slideIn { from { transform: translateX(110%); } to { transform: translateX(0); } }

/* 树形 */
.tree-node { margin-left: 4px; }
.tree-node .tn-row { display: flex; align-items: center; gap: 7px; padding: 6px 10px; border-radius: 7px; cursor: pointer; font-size: 13px; }
.tree-node .tn-row:hover { background: var(--primary-50); }
.tree-node .children { margin-left: 16px; border-left: 1.5px dashed var(--line); padding-left: 5px; }
.tree-toggle { width: 16px; text-align: center; color: var(--ink-4); font-size: 10px; }

/* 答题 */
.options-grid { display: grid; gap: 9px; }
.option-card { border: 1.5px solid var(--line); border-radius: 9px; padding: 12px 15px; cursor: pointer; transition: all .15s; display: flex; gap: 10px; align-items: center; }
.option-card:hover { border-color: var(--primary-light); background: var(--primary-50); }
.option-card.selected { border-color: var(--primary); background: var(--primary-100); }
.option-card.correct { border-color: var(--success); background: var(--success-light); }
.option-card.wrong { border-color: var(--danger); background: var(--danger-light); }
.option-card .ok { width: 26px; height: 26px; border-radius: 50%; background: var(--primary); color: #fff; display: grid; place-items: center; font-weight: 700; flex-shrink: 0; font-size: 12px; }

/* 滚动条 */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #e2e8f0; border-radius: 999px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: #cbd5e1; background-clip: content-box; }

/* 侧边栏滚动条 — 极简半透明 */
.nav::-webkit-scrollbar { width: 4px; }
.nav::-webkit-scrollbar-track { background: transparent; margin-block: 4px; }
.nav::-webkit-scrollbar-thumb { background: rgba(148,163,184,.3); border-radius: 999px; }
.nav::-webkit-scrollbar-thumb:hover { background: rgba(148,163,184,.6); }
.nav { scrollbar-width: thin; scrollbar-color: rgba(148,163,184,.3) transparent; }

/* Chip 选择器 */
.chip { display: inline-flex; align-items: center; padding: 5px 12px; border-radius: 20px; font-size: 12.5px; font-weight: 600; border: 1.5px solid var(--line); background: #fff; color: var(--ink-3); cursor: pointer; transition: all .15s; }
.chip:hover { border-color: var(--primary-light); }
.chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* 快捷入口卡片 */
.quick-card {
  display: flex; align-items: center; gap: 14px; padding: 16px 18px;
  background: var(--card); border-radius: var(--radius); border: 1px solid var(--line);
  transition: all .18s; cursor: pointer;
}
.quick-card:hover { border-color: var(--primary-200); box-shadow: var(--shadow); transform: translateY(-1px); }
.quick-card .qc-ico { width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; }
.quick-card .qc-ico svg { width: 22px; height: 22px; }
.quick-card .qc-title { font-size: 14px; font-weight: 700; color: var(--ink); }
.quick-card .qc-desc { font-size: 12px; color: var(--ink-4); margin-top: 2px; }

/* 响应式 */
@media (max-width: 900px) {
  :root { --sidebar-w: 0px; }
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; }
  .content { padding: 16px; }
  .topbar { padding: 0 16px; }
  .menu-btn { display: grid !important; }
}
.menu-btn { display: none; width: 36px; height: 36px; border: none; background: var(--line-2); border-radius: 8px; font-size: 17px; place-items: center; }

/* 数学公式渲染区域 */
.math-content { line-height: 2; }
.math-content p { margin-bottom: 8px; }

/* ============================================================
   v3.0 — 全局字号升级 + 高级组件
   ============================================================ */

/* 全局字号统一升级（v3.0） */
.section-title { font-size: 18px; font-weight: 800; color: var(--ink); letter-spacing: -.02em; margin: 24px 0 14px; display: flex; align-items: center; gap: 8px; }
.section-title.mt-lg { margin-top: 36px; }
.card { background: var(--card); border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow-sm); padding: 22px; }
.card .card-head h3 { font-size: 16px; font-weight: 700; color: var(--ink); margin-bottom: 14px; }
.btn { font-size: 14px; font-weight: 600; padding: 9px 18px; border-radius: 8px; border: none; transition: all .18s; display: inline-flex; align-items: center; gap: 6px; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(30,64,175,.25); }
.btn-ghost { background: transparent; color: var(--ink-3); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-50); }
.input, .select { font-size: 14px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); transition: border-color .15s; font-family: inherit; }
.input:focus, .select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(30,64,175,.08); }
.field label { display: block; font-size: 12px; font-weight: 600; color: var(--ink-4); margin-bottom: 5px; letter-spacing: .02em; }

/* ============================================================
   首页 Hero 增强 + 空间填充动画
   ============================================================ */
.hero-banner {
  display: grid; grid-template-columns: 1.3fr 1fr; gap: 32px; align-items: center;
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 60%, #1e40af 100%);
  border-radius: 18px; padding: 38px 40px; color: #fff;
  position: relative; overflow: hidden; margin-bottom: 28px;
  box-shadow: 0 16px 48px rgba(15,23,42,.18);
}
.hero-banner::before {
  content: ''; position: absolute; top: -60%; right: -10%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(59,130,246,.25), transparent 70%);
  animation: pulse-glow 8s ease-in-out infinite;
}
.hero-banner::after {
  content: ''; position: absolute; bottom: -50%; left: -15%;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(14,165,233,.15), transparent 70%);
  animation: pulse-glow 10s ease-in-out infinite reverse;
}
@keyframes pulse-glow {
  0%,100% { transform: scale(1); opacity: .6; }
  50% { transform: scale(1.15); opacity: 1; }
}
.hero-content { position: relative; z-index: 2; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 14px; border-radius: 100px;
  background: rgba(59,130,246,.25); border: 1px solid rgba(59,130,246,.4);
  font-size: 13px; font-weight: 600; color: #93c5fd;
  margin-bottom: 16px; backdrop-filter: blur(4px);
}
.hero-title { font-size: 30px; font-weight: 800; letter-spacing: -.03em; line-height: 1.2; margin-bottom: 12px; background: linear-gradient(135deg, #fff, #93c5fd); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero-desc { font-size: 14.5px; color: #cbd5e1; margin-bottom: 22px; line-height: 1.6; }
.hero-btns { display: flex; gap: 10px; }
.hero-btn { display: inline-flex; align-items: center; gap: 7px; padding: 10px 20px; border-radius: 10px; font-size: 14px; font-weight: 600; transition: all .2s; }
.hero-btn.primary { background: linear-gradient(135deg, #3b82f6, #1e40af); color: #fff; box-shadow: 0 6px 20px rgba(59,130,246,.4); }
.hero-btn.primary:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(59,130,246,.5); }
.hero-btn.ghost { background: rgba(255,255,255,.08); color: #fff; border: 1px solid rgba(255,255,255,.2); }
.hero-btn.ghost:hover { background: rgba(255,255,255,.15); }

/* Hero 数据网格 — 动画填充空间 */
.hero-stats-grid { position: relative; z-index: 2; display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.hero-stat {
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px; padding: 18px 20px; backdrop-filter: blur(8px);
  transition: all .25s; animation: fadeUp .6s ease backwards;
}
.hero-stat:hover { background: rgba(255,255,255,.14); transform: translateY(-3px); }
.hero-stat .hs-num { font-size: 28px; font-weight: 800; color: #fff; line-height: 1; letter-spacing: -.02em; }
.hero-stat .hs-num .unit { font-size: 14px; font-weight: 600; color: #93c5fd; margin-left: 3px; }
.hero-stat .hs-lbl { font-size: 12.5px; color: #94a3b8; margin-top: 6px; font-weight: 500; }
.hero-stat .hs-bar { height: 3px; background: rgba(255,255,255,.1); border-radius: 2px; margin-top: 10px; overflow: hidden; }
.hero-stat .hs-bar-fill { height: 100%; background: linear-gradient(90deg, #3b82f6, #60a5fa); border-radius: 2px; animation: bar-fill 1.2s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } }
@keyframes bar-fill { from { width: 0; } }

/* 数据看板增强 */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(200px,1fr)); gap: 14px; }
.stat-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; position: relative; overflow: hidden; transition: all .2s;
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.stat-card::after {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  transform: scaleX(0); transform-origin: left; transition: transform .3s;
}
.stat-card:hover::after { transform: scaleX(1); }
.stat-card .sc-icon { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; margin-bottom: 12px; }
.stat-card .sc-num { font-size: 26px; font-weight: 800; color: var(--ink); letter-spacing: -.02em; line-height: 1.1; }
.stat-card .sc-lbl { font-size: 13px; color: var(--ink-4); margin-top: 5px; font-weight: 500; }
.stat-card .sc-trend { font-size: 12px; font-weight: 600; margin-top: 8px; display: inline-flex; align-items: center; gap: 3px; }
.stat-card .sc-trend.up { color: var(--success); }
.stat-card .sc-trend.down { color: var(--danger); }

/* ============================================================
   知识点级联选择器（三级联动）
   ============================================================ */
.kp-cascader { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.kp-cascader .field { margin-bottom: 0; }
.kp-cascader select { min-width: 180px; }

/* ============================================================
   试卷答题模式
   ============================================================ */
.attempt-modal {
  position: fixed; inset: 0; background: rgba(15,23,42,.55); backdrop-filter: blur(4px);
  z-index: 200; display: none; place-items: center; padding: 20px;
  animation: fadeIn .2s ease;
}
.attempt-modal.open { display: grid; }
.attempt-modal .am-box {
  background: #fff; border-radius: 16px; max-width: 900px; width: 100%;
  max-height: 90vh; overflow-y: auto; box-shadow: 0 24px 64px rgba(0,0,0,.25);
  animation: scaleIn .25s cubic-bezier(.4,0,.2,1);
}
@keyframes fadeIn { from { opacity: 0; } }
@keyframes scaleIn { from { opacity: 0; transform: scale(.94) translateY(10px); } }
.am-header { padding: 22px 28px 18px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; z-index: 5; border-radius: 16px 16px 0 0; }
.am-header h3 { font-size: 19px; font-weight: 800; color: var(--ink); }
.am-header .am-meta { font-size: 13px; color: var(--ink-4); margin-top: 5px; display: flex; gap: 16px; flex-wrap: wrap; }
.am-body { padding: 22px 28px; }
.am-body .am-q { padding: 18px 0; border-bottom: 1px solid var(--line-2); }
.am-body .am-q:last-child { border-bottom: none; }
.am-q-no { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 26px; padding: 0 8px; background: var(--primary-50); color: var(--primary); border-radius: 6px; font-size: 12.5px; font-weight: 700; margin-right: 8px; }
.am-q-type { display: inline-block; padding: 2px 8px; background: var(--line-2); border-radius: 4px; font-size: 11px; color: var(--ink-4); font-weight: 600; margin-right: 8px; }
.am-q-score { float: right; font-size: 12px; color: var(--ink-4); font-weight: 600; }
.am-q-stem { font-size: 14.5px; color: var(--ink-2); line-height: 1.75; margin: 8px 0 10px; }
.am-options { margin: 10px 0; }
.am-options .opt-row { display: flex; gap: 8px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 6px; cursor: pointer; transition: all .15s; font-size: 14px; }
.am-options .opt-row:hover { border-color: var(--primary-200); background: var(--primary-50); }
.am-options .opt-row.selected { border-color: var(--primary); background: var(--primary-50); font-weight: 600; }
.am-options .opt-row.correct { border-color: var(--success); background: var(--success-light); }
.am-options .opt-row.wrong { border-color: var(--danger); background: var(--danger-light); }
.am-input { width: 100%; padding: 10px 14px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; font-family: inherit; }
.am-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(30,64,175,.08); }
.am-footer { padding: 16px 28px 22px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; position: sticky; bottom: 0; background: #fff; border-radius: 0 0 16px 16px; }
.am-score-input { width: 70px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 6px; font-size: 14px; text-align: center; font-weight: 700; }
.am-score-input:focus { outline: none; border-color: var(--primary); }
.am-result-banner { padding: 18px 24px; border-radius: 12px; margin-bottom: 18px; display: flex; align-items: center; justify-content: space-between; }
.am-result-banner.excellent { background: linear-gradient(135deg, #d1fae5, #a7f3d0); }
.am-result-banner.good { background: linear-gradient(135deg, #dbeafe, #bfdbfe); }
.am-result-banner.pass { background: linear-gradient(135deg, #fef3c7, #fde68a); }
.am-result-banner.fail { background: linear-gradient(135deg, #fee2e2, #fecaca); }
.am-result-banner .rb-score { font-size: 36px; font-weight: 800; }
.am-result-banner .rb-label { font-size: 14px; font-weight: 600; }
.am-scoring-guide { background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; margin-top: 8px; font-size: 13px; color: var(--ink-3); white-space: pre-wrap; line-height: 1.7; }
.am-correct-tag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 6px; font-size: 12px; font-weight: 700; }
.am-correct-tag.right { background: var(--success-light); color: var(--success); }
.am-correct-tag.wrong { background: var(--danger-light); color: var(--danger); }
.am-correct-tag.skip { background: var(--line-2); color: var(--ink-4); }
.am-correct-tag.pending { background: var(--warning-light); color: var(--warning); }

/* 知识点练习自动跳转标识 */
.auto-selected-point { background: var(--primary-50); border: 1px solid var(--primary-200); border-radius: 8px; padding: 10px 14px; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--primary); font-weight: 600; }

/* 资料库空状态提示 */
.resources-empty-hint { text-align: center; padding: 60px 20px; color: var(--ink-4); }
.resources-empty-hint svg { width: 64px; height: 64px; color: var(--line); margin-bottom: 16px; }

/* 题号跳转条 */
.qm-nav { display: flex; flex-wrap: wrap; gap: 6px; padding: 14px; background: var(--bg-2); border-radius: 10px; margin-bottom: 16px; }
.qm-nav-item { width: 34px; height: 34px; border-radius: 7px; display: grid; place-items: center; font-size: 12.5px; font-weight: 700; cursor: pointer; transition: all .15s; border: 1px solid var(--line); background: #fff; color: var(--ink-3); }
.qm-nav-item:hover { border-color: var(--primary); }
.qm-nav-item.answered { background: var(--success-light); border-color: var(--success); color: var(--success); }
.qm-nav-item.current { background: var(--primary); border-color: var(--primary); color: #fff; transform: scale(1.08); }
.qm-nav-item.flagged { background: var(--warning-light); border-color: var(--warning); color: var(--warning); }

@media (max-width: 900px) {
  .hero-banner { grid-template-columns: 1fr; padding: 28px 24px; }
  .hero-title { font-size: 24px; }
  .hero-stats-grid { grid-template-columns: 1fr; }
}
