/* =============================================================
   桃子湖集训营成绩查询系统 - 前台样式
   风格：2026 红色科技感 · 移动端优先 · 适配安卓/鸿蒙/苹果/电脑/微信浏览器
   ============================================================= */

:root {
  --red-500: #f43f5e;
  --red-600: #e11d48;
  --red-700: #be123c;
  --red-800: #9f1239;
  --gold: #fbbf24;
  --ink: #fff5f6;
  --ink-dim: rgba(255, 214, 220, .72);
  --bg-deep: #1a0508;
  --card-bg: rgba(38, 10, 16, .82);
  --line: rgba(255, 255, 255, .14);
  --input-bg: rgba(255, 255, 255, .07);
  --radius: 22px;
  --shadow: 0 24px 60px rgba(225, 29, 72, .28), 0 6px 20px rgba(0, 0, 0, .45);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body { height: 100%; }

body {
  font-family: "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  /* 纯色背景（用户提供色样 #24090F） */
  background: #24090F;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  /* 全站禁止选中 / 长按菜单（防截屏、防复制传播） */
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
input, textarea { -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; }
img, video, canvas { -webkit-user-drag: none; user-select: none; }

/* ---- 布局：上下左右居中 ---- */
.page-wrap {
  position: relative; z-index: 1;
  min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 22px; padding: 24px 16px;
}

.card {
  width: 100%; max-width: 540px;
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 26px 26px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  animation: rise .55s cubic-bezier(.22, 1, .36, 1) both;
}
@keyframes rise {
  from { opacity: 0; transform: translateY(22px) scale(.985); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---- 头部 ---- */
.card-head { text-align: center; margin-bottom: 26px; }
.logo-badge {
  width: 62px; height: 62px; margin: 0 auto 12px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--red-500), var(--red-700));
  box-shadow: 0 10px 26px rgba(225, 29, 72, .5), inset 0 1px 0 rgba(255,255,255,.35);
  transform: rotate(-4deg);
}
.site-title {
  font-size: 23px; font-weight: 800; letter-spacing: 1px;
  background: linear-gradient(92deg, #fff 20%, #ffd6dc 55%, var(--gold) 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  text-shadow: 0 0 34px rgba(244, 63, 94, .25);
}
.site-sub {
  margin-top: 7px; font-size: 11px; letter-spacing: 3px; text-transform: uppercase;
  color: var(--ink-dim);
}

/* ---- 表单 ---- */
.field { margin-bottom: 18px; }
.label {
  display: block; font-size: 13.5px; font-weight: 600; color: var(--ink);
  margin-bottom: 8px; letter-spacing: .5px;
}
.label em { color: var(--red-500); font-style: normal; margin-left: 2px; }

.input {
  width: 100%; height: 48px;
  background: var(--input-bg);
  border: 1.5px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  font-size: 15px; padding: 0 14px;
  outline: none; transition: border-color .2s, box-shadow .2s, background .2s;
}
.input::placeholder { color: rgba(255, 214, 220, .4); }
.input:focus {
  border-color: var(--red-500);
  background: rgba(255, 255, 255, .1);
  box-shadow: 0 0 0 4px rgba(244, 63, 94, .18);
}

/* 分段选择（查询方式） */
.seg {
  display: flex; gap: 10px; background: rgba(255,255,255,.06);
  padding: 5px; border-radius: 14px; border: 1px solid var(--line);
}
.seg-item {
  flex: 1; height: 40px; border: none; border-radius: 10px;
  background: transparent; color: var(--ink-dim);
  font-size: 14px; font-weight: 600; cursor: pointer;
  transition: all .22s ease;
}
.seg-item.active {
  background: linear-gradient(135deg, var(--red-500), var(--red-700));
  color: #fff; box-shadow: 0 6px 16px rgba(225, 29, 72, .45);
}

.hidden { display: none !important; }

/* 验证码 */
.captcha-row { display: flex; gap: 12px; align-items: center; }
.captcha-row .input { flex: 1; background: transparent; }   /* 验证码输入框去除底色 */
.captcha-img {
  width: 144px; height: 48px; flex-shrink: 0;   /* 3:1 与生成图一致；高度与输入框一致，底色完整铺满 */
  border-radius: 12px; cursor: pointer;
  box-shadow: inset 0 0 0 1.5px var(--line);    /* 内阴影画框，不占布局尺寸、不破坏 3:1 比例 */
  transition: transform .18s, box-shadow .2s;
}
.captcha-img:active { transform: scale(.96); }

/* 提交按钮（防重复点击：禁用态 + loading） */
.btn-submit {
  position: relative; width: 100%; height: 52px; margin-top: 6px;
  border: none; border-radius: 15px; cursor: pointer; overflow: hidden;
  font-size: 16.5px; font-weight: 700; letter-spacing: 3px; color: #fff;
  background: linear-gradient(135deg, var(--red-500) 0%, var(--red-600) 45%, var(--red-800) 100%);
  box-shadow: 0 12px 28px rgba(225, 29, 72, .45), inset 0 1px 0 rgba(255,255,255,.3);
  transition: transform .16s, box-shadow .2s, opacity .2s;
}
.btn-submit:hover { transform: translateY(-2px); box-shadow: 0 16px 34px rgba(225, 29, 72, .55); }
.btn-submit:active { transform: scale(.98); }
.btn-submit:disabled { opacity: .62; cursor: not-allowed; transform: none; }

.btn-loader {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
}
.btn-loader::after {
  content: ""; width: 22px; height: 22px; border-radius: 50%;
  border: 3px solid rgba(255,255,255,.35); border-top-color: #fff;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.foot-tip {
  margin-top: 18px; text-align: center; font-size: 12px; color: var(--ink-dim); line-height: 1.7;
}

/* ---- 通知框 ---- */
.notice-box {
  display: flex; gap: 12px; align-items: flex-start;
  background: rgba(251, 191, 36, .12); border: 1px solid rgba(251, 191, 36, .4);
  color: #ffe9b0; border-radius: 14px; padding: 16px;
  font-size: 14px; line-height: 1.7;
}
.notice-box svg { flex-shrink: 0; margin-top: 2px; }

/* ---- 查询结果 ---- */
.result-card { animation: rise .5s cubic-bezier(.22,1,.36,1) both; }

/* 结果页标题 */
.result-title {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  font-size: 18px; font-weight: 800; letter-spacing: 3px; color: #fff;
  margin-bottom: 14px; text-align: center;
}
.result-title::before,
.result-title::after {
  content: ""; height: 1.5px; width: 48px; flex-shrink: 0;
}
.result-title::before { background: linear-gradient(90deg, transparent, var(--red-500)); }
.result-title::after  { background: linear-gradient(90deg, var(--red-500), transparent); }

.stu-info {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: center;
  padding: 14px 16px; margin-bottom: 6px;
  background: linear-gradient(135deg, rgba(244,63,94,.16), rgba(159,18,57,.2));
  border: 1px solid rgba(244,63,94,.4); border-radius: 16px;
}
.stu-chip {
  font-size: 14px; font-weight: 700; padding: 7px 16px; border-radius: 999px;
  background: rgba(255,255,255,.08); border: 1px solid var(--line);
}
.stu-chip b { color: var(--gold); }

.result-block { margin-top: 22px; }
.block-title {
  display: flex; align-items: center; gap: 10px;
  font-size: 16.5px; font-weight: 800; color: #fff;
  margin-bottom: 12px;
}
.t-line { width: 4px; height: 18px; border-radius: 2px; background: linear-gradient(180deg, var(--red-500), var(--red-700)); }
.block-note { font-size: 11.5px; font-weight: 500; color: var(--ink-dim); margin-left: auto; }

.table-scroll { overflow: hidden; border-radius: 14px; border: 1px solid var(--line); }
.rtable { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: 13px; }
.rtable th {
  background: linear-gradient(135deg, rgba(225,29,72,.35), rgba(159,18,57,.4));
  color: #ffe3e7; font-weight: 700; padding: 10px 6px; text-align: center;
  white-space: nowrap; border-bottom: 1px solid var(--line);
  overflow: hidden; text-overflow: ellipsis; font-size: 12.5px;
}
.rtable td {
  padding: 10px 6px; text-align: center; border-bottom: 1px solid rgba(255,255,255,.07);
  color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rtable tbody tr:last-child td { border-bottom: none; }
.rtable tbody tr { transition: background .15s; }
.rtable tbody tr:hover { background: rgba(244,63,94,.09); }

.score-val { font-weight: 800; color: var(--gold); font-size: 13.5px; }
.time-val { color: var(--ink-dim); font-size: 12px; }

.rank-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 46px; padding: 3px 9px; border-radius: 999px;
  font-weight: 800; font-size: 12.5px;
  background: rgba(255,255,255,.09); border: 1px solid var(--line); color: var(--ink);
}
.rank-1 { background: linear-gradient(135deg, #fbbf24, #f59e0b); border-color: transparent; color: #451a03; box-shadow: 0 0 14px rgba(251,191,36,.45); }
.rank-2 { background: linear-gradient(135deg, #e2e8f0, #cbd5e1); border-color: transparent; color: #1e293b; }
.rank-3 { background: linear-gradient(135deg, #fda4af, #fb7185); border-color: transparent; color: #4c0519; }

.empty-tip { text-align: center; padding: 26px 0; color: var(--ink-dim); font-size: 13.5px; }

/* 返回查询按钮 */
.btn-back {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; height: 46px; margin-top: 24px;
  border: 1.5px solid var(--red-500); border-radius: 14px; cursor: pointer;
  background: rgba(225, 29, 72, .14); color: #ffd6dc;
  font-size: 14.5px; font-weight: 700; letter-spacing: 2px;
  transition: all .2s ease;
}
.btn-back:hover {
  background: linear-gradient(135deg, var(--red-500), var(--red-700));
  color: #fff; box-shadow: 0 10px 22px rgba(225, 29, 72, .4);
}
.btn-back:active { transform: scale(.98); }

/* ---- 试卷分析「观看」按钮 ---- */
.analysis-btn {
  display: inline-block;
  padding: 3px 7px;
  font-size: 12px;
  line-height: 1.4;
  color: #fff;
  text-decoration: none;
  background: linear-gradient(135deg, var(--red-500), var(--red-700));
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 999px;
  cursor: pointer;
  transition: transform .12s, box-shadow .12s, filter .12s;
  box-shadow: 0 3px 10px rgba(225,29,72,.35);
  white-space: nowrap;
}
.analysis-btn:hover { filter: brightness(1.1); box-shadow: 0 4px 14px rgba(225,29,72,.5); }
.analysis-btn:active { transform: scale(.95); }

.td-dim { color: var(--ink-dim); }

/* ---- 试卷分析「下载答案」按钮（a 标签复用 .analysis-btn 样式） ---- */

/* ---- Toast 提示 ---- */
.toast {
  position: fixed; top: 22px; left: 50%; transform: translate(-50%, -90px);
  z-index: 100; max-width: 88vw;
  background: rgba(28, 6, 12, .95); border: 1px solid var(--red-500);
  color: #fff; font-size: 14px; line-height: 1.6;
  padding: 12px 20px; border-radius: 12px; box-shadow: 0 12px 32px rgba(0,0,0,.5);
  opacity: 0; transition: transform .32s cubic-bezier(.22,1,.36,1), opacity .32s;
  pointer-events: none; text-align: center;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.toast.error { border-color: var(--red-600); }
.toast.ok { border-color: rgba(74, 222, 128, .55); }

/* ---- 手机端紧凑适配（保持单行显示，无需横向拖动） ---- */
@media (max-width: 640px) {
  .card { padding: 24px 18px 20px; border-radius: 18px; }
  .site-title { font-size: 20px; }
  .rtable { font-size: 12px; }
  .rtable th { padding: 9px 4px; font-size: 12px; }
  .rtable td { padding: 9px 4px; }
  .score-val { font-size: 13px; }
  .time-val { font-size: 11.5px; }
  .rank-badge { min-width: 36px; padding: 2px 5px; font-size: 11px; }
  .block-note { display: none; }
}

@media (max-width: 380px) {
  .page-wrap { padding: 16px 12px; }
}

/* =============================================================
   双 Tab 切换（成绩查询 / 在线刷题）
   ============================================================= */
.tabbar {
  display: flex; gap: 8px; padding: 5px; margin-bottom: 22px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid var(--line); border-radius: 14px;
}
.tab-item {
  flex: 1; height: 42px; border: none; border-radius: 10px;
  background: transparent; color: var(--ink-dim);
  font-size: 14.5px; font-weight: 700; letter-spacing: 1px; cursor: pointer;
  transition: all .22s ease;
}
.tab-item.active {
  background: linear-gradient(135deg, var(--red-500), var(--red-700));
  color: #fff; box-shadow: 0 6px 16px rgba(225, 29, 72, .45);
}

/* =============================================================
   在线刷题
   ============================================================= */
.pz-login-tip { text-align: center; font-size: 13px; color: var(--ink-dim); margin-bottom: 18px; }

.pz-topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px; margin-bottom: 16px;
  background: linear-gradient(135deg, rgba(244,63,94,.16), rgba(159,18,57,.2));
  border: 1px solid rgba(244,63,94,.4); border-radius: 16px;
}
.pz-user { display: flex; align-items: center; gap: 10px; min-width: 0; }
.pz-avatar {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 16px; color: #fff;
  background: linear-gradient(135deg, var(--red-500), var(--red-800));
  box-shadow: 0 6px 14px rgba(225, 29, 72, .4);
}
.pz-user-meta { display: flex; flex-direction: column; min-width: 0; }
.pz-user-meta b { font-size: 15px; font-weight: 800; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pz-user-meta span { font-size: 11.5px; color: var(--ink-dim); font-family: "JetBrains Mono", "Consolas", monospace; }
.pz-quit {
  flex-shrink: 0; height: 32px; padding: 0 14px;
  border: 1.5px solid rgba(244,63,94,.55); border-radius: 999px; cursor: pointer;
  background: rgba(225, 29, 72, .16); color: #ffd6dc;
  font-size: 12.5px; font-weight: 700; transition: all .2s;
}
.pz-quit:active { transform: scale(.95); }

/* 功能入口 */
.pz-menu { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pz-menu-card {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 18px 16px; text-align: center;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--line); border-radius: 16px; cursor: pointer;
  color: var(--ink); transition: all .2s ease;
}
.pz-menu-card:hover { background: rgba(255,255,255,.09); border-color: rgba(244,63,94,.5); transform: translateY(-2px); }
.pz-menu-card:active { transform: scale(.97); }
.pz-menu-icon {
  width: 44px; height: 44px; border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
}
.pz-i-practice { background: linear-gradient(135deg, rgba(244,63,94,.28), rgba(159,18,57,.36)); color: #ff8fa5; }
.pz-i-kp       { background: linear-gradient(135deg, rgba(251,191,36,.2), rgba(217,119,6,.3)); color: #fcd34d; }
.pz-i-exam     { background: linear-gradient(135deg, rgba(96,165,250,.18), rgba(37,99,235,.28)); color: #93c5fd; }
.pz-i-wrong   { background: linear-gradient(135deg, rgba(251,191,36,.2), rgba(217,119,6,.3)); color: #fcd34d; }
.pz-i-fav     { background: linear-gradient(135deg, rgba(236,72,153,.22), rgba(190,18,60,.3)); color: #fda4af; }
.pz-i-stats   { background: linear-gradient(135deg, rgba(96,165,250,.18), rgba(37,99,235,.28)); color: #93c5fd; }
.pz-i-report  { background: linear-gradient(135deg, rgba(74,222,128,.18), rgba(22,163,74,.26)); color: #86efac; }
.pz-menu-card b { font-size: 15.5px; font-weight: 800; color: #fff; }
.pz-menu-card > span:last-child { font-size: 12px; color: var(--ink-dim); }

/* 子视图通用 */
.pz-view { animation: rise .4s cubic-bezier(.22,1,.36,1) both; }
.pz-head {
  display: flex; align-items: center; gap: 12px; margin-bottom: 16px;
}
.pz-back {
  flex-shrink: 0; width: 36px; height: 36px; border-radius: 11px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.07); border: 1px solid var(--line); color: var(--ink-dim);
  transition: all .18s;
}
.pz-back:active { transform: scale(.92); }
.pz-head h3 { flex: 1; font-size: 17px; font-weight: 800; color: #fff; letter-spacing: .5px; }
.pz-head .pz-head-sub { font-size: 11.5px; color: var(--ink-dim); font-weight: 500; }

/* 科目/模式选择 */
.pz-subj-card {
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 15px 16px; margin-bottom: 10px;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--line); border-radius: 14px; cursor: pointer;
  color: var(--ink); text-align: left; transition: all .18s;
}
.pz-subj-card:hover { border-color: rgba(244,63,94,.5); background: rgba(255,255,255,.09); }
.pz-subj-card:active { transform: scale(.98); }
.pz-subj-name { flex: 1; font-size: 14.5px; font-weight: 700; color: #fff; }
.pz-subj-cnt { font-size: 12px; color: var(--ink-dim); margin-right: 4px; }
.pz-subj-arrow { color: rgba(255,214,220,.5); flex-shrink: 0; }

.pz-mode-card {
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 15px 16px; margin-bottom: 10px;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--line); border-radius: 14px; cursor: pointer;
  color: var(--ink); text-align: left; transition: all .18s;
}
.pz-mode-card:hover { border-color: rgba(244,63,94,.5); background: rgba(255,255,255,.09); }
.pz-mode-icon {
  width: 38px; height: 38px; border-radius: 11px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, rgba(244,63,94,.24), rgba(159,18,57,.3)); color: #ff8fa5;
}
.pz-mode-meta { flex: 1; }
.pz-mode-meta b { display: block; font-size: 14.5px; font-weight: 800; color: #fff; }
.pz-mode-meta span { font-size: 12px; color: var(--ink-dim); }

/* 练习进度 */
.pz-progress { margin-bottom: 14px; }
.pz-progress-bar {
  height: 8px; border-radius: 999px; overflow: hidden;
  background: rgba(255,255,255,.08); border: 1px solid var(--line);
}
.pz-progress-fill {
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--red-500), var(--red-700));
  transition: width .3s ease;
}
.pz-progress-meta {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 8px; font-size: 12px; color: var(--ink-dim);
}
.pz-progress-meta b { color: #fff; font-size: 13px; }

/* 题目卡 */
.q-card {
  background: rgba(255,255,255,.05);
  border: 1px solid var(--line); border-radius: 16px;
  padding: 18px 16px; margin-bottom: 14px;
}
.q-type-tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; font-weight: 800; color: #ffd6dc;
  padding: 3px 10px; border-radius: 999px;
  background: rgba(244,63,94,.18); border: 1px solid rgba(244,63,94,.45);
}
.q-stem { font-size: 15.5px; font-weight: 700; color: #fff; line-height: 1.75; margin-top: 12px; white-space: pre-wrap; word-break: break-word; }
.q-opts { margin-top: 16px; display: flex; flex-direction: column; gap: 10px; }
.q-opt {
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 12px 14px; text-align: left;
  background: rgba(255,255,255,.05);
  border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer;
  color: var(--ink); font-size: 14px; line-height: 1.6;
  transition: all .16s ease;
}
.q-opt:active { transform: scale(.985); }
.q-opt-key {
  flex-shrink: 0; width: 28px; height: 28px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800; color: var(--ink-dim);
  background: rgba(255,255,255,.09);
}
.q-opt.active {
  border-color: var(--red-500);
  background: linear-gradient(135deg, rgba(244,63,94,.2), rgba(159,18,57,.24));
  box-shadow: 0 0 0 3px rgba(244,63,94,.16);
}
.q-opt.active .q-opt-key {
  background: linear-gradient(135deg, var(--red-500), var(--red-700));
  color: #fff;
}
.q-opt.ok {
  border-color: rgba(74,222,128,.65);
  background: rgba(74,222,128,.13);
}
.q-opt.ok .q-opt-key { background: linear-gradient(135deg, #4ade80, #16a34a); color: #fff; }
.q-opt.err {
  border-color: rgba(244,63,94,.75);
  background: rgba(244,63,94,.16);
}
.q-opt.err .q-opt-key { background: linear-gradient(135deg, #f43f5e, #dc2626); color: #fff; }

/* 答题卡 */
.ans-grid {
  display: grid; grid-template-columns: repeat(10, 1fr); gap: 7px;
  padding: 14px; margin-bottom: 14px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--line); border-radius: 14px;
}
.ans-cell {
  aspect-ratio: 1; border: none; border-radius: 9px; cursor: pointer;
  font-size: 12.5px; font-weight: 700; color: var(--ink-dim);
  background: rgba(255,255,255,.07);
  transition: all .14s;
}
.ans-cell.done { background: linear-gradient(135deg, var(--red-500), var(--red-700)); color: #fff; }
.ans-cell.cur { box-shadow: 0 0 0 2px var(--gold); color: var(--gold); }

/* 练习底部导航 */
.pz-nav { display: flex; gap: 10px; margin-top: 4px; }
.pz-nav .pz-back { width: auto; height: 46px; padding: 0 20px; font-size: 13.5px; font-weight: 700; }
.btn-submit.pz-submit { margin-top: 0; flex: 1; }

/* 结果 */
.res-score {
  display: flex; align-items: center; gap: 16px;
  padding: 18px 16px; margin-bottom: 14px;
  background: linear-gradient(135deg, rgba(244,63,94,.2), rgba(159,18,57,.26));
  border: 1px solid rgba(244,63,94,.45); border-radius: 16px;
}
.res-score-num { flex-shrink: 0; text-align: center; }
.res-score-num b { display: block; font-size: 30px; font-weight: 900; color: var(--gold); line-height: 1.1; }
.res-score-num span { font-size: 11px; color: var(--ink-dim); }
.res-score-meta { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.res-score-row { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--ink-dim); }
.res-score-row b { color: #fff; }
.res-rate {
  flex-shrink: 0; width: 64px; height: 64px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 900; color: #fff;
  background: conic-gradient(var(--red-500) var(--pct, 0%), rgba(255,255,255,.09) 0);
  position: relative;
}
.res-rate::after {
  content: ""; position: absolute; inset: 7px; border-radius: 50%;
  background: #20060b;
}
.res-rate b { position: relative; z-index: 1; }

.res-card {
  background: rgba(255,255,255,.05);
  border: 1px solid var(--line); border-radius: 16px;
  padding: 16px; margin-bottom: 12px;
}
.res-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.res-no { font-size: 12.5px; font-weight: 800; color: var(--ink-dim); }
.res-tag {
  font-size: 11px; font-weight: 800; padding: 3px 10px; border-radius: 999px;
}
.res-tag.ok { color: #86efac; background: rgba(74,222,128,.15); border: 1px solid rgba(74,222,128,.45); }
.res-tag.err { color: #ffa3b3; background: rgba(244,63,94,.16); border: 1px solid rgba(244,63,94,.5); }
.res-stem { font-size: 14px; font-weight: 700; color: #fff; line-height: 1.7; margin-bottom: 12px; white-space: pre-wrap; word-break: break-word; }
.res-line { font-size: 12.5px; color: var(--ink-dim); line-height: 1.8; margin-top: 8px; }
.res-line b { color: #fff; }
.res-line .ans-correct { color: #86efac; font-weight: 800; }
.res-line .ans-wrong { color: #fda4af; font-weight: 800; }
.res-analysis { font-size: 13px; color: var(--ink-dim); line-height: 1.8; margin-top: 10px; padding-top: 10px; border-top: 1px dashed rgba(255,255,255,.14); }
.res-analysis b { color: #ffd6dc; }
.res-analysis .q-video {
  display: block;
  width: 100%;
  max-width: 640px;
  margin: 8px 0 4px;
  border-radius: 10px;
  background: #000;
}
.res-analysis .q-video-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 8px 18px;
  border-radius: 10px;
  background: linear-gradient(135deg, #e11d48, #be123c);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(225, 29, 72, .35);
}
.ans-or {
  color: #e11d48;
  font-weight: 600;
  margin: 0 4px;
}
.res-fav {
  margin-top: 12px; height: 36px; padding: 0 16px;
  border: 1.5px solid rgba(244,63,94,.55); border-radius: 10px; cursor: pointer;
  background: rgba(225,29,72,.12); color: #ffd6dc;
  font-size: 12.5px; font-weight: 700; transition: all .18s;
}
.res-fav.on { background: linear-gradient(135deg, var(--red-500), var(--red-700)); color: #fff; border-color: transparent; }
.res-fav:active { transform: scale(.95); }

/* 统计 */
.pz-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pz-stat-card {
  padding: 18px 16px; text-align: center;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--line); border-radius: 16px;
}
.pz-stat-num { font-size: 26px; font-weight: 900; color: #fff; line-height: 1.2; }
.pz-stat-num.gold { color: var(--gold); }
.pz-stat-num.red { color: #fb7185; }
.pz-stat-num.green { color: #86efac; }
.pz-stat-label { font-size: 12px; color: var(--ink-dim); margin-top: 4px; }

/* =============================================================
   题库刷题扩展（难度/知识点/填空/公式/报告）
   ============================================================= */
.stars { color: var(--gold); font-size: 14px; letter-spacing: 1px; white-space: nowrap; }
.stars i { color: rgba(255,214,220,.35); font-style: normal; }

.q-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.q-kp {
  font-size: 11px; font-weight: 700; color: #ffd6dc;
  padding: 3px 10px; border-radius: 999px;
  background: rgba(251,191,36,.12); border: 1px solid rgba(251,191,36,.4);
}
.q-points {
  margin-left: auto; font-size: 12px; font-weight: 800; color: var(--gold);
  padding: 3px 10px; border-radius: 999px;
  background: rgba(251,191,36,.12); border: 1px solid rgba(251,191,36,.4);
}

/* 填空 */
.q-fill { margin-top: 16px; }
.q-fill-label { display: block; font-size: 12.5px; color: var(--ink-dim); margin-bottom: 8px; }
.q-fill-input {
  width: 100%; height: 48px; font-size: 15px; padding: 0 14px;
  background: var(--input-bg); border: 1.5px solid var(--line); border-radius: 12px;
  color: #fff; outline: none; transition: border-color .18s, box-shadow .18s;
}
.q-fill-input:focus { border-color: var(--red-500); box-shadow: 0 0 0 4px rgba(244,63,94,.15); }
.q-fill-input::placeholder { color: rgba(255,214,220,.4); }

/* 富文本内容（公式/图片） */
.q-stem .katex, .res-stem .katex, .q-opt-text .katex, .res-analysis .katex { overflow-x: auto; overflow-y: hidden; max-width: 100%; }
.q-stem .katex-display, .res-stem .katex-display, .res-analysis .katex-display { margin: 8px 0; overflow-x: auto; overflow-y: hidden; }
.q-stem img.q-img, .res-stem img.q-img, .q-opt-text img.q-img, .res-analysis img.q-img {
  max-width: 100%; max-height: 220px; border-radius: 12px; margin: 6px 0; display: block;
}

/* 知识点选择 */
.kp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.kp-item {
  display: flex; align-items: center; gap: 10px; padding: 13px 14px; text-align: left;
  background: rgba(255,255,255,.05); border: 1.5px solid var(--line); border-radius: 12px;
  color: #fff; font-size: 13.5px; cursor: pointer; transition: all .15s;
}
.kp-item:active { transform: scale(.97); }
.kp-check {
  width: 20px; height: 20px; border-radius: 7px; flex-shrink: 0;
  border: 1.5px solid rgba(255,255,255,.35); position: relative; transition: all .15s;
}
.kp-item.on { border-color: var(--red-500); background: rgba(244,63,94,.16); }
.kp-item.on .kp-check { background: linear-gradient(135deg, var(--red-500), var(--red-700)); border-color: transparent; }
.kp-item.on .kp-check::after {
  content: ""; position: absolute; left: 6px; top: 2px; width: 5px; height: 10px;
  border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}

/* 模拟考试 */
.exam-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 14px; margin-bottom: 12px;
  background: linear-gradient(135deg, rgba(244,63,94,.2), rgba(159,18,57,.24));
  border: 1px solid rgba(244,63,94,.5); border-radius: 14px;
}
.exam-timer { font-size: 16px; font-weight: 900; color: var(--gold); font-variant-numeric: tabular-nums; }
.exam-tip { font-size: 11.5px; color: var(--ink-dim); }

/* 报告 */
.rep-block { margin-top: 14px; }
.rep-title {
  font-size: 14px; font-weight: 800; color: #fff; margin-bottom: 10px;
  padding-left: 10px; border-left: 3px solid var(--red-500);
}
.kp-bar { margin-bottom: 12px; }
.kp-bar-head { display: flex; justify-content: space-between; font-size: 12.5px; margin-bottom: 5px; color: var(--ink-dim); }
.kp-bar-head b { color: #fff; }
.kp-bar-track { height: 9px; border-radius: 999px; background: rgba(255,255,255,.08); overflow: hidden; }
.kp-bar-fill { height: 100%; border-radius: 999px; transition: width .4s ease; }
.kp-bar-fill.good { background: linear-gradient(90deg, #4ade80, #16a34a); }
.kp-bar-fill.mid { background: linear-gradient(90deg, #fbbf24, #f59e0b); }
.kp-bar-fill.low { background: linear-gradient(90deg, #f43f5e, #dc2626); }

.exam-trend {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 8px;
  height: 150px; padding: 12px 10px 0;
  background: rgba(255,255,255,.04); border: 1px solid var(--line); border-radius: 14px;
  margin-bottom: 14px;
}
.trend-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; }
.trend-bar {
  width: 100%; max-width: 30px; border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, var(--red-500), var(--red-800));
  min-height: 4px;
}
.trend-val { font-size: 10.5px; font-weight: 800; color: var(--gold); }
.trend-date { font-size: 10px; color: var(--ink-dim); }

.exam-list { display: flex; flex-direction: column; gap: 8px; }
.exam-item {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px; text-align: left;
  background: rgba(255,255,255,.05); border: 1.5px solid var(--line); border-radius: 12px;
  color: #fff; cursor: pointer; transition: all .15s;
}
.exam-item:active { transform: scale(.985); }
.exam-score { font-size: 15px; font-weight: 900; color: var(--gold); flex-shrink: 0; }
.exam-meta { flex: 1; font-size: 12.5px; color: var(--ink-dim); min-width: 0; }
.exam-time { font-size: 11px; color: rgba(255,214,220,.5); flex-shrink: 0; }

.exam-detail-head {
  display: flex; flex-wrap: wrap; gap: 8px 16px; padding: 14px;
  background: rgba(255,255,255,.05); border: 1px solid var(--line); border-radius: 14px;
  font-size: 12.5px; color: var(--ink-dim); margin-bottom: 12px;
}
.exam-detail-head b { color: #86efac; }

/* =============================================================
   手机端刷题紧凑适配
   ============================================================= */
@media (max-width: 640px) {
  .ans-grid { grid-template-columns: repeat(8, 1fr); gap: 6px; }
  .q-stem { font-size: 14.5px; }
  .pz-menu-card { padding: 15px 13px; }
  .res-score-num b { font-size: 26px; }
}
@media (max-width: 380px) {
  .ans-grid { grid-template-columns: repeat(7, 1fr); }
}

/* =============================================================
   三端自适应最佳布局（手机 / 平板 / 电脑 / 微信内置浏览器）
   移动优先：基础样式=手机；≥768px 平板增强；≥1200px 电脑增强
   微信内置浏览器（Android X5 / iOS WKWebView）按窗口宽度
   自然命中对应断点，无需额外处理。
   ============================================================= */

/* ---- 极窄屏（≤380px）细节收紧 ---- */
@media (max-width: 380px) {
  .captcha-row { gap: 8px; }
  .captcha-img { width: 128px; }
  .q-meta { gap: 5px; }
  .q-kp, .q-points { font-size: 10.5px; padding: 2px 8px; }
  .pz-quit { padding: 0 10px; font-size: 12px; }
  .pz-user-meta b { font-size: 14px; }
  .stu-chip { padding: 6px 12px; font-size: 13px; }
  .res-rate { width: 56px; height: 56px; font-size: 13px; }
  .res-score-num b { font-size: 24px; }
  .kp-grid { grid-template-columns: 1fr; }
  .pz-menu-icon { width: 40px; height: 40px; }
}

/* ---- 平板（≥768px）：卡片加宽、三栏功能宫格、大字号 ---- */
@media (min-width: 768px) {
  .page-wrap { padding: 32px 28px; gap: 26px; }
  .card { max-width: 680px; padding: 34px 32px 30px; }
  .site-title { font-size: 25px; letter-spacing: 2px; }
  .site-sub { font-size: 12px; letter-spacing: 4px; }
  .logo-badge { width: 68px; height: 68px; border-radius: 20px; }
  .label { font-size: 14.5px; }
  .input { height: 52px; font-size: 16px; border-radius: 15px; }
  .captcha-img { width: 156px; height: 52px; border-radius: 13px; }
  .seg { padding: 6px; border-radius: 15px; }
  .seg-item { height: 44px; font-size: 15px; border-radius: 11px; }
  .btn-submit { height: 56px; font-size: 17px; border-radius: 16px; }
  .tabbar { padding: 6px; border-radius: 15px; margin-bottom: 26px; }
  .tab-item { height: 46px; font-size: 15.5px; border-radius: 11px; }
  .foot-tip { font-size: 12.5px; }

  /* 查询结果 */
  .result-title { font-size: 20px; }
  .result-title::before, .result-title::after { width: 64px; }
  .block-title { font-size: 17.5px; }
  .rtable { font-size: 13.5px; }
  .rtable th { font-size: 13px; padding: 12px 8px; }
  .rtable td { padding: 12px 8px; }
  .score-val { font-size: 14.5px; }
  .time-val { font-size: 12.5px; }
  .rank-badge { min-width: 52px; padding: 4px 10px; font-size: 13px; }
  .stu-chip { font-size: 15px; padding: 8px 18px; }
  .btn-back { height: 50px; font-size: 15.5px; }
  .block-note { display: inline; }

  /* 刷题 */
  .pz-menu { grid-template-columns: repeat(3, 1fr); gap: 14px; }
  .pz-menu-card { padding: 22px 16px; gap: 9px; }
  .pz-menu-icon { width: 48px; height: 48px; border-radius: 15px; }
  .pz-menu-card b { font-size: 16px; }
  .pz-menu-card > span:last-child { font-size: 12.5px; }
  .pz-topbar { padding: 14px 16px; border-radius: 18px; }
  .pz-avatar { width: 46px; height: 46px; font-size: 18px; }
  .pz-user-meta b { font-size: 16.5px; }
  .pz-user-meta span { font-size: 12.5px; }
  .pz-quit { height: 36px; padding: 0 18px; font-size: 13.5px; }
  .pz-head h3 { font-size: 18px; }
  .pz-subj-card, .pz-mode-card { padding: 17px 18px; border-radius: 16px; }
  .pz-subj-name, .pz-mode-meta b { font-size: 15.5px; }
  .kp-grid { grid-template-columns: repeat(3, 1fr); gap: 12px; }
  .kp-item { padding: 15px 16px; font-size: 14.5px; }
  .pz-stats { grid-template-columns: repeat(4, 1fr); gap: 14px; }
  .pz-stat-num { font-size: 28px; }
  .ans-grid { grid-template-columns: repeat(10, 1fr); gap: 8px; }
  .ans-cell { font-size: 13.5px; border-radius: 10px; }
  .q-card { padding: 22px 20px; border-radius: 18px; }
  .q-stem { font-size: 16px; }
  .q-opt { padding: 14px 16px; font-size: 15px; border-radius: 14px; }
  .q-opt-key { width: 30px; height: 30px; font-size: 14px; }
  .q-fill-input { height: 52px; font-size: 16px; }
  .q-fill-label { font-size: 13.5px; }
  .q-type-tag { font-size: 12px; }
  .stars { font-size: 15px; }
  .res-score { padding: 20px 18px; border-radius: 18px; }
  .res-score-num b { font-size: 34px; }
  .res-rate { width: 70px; height: 70px; font-size: 16px; }
  .res-card { padding: 20px; border-radius: 18px; }
  .res-stem { font-size: 15px; }
  .res-line, .res-analysis { font-size: 13.5px; }
  .pz-nav { gap: 12px; }
  .pz-nav .pz-back { height: 50px; padding: 0 26px; font-size: 14.5px; }
  .btn-submit.pz-submit { height: 50px; }
  .exam-bar { padding: 14px 16px; border-radius: 16px; }
  .exam-timer { font-size: 17px; }
  .exam-detail-head { font-size: 13px; padding: 16px; }
  .rep-title { font-size: 15px; }
  .kp-bar-head { font-size: 13.5px; }
}

/* ---- 电脑（≥1200px）：四栏宫格、更宽卡片、居中舒适 ---- */
@media (min-width: 1200px) {
  .card { max-width: 820px; padding: 40px 40px 34px; border-radius: 26px; }
  .site-title { font-size: 27px; }
  .site-sub { font-size: 12.5px; }
  .logo-badge { width: 74px; height: 74px; }
  .page-wrap { padding: 40px 32px; }
  .rtable { font-size: 14px; }
  .rtable th { font-size: 13.5px; padding: 13px 10px; }
  .rtable td { padding: 13px 10px; }
  .pz-menu { grid-template-columns: repeat(4, 1fr); gap: 16px; }
  .pz-menu-card { padding: 26px 18px; border-radius: 18px; }
  .pz-menu-icon { width: 52px; height: 52px; }
  .kp-grid { grid-template-columns: repeat(4, 1fr); gap: 14px; }
  .q-card { padding: 26px 24px; }
  .q-stem { font-size: 16.5px; }
  .q-opt { padding: 15px 18px; font-size: 15.5px; }
  .res-card { padding: 24px; }
  .res-stem { font-size: 15.5px; }
  .res-score { padding: 22px 20px; }
  .pz-stats { gap: 16px; }
  .pz-stat-num { font-size: 30px; }
  .ans-grid { gap: 9px; }
  .pz-nav .pz-back { padding: 0 32px; }
  .exam-timer { font-size: 18px; }
  .pz-topbar { padding: 16px 18px; }
  .pz-user-meta b { font-size: 17px; }
}

/* ---- 统一确认弹窗（交卷 / 退出模拟考试，替代原生 confirm） ---- */
.pz-confirm { position: fixed; inset: 0; z-index: 999; display: flex; align-items: center; justify-content: center; }
.pz-confirm.hidden { display: none; }
.pz-confirm-mask { position: absolute; inset: 0; background: rgba(8, 2, 4, .74); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.pz-confirm-box {
  position: relative; width: min(88vw, 372px); border-radius: 22px; padding: 26px 24px 20px;
  text-align: center; color: var(--ink);
  background: linear-gradient(165deg, #2b0a13, #1a0508 62%, #24090F);
  border: 1px solid rgba(255, 61, 100, .30);
  box-shadow: 0 18px 60px rgba(0, 0, 0, .55), 0 0 44px rgba(225, 29, 72, .20);
  transform: translateY(16px) scale(.95); opacity: 0; transition: all .22s ease;
}
.pz-confirm.show .pz-confirm-box { transform: none; opacity: 1; }
.pz-confirm-icon {
  width: 62px; height: 62px; margin: 0 auto 12px; border-radius: 18px;
  display: flex; align-items: center; justify-content: center; color: #fff;
  background: linear-gradient(135deg, #f43f5e, #9f1239);
  box-shadow: 0 10px 26px rgba(225, 29, 72, .42);
}
.pz-confirm-title { margin: 0 0 10px; font-size: 19px; font-weight: 700; color: #fff; letter-spacing: .5px; }
.pz-confirm-msg { margin: 0 0 22px; font-size: 15px; line-height: 1.75; color: rgba(255, 235, 238, .88); }
.pz-confirm-msg b { color: #ff5c7c; font-weight: 700; }
.pz-confirm-msg em { color: #ffb020; font-style: normal; }
.pz-confirm-actions { display: flex; gap: 12px; }
.pz-confirm-actions button { flex: 1; height: 44px; border-radius: 12px; font-size: 15px; font-weight: 600; cursor: pointer; border: 0; transition: all .18s ease; -webkit-user-select: none; user-select: none; }
.pz-btn-ghost { background: rgba(255, 255, 255, .06); color: rgba(255, 255, 255, .86); border: 1px solid rgba(255, 255, 255, .15) !important; }
.pz-btn-ghost:hover { background: rgba(255, 255, 255, .12); }
.pz-btn-ok { background: linear-gradient(135deg, #f43f5e, #be123c); color: #fff; box-shadow: 0 8px 22px rgba(225, 29, 72, .38); }
.pz-btn-ok:hover { filter: brightness(1.12); }
.pz-btn-ok:active { transform: scale(.97); }
