/* 背题酱 Web 版 —— 与小程序 app.wxss 同一套科技蓝设计令牌 */
:root {
  --brand: #1b6bff;
  --brand2: #0b4fd9;
  --brand-soft: #e8f0ff;
  --brand-line: #c3d9ff;
  --navy: #0a2a6b;
  --cyan: #12b8ff;
  --bg: #f1f5fb;
  --card: #ffffff;
  --ink: #16233b;
  --sub: #64748b;
  --line: #e2e9f5;
  --purple: #7c5cff;
  --ok: #00a870;
  --okbg: #e6f7f0;
  --okline: #a9e5c9;
  --bad: #f5455c;
  --badbg: #fdeef0;
  --badline: #fac0c8;
  --warn: #f59e0b;
  --warnbg: #fff5e6;
  --shadow: 0 6px 24px rgba(26, 58, 120, .08);
  --radius: 16px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; min-height: 100%; }
body {
  background:
    radial-gradient(900px 420px at 10% -10%, #dfeaff 0%, transparent 60%),
    radial-gradient(700px 380px at 100% 0%, #e6f7ff 0%, transparent 55%),
    var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; }
button { cursor: pointer; }
a { color: var(--brand); text-decoration: none; }

.boot { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; }
.boot-logo {
  width: 72px; height: 72px; border-radius: 20px;
  background: linear-gradient(135deg, var(--brand), var(--cyan));
  color: #fff; font-size: 34px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 12px 30px rgba(27, 107, 255, .3);
}
.boot-text { color: var(--sub); font-size: 14px; }

.shell { max-width: 960px; margin: 0 auto; padding: 20px 18px 90px; }
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; margin-bottom: 18px;
  background: linear-gradient(135deg, var(--navy), var(--brand2));
  color: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 11px; background: rgba(255,255,255,.16);
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 20px;
}
.brand-name { font-weight: 700; font-size: 18px; letter-spacing: .5px; }
.brand-sub { font-size: 12px; opacity: .75; margin-top: -2px; }
.user-chip { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.2); display: flex; align-items: center; justify-content: center; font-weight: 700; }
.role-tag { font-size: 11px; padding: 2px 8px; border-radius: 999px; background: rgba(255,255,255,.18); }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow); margin-bottom: 16px;
}
.card-title { font-weight: 700; font-size: 17px; margin: 0 0 14px; display: flex; align-items: center; gap: 8px; }
.card-title::before { content: ''; width: 4px; height: 18px; border-radius: 3px; background: linear-gradient(var(--brand), var(--cyan)); }
.muted { color: var(--sub); font-size: 13px; }
.center { text-align: center; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.grow { flex: 1; }

.btn {
  border: 1px solid var(--brand-line); background: var(--brand-soft); color: var(--brand2);
  padding: 10px 18px; border-radius: 10px; font-weight: 600; transition: .15s;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(27,107,255,.16); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-primary { background: linear-gradient(135deg, var(--brand), var(--brand2)); border-color: transparent; color: #fff; }
.btn-ghost { background: #fff; border-color: var(--line); color: var(--ink); }
.btn-danger { background: var(--badbg); border-color: var(--badline); color: var(--bad); }
.btn-sm { padding: 6px 12px; font-size: 13px; border-radius: 8px; }
.btn-lg { padding: 13px 26px; font-size: 16px; border-radius: 12px; }

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; color: var(--sub); margin-bottom: 6px; font-weight: 600; }
.field input, .field select, .field textarea {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px;
  background: #fff; color: var(--ink); outline: none; transition: .15s;
}
.field input:focus, .field select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(27,107,255,.1); }

.hero { text-align: center; padding: 46px 20px 24px; }
.hero-logo {
  width: 84px; height: 84px; margin: 0 auto 20px; border-radius: 24px;
  background: linear-gradient(135deg, var(--brand), var(--cyan));
  color: #fff; font-size: 40px; font-weight: 800; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 16px 36px rgba(27,107,255,.28);
}
.hero h1 { font-size: 28px; margin: 0 0 8px; letter-spacing: 1px; }
.hero p { color: var(--sub); margin: 0 0 28px; }
.login-card { max-width: 420px; margin: 0 auto; }
.wechat-btn {
  width: 100%; padding: 14px; border: none; border-radius: 12px; color: #fff;
  background: linear-gradient(135deg, #07c160, #06ad56); font-size: 16px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; gap: 10px;
}
.wechat-btn:hover { filter: brightness(1.05); }
.divider { display: flex; align-items: center; gap: 12px; color: var(--sub); font-size: 12px; margin: 20px 0; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.tile {
  background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px;
  text-align: left; transition: .15s; box-shadow: 0 2px 10px rgba(26,58,120,.04);
}
.tile:hover { transform: translateY(-2px); border-color: var(--brand-line); box-shadow: var(--shadow); }
.tile-icon { width: 40px; height: 40px; border-radius: 11px; background: var(--brand-soft); color: var(--brand); display: flex; align-items: center; justify-content: center; font-size: 20px; margin-bottom: 12px; }
.tile-title { font-weight: 700; font-size: 15px; }
.tile-desc { color: var(--sub); font-size: 12px; margin-top: 4px; }
.tile-purple .tile-icon { background: #f0ecff; color: var(--purple); }
.tile-ok .tile-icon { background: var(--okbg); color: var(--ok); }
.tile-warn .tile-icon { background: var(--warnbg); color: var(--warn); }
.tile-bad .tile-icon { background: var(--badbg); color: var(--bad); }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; }
.stat { background: linear-gradient(135deg, var(--brand-soft), #fff); border: 1px solid var(--brand-line); border-radius: 12px; padding: 14px; text-align: center; }
.stat-num { font-size: 24px; font-weight: 800; color: var(--brand2); font-variant-numeric: tabular-nums; }
.stat-label { font-size: 12px; color: var(--sub); margin-top: 2px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.chip { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--sub); font-size: 13px; }
.chip.active { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }

.q-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.q-index { font-weight: 700; color: var(--brand2); font-variant-numeric: tabular-nums; }
.q-type { font-size: 12px; color: var(--sub); background: var(--bg); padding: 3px 10px; border-radius: 999px; }
.stem { font-size: 17px; font-weight: 600; line-height: 1.8; margin: 8px 0 20px; white-space: pre-wrap; }
.options { display: flex; flex-direction: column; gap: 10px; }
.option {
  display: flex; gap: 12px; align-items: flex-start; padding: 14px;
  border: 1px solid var(--line); border-radius: 12px; background: #fff; transition: .15s; text-align: left;
}
.option:hover { border-color: var(--brand-line); background: #fafdff; }
.option.selected { border-color: var(--brand); background: var(--brand-soft); }
.option-key { flex: 0 0 28px; height: 28px; border-radius: 8px; background: var(--bg); color: var(--sub); display: flex; align-items: center; justify-content: center; font-weight: 700; }
.option.selected .option-key { background: var(--brand); color: #fff; }
.option.right { border-color: var(--okline); background: var(--okbg); }
.option.right .option-key { background: var(--ok); color: #fff; }
.option.wrong { border-color: var(--badline); background: var(--badbg); }
.option.wrong .option-key { background: var(--bad); color: #fff; }

.explain { margin-top: 18px; padding: 16px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); font-size: 14px; }
.explain b { color: var(--brand2); }
.answer-line { font-weight: 700; margin-bottom: 8px; }
.answer-right { color: var(--ok); }
.answer-wrong { color: var(--bad); }

.timer { font-variant-numeric: tabular-nums; font-weight: 800; color: var(--brand2); }
.timer.danger { color: var(--bad); }
.nav-grid { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.nav-num { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line); background: #fff; color: var(--sub); font-size: 12px; }
.nav-num.answered { background: var(--brand-soft); border-color: var(--brand-line); color: var(--brand2); }
.nav-num.current { background: var(--brand); border-color: var(--brand); color: #fff; }

.list-row { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.list-row:last-child { border-bottom: none; }
.list-main { flex: 1; min-width: 0; }
.list-title { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-meta { color: var(--sub); font-size: 12px; margin-top: 3px; }
.badge { font-size: 11px; padding: 2px 9px; border-radius: 999px; background: var(--brand-soft); color: var(--brand2); white-space: nowrap; }
.badge-ok { background: var(--okbg); color: var(--ok); }
.badge-bad { background: var(--badbg); color: var(--bad); }

.empty { text-align: center; padding: 48px 16px; color: var(--sub); }
.empty-icon { font-size: 38px; opacity: .4; margin-bottom: 10px; }

.toast {
  position: fixed; left: 50%; top: 24px; transform: translateX(-50%);
  background: rgba(22,35,59,.92); color: #fff; padding: 10px 18px; border-radius: 10px;
  font-size: 14px; z-index: 999; box-shadow: 0 8px 24px rgba(0,0,0,.2); max-width: 90vw;
}

.bottom-nav {
  position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%);
  display: flex; gap: 4px; padding: 6px; border-radius: 16px;
  background: rgba(255,255,255,.94); border: 1px solid var(--line);
  box-shadow: 0 10px 30px rgba(26,58,120,.16); z-index: 50; backdrop-filter: blur(10px);
}
.bottom-nav button { border: none; background: transparent; color: var(--sub); padding: 8px 16px; border-radius: 11px; font-size: 13px; }
.bottom-nav button.active { background: var(--brand-soft); color: var(--brand); font-weight: 700; }

.group-title { font-size: 13px; font-weight: 700; color: var(--sub); margin: 14px 0 8px; }
.paper-list { display: grid; gap: 10px; }
.paper-item { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: #fff; }
.paper-name { font-size: 15px; font-weight: 700; color: var(--ink); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.paper-meta { font-size: 12px; color: var(--sub); margin-top: 4px; }
.tag { font-size: 11px; font-weight: 700; color: var(--brand); background: var(--brand-soft); border-radius: 6px; padding: 2px 6px; }
.tag-warn { color: #b26a00; background: #fff3d6; }
.btn-sm { padding: 8px 12px; font-size: 13px; }

.qr-box {
  display: inline-block; background: #fff; padding: 12px; border-radius: 16px;
  box-shadow: 0 8px 28px rgba(26,58,120,.14); border: 1px solid var(--line);
}
.qr-img { display: block; width: 224px; height: 224px; object-fit: contain; }

@media (max-width: 640px) {
  .shell { padding: 14px 12px 88px; }
  .topbar { padding: 12px 14px; }
  .card { padding: 16px; }
  .stem { font-size: 16px; }
  .bottom-nav button { padding: 8px 12px; }
}
