/* ============================================================
   课堂观点大屏 · 视觉系统 v3
   基调：官方产品 / 专业仪表盘 —— 深色、克制、信息优先
   · 单一品牌强调色；细边框；无霓虹光晕
   · 数字用等宽字形（tabular），远距离可读
   ============================================================ */
:root {
  --bg: #0a0d14;
  --bg-2: #0e1320;
  --surface: #121826;
  --surface-2: #161d2e;
  --line: rgba(255, 255, 255, .07);
  --line-2: rgba(255, 255, 255, .12);
  --ink: #f2f5fa;
  --ink-2: #98a4b8;
  --ink-3: #64708a;
  --brand: #2f6bff;
  --brand-2: #1f56e6;
  --brand-soft: rgba(47, 107, 255, .14);
  --ok: #22c55e;
  --warn: #f0b429;
  --danger: #ef4444;
  --radius: 14px;
  --radius-lg: 18px;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, .35);
  --shadow-md: 0 18px 48px rgba(0, 0, 0, .5);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Noto Sans CJK SC", "Microsoft YaHei", system-ui, sans-serif;
  font-synthesis: none;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  color: var(--ink);
  font: 15px/1.6 var(--font);
  background-color: var(--bg);
  background-image:
    radial-gradient(1200px 680px at 50% -22%, rgba(47, 107, 255, .17), transparent 68%),
    linear-gradient(180deg, #0a0d14 0%, #0b1019 55%, #080b12 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  letter-spacing: .002em;
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .022) 1px, transparent 1px);
  background-size: 64px 64px, 64px 64px;
  mask-image: radial-gradient(circle at 50% 0%, #000 0%, transparent 74%);
  -webkit-mask-image: radial-gradient(circle at 50% 0%, #000 0%, transparent 74%);
}
body > * { position: relative; z-index: 1; }
a { color: #7fa6ff; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }

/* ---------- 基础元素 ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.muted { color: var(--ink-2); }
.small { font-size: 12.5px; }
.mono { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }
.label {
  font-size: 11.5px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 600;
}
.tag {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .16rem .55rem; border-radius: 6px; font-size: 12px;
  background: rgba(255, 255, 255, .05); border: 1px solid var(--line);
  color: var(--ink-2);
}
.hidden { display: none !important; }

/* 品牌标识 */
.brand { display: inline-flex; align-items: center; gap: .55rem; }
.brand .mark {
  width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center;
  background: linear-gradient(150deg, #2f6bff, #1f56e6); color: #fff;
  font-size: 11px; font-weight: 800; letter-spacing: .02em;
}
.brand .name { font-size: 13px; font-weight: 600; letter-spacing: .06em; color: var(--ink-2); }

/* ---------- 按钮 ---------- */
.btn {
  --bg-btn: rgba(255, 255, 255, .05);
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  padding: .58rem 1rem; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--line-2); background: var(--bg-btn); color: var(--ink);
  font-size: 14px; font-weight: 500; white-space: nowrap;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.btn:hover { background: rgba(255, 255, 255, .09); border-color: rgba(255, 255, 255, .2); }
.btn:active { background: rgba(255, 255, 255, .12); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.btn.primary:hover { background: var(--brand-2); border-color: var(--brand-2); }
.btn.green { background: rgba(34, 197, 94, .14); border-color: rgba(34, 197, 94, .38); color: #86efac; font-weight: 600; }
.btn.green:hover { background: rgba(34, 197, 94, .22); }
.btn.gold { background: rgba(240, 180, 41, .12); border-color: rgba(240, 180, 41, .4); color: #f7d488; font-weight: 600; }
.btn.ghost { background: transparent; }
.btn.sm { padding: .4rem .7rem; font-size: 13px; border-radius: 7px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

/* ---------- 表单 ---------- */
.field { display: flex; flex-direction: column; gap: .4rem; margin-bottom: .95rem; }
.field label { font-size: 12.5px; color: var(--ink-2); letter-spacing: .02em; }
.input, .textarea {
  width: 100%; padding: .72rem .9rem; border-radius: 9px;
  border: 1px solid var(--line-2); background: #0d1220; color: var(--ink);
  outline: none; transition: border-color .15s ease, box-shadow .15s ease;
}
.input::placeholder, .textarea::placeholder { color: var(--ink-3); }
.input:focus, .textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.textarea { min-height: 128px; resize: vertical; line-height: 1.7; }

/* ---------- 退出 ---------- */
.exit {
  position: fixed; top: 16px; right: 18px; z-index: 80;
  display: inline-flex; align-items: center; gap: .38rem;
  padding: .4rem .8rem; border-radius: 7px; font-size: 13px;
  background: rgba(18, 24, 38, .86); border: 1px solid var(--line-2); color: var(--ink-2);
  transition: color .15s, border-color .15s, background .15s;
  backdrop-filter: blur(10px);
}
.exit:hover { color: var(--ink); border-color: rgba(255, 255, 255, .24); }
.exit svg { width: 13px; height: 13px; }

/* ---------- Toast ---------- */
.qa-toast {
  position: fixed; left: 50%; bottom: 3.2rem; transform: translate(-50%, 10px);
  padding: .62rem 1rem; border-radius: 8px; z-index: 9999;
  background: #161d2e; border: 1px solid var(--line-2); box-shadow: var(--shadow-md);
  font-size: 13.5px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
}
.qa-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 学生端（浅色 · 官方文档风） ---------- */
body.student {
  background: #f4f6fa;
  background-image: radial-gradient(900px 460px at 50% -18%, rgba(47, 107, 255, .08), transparent 70%);
  color: #101a2e;
}
body.student::before { display: none; }
body.student .card { background: #fff; border-color: #e4e9f2; box-shadow: 0 10px 30px rgba(16, 26, 46, .06); }
body.student .muted { color: #5b6b85; }
body.student .label { color: #8b98ad; }
body.student .tag { background: #f1f5fb; border-color: #e2e8f2; color: #3c4a63; }
body.student .input, body.student .textarea { background: #f8fafd; border-color: #dfe6f1; color: #101a2e; }
body.student .input:focus, body.student .textarea:focus { background: #fff; border-color: var(--brand); }
body.student .btn { background: #f1f5fb; border-color: #dfe6f1; color: #1b2942; }
body.student .btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
body.student .btn.green { background: #e9f9f0; border-color: #bfe8cf; color: #10693d; }
body.student .exit { background: #fff; border-color: #e2e8f2; color: #5b6b85; }
body.student a { color: #1f56e6; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
