/* ============================================================
   一起考试 (17kaoshi.com) 在线考试系统 —— 全局样式
   ============================================================ */
:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --success: #16a34a;
  --danger: #dc2626;
  --warning: #d97706;
  --info: #0891b2;
  --bg: #f1f5f9;
  --card-bg: #ffffff;
  --border: #e2e8f0;
  --text: #0f172a;
  --text-muted: #64748b;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(15, 23, 42, .08);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
}
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

.container { max-width: 1100px; margin: 0 auto; padding: 0 16px; }

/* ---------- 顶部导航（两行式：品牌+工具行 / 主色导航条） ---------- */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
  box-shadow: 0 1px 2px rgba(15,23,42,.04);
}
.header-top { display: flex; align-items: center; justify-content: space-between; height: 56px; gap: 10px; }
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; flex: none; }
.brand-logo { width: 34px; height: 34px; border-radius: 9px; box-shadow: 0 3px 10px rgba(37, 99, 235, .28); display: block; }
.brand-text { display: flex; flex-direction: column; line-height: 1.12; font-size: 19px; font-weight: 800; color: var(--text); letter-spacing: .5px; }
.brand-text small { font-size: 10px; color: #94a3b8; font-weight: 500; letter-spacing: 1px; }
.main-nav {
  background: linear-gradient(92deg, #1d4ed8 0%, #2563eb 48%, #4f46e5 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.16), inset 0 -1px 0 rgba(0,0,0,.08);
}
.main-nav-inner { display: flex; gap: 4px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding: 6px 0; }
.main-nav-inner::-webkit-scrollbar { display: none; }
.main-nav a {
  display: flex; align-items: center; gap: 5px;
  padding: 7px 14px; border-radius: 999px;
  color: rgba(255,255,255,.94); font-size: 14px; white-space: nowrap;
  transition: background .15s, color .15s, box-shadow .15s;
}
.main-nav a:hover { background: rgba(255,255,255,.16); color: #fff; }
.main-nav a.active {
  background: #fff; color: #1d4ed8; font-weight: 700;
  box-shadow: 0 3px 10px rgba(15,23,42,.22);
}
.main-nav a.active:hover { color: #1d4ed8; }

/* ---------- 主体与页脚 ---------- */
main.container { min-height: calc(100vh - 170px); padding-top: 22px; padding-bottom: 30px; }
.site-footer {
  border-top: 1px solid var(--border); background: #fff;
  padding: 16px 0; text-align: center; color: var(--text-muted); font-size: 13px;
}

/* ---------- 提示 ---------- */
.alert {
  position: relative; padding: 11px 38px 11px 14px; border-radius: var(--radius);
  margin-bottom: 14px; font-size: 14px; border: 1px solid transparent;
}
.alert-close {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  border: none; background: none; font-size: 18px; cursor: pointer; color: inherit; opacity: .6;
}
.alert-success { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.alert-warning { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.alert-danger  { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.alert-info    { background: #ecfeff; border-color: #a5f3fc; color: #155e75; }

/* ---------- 卡片与栅格 ---------- */
.card {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px;
  margin-bottom: 18px;
}
.card h2, .card h3 { margin-top: 0; }
.card-title { font-size: 17px; font-weight: 600; margin: 0 0 14px; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-7 { grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); }
@media (max-width: 860px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .header-top { height: 50px; }
  .user-nav a { padding: 5px 8px; font-size: 12.5px; }
  .points-badge { padding: 3px 8px; font-size: 12px; }
  /* 窄屏导航只留文字，保证 8 项全显示 */
  .main-nav .nav-ico { display: none; }
  .main-nav a { padding: 7px 12px; }
}

/* 统计卡片 */
.stat-card {
  background: #fff; border: 1px solid var(--border); border-radius: 14px;
  padding: 16px 14px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 3px;
  transition: transform .15s, box-shadow .15s;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(15, 23, 42, .08); }
.stat-card .num { font-size: 26px; font-weight: 800; color: var(--primary); line-height: 1.1; }
.stat-card .label { color: var(--text-muted); font-size: 12.5px; margin-top: 2px; }
.title-cell { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 每日签到独立页 */
.signin-hero {
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  background: linear-gradient(120deg, #2563eb, #7c3aed);
  border-radius: 16px; padding: 26px 28px; color: #fff;
  box-shadow: 0 10px 28px rgba(99, 102, 241, .25);
}
.signin-hero-bg {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(220px 120px at 88% 0%, rgba(255,255,255,.14), transparent 70%),
    radial-gradient(180px 110px at 10% 110%, rgba(251,191,36,.18), transparent 70%);
}
.signin-hero-main { display: flex; align-items: center; gap: 16px; min-width: 0; position: relative; z-index: 1; }
.signin-hero-ico {
  flex: none; width: 56px; height: 56px; border-radius: 16px; display: flex; align-items: center; justify-content: center;
  font-size: 28px; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.25);
  box-shadow: 0 4px 12px rgba(0,0,0,.12);
}
.signin-hero h2 { margin: 0; color: #fff; font-size: 22px; font-weight: 800; }
.signin-hero p { margin: 8px 0 0; color: rgba(255,255,255,.85); font-size: 13.5px; line-height: 1.7; }
.signin-hero-side { flex: none; position: relative; z-index: 1; }
.signin-btn {
  background: #fff; color: #2563eb; font-weight: 800; font-size: 17px;
  padding: 14px 40px; border: none; border-radius: 14px; cursor: pointer;
  box-shadow: 0 6px 18px rgba(0,0,0,.18); transition: transform .12s, box-shadow .12s;
}
.signin-btn:hover { transform: translateY(-1px); box-shadow: 0 9px 22px rgba(0,0,0,.24); }
.signin-done-big {
  display: flex; align-items: center; gap: 12px; background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.3); border-radius: 14px; padding: 12px 20px;
}
.sdb-tick {
  width: 42px; height: 42px; border-radius: 50%; background: #22c55e; color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 800; flex: none;
}
.sdb-title { font-size: 15px; font-weight: 700; }
.sdb-sub { font-size: 12.5px; color: rgba(255,255,255,.85); margin-top: 2px; }
.stat-accent .num { color: #d97706; }
.signin-cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.cal-cell {
  border: 1px solid var(--border); border-radius: 10px; padding: 8px 4px; text-align: center;
  background: #f8fafc;
}
.cal-cell.cal-on { background: #eff6ff; border-color: #93c5fd; }
.cal-day { font-size: 13px; font-weight: 700; color: #475569; }
.cal-cell.cal-on .cal-day { color: #2563eb; }
.cal-dot { font-size: 12px; margin-top: 2px; color: #94a3b8; }
.cal-cell.cal-on .cal-dot { color: #2563eb; font-weight: 800; }
/* 签到排行榜 */
.rank-list { display: flex; flex-direction: column; gap: 8px; }
.rank-item {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px;
  background: #fff; transition: border-color .12s, background .12s;
}
.rank-item:hover { border-color: #c7d2fe; }
.rank-item.rank-me { background: #eff6ff; border-color: #93c5fd; }
.rank-medal {
  flex: none; width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 17px; font-weight: 800; color: #fff; background: #e2e8f0;
}
.rank-medal.rank-1 { background: linear-gradient(135deg, #f59e0b, #fbbf24); box-shadow: 0 3px 8px rgba(245,158,11,.35); }
.rank-medal.rank-2 { background: linear-gradient(135deg, #94a3b8, #cbd5e1); box-shadow: 0 3px 8px rgba(100,116,139,.3); }
.rank-medal.rank-3 { background: linear-gradient(135deg, #d97706, #f59e0b); box-shadow: 0 3px 8px rgba(217,119,6,.3); }
.rank-name { font-weight: 700; font-size: 14.5px; min-width: 0; flex: 1 1 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.rank-date { font-size: 12.5px; color: #94a3b8; flex: none; }
.rank-me-footer { margin-top: 8px; }
@media (max-width: 560px) {
  .signin-hero { padding: 20px 16px; }
  .signin-btn { width: 100%; }
  .rank-date { display: none; }
}

/* 点评审核卡片流 */
.rv-list { display: flex; flex-direction: column; gap: 12px; }
.rv-card { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; box-shadow: var(--shadow); }
.rv-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.rv-user { display: flex; align-items: center; gap: 11px; min-width: 0; }
.rv-avatar {
  flex: none; width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #7c3aed); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 16px;
}
.rv-name { font-weight: 600; font-size: 14.5px; display: flex; align-items: center; flex-wrap: wrap; }
.rv-mat { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }
.rv-mat a { color: var(--primary); text-decoration: none; }
.rv-mat a:hover { text-decoration: underline; }
.rv-actions { display: flex; gap: 6px; flex-wrap: wrap; flex: none; }
.rv-body { margin-top: 12px; background: #f8fafc; border: 1px solid #eef2f7; border-radius: 10px; padding: 11px 13px; }
.rv-comment { margin-top: 7px; font-size: 14px; line-height: 1.65; color: var(--text); word-break: break-word; }
.rv-empty { padding: 40px 0; text-align: center; color: var(--text-muted); font-size: 13.5px; }

/* 最近上传列表 */
.latest-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.latest-item { display: flex; align-items: center; gap: 10px; padding: 8px 2px; border-bottom: 1px dashed var(--border); }
.latest-item:last-child { border-bottom: none; }
.li-main { flex: 1; min-width: 0; }
.li-title { font-weight: 600; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.li-meta { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* 分类分布表：一级分类左侧圆点 */
.cat-dot { display: inline-block; width: 8px; height: 8px; border-radius: 3px; background: var(--primary); margin-right: 8px; vertical-align: middle; }

/* ---------- 表单 ---------- */
.form-group { margin-bottom: 14px; }
.form-group label { display: block; margin-bottom: 5px; font-weight: 600; font-size: 14px; }
.form-group .hint { color: var(--text-muted); font-size: 12.5px; margin-top: 4px; }
.form-control, select.form-control, textarea.form-control {
  width: 100%; padding: 9px 12px; border: 1px solid var(--border);
  border-radius: 8px; font-size: 14px; font-family: inherit; background: #fff; color: var(--text);
}
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
textarea.form-control { resize: vertical; min-height: 80px; }
.form-row { display: flex; gap: 12px; flex-wrap: wrap; }
.form-row .form-group { flex: 1; min-width: 0; }
input[type=checkbox], input[type=radio] { accent-color: var(--primary); }

.btn {
  display: inline-block; padding: 9px 20px; border-radius: 8px; border: 1px solid transparent;
  font-size: 14px; cursor: pointer; background: var(--primary); color: #fff;
  transition: background .15s; font-family: inherit; line-height: 1.4;
}
.btn:hover { background: var(--primary-dark); color: #fff; }
.btn-lg { padding: 12px 32px; font-size: 15px; }
.btn-sm { padding: 5px 12px; font-size: 13px; border-radius: 6px; }
.btn-secondary { background: #fff; color: var(--text); border-color: var(--border); }
.btn-secondary:hover { background: #f8fafc; color: var(--text); }
.btn-success { background: var(--success); }
.btn-success:hover { background: #15803d; }
.btn-danger { background: var(--danger); }
.btn-danger:hover { background: #b91c1c; }
.btn-warning { background: var(--warning); }
.btn-warning:hover { background: #b45309; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
/* 复习入口按钮：橙色渐变 + 图标 + 悬停抬升（尺寸与 .btn-lg 完全一致） */
.btn-review {
  display: inline-flex; align-items: center; gap: 7px;
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  color: #fff;
  padding: 12px 32px; font-size: 15px;
  box-shadow: 0 4px 12px rgba(234, 88, 12, .28);
  transition: transform .15s, box-shadow .15s, filter .15s;
}
.btn-review:hover {
  background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(234, 88, 12, .38);
}
.btn-review:active { transform: translateY(0); }
.btn-review svg { flex: none; }
.btn-next { margin-top: 12px; background: #fff; color: var(--primary); border-color: var(--primary); }
.btn-next:hover { background: #eff6ff; }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; min-width: 720px; border-collapse: collapse; font-size: 14px; }
/* 密集数据表：列多时保持自然宽度，放不下横向滚动而不是压扁换行 */
table.table.table-wide { min-width: 1080px; }
.table th, .table td { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
.table th { background: #f8fafc; font-weight: 600; white-space: nowrap; }
.table tr:hover td { background: #f8fafc; }

/* ---------- 徽标 ---------- */
.badge {
  display: inline-block; padding: 2px 9px; border-radius: 20px;
  font-size: 12px; font-weight: 600; background: #e2e8f0; color: #334155;
}
.badge-green { background: #dcfce7; color: #166534; }
.badge-red { background: #fee2e2; color: #991b1b; }
.badge-blue { background: #dbeafe; color: #1e40af; }
.badge-yellow { background: #fef9c3; color: #854d0e; }
.badge-gray { background: #e2e8f0; color: #475569; }
.badge-purple { background: #ede9fe; color: #5b21b6; }

/* 复习模式：隐藏答案/解析（默认显示） */
body.review-hide .review-ans { display: none; }
body.review-hide .q-options label { border-color: var(--border) !important; background: #fff !important; }
body.review-hide .ans-tick { display: none; }

.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-info { color: var(--info); }
.text-muted { color: var(--text-muted); }

/* ---------- 分页 ---------- */
.pagination { display: flex; gap: 4px; margin-top: 16px; flex-wrap: wrap; }
.pg {
  min-width: 32px; text-align: center; padding: 5px 9px; border-radius: 6px;
  background: #fff; border: 1px solid var(--border); font-size: 13px; color: var(--text);
}
.pg.current { background: var(--primary); color: #fff; border-color: var(--primary); }
a.pg:hover { border-color: var(--primary); color: var(--primary); }

/* ---------- 题目展示（考试/练习/回顾共用） ---------- */
.q-item { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; box-shadow: var(--shadow); }
.q-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.q-no {
  width: 28px; height: 28px; border-radius: 50%; background: var(--primary); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px;
}
.q-type { font-size: 13px; color: var(--primary); background: #eff6ff; padding: 2px 10px; border-radius: 20px; font-weight: 600; }
.q-score { font-size: 13px; color: var(--text-muted); }
.q-content { font-size: 15px; margin-bottom: 12px; word-break: break-word; }
.q-options label {
  display: block; padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px;
  margin-bottom: 8px; cursor: pointer; transition: border-color .12s, background .12s;
}
.q-options label:hover { border-color: var(--primary); }
.q-options label:has(input:checked) { border-color: var(--primary); background: #eff6ff; }
.q-options input { margin-right: 8px; }
.q-options textarea { width: 100%; }
.q-tools { margin-top: 12px; display: flex; gap: 10px; align-items: center; }

/* 答题卡 */
.exam-layout { display: grid; grid-template-columns: 1fr 250px; gap: 16px; align-items: start; }
@media (max-width: 860px) { .exam-layout { grid-template-columns: 1fr; } }
.exam-topbar {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 12px 16px; margin-bottom: 16px; box-shadow: var(--shadow);
}
.exam-topbar .timer { font-size: 20px; font-weight: 700; color: var(--danger); font-variant-numeric: tabular-nums; }
.exam-side { position: sticky; top: 76px; }
/* 复习页：题号导航定位高亮 + 回到顶部悬浮按钮 */
.review-side { top: 76px; }
@media (max-width: 860px) { .review-side { display: none; } }
.q-item { scroll-margin-top: 84px; }
.q-item.jump-flash { animation: jumpFlash 1.2s ease; }
@keyframes jumpFlash {
  0%, 100% { box-shadow: var(--shadow); }
  30% { box-shadow: 0 0 0 4px rgba(249, 115, 22, .45); }
}
.btn-gotop {
  position: fixed; right: 22px; bottom: 24px; width: 46px; height: 46px;
  border-radius: 50%; border: none; cursor: pointer; z-index: 60;
  display: none; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%); color: #fff;
  box-shadow: 0 4px 12px rgba(234, 88, 12, .35);
  transition: transform .15s, box-shadow .15s;
}
.btn-gotop:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(234, 88, 12, .45); }
.btn-gotop.show { display: inline-flex; }
.answer-card {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 12px 0;
}
.acell {
  height: 38px; border: 1px solid var(--border); border-radius: 8px; background: #fff;
  cursor: pointer; font-size: 14px; font-weight: 600; color: var(--text);
  transition: all .1s;
}
.acell:hover { border-color: var(--primary); }
.acell.answered { background: var(--success); border-color: var(--success); color: #fff; }
.acell.marked { outline: 2px solid var(--warning); outline-offset: -1px; }
.acell.current { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.18); }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--text-muted); margin-top: 6px; flex-wrap: wrap; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }
.legend .lg-ans { background: var(--success); }
.legend .lg-mark { background: #fff; border: 2px solid var(--warning); }
.legend .lg-cur { background: #fff; border: 1px solid var(--primary); }

/* 练习反馈 */
.pq-feedback { margin-top: 14px; padding: 14px; border-radius: 8px; background: #f8fafc; border: 1px solid var(--border); }
.ans-box { margin-top: 8px; padding: 10px 12px; background: #fff; border-radius: 8px; border: 1px solid var(--border); font-size: 14px; }

/* ---------- 后台子导航 ---------- */
.admin-nav { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.admin-nav a {
  padding: 7px 14px; border-radius: 8px; background: #fff; border: 1px solid var(--border);
  color: var(--text); font-size: 14px;
}
.admin-nav a:hover { border-color: var(--primary); color: var(--primary); }
.admin-nav a.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ---------- 考试/列表卡片 ---------- */
.exam-card { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.exam-card .meta { color: var(--text-muted); font-size: 13px; margin-top: 4px; }
.empty { text-align: center; color: var(--text-muted); padding: 40px 0; }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; }
.mb-8 { margin-bottom: 8px; } .mb-16 { margin-bottom: 16px; }
.flex { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.right { float: right; }
.mono { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }

/* 导入预览 */
.import-help { background: #f8fafc; border: 1px solid var(--border); border-radius: 8px; padding: 14px; font-size: 13px; margin-bottom: 16px; }
.import-help code { background: #eef2f7; padding: 1px 6px; border-radius: 4px; }
.import-help pre { background: #0f172a; color: #e2e8f0; padding: 12px; border-radius: 8px; overflow-x: auto; font-size: 12.5px; line-height: 1.55; }

/* ============================================================
   移动端（手机 H5）适配
   ============================================================ */
body { -webkit-tap-highlight-color: transparent; }
.btn, .acell { touch-action: manipulation; }

@media (max-width: 640px) {
  .container { padding: 0 12px; }
  main.container { padding-top: 14px; }

  /* 顶部导航：品牌行紧凑，导航条横向滚动 */
  .header-top { height: 48px; }
  .brand-text { font-size: 17px; }
  .brand-logo { width: 30px; height: 30px; }
  .main-nav a { padding: 7px 11px; font-size: 13px; }
  .nav-ico { width: 14px; height: 14px; }

  /* 统计卡片 */
  .stat-card { padding: 13px; }
  .stat-card .num { font-size: 24px; }

  /* 考试卡片 */
  .exam-card { align-items: flex-start; }
  .exam-card .btn { width: 100%; text-align: center; }

  /* 考试答题页 */
  .exam-topbar { padding: 10px 12px; gap: 8px; }
  .exam-topbar .timer { font-size: 17px; }
  .exam-layout { gap: 12px; }
  .exam-side { position: static; }
  .answer-card { grid-template-columns: repeat(6, 1fr); gap: 7px; }
  .acell { height: 36px; font-size: 13px; }

  /* 题目 */
  .q-item { padding: 14px; }
  .q-content { font-size: 15px; }
  .q-options label { padding: 10px 11px; font-size: 14.5px; }

  /* 表单与按钮 */
  .form-row { flex-direction: column; gap: 0; }
  .btn-lg { width: 100%; }
  .grid-2 { grid-template-columns: 1fr; }

  /* 后台导航可横向滚动 */
  .admin-nav { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
  .admin-nav a { white-space: nowrap; }

  /* 表格 */
  .table th, .table td { padding: 8px 9px; font-size: 13px; }

  /* 登录/注册卡片 */
  .auth-wrap { margin: 20px auto !important; }

  .pagination { gap: 3px; }
  .pg { min-width: 30px; padding: 4px 8px; font-size: 12.5px; }
}

/* ============================================================
   参考「云点点题库」风格：首页落地页 / 导航图标 / 搜题 / 收藏
   ============================================================ */
.main-nav a { display: flex; align-items: center; gap: 5px; }
.nav-ico { width: 15px; height: 15px; flex: none; }
.user-nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.user-nav a { padding: 6px 12px; border-radius: 999px; color: var(--text); font-size: 13.5px; display: flex; align-items: center; gap: 4px; transition: background .15s, color .15s; }
.user-nav a:hover { background: #eff6ff; color: var(--primary); }
.nav-reg { background: var(--primary); color: #fff !important; padding: 6px 14px; }
.nav-reg:hover { background: #1d4ed8 !important; color: #fff !important; }

/* 首屏 */
/* 首页 Hero：浅色柔和渐变 + 左侧品牌文案 + 右侧学员权益卡（高度精简） */
.hero {
  background: linear-gradient(135deg, #eef2ff 0%, #f5f3ff 45%, #ecfeff 100%);
  border: 1px solid #e0e7ff; border-radius: 18px; margin-top: 18px;
  padding: 26px 18px;
}
.hero-inner { display: grid; grid-template-columns: 1.25fr 1fr; gap: 28px; align-items: center; }
.hero-title { font-size: 34px; margin: 0 0 12px; font-weight: 800; letter-spacing: 1px; line-height: 1.25; }
.hero-title span {
  display: block; font-size: 16px; font-weight: 600; letter-spacing: 3px; margin-top: 8px;
  background: linear-gradient(90deg, #2563eb, #7c3aed, #0891b2);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent;
}
.hero-sub { font-size: 14px; color: #475569; max-width: 560px; margin: 0; line-height: 1.8; }
.hero-actions { margin-top: 20px; display: flex; gap: 12px; flex-wrap: wrap; }
.hero-benefits { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hero-benefit {
  background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 12px;
  display: flex; gap: 10px; align-items: center; box-shadow: 0 2px 10px rgba(15,23,42,.05);
  transition: transform .15s, box-shadow .15s;
}
.hero-benefit:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(15,23,42,.09); }
.benefit-ico {
  flex: none; width: 40px; height: 40px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center; font-size: 19px;
}
.benefit-ico.b-blue  { background: #dbeafe; }
.benefit-ico.b-violet{ background: #ede9fe; }
.benefit-ico.b-cyan  { background: #cffafe; }
.benefit-ico.b-orange{ background: #ffedd5; }
.benefit-name { font-size: 14px; font-weight: 700; }
.benefit-desc { font-size: 12px; color: var(--text-muted); margin-top: 1px; line-height: 1.5; }
@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; gap: 20px; }
  .hero-title { font-size: 28px; }
}
.btn-light { background: #fff; color: #1d4ed8; font-weight: 600; }
.btn-light:hover { background: #eff6ff; }
.btn-ghost { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.65); }
.btn-ghost:hover { background: rgba(255,255,255,.14); }

/* 统计条 */
.stat-strip { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 20px 18px; margin-bottom: 18px; box-shadow: 0 4px 18px rgba(15,23,42,.05); }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat-cell { text-align: center; border-right: 1px dashed var(--border); }
.stat-cell:last-child { border-right: none; }
.stat-num { font-size: 30px; font-weight: 800; }
.stat-cell:nth-child(1) .stat-num { color: #2563eb; }
.stat-cell:nth-child(2) .stat-num { color: #7c3aed; }
.stat-cell:nth-child(3) .stat-num { color: #0891b2; }
.stat-cell:nth-child(4) .stat-num { color: #ea580c; }
.stat-lbl { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

/* 区块 */
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin: 26px 0 14px; gap: 10px; flex-wrap: wrap; }
.section-title { font-size: 22px; font-weight: 700; margin: 0; }
.sub-title { font-size: 16px; font-weight: 700; color: #334155; margin: 22px 0 10px; }
.section-head a { font-size: 13px; }

/* 分类 chips */
.chip-row { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { display: inline-block; padding: 8px 18px; border-radius: 24px; background: #fff; border: 1px solid var(--border); color: #334155; font-size: 14px; transition: all .15s; }
.chip:hover { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(15,23,42,.08); }
.chip:nth-child(5n+1) { border-color: #bfdbfe; color: #1d4ed8; background: #eff6ff; }
.chip:nth-child(5n+1):hover { background: #dbeafe; }
.chip:nth-child(5n+2) { border-color: #ddd6fe; color: #6d28d9; background: #f5f3ff; }
.chip:nth-child(5n+2):hover { background: #ede9fe; }
.chip:nth-child(5n+3) { border-color: #a5f3fc; color: #0e7490; background: #ecfeff; }
.chip:nth-child(5n+3):hover { background: #cffafe; }
.chip:nth-child(5n+4) { border-color: #fed7aa; color: #c2410c; background: #fff7ed; }
.chip:nth-child(5n+4):hover { background: #ffedd5; }
.chip:nth-child(5n+5) { border-color: #bbf7d0; color: #15803d; background: #f0fdf4; }
.chip:nth-child(5n+5):hover { background: #dcfce7; }

/* 试卷卡片网格 */
.exam-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(235px, 1fr)); gap: 14px; }
.exam-tile { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 6px; box-shadow: var(--shadow); transition: box-shadow .15s, transform .15s; min-height: 205px; }
.exam-tile:hover { box-shadow: 0 6px 18px rgba(37,99,235,.10); transform: translateY(-2px); }
.tile-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.tile-title { font-size: 15.5px; font-weight: 700; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tile-meta { font-size: 13px; color: var(--text-muted); line-height: 1.6; }
.tile-actions { display: flex; gap: 8px; margin-top: auto; padding-top: 8px; flex-wrap: wrap; }

/* 学员权益 */
.feat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.feat-card { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 20px 16px; text-align: center; }
.feat-icon { font-size: 30px; }
.feat-name { font-size: 15px; font-weight: 700; margin: 8px 0 4px; }
.feat-desc { font-size: 12.5px; color: var(--text-muted); }

/* 搜题 */
.search-bar form { gap: 12px; }
.q-row { display: flex; justify-content: space-between; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.q-row:last-child { border-bottom: none; }
.q-main { flex: 1; min-width: 0; }
.q-text { margin-top: 8px; font-size: 14.5px; line-height: 1.7; word-break: break-word; }
.q-text mark { background: #fde68a; border-radius: 3px; padding: 0 2px; }
.q-actions { display: flex; flex-direction: column; gap: 8px; align-items: stretch; flex: none; }
.fav-btn { display: inline-flex; align-items: center; justify-content: center; gap: 5px; padding: 7px 14px; border: 1px solid var(--border); border-radius: 8px; background: #fff; color: #64748b; font-size: 13px; cursor: pointer; }
.fav-btn .fav-star { color: #cbd5e1; font-size: 14px; }
.fav-btn:hover { border-color: var(--warning); color: var(--warning); }
.fav-btn.active { background: #fffbeb; border-color: var(--warning); color: #b45309; }
.fav-btn.active .fav-star { color: var(--warning); }

/* 验证码 */
.captcha-row { display: flex; gap: 10px; align-items: center; }
.captcha-row .form-control { flex: 1; }
.captcha-q { flex: none; background: #eef2ff; color: #1d4ed8; font-weight: 700; border: 1px dashed #c7d2fe; border-radius: 8px; padding: 9px 14px; font-size: 15px; min-width: 84px; text-align: center; }
.admin-logo { width: 52px; height: 52px; margin: 0 auto 12px; background: #eff6ff; color: var(--primary); border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.admin-logo svg { width: 30px; height: 30px; }

/* 移动端适配（参考首页） */
@media (max-width: 900px) {
  .exam-grid { grid-template-columns: repeat(2, 1fr); }
  .feat-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .hero { padding: 44px 0 60px; }
  .hero-title { font-size: 30px; }
  .hero-title span { font-size: 14px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .stat-num { font-size: 24px; }
  .exam-grid, .feat-grid { grid-template-columns: 1fr; }
  .q-row { flex-direction: column; }
  .q-actions { flex-direction: row; }
  .q-actions .btn, .q-actions .fav-btn { flex: 1; }
  .captcha-row { flex-direction: column; align-items: stretch; }
}

/* ============================================================
   资料下载模块
   ============================================================ */
.mat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(235px, 1fr)); gap: 16px; }
.mat-card {
  background: #fff; border: 1px solid var(--border); border-radius: 12px;
  padding: 15px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px;
  transition: transform .15s, box-shadow .15s;
}
.mat-card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(15, 23, 42, .1); }
.mat-head { display: flex; align-items: flex-start; gap: 10px; min-width: 0; }
.mat-ext {
  flex: none; width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 11px; letter-spacing: .5px; margin-top: 1px;
}
.mat-ext.ext-blue   { background: #3b82f6; }
.mat-ext.ext-red    { background: #ef4444; }
.mat-ext.ext-green  { background: #16a34a; }
.mat-ext.ext-orange { background: #f97316; }
.mat-ext.ext-purple { background: #8b5cf6; }
.mat-ext.ext-pink   { background: #ec4899; }
.mat-ext.ext-teal   { background: #14b8a6; }
.mat-ext.ext-gray   { background: #64748b; }
.mat-title {
  font-weight: 600; font-size: 14.5px; line-height: 1.4; min-width: 0; margin-top: 2px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.mat-desc { font-size: 13px; color: var(--text-muted); line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 40px; }
.mat-meta {
  display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--text-muted);
  border-top: 1px dashed var(--border); padding-top: 9px;
}
.mat-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; }
.stars { display: inline-flex; align-items: center; gap: 2px; color: #f59e0b; font-size: 14px; line-height: 1; }
.stars i { font-style: normal; color: #e2e8f0; }
.stars i.star-on { color: #f59e0b; }
.stars b { margin-left: 5px; font-size: 12.5px; color: var(--text); font-weight: 600; }
.star-pick { display: flex; align-items: center; gap: 2px; }
.star-opt { cursor: pointer; font-size: 26px; line-height: 1; color: #e2e8f0; transition: color .1s, transform .1s; }
.star-opt:hover { transform: scale(1.08); }
.star-opt.on { color: #f59e0b; }
.star-opt input { position: absolute; opacity: 0; pointer-events: none; }
.review-item { border-top: 1px solid var(--border); padding: 12px 0; }
.review-item:first-of-type { border-top: none; }

/* 积分体系 */
.points-badge {
  display: inline-flex; align-items: center; gap: 4px;
  background: #fffbeb; color: #b45309; border: 1px solid #fde68a;
  border-radius: 999px; padding: 4px 10px; font-size: 12.5px; font-weight: 700;
}
.points-badge svg { width: 13px; height: 13px; }
.mat-meta .mat-price { color: #b45309; font-weight: 700; }
/* 考试卡片（考试中心/首页试卷中心） */
.exam-card2 { display: flex; flex-direction: column; }
.exam-card2 .mat-ext.ext-exam {
  background: linear-gradient(135deg, #2563eb, #7c3aed); color: #fff; font-weight: 800;
}
.exam-card2 .mat-desc { flex: 1; line-height: 1.7; }
.exam-card2 .mat-meta { line-height: 1.8; }
.exam-card2 .mat-foot { margin-top: auto; }

/* 资料分类标签 */
.cat-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.cat-tab {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 999px; font-size: 13.5px; font-weight: 600;
  background: #fff; border: 1px solid var(--border); color: var(--text);
  transition: all .15s;
}
.cat-tab:hover { border-color: var(--primary); color: var(--primary); }
.cat-tab.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.cat-tab span {
  background: rgba(0,0,0,.08); border-radius: 999px; padding: 1px 7px; font-size: 11.5px; font-weight: 700;
}
.cat-tab.active span { background: rgba(255,255,255,.25); }
.mat-cat {
  display: inline-block; background: #f1f5f9; color: #475569; font-size: 11.5px; font-weight: 600;
  border-radius: 4px; padding: 1px 7px;
}

/* 资料下载两栏布局：左分类树 / 右列表 */
.mat-layout { display: grid; grid-template-columns: 200px minmax(0,1fr); gap: 16px; align-items: start; }

/* 首页栏目卡（试卷中心 / 资料下载 统一容器） */
.home-mod {
  background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 18px;
  box-shadow: var(--shadow); margin-bottom: 18px;
}
.home-mod-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin-bottom: 14px;
}
.home-mod-title { display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 800; color: var(--text); }
.mod-ico {
  width: 30px; height: 30px; border-radius: 9px; display: flex; align-items: center; justify-content: center;
  font-size: 15px; flex: none;
}
.mod-ico-exam { background: #eff6ff; }
.mod-ico-mat { background: #fff7ed; }
.home-mod .mat-card { min-height: 205px; }
.mat-side { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 14px; }
.side-title { font-weight: 700; font-size: 14px; margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.cat-node { display: block; padding: 7px 10px; border-radius: 8px; font-size: 13.5px; color: var(--text); text-decoration: none; transition: background .15s; }
.cat-node:hover { background: #f1f5f9; }
.cat-node.active { background: var(--primary); color: #fff; }
.cat-top { display: flex; justify-content: space-between; align-items: center; margin-top: 4px; font-weight: 600; }
.cat-top a { flex: 1; color: inherit; text-decoration: none; }
.cat-subs { margin-left: 10px; border-left: 2px solid #e2e8f0; padding-left: 6px; margin-bottom: 4px; }
.cat-sub { padding: 5px 10px; font-weight: 400; font-size: 13px; }
.cat-toggle { color: #94a3b8; font-size: 12px; }
.cat-top.active .cat-toggle { color: #fff; }
.mat-crumb a { color: var(--text); text-decoration: none; }
.mat-crumb a:hover { color: var(--primary); }
@media (max-width: 640px) {
  .mat-layout { grid-template-columns: 1fr; }
}

/* ===== 首页：分类标签 + 快捷入口（参考希赛网） ===== */
.mod-cat-sub { margin-top: 16px; font-size: 15px; }
.cat-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.chip { padding: 7px 16px; border-radius: 999px; border: 1px solid var(--border); background: #f8fafc; color: #334155; font-size: 13px; text-decoration: none; transition: all .15s; white-space: nowrap; }
.chip:hover { border-color: var(--primary); color: var(--primary); background: #eff6ff; }
.entry-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.entry-card { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; box-shadow: var(--shadow); text-decoration: none; transition: transform .15s, box-shadow .15s, border-color .15s; }
.entry-card:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(37,99,235,.10); border-color: #c7d2fe; }
.entry-ico { flex: none; width: 40px; height: 40px; border-radius: 11px; display: flex; align-items: center; justify-content: center; font-size: 19px; }
.e-blue { background: #eff6ff; } .e-violet { background: #f5f3ff; } .e-cyan { background: #ecfeff; }
.e-orange { background: #fff7ed; } .e-pink { background: #fdf2f8; } .e-green { background: #f0fdf4; }
.e-teal { background: #f0fdfa; } .e-purple { background: #faf5ff; }
.entry-name { font-size: 14.5px; font-weight: 700; color: var(--text); }
.entry-desc { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
@media (max-width: 900px) { .entry-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .entry-grid { grid-template-columns: 1fr; } }

/* ===== 资料封面截图 ===== */
.mat-shot { height: 112px; border-radius: 10px; overflow: hidden; margin-bottom: 10px; background: linear-gradient(135deg, #f1f5f9, #eef2ff); display: flex; align-items: center; justify-content: center; }
.mat-shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mat-shot-ph { font-size: 12.5px; color: #94a3b8; }
.mat-detail-shot { max-width: 100%; max-height: 420px; border-radius: 12px; border: 1px solid var(--border); box-shadow: var(--shadow); }
