/* 学生刷题网站 - 全站基础样式（移动端优先） */
* { box-sizing: border-box; }
:root {
  --bg:#f5f6f8; --card:#fff; --text:#1f2329; --muted:#8a9099;
  --line:#e5e7eb; --primary:#2563eb; --primary-d:#1d4ed8;
  --green:#16a34a; --red:#dc2626; --amber:#d97706; --radius:10px;
}
body { margin:0; 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; }
a { color:var(--primary); text-decoration:none; }
.topbar { background:var(--card); border-bottom:1px solid var(--line); position:sticky; top:0; z-index:10; }
.topbar-inner { max-width:1080px; margin:0 auto; padding:10px 16px; display:flex; align-items:center; gap:14px; flex-wrap:wrap; }
.brand { font-weight:700; font-size:18px; color:var(--text); margin-right:auto; }
.nav { display:flex; gap:12px; flex-wrap:wrap; }
.nav a { color:var(--muted); font-size:14px; }
.nav a.active { color:var(--primary); font-weight:600; }
.user-chip { font-size:13px; color:var(--muted); display:flex; align-items:center; gap:8px; }
.container { max-width:1080px; margin:0 auto; padding:20px 16px 60px; }
.container.narrow { max-width:520px; }
.grid { display:grid; gap:14px; }
.grid-2 { grid-template-columns:repeat(2,1fr); }
.grid-3 { grid-template-columns:repeat(3,1fr); }
.grid-4 { grid-template-columns:repeat(2,1fr); }
@media(min-width:720px){ .grid-4 { grid-template-columns:repeat(4,1fr); } }
.card { background:var(--card); border:1px solid var(--line); border-radius:var(--radius); padding:18px; margin-bottom:14px; }
.card h2 { margin:0 0 12px; font-size:17px; }
.card h3 { margin:16px 0 8px; font-size:15px; }
.stat { text-align:center; }
.stat .value { font-size:24px; font-weight:700; color:var(--primary); }
.stat .label { font-size:12px; color:var(--muted); margin-top:4px; }
.btn { display:inline-flex; align-items:center; justify-content:center; gap:6px; border:none; border-radius:8px;
  background:var(--primary); color:#fff; padding:10px 18px; font-size:14px; cursor:pointer; }
.btn:hover { background:var(--primary-d); }
.btn:disabled { opacity:.55; cursor:not-allowed; }
.btn-secondary { background:#eef0f3; color:var(--text); }
.btn-secondary:hover { background:#e2e5ea; }
.btn-danger { background:var(--red); }
.btn-sm { padding:6px 12px; font-size:13px; }
.btn-block { width:100%; }
.field { margin-bottom:14px; }
.field label { display:block; font-size:13px; color:var(--muted); margin-bottom:6px; }
.field input[type=text],.field input[type=password],.field input[type=number],.field input[type=date],
.field select,.field textarea { width:100%; padding:10px 12px; border:1px solid var(--line); border-radius:8px;
  font-size:14px; font-family:inherit; background:#fff; color:var(--text); }
.field textarea { min-height:96px; resize:vertical; }
.field .hint { font-size:12px; color:var(--muted); margin-top:4px; }
.checkbox-row { display:flex; flex-wrap:wrap; gap:10px 18px; }
.checkbox-row label { display:flex; align-items:center; gap:6px; font-size:14px; color:var(--text); }
.alert { padding:10px 14px; border-radius:8px; margin-bottom:14px; font-size:14px; }
.alert-error { background:#fef2f2; color:var(--red); border:1px solid #fecaca; }
.alert-success { background:#f0fdf4; color:var(--green); border:1px solid #bbf7d0; }
.alert-warn { background:#fffbeb; color:var(--amber); border:1px solid #fde68a; }
.hidden { display:none !important; }
.muted { color:var(--muted); }
.small { font-size:12px; }
.center { text-align:center; }
.mt { margin-top:14px; } .mb { margin-bottom:14px; }
.tag { display:inline-block; padding:2px 8px; border-radius:999px; font-size:12px; background:#eef0f3; color:var(--muted); margin:2px; }
.tag-green { background:#dcfce7; color:var(--green); }
.tag-red { background:#fee2e2; color:var(--red); }
.tag-yellow { background:#fef3c7; color:var(--amber); }
.tag-blue { background:#dbeafe; color:var(--primary); }
table { width:100%; border-collapse:collapse; font-size:14px; }
th,td { text-align:left; padding:10px 8px; border-bottom:1px solid var(--line); vertical-align:top; }
th { color:var(--muted); font-weight:600; font-size:13px; }
.tabs { display:flex; gap:6px; flex-wrap:wrap; margin-bottom:16px; border-bottom:1px solid var(--line); }
.tab { padding:8px 14px; cursor:pointer; font-size:14px; color:var(--muted); border-bottom:2px solid transparent; }
.tab.active { color:var(--primary); border-bottom-color:var(--primary); font-weight:600; }
.qimg { display:block; max-width:100%; height:auto; border-radius:8px; margin:8px 0; border:1px solid var(--line); }
.timer-bar { display:flex; justify-content:space-between; align-items:center; background:#fff;
  border:1px solid var(--line); border-radius:8px; padding:10px 14px; margin-bottom:14px; }
.timer-num { font-variant-numeric:tabular-nums; font-weight:700; font-size:18px; }
.timer-num.danger { color:var(--red); }
.timer-num.warn { color:var(--amber); }
.answer-box { background:#fffbeb; border:1px solid #fde68a; border-radius:8px; padding:14px; margin-top:12px; }
.locked-box { text-align:center; padding:28px 14px; background:#f9fafb; border:1px dashed var(--line);
  border-radius:8px; color:var(--muted); }
.pager { display:flex; justify-content:center; gap:10px; margin-top:16px; }
.form-row { display:flex; gap:10px; flex-wrap:wrap; align-items:end; }
.form-row .field { flex:1; min-width:140px; margin-bottom:10px; }
img.avatar { width:32px; height:32px; border-radius:50%; vertical-align:middle; }
