:root {
  --primary: #2b5cff;
  --primary-2: #5b82ff;
  --primary-dark: #1e45d8;
  --primary-light: #e8eeff;
  --grad: linear-gradient(135deg, #7aa2ff 0%, #2b5cff 48%, #1e45d8 100%);
  --bg: #f6f8fc;
  --card: #ffffff;
  --border: #e4eaf4;
  --text: #16243f;
  --text-2: #45557a;
  --muted: #8a97b0;
  --green: #16a34a;
  --green-bg: #e9f8ef;
  --amber: #8a97b0;
  --amber-bg: #eef1f8;
  --danger: #dc2626;
  --danger-bg: #fee2e2;
  --shadow: 0 2px 10px rgba(43, 92, 255, .06), 0 8px 28px rgba(43, 92, 255, .10);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }

#app { min-height: 100vh; }

/* ---------- 顶栏 ---------- */
#topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 24px;
  padding: 10px 24px;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--grad); color: #fff; font-weight: 700; font-size: 18px;
  box-shadow: 0 3px 10px rgba(43, 92, 255, .35);
}
.brand-icon.lg { width: 52px; height: 52px; font-size: 26px; border-radius: 14px; }
.brand-title { font-weight: 700; font-size: 16px; }
.brand-sub { font-size: 12px; color: var(--muted); }

#nav { display: flex; gap: 4px; flex: 1; }
.nav-btn {
  border: none; background: transparent; padding: 7px 14px; border-radius: 10px;
  cursor: pointer; font-size: 14px; color: var(--text-2); font-weight: 500;
  transition: all .15s;
}
.nav-btn:hover { background: var(--primary-light); color: var(--primary); }
.nav-btn.active { background: var(--grad); color: #fff; box-shadow: 0 3px 10px rgba(43, 92, 255, .3); }

.user-area { display: flex; align-items: center; gap: 8px; }
.user-name { font-weight: 600; font-size: 14px; }

.badge {
  display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 4px;
  background: var(--grad); color: #fff; border-radius: 10px; font-size: 11px;
  text-align: center; line-height: 18px;
}

/* ---------- 按钮 ---------- */
.btn {
  border: 1px solid var(--border); background: var(--card); color: var(--text);
  padding: 8px 16px; border-radius: 10px; cursor: pointer; font-size: 14px;
  transition: all .15s; white-space: nowrap;
}
.btn:hover { border-color: var(--primary-2); }
.btn-primary {
  background: var(--grad); border: none; color: #fff;
  box-shadow: 0 4px 14px rgba(43, 92, 255, .32);
}
.btn-primary:hover { box-shadow: 0 6px 20px rgba(43, 92, 255, .42); transform: translateY(-1px); }
.btn-primary:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-outline { border-color: var(--primary); color: var(--primary); background: #fff; }
.btn-outline:hover { background: var(--primary-light); }
.btn-ghost { border: none; background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--primary-light); color: var(--primary); }
.btn-block { width: 100%; }
.btn-sm { padding: 5px 11px; font-size: 13px; border-radius: 8px; }
.btn-danger { color: var(--danger); border-color: #f3c7c7; }
.btn-danger:hover { background: var(--danger-bg); }

/* ---------- 登录 ---------- */
.center-view {
  display: flex; align-items: center; justify-content: center; min-height: 100vh;
  padding: 24px;
  background: linear-gradient(135deg, #eef3ff 0%, #e2ebff 55%, #d3e0ff 100%);
}
.login-card {
  width: 400px; max-width: 100%; background: var(--card); border-radius: 20px; padding: 36px 32px;
  box-shadow: 0 12px 40px rgba(43, 92, 255, .18); border: 1px solid var(--border);
}
.login-card .brand { flex-direction: column; text-align: center; margin-bottom: 22px; }
.login-card h1 { font-size: 21px; margin: 12px 0 6px; }
.login-card p { font-size: 13px; color: var(--muted); }
.tabs { display: flex; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.tab {
  flex: 1; border: none; background: transparent; padding: 10px; cursor: pointer;
  font-size: 15px; color: var(--text-2); border-bottom: 2px solid transparent;
}
.tab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
form label { display: block; margin-bottom: 14px; font-size: 13px; color: var(--text-2); }
form input {
  width: 100%; margin-top: 6px; padding: 11px 12px; border: 1px solid var(--border);
  border-radius: 10px; font-size: 15px; outline: none; transition: all .15s;
}
form input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
.login-tip { margin-top: 18px; font-size: 12px; color: var(--muted); text-align: center; }

/* ---------- 通用面板 ---------- */
.view { padding: 24px; max-width: 1200px; margin: 0 auto; }
.panel { background: var(--card); border-radius: 16px; border: 1px solid var(--border); box-shadow: var(--shadow); padding: 20px; margin-bottom: 20px; }
.panel-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.panel-head h2 { font-size: 17px; flex: 1; }
.muted { color: var(--muted); font-size: 13px; }

/* 练习顺序切换（顺序/随机） */
.mode-toggle {
  display: inline-flex; border: 1px solid var(--border); border-radius: 10px;
  overflow: hidden; background: #fff; flex-shrink: 0;
}
.mode-btn {
  border: none; background: transparent; padding: 7px 16px; cursor: pointer;
  font-size: 14px; color: var(--text-2); transition: all .15s;
}
.mode-btn.active { background: var(--grad); color: #fff; }
.mode-btn:not(.active):hover { background: var(--primary-light); color: var(--primary); }

/* ---------- 统计卡片 ---------- */
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.stat-card {
  position: relative; overflow: hidden;
  background: var(--card); border: 1px solid var(--border); border-radius: 16px;
  padding: 18px; box-shadow: var(--shadow);
}
.stat-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--grad);
}
.stat-card .num { font-size: 26px; font-weight: 700; color: var(--primary); }
.stat-card .lbl { font-size: 13px; color: var(--text-2); margin-top: 2px; }

.dash-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; align-items: start; }

/* ---------- 单元列表 ---------- */
.unit-list { display: flex; flex-direction: column; gap: 10px; }
.unit-item {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  border: 1px solid var(--border); border-radius: 12px; transition: all .15s;
  background: #fff;
}
.unit-item:hover { border-color: var(--primary-2); box-shadow: 0 4px 14px rgba(43,92,255,.08); }
.unit-name { font-weight: 600; flex: 1; }
.unit-sub { font-size: 12px; color: var(--muted); font-weight: 400; }
.unit-count { font-size: 12px; color: var(--muted); }
.unit-actions { display: flex; gap: 6px; flex-shrink: 0; }

/* ---------- 进度列表 ---------- */
.progress-list { display: flex; flex-direction: column; gap: 12px; }
.prog-item .prog-top { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 5px; }
.prog-item .prog-name { font-weight: 500; }
.prog-item .prog-num { color: var(--muted); }
.prog-bar { height: 8px; background: #e8edf6; border-radius: 6px; overflow: hidden; }
.prog-fill { height: 100%; background: var(--grad); border-radius: 6px; transition: width .3s; }

/* ---------- 答题区 ---------- */
.quiz-top { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.quiz-meta { font-size: 14px; color: var(--text-2); }
.quiz-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 16px;
  padding: 26px; box-shadow: var(--shadow); margin-bottom: 16px;
}
.q-type {
  display: inline-block; padding: 2px 10px; border-radius: 6px; font-size: 12px;
  background: var(--primary-light); color: var(--primary); font-weight: 600; margin-bottom: 10px;
}
.q-stem { font-size: 17px; font-weight: 600; margin-bottom: 18px; line-height: 1.7; }
.opt {
  display: flex; align-items: flex-start; gap: 12px; padding: 13px 16px; margin-bottom: 10px;
  border: 1px solid var(--border); border-radius: 12px; cursor: pointer; transition: all .15s;
  background: #fff;
}
.opt:hover { border-color: var(--primary); background: var(--primary-light); }
.opt .opt-letter {
  flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%; background: #eef2fb;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px;
}
.opt.selected { border-color: var(--primary); background: var(--primary-light); }
.opt.selected .opt-letter { background: var(--grad); color: #fff; }
.opt.correct { border-color: var(--green); background: var(--green-bg); }
.opt.correct .opt-letter { background: var(--green); color: #fff; }
.opt.wrong { border-color: var(--danger); background: var(--danger-bg); }
.opt.wrong .opt-letter { background: var(--danger); color: #fff; }
.opt.disabled { pointer-events: none; opacity: .85; }

.analysis-box {
  margin-top: 18px; padding: 16px; border-radius: 12px; font-size: 14px; line-height: 1.8;
  border: 1px solid var(--border); background: #f6f8fc;
}
.analysis-box.correct { background: var(--green-bg); border-color: #bce6cd; }
.analysis-box.wrong { background: var(--danger-bg); border-color: #f3b6b6; }
.analysis-box .res-title { font-weight: 700; margin-bottom: 6px; }

.quiz-actions { display: flex; justify-content: center; gap: 12px; margin-top: 8px; flex-wrap: wrap; }

/* ---------- 考试 ---------- */
.exam-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.exam-nav .dot {
  width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 13px; background: #fff;
}
.exam-nav .dot.answered { background: var(--primary-light); border-color: var(--primary); color: var(--primary); }
.exam-nav .dot.current { background: var(--grad); color: #fff; border-color: transparent; }

/* ---------- 结果页 ---------- */
.result-card { max-width: 860px; margin: 20px auto; }
.result-hero {
  background: var(--card); border-radius: 20px; border: 1px solid var(--border);
  padding: 36px 32px; text-align: center; box-shadow: var(--shadow); margin-bottom: 20px;
  position: relative; overflow: hidden;
}
.result-hero::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 5px; background: var(--grad); }
.result-hero .score { font-size: 56px; font-weight: 800; color: var(--primary); }
.result-hero .sub { color: var(--text-2); margin-top: 6px; }
.result-q { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 18px; margin-bottom: 14px; box-shadow: var(--shadow); }
.result-q .badge-correct { color: var(--green); font-weight: 700; }
.result-q .badge-wrong { color: var(--danger); font-weight: 700; }

/* ---------- 错题本 ---------- */
.wb-item { border: 1px solid var(--border); border-radius: 14px; padding: 16px; margin-bottom: 12px; background: #fff; }
.wb-item .wb-stem { font-weight: 600; margin-bottom: 8px; }
.wb-item .wb-answer { color: var(--green); font-size: 14px; margin-bottom: 8px; }
.wb-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.wb-analysis { display: none; font-size: 13px; color: var(--text-2); background: #f6f8fc; padding: 10px; border-radius: 8px; margin-top: 8px; }

/* ---------- 后台 ---------- */
.admin-overview { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 10px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 720px; }
.admin-table th, .admin-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
.admin-table th { background: #f3f6fd; color: var(--text-2); font-weight: 600; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 12px; }
.tag-admin { background: var(--primary-light); color: var(--primary); }
.tag-user { background: #e8edf6; color: var(--text-2); }
.tag-active { background: var(--green-bg); color: var(--green); }
.tag-paused { background: var(--amber-bg); color: var(--amber); }
.row-actions { display: flex; gap: 6px; }

/* ---------- 弹窗 ---------- */
.modal { position: fixed; inset: 0; background: rgba(22,36,63,.45); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 20px; }
.modal-box { background: #fff; border-radius: 16px; width: 420px; max-width: 100%; box-shadow: 0 16px 50px rgba(22,36,63,.25); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.modal-head h3 { font-size: 16px; }
.modal-close { border: none; background: transparent; font-size: 22px; cursor: pointer; color: var(--muted); line-height: 1; }
.modal-body { padding: 20px; }
.modal-body label { display: block; margin-bottom: 14px; font-size: 13px; color: var(--text-2); }
.modal-body input, .modal-body select {
  width: 100%; margin-top: 6px; padding: 9px 12px; border: 1px solid var(--border); border-radius: 10px; font-size: 14px; outline: none;
}
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; top: 20px; left: 50%; transform: translateX(-50%);
  background: #16243f; color: #fff; padding: 10px 20px; border-radius: 10px;
  font-size: 14px; z-index: 200; box-shadow: 0 8px 24px rgba(0,0,0,.2); max-width: 90vw;
}
.toast.error { background: var(--danger); }
.toast.success { background: var(--green); }

/* ---------- 滑动验证码 ---------- */
.captcha-box {
  margin-top: 18px; padding: 12px; border: 1px solid var(--border); border-radius: 12px;
  background: #fbfcff;
}
.captcha-head { display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: var(--text-2); margin-bottom: 10px; }
.captcha-refresh { border: none; background: transparent; font-size: 18px; cursor: pointer; color: var(--muted); line-height: 1; }
.captcha-refresh:hover { color: var(--primary); }
.captcha-canvas { position: relative; width: 100%; max-width: 320px; margin: 0 auto; border-radius: 8px; overflow: hidden; }
#captcha-bg { display: block; width: 100%; height: auto; }
.captcha-slider { margin-top: 10px; }
.captcha-track {
  position: relative; height: 40px; width: 100%; max-width: 320px; margin: 0 auto;
  background: #f4ece3; border: 1px solid var(--border); border-radius: 22px; overflow: hidden; user-select: none;
  touch-action: none;
}
.captcha-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--grad); }
.captcha-tip {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 13px; color: var(--text-2); pointer-events: none; transition: color .2s;
}
.captcha-handle {
  position: absolute; left: 0; top: 0; width: 40px; height: 40px; border-radius: 50%;
  background: #fff; border: 1px solid var(--primary-2); cursor: grab; z-index: 2;
  display: flex; align-items: center; justify-content: center; color: var(--primary);
  font-size: 16px; box-shadow: 0 2px 8px rgba(43,92,255,.25);
  touch-action: none;
}
.captcha-handle:active { cursor: grabbing; }
.captcha-box.ok .captcha-track { background: var(--green-bg); border-color: #bce6cd; }
.captcha-box.ok .captcha-tip { color: var(--green); }
.captcha-box.ok .captcha-handle { color: var(--green); border-color: var(--green); }

/* ---------- 侧边栏进度续答 ---------- */
.dash-grid > .panel:nth-child(2) { position: sticky; top: 74px; align-self: start; }
.prog-meta { display: flex; align-items: center; justify-content: space-between; margin-top: 7px; }
.prog-resume { font-size: 12px; color: var(--primary); font-weight: 500; }
.prog-actions { display: flex; gap: 6px; }

/* ---------- 后台标签页 / 数据大屏 ---------- */
.admin-tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.admin-tab {
  border: 1px solid var(--border); background: #fff; padding: 8px 20px; border-radius: 10px;
  cursor: pointer; font-size: 14px; color: var(--text-2); transition: all .15s;
}
.admin-tab.active { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 4px 14px rgba(43,92,255,.3); }

/* 开关 */
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; flex-shrink: 0; }
.switch-label { font-size: 13px; color: var(--text-2); }
.switch input { display: none; }
.switch-ui {
  position: relative; width: 44px; height: 24px; background: #e0d5c8; border-radius: 12px;
  transition: background .2s; flex-shrink: 0;
}
.switch-ui::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px;
  background: #fff; border-radius: 50%; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.22);
}
.switch input:checked + .switch-ui { background: var(--grad); }
.switch input:checked + .switch-ui::after { transform: translateX(20px); }

.admin-users-progress { padding: 16px 20px 20px; display: flex; flex-direction: column; gap: 14px; }
.admin-empty { text-align: center; color: var(--muted); padding: 30px; }
.user-prog-card { border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; background: #fff; }
.upc-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; cursor: pointer; user-select: none; }
.upc-arrow { color: var(--muted); font-size: 12px; transition: transform .25s ease; }
.user-prog-card:not(.collapsed) .upc-arrow { transform: rotate(90deg); }
.upc-name { font-size: 15px; }
.upc-stats { font-size: 12px; color: var(--muted); margin-left: auto; }
/* 折叠：grid-rows 0fr/1fr 实现平滑展开收起 */
.upc-units-wrap { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .3s ease; }
.user-prog-card:not(.collapsed) .upc-units-wrap { grid-template-rows: 1fr; }
.upc-units { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; overflow: hidden; min-height: 0; }
.upc-unit { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.upc-unit-name { flex-shrink: 0; width: 64px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upc-unit-num { flex-shrink: 0; width: 52px; text-align: right; color: var(--muted); }

/* ================= 展示页（Landing） ================= */
.landing {
  padding: 0; max-width: none; background: #fff; overflow-x: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}
.landing-nav {
  position: sticky; top: 0; z-index: 60;
  display: flex; align-items: center; gap: 28px;
  padding: 14px 40px;
  background: rgba(255, 255, 255, .9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.landing-brand { display: flex; align-items: center; gap: 10px; }
.landing-logo {
  width: 34px; height: 34px; border-radius: 10px; background: var(--grad);
  color: #fff; font-weight: 700; font-size: 18px;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 10px rgba(43,92,255,.35);
}
.landing-brand-name { font-weight: 700; font-size: 16px; color: var(--text); }
.landing-links { display: flex; gap: 26px; flex: 1; }
.landing-links a { text-decoration: none; color: var(--text-2); font-size: 14px; font-weight: 500; transition: color .15s; }
.landing-links a:hover { color: var(--primary); }

.landing-hero {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, #eef3ff 0%, #e2ebff 50%, #d3e0ff 100%);
  padding: 88px 40px 96px;
}
.hero-grid-bg {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(43,92,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(43,92,255,.05) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 32%, #000 35%, transparent 100%);
  mask-image: radial-gradient(ellipse 80% 70% at 50% 32%, #000 35%, transparent 100%);
}
.hero-grid-bg::before,
.hero-grid-bg::after { content: ""; position: absolute; border-radius: 50%; filter: blur(80px); opacity: .55; }
.hero-grid-bg::before { width: 460px; height: 460px; top: -140px; left: -100px; background: #9bb8ff; }
.hero-grid-bg::after { width: 520px; height: 520px; bottom: -180px; right: -120px; background: #7aa2ff; }

.hero-inner {
  position: relative; z-index: 1;
  max-width: 1120px; margin: 0 auto;
  display: grid; grid-template-columns: 1.02fr .98fr; gap: 56px; align-items: center;
}
.hero-copy { text-align: left; animation: fadeUp .7s ease both; }
.hero-badge {
  display: inline-block; padding: 6px 16px; border-radius: 20px;
  background: rgba(255,255,255,.8); border: 1px solid var(--border);
  color: var(--primary); font-size: 13px; font-weight: 600;
}
.hero-title {
  font-size: 46px; font-weight: 800; line-height: 1.22; color: #16243f;
  margin: 22px 0 18px; letter-spacing: .5px;
}
.hero-sub { font-size: 17px; color: var(--text-2); max-width: 560px; line-height: 1.8; margin-bottom: 30px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.btn-lg { padding: 13px 30px; font-size: 16px; border-radius: 12px; }
.hero-trust { display: flex; align-items: center; gap: 14px; margin-top: 30px; color: var(--text-2); font-size: 14px; }
.hero-trust b { color: #16243f; font-size: 17px; font-weight: 800; }
.trust-dot { width: 5px; height: 5px; border-radius: 50%; background: #e8c7a8; }

/* Hero 右侧 mockup */
.hero-visual { position: relative; animation: fadeUp .7s ease .15s both; }
.mockup {
  background: #fff; border: 1px solid rgba(43,92,255,.14); border-radius: 16px;
  box-shadow: 0 24px 60px rgba(43,92,255,.20), 0 4px 14px rgba(0,0,0,.04); overflow: hidden;
}
.mockup-bar {
  display: flex; align-items: center; gap: 6px; padding: 10px 14px;
  background: #faf5ef; border-bottom: 1px solid var(--border);
}
.mdot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.mdot.r { background: #ff6b6b; } .mdot.y { background: #ffc94d; } .mdot.g { background: #5bd47a; }
.mockup-url {
  margin-left: 8px; font-size: 12px; color: var(--muted);
  background: #fff; border: 1px solid var(--border); border-radius: 6px; padding: 2px 10px;
}
.mockup-body { padding: 20px 22px 22px; }

.mm-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.mm-head .q-type { margin-bottom: 0; }
.mm-unit { font-size: 12px; color: var(--muted); }
.mm-stem { font-size: 14.5px; font-weight: 600; line-height: 1.65; color: #16243f; margin-bottom: 14px; }
.mm-opt {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; margin-bottom: 8px;
  border: 1px solid var(--border); border-radius: 10px; font-size: 13.5px; color: var(--text);
  background: #fff; transition: all .15s;
}
.mm-letter {
  flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%; background: #eef2fb;
  display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; color: var(--text-2);
}
.mm-selected { border-color: var(--primary); background: var(--primary-light); }
.mm-selected .mm-letter { background: var(--grad); color: #fff; }
.mm-correct { border-color: var(--green); background: var(--green-bg); }
.mm-correct .mm-letter { background: var(--green); color: #fff; }
.mm-wrong { border-color: var(--danger); background: var(--danger-bg); }
.mm-wrong .mm-letter { background: var(--danger); color: #fff; }
.mm-check { margin-left: auto; color: var(--green); font-weight: 800; }
.mm-x { margin-left: auto; color: var(--danger); font-weight: 800; }
.mm-result {
  margin-top: 12px; padding: 9px 12px; border-radius: 10px; font-size: 13px; font-weight: 600;
  background: var(--green-bg); color: var(--green);
}
.mm-result-wrong { background: var(--danger-bg); color: var(--danger); }

.hero-float-card {
  position: absolute; right: -18px; bottom: 32px;
  background: var(--grad); color: #fff; border-radius: 14px; padding: 16px 20px;
  box-shadow: 0 16px 40px rgba(43,92,255,.4);
  animation: float 5s ease-in-out infinite;
}
.hfc-num { font-size: 30px; font-weight: 800; line-height: 1; }
.hfc-label { font-size: 12px; opacity: .92; margin-top: 4px; }

@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(26px); }
  to { opacity: 1; transform: none; }
}

.landing-section { padding: 84px 40px; max-width: 1120px; margin: 0 auto; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 48px; }
.landing-h2 { font-size: 34px; font-weight: 800; text-align: center; color: #16243f; }
.landing-lead { text-align: center; color: var(--muted); margin-top: 12px; font-size: 16px; }

.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.feature-card {
  background: #fff; border: 1px solid var(--border); border-radius: 18px; padding: 30px 26px;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.feature-card:hover {
  transform: translateY(-6px); border-color: var(--primary-2);
  box-shadow: 0 16px 40px rgba(43,92,255,.14);
}
.feature-icon {
  width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px; background: var(--primary-light); color: var(--primary);
  box-shadow: 0 6px 16px rgba(43,92,255,.24);
}
.feature-icon svg { width: 26px; height: 26px; }
.feature-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 10px; color: var(--text); }
.feature-card p { font-size: 14px; color: var(--text-2); line-height: 1.8; }

/* 界面预览 */
.landing-showcase { max-width: none; background: #fdf9f4; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.landing-showcase .section-head, .landing-showcase .showcase-grid { max-width: 1120px; margin-left: auto; margin-right: auto; }
.showcase-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.showcase-grid .mockup { box-shadow: 0 18px 44px rgba(43,92,255,.14), 0 4px 12px rgba(0,0,0,.04); }

.sm-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.sm-stat { background: var(--primary-light); border-radius: 10px; padding: 12px 10px; text-align: center; }
.sm-stat b { display: block; font-size: 22px; font-weight: 800; color: var(--primary); }
.sm-stat span { font-size: 11px; color: var(--text-2); }
.sm-title { font-size: 12px; font-weight: 700; color: var(--muted); margin: 14px 0 8px; }
.sm-prog { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 12.5px; color: var(--text-2); }
.sm-prog > span:first-child { flex-shrink: 0; width: 44px; }
.sm-bar { flex: 1; height: 7px; border-radius: 6px; background: #f1e7dc; overflow: hidden; }
.sm-bar i { display: block; height: 100%; border-radius: 6px; background: var(--grad); }
.sm-pct { flex-shrink: 0; width: 36px; text-align: right; font-weight: 600; color: var(--text); }

.landing-stats {
  max-width: none; padding: 84px 40px;
  background: linear-gradient(135deg, #16243f 0%, #1e3a8a 60%, #2b5cff 100%);
}
.stats-inner { max-width: 1120px; margin: 0 auto; }
.landing-h2-light { color: #fff; }
.landing-lead-light { color: #cbb9a6; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 48px; }
.stat-pill {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12);
  border-radius: 16px; padding: 32px 20px; text-align: center;
  transition: background .25s ease, transform .25s ease;
}
.stat-pill:hover { background: rgba(255,255,255,.12); transform: translateY(-4px); }
.sp-num { display: block; font-size: 42px; font-weight: 800; color: var(--primary); }
.sp-label { font-size: 14px; color: #e9d9c6; }

.flow-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 48px; }
.flow-step {
  text-align: center; padding: 34px 26px; border: 1px solid var(--border); border-radius: 18px;
  background: #fff; transition: transform .25s ease, box-shadow .25s ease;
}
.flow-step:hover { transform: translateY(-5px); box-shadow: 0 14px 34px rgba(43,92,255,.12); }
.flow-num {
  width: 46px; height: 46px; border-radius: 50%; background: var(--grad); color: #fff;
  font-size: 20px; font-weight: 800; display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px; box-shadow: 0 6px 16px rgba(43,92,255,.3);
}
.flow-step h3 { font-size: 17px; font-weight: 700; margin-bottom: 10px; }
.flow-step p { font-size: 14px; color: var(--text-2); line-height: 1.8; }
.flow-cta { text-align: center; margin-top: 44px; }

.landing-footer {
  padding: 34px 40px; text-align: center; border-top: 1px solid var(--border); background: #f6f8fc;
  color: var(--muted); font-size: 13px;
}
.landing-footer .landing-brand { justify-content: center; margin-bottom: 8px; }

/* 滚动渐入 */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ================= 响应式 / 移动端 ================= */
@media (max-width: 900px) {
  .dash-grid { grid-template-columns: 1fr; }
  .stats-row, .admin-overview { grid-template-columns: repeat(2, 1fr); }
  .feature-grid, .flow-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-inner { grid-template-columns: 1fr; gap: 48px; }
  .hero-title { font-size: 40px; }
  .showcase-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  body { font-size: 14px; }
  .view { padding: 14px; }
  .landing { padding: 0; }

  .landing-nav { padding: 12px 18px; gap: 12px; }
  .landing-links { display: none; }
  .landing-brand-name { font-size: 14px; }
  .landing-hero { padding: 60px 20px 56px; }
  .hero-inner { gap: 36px; }
  .hero-title { font-size: 27px; }
  .hero-sub { font-size: 15px; }
  .hero-trust { gap: 10px; font-size: 13px; }
  .hero-float-card { right: 8px; bottom: 16px; padding: 12px 16px; }
  .hfc-num { font-size: 24px; }
  .landing-section { padding: 56px 20px; }
  .landing-h2 { font-size: 26px; }
  .feature-grid, .flow-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .landing-stats { padding: 56px 20px; }
  .sp-num { font-size: 32px; }

  /* 顶栏换行，导航可横向滚动 */
  #topbar { flex-wrap: wrap; gap: 8px; padding: 10px 14px; }
  .brand-sub { display: none; }
  .brand-title { font-size: 14px; }
  .brand-icon { width: 30px; height: 30px; font-size: 16px; }
  #nav { order: 3; flex: 1 1 100%; overflow-x: auto; gap: 2px; }
  .nav-btn { padding: 7px 12px; white-space: nowrap; }
  .user-area { margin-left: auto; gap: 4px; }
  .user-name { display: none; }

  /* 登录卡 */
  .center-view { padding: 16px; }
  .login-card { padding: 28px 20px; border-radius: 16px; }

  /* 面板 */
  .panel { padding: 16px; border-radius: 14px; }
  .panel-head { gap: 8px; }
  .panel-head h2 { font-size: 16px; }

  /* 单元项纵向堆叠 */
  .unit-item { flex-wrap: wrap; }
  .unit-name { flex: 1 1 100%; }
  .unit-count { flex: 1 1 auto; }
  .unit-actions { margin-left: auto; }
  .unit-actions .btn { padding: 6px 14px; }

  /* 答题卡 */
  .quiz-card { padding: 18px 16px; }
  .q-stem { font-size: 16px; }
  .opt { padding: 12px 13px; }
  .quiz-actions .btn { flex: 1 1 auto; }
  .result-hero .score { font-size: 44px; }

  /* 弹窗 */
  .modal { padding: 12px; }
  .modal-box { border-radius: 14px; }

  .admin-table { min-width: 640px; }
  .admin-tab { padding: 7px 14px; font-size: 13px; }
  .upc-unit-name { width: 56px; }
  .upc-stats { margin-left: 0; flex: 1 1 100%; }
}

@media (max-width: 380px) {
  .stats-row, .admin-overview { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-card .num { font-size: 22px; }
}

/* ================= 课程「即将上线」占位 ================= */
.hero-badge { transition: background .2s, color .2s; }
.course-pending .hero-badge {
  background: rgba(43,92,255,.12);
  color: #1e45d8;
}
.pending-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 10px;
  padding: 40px 26px;
  min-height: 320px;
}
.pending-icon {
  width: 76px; height: 76px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 20px;
  background: linear-gradient(135deg,#7aa2ff,#2b5cff);
  color: #fff;
  box-shadow: 0 10px 30px rgba(43,92,255,.28);
}
.pending-icon svg { width: 38px; height: 38px; }
.pending-title { font-size: 21px; font-weight: 700; color: #12203a; }
.pending-sub { font-size: 14px; color: var(--muted); line-height: 1.7; max-width: 320px; }
.pending-card .btn { margin-top: 8px; }
