/* ============================================================
   创想童年课后作业平台 · 视觉系统
   设计语言：课程学习 / 信息学竞赛 / OJ 工作台
   ============================================================ */

:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #f8f9fd;
  --surface-3: #eef1f8;
  --border: #e3e7f0;
  --border-strong: #cfd6e6;
  --text: #1b2337;
  --text-2: #46516b;
  --muted: #7b869e;
  --primary: #4f46e5;
  --primary-2: #6d5efc;
  --primary-soft: #eef0ff;
  --accent: #0ea5e9;
  --accent-soft: #e6f6fe;
  --success: #15a46e;
  --success-soft: #e5f7ef;
  --danger: #e0484d;
  --danger-soft: #fdecec;
  --warn: #e8930c;
  --warn-soft: #fff4e0;
  --purple: #8b5cf6;
  --purple-soft: #f2ecff;
  --code-bg: #141b30;
  --code-bg-2: #1b2440;
  --code-text: #dbe4ff;
  --code-line: #2b3757;
  --shadow-sm: 0 1px 2px rgba(20, 30, 60, .05), 0 2px 8px rgba(20, 30, 60, .04);
  --shadow: 0 4px 20px rgba(24, 34, 72, .08);
  --shadow-lg: 0 18px 50px rgba(18, 26, 58, .16);
  --radius: 12px;
  --radius-sm: 8px;
  --mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
}

body[data-theme="dark"] {
  --bg: #0e1322;
  --surface: #171e33;
  --surface-2: #1c2440;
  --surface-3: #232d4c;
  --border: #2a3554;
  --border-strong: #3b4870;
  --text: #e8edfb;
  --text-2: #b9c4df;
  --muted: #8592b4;
  --primary: #8b83ff;
  --primary-2: #a29bff;
  --primary-soft: #262a55;
  --accent: #38bdf8;
  --accent-soft: #16334a;
  --success: #3ddc9a;
  --success-soft: #123a30;
  --danger: #ff6b70;
  --danger-soft: #3d1d25;
  --warn: #f5b544;
  --warn-soft: #3a2c12;
  --purple: #b69aff;
  --purple-soft: #2c2350;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .2);
  --shadow: 0 6px 24px rgba(0, 0, 0, .28);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, .45);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15.5px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }
button { cursor: pointer; }
::selection { background: var(--primary-soft); color: var(--primary); }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 8px; }

.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.small { font-size: 13.5px; }
.tiny { font-size: 12.5px; }
.b { font-weight: 700; }
.nowrap { white-space: nowrap; }
.row { display: flex; align-items: center; gap: 10px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tac { text-align: center; }
.tar { text-align: right; }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; }
.mb8 { margin-bottom: 8px; } .mb12 { margin-bottom: 12px; } .mb16 { margin-bottom: 16px; } .mb24 { margin-bottom: 24px; }
.hidden { display: none !important; }

/* ---------- 启动 / 加载 ---------- */
.boot {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); color: var(--primary); font-size: 16.5px; gap: 8px; background: var(--bg);
}
.boot-caret { color: var(--success); }
.boot-dots { animation: blink 1.2s steps(4) infinite; }
@keyframes blink { 0%,100% { opacity: .2 } 50% { opacity: 1 } }
.spinner { width: 18px; height: 18px; border: 2px solid var(--border-strong); border-top-color: var(--primary); border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg) } }

/* ---------- 登录页 ---------- */
.login-shell { min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr; }
.login-brand {
  position: relative; overflow: hidden; color: #fff;
  background: radial-gradient(1100px 600px at 15% 10%, #2b3a78 0%, transparent 60%),
              radial-gradient(900px 700px at 90% 90%, #203f70 0%, transparent 55%),
              linear-gradient(155deg, #101830 0%, #172345 55%, #0e1730 100%);
  padding: 54px 60px; display: flex; flex-direction: column; justify-content: space-between;
}
.login-brand::before {
  content: ""; position: absolute; inset: 0; opacity: .35;
  background-image: linear-gradient(rgba(120,150,255,.09) 1px, transparent 1px), linear-gradient(90deg, rgba(120,150,255,.09) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(160deg, #000 10%, transparent 85%);
}
.login-brand > * { position: relative; z-index: 1; }
.brand-logo { display: flex; align-items: center; gap: 14px; }
.brand-mark {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  font-family: var(--mono); font-weight: 800; font-size: 18.5px; letter-spacing: -1px;
  background: linear-gradient(140deg, #6d5efc, #2aa6f5); color: #fff;
  box-shadow: 0 8px 26px rgba(75, 92, 255, .45);
}
.brand-name { font-weight: 800; font-size: 20px; letter-spacing: .5px; }
.brand-sub { font-family: var(--mono); font-size: 12.5px; color: #9fb0dd; letter-spacing: 1.4px; text-transform: uppercase; }
.brand-hero h1 { font-size: 42px; line-height: 1.28; margin: 0 0 18px; font-weight: 800; letter-spacing: -.5px; }
.brand-hero h1 em { font-style: normal; background: linear-gradient(100deg, #8ea4ff, #56d7f5); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand-hero p { color: #b3c0e2; font-size: 16.5px; max-width: 430px; margin: 0; }
.terminal {
  margin-top: 34px; border: 1px solid rgba(150,175,255,.22); border-radius: 12px; overflow: hidden;
  background: rgba(9, 15, 34, .72); backdrop-filter: blur(6px); max-width: 470px;
  box-shadow: 0 16px 40px rgba(0,0,0,.28);
}
.terminal-head { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid rgba(150,175,255,.16); }
.terminal-head i { width: 9px; height: 9px; border-radius: 50%; display: block; }
.terminal-head span { margin-left: 10px; font-family: var(--mono); font-size: 12.5px; color: #8fa2ce; }
.terminal-body { padding: 15px 18px; font-family: var(--mono); font-size: 13.5px; line-height: 1.95; color: #c3d2f5; }
.terminal-body .c { color: #6f83b4; }
.terminal-body .ok { color: #4ade80; }
.terminal-body .warn { color: #fbbf24; }
.terminal-body .kw { color: #a78bfa; }
.terminal-body .prompt { color: #4ade80; }
.brand-foot { font-family: var(--mono); font-size: 12.5px; color: #7f90bc; letter-spacing: .4px; }

.login-side { padding: 46px 60px; display: flex; flex-direction: column; justify-content: center; background: var(--surface); overflow-y: auto; }
.login-card { width: 100%; max-width: 400px; margin: 0 auto; }
.login-card h2 { font-size: 26px; margin: 0 0 6px; font-weight: 800; }
.login-card .lead { color: var(--muted); margin: 0 0 26px; font-size: 14.5px; }
.login-tabs { display: flex; background: var(--surface-3); border-radius: 10px; padding: 4px; margin-bottom: 22px; }
.login-tabs button { flex: 1; border: 0; background: transparent; color: var(--muted); padding: 9px; border-radius: 7px; font-weight: 600; font-size: 14.5px; }
.login-tabs button.on { background: var(--surface); color: var(--primary); box-shadow: var(--shadow-sm); }
.login-note { font-size: 13.5px; color: var(--muted); background: var(--surface-2); border: 1px dashed var(--border-strong); border-radius: 10px; padding: 12px 14px; margin-top: 18px; line-height: 1.7; }
.login-note b { color: var(--text-2); }
.login-divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13.5px; margin: 22px 0 16px; }
.login-divider::before, .login-divider::after { content: ""; height: 1px; flex: 1; background: var(--border); }
.login-mini-news { border-top: 1px solid var(--border); margin-top: 26px; padding-top: 18px; }
.login-mini-news h4 { margin: 0 0 10px; font-size: 13.5px; color: var(--muted); letter-spacing: 1px; font-family: var(--mono); text-transform: uppercase; }
.login-mini-news a { display: flex; gap: 8px; align-items: baseline; color: var(--text-2); font-size: 14px; padding: 5px 0; }
.login-mini-news a:hover { color: var(--primary); text-decoration: none; }
.login-mini-news .dot { color: var(--primary); }

/* ---------- 表单 / 按钮 ---------- */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 14px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.field .hint { font-size: 13px; color: var(--muted); margin-top: 5px; }
.input, .select, .textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); outline: none; transition: border-color .15s, box-shadow .15s;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.input:disabled, .textarea:disabled { background: var(--surface-3); color: var(--muted); cursor: not-allowed; }
.textarea { resize: vertical; min-height: 88px; line-height: 1.6; }
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
.check { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; font-size: 14.5px; color: var(--text-2); }
.check input { accent-color: var(--primary); width: 15px; height: 15px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 16px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface);
  color: var(--text-2); font-weight: 600; font-size: 14.5px; transition: all .15s; white-space: nowrap;
}
.btn:hover { border-color: var(--primary); color: var(--primary); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 3px 10px rgba(79,70,229,.22); }
.btn-primary:hover { background: var(--primary-2); border-color: var(--primary-2); color: #fff; }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--surface-3); }
.btn-danger { color: var(--danger); border-color: var(--border-strong); }
.btn-danger:hover { border-color: var(--danger); background: var(--danger-soft); color: var(--danger); }
.btn-sm { padding: 6px 11px; font-size: 13.5px; }
.btn-lg { padding: 12px 18px; font-size: 15.5px; width: 100%; }
.btn-code { font-family: var(--mono); }

/* ---------- 应用骨架 ---------- */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 238px; flex: none; background: var(--surface); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; z-index: 20;
}
.side-head { padding: 18px 18px 14px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 11px; }
.side-head .brand-mark { width: 36px; height: 36px; border-radius: 9px; font-size: 14.5px; }
.side-head .brand-name { font-size: 16.5px; color: var(--text); }
.side-head .brand-sub { font-size: 10.5px; }
.side-scroll { flex: 1; overflow-y: auto; padding: 12px 10px 20px; }
.nav-group { margin-bottom: 14px; }
.nav-title { font-family: var(--mono); font-size: 11.5px; letter-spacing: 1.3px; text-transform: uppercase; color: var(--muted); padding: 8px 12px 5px; }
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px;
  color: var(--text-2); font-size: 14.5px; font-weight: 500; margin: 1px 0; cursor: pointer;
  border: 1px solid transparent; transition: all .13s;
}
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.on { background: var(--primary-soft); color: var(--primary); font-weight: 700; border-color: color-mix(in srgb, var(--primary) 16%, transparent); }
.nav-item .ico { width: 18px; text-align: center; font-size: 16.5px; flex: none; }
.nav-item .badge { margin-left: auto; }
.side-foot { padding: 12px; border-top: 1px solid var(--border); }
.role-chip { display: flex; align-items: center; gap: 9px; padding: 9px; background: var(--surface-2); border-radius: 9px; }
.avatar { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 14.5px; flex: none; }
.avatar.lg { width: 44px; height: 44px; border-radius: 12px; font-size: 18.5px; }
.avatar.sm { width: 26px; height: 26px; border-radius: 7px; font-size: 12.5px; }

.main-wrap { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 60px; flex: none; background: var(--surface); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 14px; padding: 0 24px; position: sticky; top: 0; z-index: 15;
}
.topbar .crumb { font-weight: 700; font-size: 16.5px; }
.topbar .crumb small { font-weight: 400; color: var(--muted); font-size: 13.5px; margin-left: 8px; }
.top-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.icon-btn { width: 34px; height: 34px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--text-2); display: grid; place-items: center; font-size: 17.5px; }
.icon-btn:hover { background: var(--surface-3); }
.demo-banner { background: linear-gradient(90deg, #fff4e0, #ffe9c7); color: #8a5b00; border-bottom: 1px solid #f2d49a; padding: 8px 24px; font-size: 14px; display: flex; align-items: center; gap: 10px; }
body[data-theme="dark"] .demo-banner { background: #3a2c12; color: #f5b544; border-color: #5a431a; }
.content { padding: 24px; max-width: 1440px; width: 100%; margin: 0 auto; }

/* ---------- 卡片 / 通用块 ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-pad { padding: 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.card-head h3 { margin: 0; font-size: 16.5px; font-weight: 700; }
.card-head .desc { color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.card-body { padding: 20px; }
.card-foot { padding: 14px 20px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); }
.section-title { display: flex; align-items: center; gap: 10px; font-size: 17.5px; font-weight: 800; margin: 0 0 14px; }
.section-title::before { content: ""; width: 3px; height: 16px; background: var(--primary); border-radius: 2px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h2 { margin: 0; font-size: 23px; font-weight: 800; letter-spacing: -.3px; }
.page-head p { margin: 4px 0 0; color: var(--muted); font-size: 14.5px; }
.kicker { font-family: var(--mono); font-size: 12px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--primary); font-weight: 700; }

/* ---------- 统计卡 ---------- */
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow-sm); position: relative; overflow: hidden; }
.stat::after { content: ""; position: absolute; right: -22px; top: -22px; width: 76px; height: 76px; border-radius: 50%; background: var(--primary-soft); opacity: .7; }
.stat .label { color: var(--muted); font-size: 13.5px; font-weight: 600; position: relative; z-index: 1; }
.stat .value { font-family: var(--mono); font-size: 28px; font-weight: 800; margin-top: 6px; letter-spacing: -1px; position: relative; z-index: 1; }
.stat .foot { font-size: 13px; color: var(--muted); margin-top: 4px; position: relative; z-index: 1; }
.stat.a::after { background: var(--accent-soft); } .stat.b::after { background: var(--success-soft); } .stat.c::after { background: var(--warn-soft); } .stat.d::after { background: var(--purple-soft); }

/* ---------- 标签 / 徽章 ---------- */
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 6px; font-size: 13px; font-weight: 600; background: var(--surface-3); color: var(--text-2); white-space: nowrap; }
.tag-primary { background: var(--primary-soft); color: var(--primary); }
.tag-success { background: var(--success-soft); color: var(--success); }
.tag-danger { background: var(--danger-soft); color: var(--danger); }
.tag-warn { background: var(--warn-soft); color: var(--warn); }
.tag-accent { background: var(--accent-soft); color: var(--accent); }
.tag-purple { background: var(--purple-soft); color: var(--purple); }
.tag-outline { background: transparent; border: 1px solid var(--border-strong); color: var(--muted); }
.badge { font-family: var(--mono); font-size: 11.5px; padding: 1px 6px; border-radius: 5px; background: var(--danger-soft); color: var(--danger); font-weight: 700; }
.verdict { display: inline-flex; align-items: center; gap: 5px; font-family: var(--mono); font-size: 13px; font-weight: 800; letter-spacing: .3px; padding: 3px 9px; border-radius: 6px; }
.v-ac { background: var(--success-soft); color: var(--success); }
.v-wa { background: var(--danger-soft); color: var(--danger); }
.v-tle, .v-mle { background: var(--warn-soft); color: var(--warn); }
.v-ce, .v-re { background: var(--purple-soft); color: var(--purple); }
.v-pending { background: var(--surface-3); color: var(--muted); }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14.5px; }
table.tbl th { text-align: left; font-size: 13px; letter-spacing: .4px; color: var(--muted); font-weight: 700; padding: 10px 14px; border-bottom: 1px solid var(--border); background: var(--surface-2); white-space: nowrap; }
table.tbl td { padding: 11px 14px; border-bottom: 1px solid var(--border); color: var(--text-2); vertical-align: middle; }
table.tbl tr:last-child td { border-bottom: 0; }
table.tbl tbody tr:hover { background: var(--surface-2); }
table.tbl td .strong { color: var(--text); font-weight: 600; }
table.tbl .actions { display: flex; gap: 6px; justify-content: flex-end; }

/* ---------- 列表项 ---------- */
.list-row { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.list-row:last-child { border-bottom: 0; }
.list-row:hover { background: var(--surface-2); }
.list-row .ico-box { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; font-size: 19.5px; flex: none; background: var(--primary-soft); }
.empty { text-align: center; padding: 46px 20px; color: var(--muted); }
.empty .big { font-size: 34px; opacity: .45; margin-bottom: 10px; }

/* ---------- 进度条 ---------- */
.progress { height: 7px; border-radius: 6px; background: var(--surface-3); overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--primary), var(--accent)); transition: width .4s; }
.progress.ok > span { background: linear-gradient(90deg, var(--success), #4ade80); }
.progress.warn > span { background: linear-gradient(90deg, var(--warn), #fbbf24); }

/* ---------- 代码编辑器 ---------- */
.editor-shell { border: 1px solid var(--border-strong); border-radius: var(--radius); overflow: hidden; background: var(--code-bg); }
.editor-bar { display: flex; align-items: center; gap: 10px; padding: 9px 14px; background: var(--code-bg-2); border-bottom: 1px solid var(--code-line); }
.editor-bar .file { font-family: var(--mono); font-size: 13px; color: #9fb0dd; }
.editor-bar .lang { font-family: var(--mono); font-size: 12.5px; color: #6ee7b7; background: rgba(110,231,183,.1); padding: 2px 8px; border-radius: 5px; }
.editor-area { display: flex; min-height: 260px; }
.editor-lines { padding: 14px 10px; text-align: right; font-family: var(--mono); font-size: 14px; line-height: 1.7; color: #5b6b96; user-select: none; border-right: 1px solid var(--code-line); min-width: 44px; }
.code-input {
  flex: 1; border: 0; outline: none; resize: vertical; padding: 14px 16px; min-height: 260px;
  background: var(--code-bg); color: var(--code-text); font-family: var(--mono); font-size: 14px; line-height: 1.7; tab-size: 4;
}
.code-input::placeholder { color: #5b6b96; }
.editor-foot { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--code-line); background: var(--code-bg-2); flex-wrap: wrap; }

/* ---------- 题目 / 答题 ---------- */
.q-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); margin-bottom: 16px; }
.q-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.q-no { font-family: var(--mono); font-weight: 800; font-size: 14.5px; color: var(--primary); background: var(--primary-soft); padding: 3px 9px; border-radius: 6px; }
.q-title { font-weight: 700; font-size: 16px; }
.q-body { padding: 18px; }
.q-stem { font-size: 15.5px; line-height: 1.85; white-space: pre-wrap; margin-bottom: 16px; }
.option { display: flex; align-items: flex-start; gap: 11px; padding: 11px 14px; border: 1px solid var(--border); border-radius: 9px; margin-bottom: 9px; cursor: pointer; transition: all .13s; }
.option:hover { border-color: var(--primary); background: var(--primary-soft); }
.option.sel { border-color: var(--primary); background: var(--primary-soft); }
.option .key { font-family: var(--mono); font-weight: 800; color: var(--primary); width: 20px; flex: none; }
.option input { margin-top: 4px; accent-color: var(--primary); }
.option.locked { cursor: default; opacity: .9; }
.option.locked:hover { border-color: var(--border); background: transparent; }
.option.locked.sel:hover { background: var(--primary-soft); border-color: var(--primary); }
.sample-box { border: 1px solid var(--border); border-radius: 9px; overflow: hidden; margin-bottom: 10px; }
.sample-head { padding: 7px 12px; background: var(--surface-2); border-bottom: 1px solid var(--border); font-size: 13.5px; font-weight: 700; color: var(--text-2); }
.sample-grid { display: grid; grid-template-columns: 1fr 1fr; }
.sample-grid > div { padding: 11px 13px; }
.sample-grid > div + div { border-left: 1px solid var(--border); }
.sample-grid pre { margin: 0; font-family: var(--mono); font-size: 13.5px; color: var(--text); white-space: pre-wrap; word-break: break-all; }
.answer-bar { display: flex; align-items: center; gap: 10px; padding: 13px 18px; border-top: 1px solid var(--border); background: var(--surface-2); flex-wrap: wrap; }
.lock-note { display: flex; align-items: center; gap: 7px; font-size: 14px; color: var(--warn); background: var(--warn-soft); padding: 8px 12px; border-radius: 8px; margin-top: 12px; }
.result-note { border-radius: 9px; padding: 12px 14px; margin-top: 14px; font-size: 14.5px; }
.result-note.ok { background: var(--success-soft); color: var(--success); }
.result-note.no { background: var(--danger-soft); color: var(--danger); }

/* ---------- 评测面板 ---------- */
.judge-panel { margin-top: 16px; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.judge-summary { display: flex; align-items: center; gap: 18px; padding: 16px 20px; background: var(--surface-2); border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.judge-score { font-family: var(--mono); font-size: 30px; font-weight: 800; color: var(--primary); letter-spacing: -1px; }
.judge-score small { font-size: 14.5px; color: var(--muted); font-weight: 500; }
.point-row { display: grid; grid-template-columns: 1.6fr .8fr .8fr .8fr .9fr; gap: 10px; align-items: center; padding: 10px 18px; border-bottom: 1px solid var(--border); font-size: 14px; }
.point-row:last-child { border-bottom: 0; }
.point-row.head { background: var(--surface-2); color: var(--muted); font-size: 12.5px; font-weight: 700; letter-spacing: .4px; }

/* ---------- 排行榜 ---------- */
.rank-row { display: flex; align-items: center; gap: 14px; padding: 12px 18px; border-bottom: 1px solid var(--border); }
.rank-row:last-child { border-bottom: 0; }
.rank-no { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; font-family: var(--mono); font-weight: 800; font-size: 14.5px; background: var(--surface-3); color: var(--muted); flex: none; }
.rank-no.r1 { background: linear-gradient(140deg,#ffd76a,#f5a524); color: #5b3b00; }
.rank-no.r2 { background: linear-gradient(140deg,#dde4f0,#aab8d0); color: #33415c; }
.rank-no.r3 { background: linear-gradient(140deg,#f0bd93,#cf8b5c); color: #5c3418; }
.rank-score { font-family: var(--mono); font-weight: 800; font-size: 17.5px; color: var(--primary); }

/* ---------- 新闻 / 快捷入口 ---------- */
.news-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; transition: all .18s; min-height: 158px; }
.news-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--primary); text-decoration: none; }
.news-emoji { font-size: 25px; margin-bottom: 10px; }
.news-card h4 { margin: 0 0 8px; font-size: 15.5px; color: var(--text); line-height: 1.5; font-weight: 700; }
.news-card p { margin: 0 0 12px; color: var(--muted); font-size: 13.5px; line-height: 1.65; flex: 1; }
.news-meta { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); }
.link-card { display: flex; align-items: center; gap: 13px; padding: 15px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); transition: all .18s; }
.link-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--primary); text-decoration: none; }
.link-ico { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; font-size: 21px; background: var(--surface-3); flex: none; }
.link-card h4 { margin: 0 0 2px; font-size: 15px; color: var(--text); }
.link-card p { margin: 0; font-size: 13px; color: var(--muted); }

/* ---------- 时间线 / 互动 ---------- */
.bubble { border-radius: 10px; padding: 11px 14px; font-size: 14.5px; line-height: 1.7; max-width: 78%; }
.bubble.self { background: var(--primary); color: #fff; border-bottom-right-radius: 3px; }
.bubble.other { background: var(--surface-3); color: var(--text-2); border-bottom-left-radius: 3px; }
.bubble.teach { background: var(--accent-soft); color: var(--text); border-bottom-left-radius: 3px; }
.msg-row { display: flex; gap: 9px; margin-bottom: 14px; align-items: flex-start; }
.msg-row.self { flex-direction: row-reverse; }
.msg-meta { font-size: 12.5px; color: var(--muted); margin-bottom: 4px; }

/* ---------- 日历条 / 状态点 ---------- */
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex: none; }
.dot.g { background: var(--success); } .dot.r { background: var(--danger); } .dot.y { background: var(--warn); } .dot.b { background: var(--primary); } .dot.n { background: var(--muted); }
.hw-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 14px; transition: all .16s; }
.hw-card:hover { box-shadow: var(--shadow); border-color: var(--border-strong); }
.hw-card .title { font-size: 17px; font-weight: 700; margin: 0 0 5px; }
.hw-meta { display: flex; flex-wrap: wrap; gap: 14px; color: var(--muted); font-size: 13.5px; margin: 10px 0 0; }
.hw-meta span { display: inline-flex; align-items: center; gap: 5px; }

/* ---------- Modal / Toast ---------- */
.modal-mask { position: fixed; inset: 0; background: rgba(12,18,38,.56); backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 100; animation: fade .15s; }
@keyframes fade { from { opacity: 0 } to { opacity: 1 } }
.modal { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg); width: min(640px, 100%); max-height: 88vh; display: flex; flex-direction: column; animation: pop .18s; }
.modal.wide { width: min(880px, 100%); }
@keyframes pop { from { transform: translateY(10px) scale(.98); opacity: 0 } to { transform: none; opacity: 1 } }
.modal-head { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.modal-head h3 { margin: 0; font-size: 17.5px; font-weight: 800; }
.modal-body { padding: 20px; overflow-y: auto; }
.modal-foot { padding: 14px 20px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; background: var(--surface-2); border-radius: 0 0 14px 14px; }
#toast-root {
  position: fixed; left: 50%; top: clamp(12px, 8vh, 88px); transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  z-index: 3000; pointer-events: none; width: max-content; max-width: min(92vw, 680px);
}
.toast {
  background: var(--surface); border: 1px solid var(--border-strong); border-left: 4px solid var(--primary);
  box-shadow: 0 18px 46px rgba(18, 26, 58, .22); border-radius: 12px; padding: 14px 24px;
  font-size: 17px; font-weight: 600; line-height: 1.6; min-width: 260px; max-width: min(92vw, 680px);
  text-align: center; animation: toastDrop .26s ease-out; pointer-events: auto;
}
@keyframes toastDrop { from { transform: translateY(-22px); opacity: 0 } to { transform: none; opacity: 1 } }
@keyframes slide { from { transform: translateX(24px); opacity: 0 } to { transform: none; opacity: 1 } }
.toast.ok { border-left-color: var(--success); background: var(--success-soft); }
.toast.err { border-left-color: var(--danger); background: var(--danger-soft); }
.toast.warn { border-left-color: var(--warn); background: var(--warn-soft); }

/* ---------- 过滤栏 / 分段控件 ---------- */
.filters { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.segment { display: inline-flex; background: var(--surface-3); padding: 3px; border-radius: 9px; gap: 2px; }
.segment button { border: 0; background: transparent; padding: 6px 13px; border-radius: 7px; font-size: 14px; font-weight: 600; color: var(--muted); }
.segment button.on { background: var(--surface); color: var(--primary); box-shadow: var(--shadow-sm); }
.search { position: relative; }
.search .input { padding-left: 32px; width: 220px; }
.search::before { content: "⌕"; position: absolute; left: 10px; top: 6px; color: var(--muted); font-size: 18.5px; }

/* ---------- 代码块（文档） ---------- */
.doc-code { background: var(--code-bg); color: var(--code-text); border-radius: 9px; padding: 14px 16px; font-family: var(--mono); font-size: 13.5px; line-height: 1.8; white-space: pre-wrap; overflow-x: auto; }
.doc-block { border-left: 3px solid var(--primary); background: var(--surface-2); padding: 12px 16px; border-radius: 0 9px 9px 0; margin: 12px 0; font-size: 14.5px; color: var(--text-2); }

/* ---------- 响应式 ---------- */
@media (max-width: 1180px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .login-shell { grid-template-columns: 1fr 1fr; }
  .login-brand, .login-side { padding: 38px; }
}
@media (max-width: 900px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-brand { display: none; }
  .login-side { min-height: 100vh; padding: 32px 22px; }
  .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sidebar { position: fixed; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow-lg); }
  body.nav-open .sidebar { transform: none; }
  .content { padding: 16px; }
  .topbar { padding: 0 14px; }
}
@media (max-width: 620px) {
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .sample-grid { grid-template-columns: 1fr; }
  .sample-grid > div + div { border-left: 0; border-top: 1px solid var(--border); }
  .page-head h2 { font-size: 20px; }
  .content { padding: 12px; }
  .search .input { width: 100%; }
  .filters > .search { width: 100%; }
}

/* ---------- 三种登录方式 / 测试点上传 / AI 出题 ---------- */
.login-tabs.three button { font-size: 13.5px; padding: 9px 4px; white-space: nowrap; }
.case-upload { width: 100%; }
.case-upload input[type="file"] { padding: 8px 10px; height: auto; font-size: 13.5px; }
.case-upload .select { font-size: 13.5px; }
.ai-card { border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; margin-bottom: 14px; background: var(--surface); }
.ai-card .q-stem { margin-bottom: 8px; font-size: 14.5px; }
.ai-card .tbl { font-size: 13.5px; }
@media (max-width: 560px) { .login-tabs.three button { font-size: 12.5px; } }

/* ---------- V2.1.8：右上角用户菜单 ---------- */
.user-menu-wrap { position: relative; margin-left: 4px; }
.user-chip {
  display: flex; align-items: center; gap: 8px; padding: 4px 9px 4px 5px;
  border: 1px solid var(--border-strong); border-radius: 999px; background: var(--surface);
  color: var(--text); font-size: 14px; font-weight: 600; cursor: pointer;
}
.user-chip:hover { border-color: var(--primary); color: var(--primary); }
.user-chip-name { max-width: 92px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-chip .caret { color: var(--muted); font-size: 11.5px; }
.user-dropdown {
  display: none; position: absolute; right: 0; top: calc(100% + 8px); width: 210px;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: 12px;
  box-shadow: var(--shadow-lg); padding: 6px; z-index: 40;
}
.user-dropdown.open { display: block; }
.ud-head { display: flex; flex-direction: column; gap: 2px; padding: 9px 10px 11px; border-bottom: 1px solid var(--border); margin-bottom: 5px; }
.user-dropdown a, .user-dropdown button {
  display: block; width: 100%; text-align: left; padding: 9px 10px; border: 0; border-radius: 8px;
  background: transparent; color: var(--text-2); font-size: 14.5px; font-weight: 500; text-decoration: none; cursor: pointer;
}
.user-dropdown a:hover, .user-dropdown button:hover { background: var(--surface-2); color: var(--primary); }
.acct-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
.acct-grid .b { margin-top: 3px; font-size: 14.5px; }

/* ---------- 题面配图 / 新建题目动态表单 ---------- */
.prob-images { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0; }
.prob-images a { display: block; border: 1px solid var(--border); border-radius: 9px; overflow: hidden; max-width: 220px; background: var(--surface-2); }
.prob-images img { display: block; max-width: 100%; max-height: 190px; }
.type-hint { font-size: 14px; color: var(--primary); background: var(--primary-soft); border-radius: 8px; padding: 9px 12px; font-weight: 600; }
.img-preview { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 10px; }
.img-thumb { position: relative; width: 86px; height: 86px; border: 1px solid var(--border); border-radius: 9px; overflow: hidden; background: var(--surface-2); }
.img-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.img-thumb button {
  position: absolute; top: 2px; right: 2px; width: 20px; height: 20px; border: 0; border-radius: 6px;
  background: rgba(10, 14, 30, .75); color: #fff; font-size: 12.5px; cursor: pointer; line-height: 1;
}
table.tbl .actions { flex-wrap: wrap; }
.form-section-hint { font-size: 13.5px; color: var(--muted); }

/* ---------- 模拟考试浮动窗 ---------- */
#exam-float-root { position: fixed; inset: 0; z-index: 12; pointer-events: none; }
.exam-float {
  position: absolute; right: 16px; top: 76px; width: 258px; pointer-events: auto;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: 13px;
  box-shadow: 0 14px 40px rgba(16, 24, 56, .18); overflow: hidden;
}
.exam-float.dragging { box-shadow: 0 20px 56px rgba(16, 24, 56, .3); cursor: move; }
.exam-float.mini { width: 172px; }
.exam-float.mini .ef-body { display: none; }
.ef-head {
  display: flex; align-items: center; gap: 7px; padding: 10px 11px; cursor: move; user-select: none;
  background: linear-gradient(100deg, var(--primary), var(--primary-2)); color: #fff;
}
.ef-title { font-size: 14px; font-weight: 700; flex: 1; white-space: nowrap; }
.ef-count { font-family: var(--mono); font-size: 12.5px; background: rgba(255, 255, 255, .22); padding: 1px 7px; border-radius: 8px; }
.ef-btn {
  width: 22px; height: 22px; border: 0; border-radius: 6px; background: rgba(255, 255, 255, .18);
  color: #fff; font-size: 14.5px; line-height: 1; cursor: pointer;
}
.ef-btn:hover { background: rgba(255, 255, 255, .32); }
.ef-body { max-height: 340px; overflow-y: auto; padding: 10px; }
.ef-card { border: 1px solid var(--border); border-radius: 10px; padding: 10px; margin-bottom: 9px; background: var(--surface-2); }
.ef-card.done { opacity: .62; filter: grayscale(1); background: var(--surface-3); }
.ef-card-title { font-size: 14px; font-weight: 700; color: var(--text); line-height: 1.5; }
.ef-card-meta { font-size: 12.5px; color: var(--muted); margin: 5px 0 9px; line-height: 1.5; }
.ef-done { font-size: 13px; font-weight: 700; color: var(--muted); text-align: center; padding: 5px; border: 1px dashed var(--border-strong); border-radius: 7px; }
.ef-empty { font-size: 13.5px; color: var(--muted); text-align: center; padding: 18px 6px; }
.ef-tip { font-size: 12px; color: var(--muted); text-align: center; padding-top: 4px; }
@media (min-width: 1180px) { body.exam-float-open .content { padding-right: 296px; } }
@media (max-width: 1179px) { .exam-float { width: 224px; } }

/* ---------- 考试确认 / 试卷 ---------- */
.exam-confirm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.exam-confirm-grid > div { display: flex; justify-content: space-between; gap: 8px; background: var(--surface-2); border-radius: 8px; padding: 9px 11px; font-size: 14px; }
.exam-confirm-grid span { color: var(--muted); }
.exam-overlay {
  position: fixed; inset: 0; z-index: 60; background: rgba(8, 12, 28, .72);
  display: flex; align-items: flex-start; justify-content: center; padding: 24px 16px; overflow-y: auto;
}
.exam-paper { width: min(940px, 100%); max-height: calc(100vh - 48px); display: flex; flex-direction: column;
  background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-lg); overflow: hidden; }
.ep-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 16px 22px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.ep-head h3 { margin: 4px 0 0; font-size: 19.5px; }
.ep-timer { font-family: var(--mono); font-size: 15.5px; color: var(--warn); }
.ep-body { flex: 1; overflow-y: auto; padding: 20px 22px; background: var(--surface-2); }
.ep-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 13px 22px; border-top: 1px solid var(--border); }
.ep-q { margin-bottom: 16px; }
.ep-code { font-size: 14px; line-height: 1.65; min-height: 170px; }
.ep-result { font-size: 13.5px; }
.ep-points { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.ep-point { font-family: var(--mono); font-size: 12px; padding: 3px 7px; border-radius: 6px; border: 1px solid var(--border-strong); }
.ep-point.ok { color: var(--success); background: var(--success-soft); border-color: transparent; }
.ep-point.no { color: var(--danger); background: var(--danger-soft); border-color: transparent; }

/* ---------- 每日签到 ---------- */
.checkin-ico { font-size: 34px; line-height: 1; margin: 4px 0 10px; }
.checkin-ico.done { filter: drop-shadow(0 4px 12px rgba(21, 164, 110, .28)); }
.checkin-quote { font-size: 13.5px; color: var(--text-2); line-height: 1.7; background: var(--surface-2); border-radius: 9px; padding: 10px 12px; text-align: left; }
.quote-box { text-align: center; padding: 10px 6px 4px; }
.quote-mark { font-size: 46px; line-height: .6; color: var(--primary); opacity: .45; font-family: Georgia, serif; }
.quote-text { font-size: 20px; font-weight: 700; line-height: 1.7; color: var(--text); margin: 12px 0; }
.quote-zh { font-size: 15px; color: var(--text-2); line-height: 1.7; margin-bottom: 10px; }
.quote-author { font-size: 14px; color: var(--muted); }


/* ============================================================
   V2.2.0 · 课程广场 / 课程切面 / 公告窗口 / 签到横幅
   ============================================================ */
body { font-size: 16px; }
.side-foot-note { font-family: var(--mono); font-size: 11.5px; color: var(--muted); letter-spacing: .6px; text-align: center; }
.side-head .brand-name { font-size: 15.5px; letter-spacing: 0; }

/* ---------- 签到横幅（放在「今天也来 AC 一道题」模块里） ---------- */
.hero-checkin { flex: 0 1 320px; min-width: 258px; }
.checkin-banner { display: flex; align-items: center; gap: 12px; border-radius: 12px; padding: 13px 15px; }
.checkin-banner.glass { background: rgba(255,255,255,.13); border: 1px solid rgba(255,255,255,.28); color: #fff; backdrop-filter: blur(6px); }
.checkin-banner.solid { background: var(--surface); border: 1px solid var(--border-strong); box-shadow: var(--shadow-sm); }
.cbb-ico { font-size: 30px; line-height: 1; flex: none; }
.cbb-main { flex: 1; min-width: 0; }
.cbb-title { font-size: 14.5px; font-weight: 800; white-space: nowrap; }
.cbb-sub { font-size: 12.5px; opacity: .82; margin-top: 3px; line-height: 1.5; }
.checkin-banner.glass .btn:not(.btn-primary) { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.36); color: #fff; }
.checkin-banner .btn { white-space: nowrap; flex: none; }

/* ---------- 公告浮动窗口：与「模拟考试」共用同一套 ef-* 组件 ---------- */
#notice-float-root { position: fixed; inset: 0; z-index: 13; pointer-events: none; }
.notice-float.exam-float { width: 258px; }
.notice-float.mini { width: 172px; }
.notice-float.mini .ef-body { display: none; }
.nf-card {
  display: block; width: 100%; text-align: left; cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.nf-card:hover { border-color: var(--primary); background: var(--primary-soft); }
.nf-preview { font-size: 12.5px; color: var(--text-2); line-height: 1.6; margin: -3px 0 8px; }
.nf-read { font-size: 12px; color: var(--primary); font-weight: 700; }
@media (max-width: 1179px) { .notice-float.exam-float { width: 224px; } }

/* ---------- 课程广场 ---------- */
.plaza-wrap { padding-bottom: 8px; }
.plaza-hero {
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  border-radius: 16px; padding: 30px 34px; margin-bottom: 26px; color: #fff;
  background: linear-gradient(120deg, #182554 0%, #3b4cc0 55%, #1c6fb8 100%);
  box-shadow: 0 14px 40px rgba(24, 40, 100, .18); position: relative; overflow: hidden;
}
.plaza-hero::after { content: ""; position: absolute; inset: 0; opacity: .15; background-image: linear-gradient(rgba(255,255,255,.3) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.3) 1px, transparent 1px); background-size: 30px 30px; pointer-events: none; }
.plaza-hero > * { position: relative; }
.plaza-hero h1 { margin: 10px 0 8px; font-size: 34px; line-height: 1.32; font-weight: 800; }
.plaza-hero p { margin: 0; color: #d2ddff; font-size: 15px; }
.plaza-hero-side { min-width: 190px; text-align: right; }
.phs-num { font-family: var(--mono); font-size: 52px; font-weight: 800; line-height: 1; }
.phs-num span { font-size: 14px; margin-left: 8px; font-family: var(--sans); font-weight: 600; }
.phs-line { height: 2px; background: rgba(255,255,255,.35); margin: 12px 0; }
.phs-tip { font-size: 12.5px; color: #cbd8ff; line-height: 1.7; }
.plaza-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 18px; }
.course-card {
  position: relative; aspect-ratio: 1 / 1; border-radius: 16px; overflow: hidden; padding: 0;
  border: 1px solid var(--border); background: var(--surface-2); cursor: pointer;
  box-shadow: var(--shadow-sm); transition: transform .18s, box-shadow .18s; text-align: left;
}
.course-card:hover { transform: translateY(-5px); box-shadow: 0 18px 40px rgba(20, 34, 76, .2); }
.course-card:active { transform: translateY(-1px); }
.cc-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.cc-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(6,12,30,.12) 0%, rgba(6,12,30,.1) 40%, rgba(6,12,30,.78) 100%); }
.cc-no { position: absolute; top: 12px; left: 14px; font-family: var(--mono); font-size: 12px; font-weight: 700; color: #fff; background: rgba(0,0,0,.28); border: 1px solid rgba(255,255,255,.3); padding: 2px 8px; border-radius: 6px; }
.cc-state { position: absolute; top: 12px; right: 12px; font-size: 11.5px; font-weight: 700; color: #fff; background: rgba(255,255,255,.22); border: 1px solid rgba(255,255,255,.42); padding: 3px 9px; border-radius: 999px; backdrop-filter: blur(4px); }
.course-card.mine .cc-state { background: #15a46e; border-color: #15a46e; }
.course-card.hard .cc-state { background: rgba(20,28,50,.6); }
.cc-body { position: absolute; left: 16px; right: 16px; bottom: 15px; display: flex; flex-direction: column; gap: 2px; }
.cc-emoji { font-size: 26px; line-height: 1.2; }
.cc-name { color: #fff; font-size: 21px; font-weight: 800; letter-spacing: .3px; }
.cc-sub { color: rgba(255,255,255,.86); font-size: 12.5px; }

/* ---------- 课程引导页 ---------- */
.course-gate { text-align: center; padding: 52px 24px 60px; border-radius: 18px; background: linear-gradient(160deg, var(--surface), var(--surface-2)); border: 1px solid var(--border); box-shadow: var(--shadow); }
.gate-photo { width: 148px; height: 148px; margin: 0 auto 18px; border-radius: 22px; overflow: hidden; box-shadow: 0 14px 34px rgba(20,34,76,.18); }
.gate-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gate-ico { font-size: 42px; margin-bottom: 8px; }
.course-gate h1 { font-size: 30px; line-height: 1.45; margin: 12px auto; max-width: 720px; color: var(--text); }
.course-gate > p { font-size: 16px; color: var(--text-2); max-width: 640px; margin: 0 auto; line-height: 1.9; }
.gate-course { display: inline-block; margin-top: 20px; padding: 10px 18px; border-radius: 999px; background: var(--primary-soft); color: var(--primary); font-size: 14px; font-weight: 700; }

/* ---------- 课程切面 ---------- */
.course-page { padding-bottom: 8px; }
.course-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 12px 16px; margin-bottom: 16px; border-radius: 12px; background: linear-gradient(100deg, var(--c1), var(--c2)); color: #fff; }
.cb-title { font-size: 18px; font-weight: 800; }
.cb-sub { font-size: 13px; opacity: .86; }
.cb-chip { border: 1px solid rgba(255,255,255,.36); background: rgba(255,255,255,.14); color: #fff; border-radius: 999px; padding: 4px 11px; font-size: 12.5px; cursor: pointer; }
.cb-chip:hover, .cb-chip.on { background: #fff; color: var(--c2); border-color: #fff; font-weight: 700; }
.course-bar .btn { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.34); color: #fff; }
.cp-hero { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; border-radius: 16px; padding: 26px 30px; color: #fff; background: linear-gradient(120deg, var(--c1), var(--c2)); overflow: hidden; }
.cph-left { flex: 1; min-width: 250px; }
.cp-hero h1 { margin: 8px 0; font-size: 34px; font-weight: 800; }
.cp-hero p { margin: 0; font-size: 15.5px; color: rgba(255,255,255,.9); max-width: 560px; }
.cph-pill { display: inline-block; border: 1px solid rgba(255,255,255,.4); background: rgba(255,255,255,.16); border-radius: 999px; padding: 5px 13px; font-size: 13px; }
.cph-photo { width: 168px; height: 168px; border-radius: 18px; overflow: hidden; border: 3px solid rgba(255,255,255,.55); box-shadow: 0 12px 30px rgba(0,0,0,.2); flex: none; }
.cph-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cp-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 22px; }
.cp-body { display: flex; flex-direction: column; gap: 22px; }
.cp-section { background: var(--surface); border: 1px solid var(--border); border-radius: 13px; padding: 20px 22px; box-shadow: var(--shadow-sm); }
.cp-tasks { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 13px; }
.cp-task { border: 1px solid var(--border); border-radius: 12px; padding: 16px; background: var(--surface-2); }
.cpt-ico { font-size: 30px; line-height: 1.2; }
.cpt-no { font-family: var(--mono); font-size: 11px; letter-spacing: 1px; color: var(--muted); margin-top: 8px; }
.cpt-title { font-size: 17px; font-weight: 800; margin: 5px 0 6px; }
.cpt-desc { font-size: 13.5px; color: var(--text-2); line-height: 1.75; }
.cpt-tag { display: inline-block; margin-top: 11px; font-size: 12px; color: var(--primary); background: var(--primary-soft); padding: 3px 10px; border-radius: 999px; }
.cp-tasks.warm .cp-task { border-top: 3px solid #f59e0b; }
.cp-tasks.cool .cp-task { border-top: 3px solid #0ea5e9; }
.cp-tasks.purple .cp-task { border-top: 3px solid #8b5cf6; }
.cp-tasks.green .cp-task { border-top: 3px solid #10b981; }
.cp-notes { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 13px; }
.cp-note, .cp-hw { display: flex; align-items: center; gap: 14px; border: 1px solid var(--border); border-radius: 11px; padding: 13px 16px; background: var(--surface-2); }
.cpn-ico { font-size: 26px; flex: none; }
.cp-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.cp-shot { text-align: center; border: 1px dashed var(--border-strong); border-radius: 12px; padding: 18px 10px; background: var(--surface-2); }
.cps-emoji { font-size: 34px; margin-bottom: 8px; }
.cp-badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.cp-badge { text-align: center; border-radius: 12px; padding: 16px 10px; background: linear-gradient(160deg, var(--primary-soft), var(--surface-2)); border: 1px solid var(--border); }
.cp-badge span { display: block; font-size: 32px; }
.cp-badge b { display: block; font-size: 15px; margin: 7px 0 3px; }
.cp-badge small { color: var(--muted); font-size: 12.5px; }
.cp-blocks { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.cp-block { display: flex; flex-direction: column; gap: 4px; border-radius: 12px; padding: 15px 16px; color: #fff; background: var(--b); box-shadow: var(--shadow-sm); }
.cpb-ico { font-size: 26px; }
.cp-block b { font-size: 16px; }
.cp-block small { font-size: 12.5px; opacity: .9; }
.cp-hw { margin-bottom: 10px; justify-content: space-between; flex-wrap: wrap; }
.code-track-note { background: var(--primary-soft); color: var(--primary); border-radius: 10px; padding: 11px 16px; margin-bottom: 16px; font-size: 14px; font-weight: 600; }
.course-thumb { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; border: 1px solid var(--border); display: block; }
.course-upload-preview { margin-top: 10px; }
.course-upload-preview img { width: 120px; height: 120px; object-fit: cover; border-radius: 10px; border: 1px solid var(--border); }
@media (max-width: 680px) {
  .plaza-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .plaza-hero { padding: 22px; }
  .plaza-hero h1 { font-size: 26px; }
  .cc-name { font-size: 17px; }
  .cph-photo { width: 110px; height: 110px; }
  .cp-hero h1 { font-size: 26px; }
  .cp-section { padding: 16px; }
}


/* ============================================================
   V2.3.0 · 视觉升级（刷题站风格） / 独立选课页 / 答案勾选框
   ============================================================ */

/* ---------- 全局层次：卡片、标题、按钮、表格 ---------- */
.content { padding: 28px 30px 44px; }
.card, .stat, .hw-card, .q-card, .cp-section, .ai-card, .news-card, .link-card {
  transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
.card:hover, .cp-section:hover { box-shadow: 0 10px 32px rgba(24, 34, 72, .09); }
.card-head { background: linear-gradient(180deg, var(--surface-2), var(--surface)); border-radius: var(--radius) var(--radius) 0 0; }
.card-head h3 { letter-spacing: -.2px; }
.page-head { padding-bottom: 4px; }
.page-head h2 { position: relative; padding-left: 15px; }
.page-head h2::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 4px; height: 22px; border-radius: 4px;
  background: linear-gradient(180deg, var(--primary), var(--accent));
}
.section-title { letter-spacing: -.2px; }
.section-title::before { width: 4px; height: 18px; border-radius: 4px; background: linear-gradient(180deg, var(--primary), var(--accent)); }
.stat { border-top: 3px solid var(--primary); }
.stat.a { border-top-color: var(--accent); }
.stat.b { border-top-color: var(--success); }
.stat.c { border-top-color: var(--warn); }
.stat.d { border-top-color: var(--purple); }
.stat:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.stat .value { background: linear-gradient(100deg, var(--primary), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.btn { border-radius: 9px; transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: none; }
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary-2)); border-color: transparent; }
.btn-primary:hover { background: linear-gradient(135deg, var(--primary-2), var(--primary)); box-shadow: 0 9px 22px rgba(79, 70, 229, .26); }
.btn-lg { border-radius: 11px; }
.segment { border: 1px solid var(--border); border-radius: 11px; }
.segment button.on { box-shadow: 0 2px 9px rgba(20, 30, 60, .12); font-weight: 800; }
.tbl thead th { color: var(--text-2); letter-spacing: .35px; }
.tbl tbody tr { transition: background .15s ease; }
.tbl tbody tr:hover { background: var(--primary-soft); }
.tag { border-radius: 999px; padding: 3px 10px; font-size: 12.5px; }
.doc-block { border-radius: 0 12px 12px 0; border-left-width: 4px; }
.lock-note { border-radius: 10px; }

/* ---------- 登录页（进入界面） ---------- */
.login-side {
  background: radial-gradient(900px 620px at 100% 0%, var(--primary-soft), transparent 62%), var(--surface-2);
}
.login-card {
  max-width: 432px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; padding: 30px 28px 26px; box-shadow: var(--shadow-lg);
}
.login-tabs { border-radius: 12px; padding: 5px; background: var(--surface-3); }
.login-tabs button { border-radius: 9px; }
.login-tabs button.on { box-shadow: 0 2px 10px rgba(20, 30, 60, .13); font-weight: 800; }
.login-card .btn-lg[type="submit"] {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  border-color: transparent; box-shadow: 0 9px 24px rgba(79, 70, 229, .26);
}
.login-card .btn-lg[type="submit"]:hover { box-shadow: 0 12px 28px rgba(79, 70, 229, .34); }
.login-note { border-style: solid; border-color: var(--border); border-radius: 12px; }
.login-mini-news { border-top: 1px dashed var(--border-strong); }
.login-mini-news a { border-radius: 7px; padding: 6px 8px; transition: background .15s; }
.login-mini-news a:hover { background: var(--surface-2); text-decoration: none; }
.brand-logo .brand-mark { border-radius: 14px; }
.terminal { border-radius: 14px; }

/* ---------- 二级弹窗 ---------- */
.modal-mask {
  background: radial-gradient(1000px 620px at 50% 0%, rgba(79, 70, 229, .2), transparent 62%), rgba(10, 16, 36, .6);
  backdrop-filter: blur(6px);
}
body[data-theme="dark"] .modal-mask { background: rgba(5, 9, 20, .74); }
.modal {
  border-radius: 18px; border-color: var(--border-strong); overflow: hidden;
  box-shadow: 0 30px 80px rgba(12, 20, 48, .3);
}
.modal::before {
  content: ""; display: block; height: 4px; flex: none;
  background: linear-gradient(90deg, var(--primary), var(--accent), var(--success));
}
.modal-head { padding: 18px 24px; background: linear-gradient(180deg, var(--surface-2), var(--surface)); }
.modal-head h3 { font-size: 19px; letter-spacing: -.2px; }
.modal-head h3::before { content: "◆"; color: var(--primary); font-size: 12px; margin-right: 10px; vertical-align: 2px; }
.modal-head .icon-btn { border-radius: 9px; }
.modal-head .icon-btn:hover { background: var(--danger-soft); color: var(--danger); }
.modal-body { padding: 24px; }
.modal-foot { padding: 16px 24px; gap: 12px; }
.modal-foot .btn { min-width: 104px; border-radius: 9px; }
#modal-form .field { margin-bottom: 18px; }
#modal-form .field > label { font-size: 14.5px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
#modal-form .hint { font-size: 12.8px; line-height: 1.65; }
.input, .select, .textarea {
  border-radius: 10px; border: 1px solid var(--border-strong);
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); background: var(--surface);
}
.check { border-radius: 8px; padding: 3px 2px; }
.check:hover { color: var(--primary); }
.type-hint { border-radius: 10px; padding: 11px 14px; border: 1px solid var(--border); }

/* ---------- 出题：选项前的答案勾选框 ---------- */
.field.opt-field {
  display: grid; grid-template-columns: 84px 30px minmax(0, 1fr);
  align-items: center; gap: 10px;
}
.field.opt-field > label:first-of-type { margin: 0; font-size: 14px; white-space: nowrap; }
.field.opt-field .hint { grid-column: 1 / -1; margin-top: 0; }
.ans-picker { position: relative; width: 28px; height: 28px; display: grid; place-items: center; cursor: pointer; margin: 0; }
.ans-picker input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 2; }
.ans-box {
  width: 25px; height: 25px; border: 2px solid var(--border-strong); border-radius: 7px;
  background: var(--surface); display: grid; place-items: center;
  color: #fff; font-size: 14px; font-weight: 800; line-height: 1;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}
.ans-picker:not(.multi) .ans-box { border-radius: 50%; }
.ans-picker:hover .ans-box { border-color: var(--success); transform: scale(1.06); }
.ans-picker.on .ans-box { background: var(--success); border-color: var(--success); }
.ans-picker:not(.multi).on .ans-box::after { content: ""; width: 9px; height: 9px; border-radius: 50%; background: #fff; }
.field.opt-field.picked .input { border-color: var(--success); background: var(--success-soft); }
@media (max-width: 620px) { .field.opt-field { grid-template-columns: 68px 30px minmax(0, 1fr); } }

/* ---------- 学生登录后的独立选课界面（V2.4.0 重做） ---------- */
body.fullscreen-page { background: var(--bg); }
body.fullscreen-page #exam-float-root,
body.fullscreen-page #notice-float-root { display: none; }
/* 选课页快捷按钮打开后：两个浮窗以右下角胶囊形式出现，可展开、拖动、收起 */
body.fullscreen-page.gate-float-open #exam-float-root,
body.fullscreen-page.gate-float-open #notice-float-root { display: block; }
body.fullscreen-page.gate-float-open .exam-float { width: 190px; right: 14px; top: auto; bottom: 14px; z-index: 14; }
body.fullscreen-page.gate-float-open .notice-float { width: 190px; right: 14px; top: auto; bottom: 62px; z-index: 13; }
body.fullscreen-page.gate-float-open .exam-float:not(.mini),
body.fullscreen-page.gate-float-open .notice-float:not(.mini) { width: 268px; z-index: 15; }
.gate-shell {
  min-height: 100vh; display: grid; place-items: start center; padding: 18px 24px 24px; box-sizing: border-box;
  background: radial-gradient(760px 520px at 10% 6%, var(--primary-soft), transparent 68%),
              radial-gradient(720px 520px at 92% 94%, var(--accent-soft, var(--primary-soft)), transparent 68%), var(--bg);
}
.gate-frame {
  width: min(1120px, 100%); padding: 20px 30px 16px; border: 1px solid var(--border);
  border-radius: 24px; background: var(--surface);
  box-shadow: 0 26px 70px rgba(24, 36, 78, .12), 0 2px 8px rgba(24, 36, 78, .05);
}
.gate-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.gate-kicker { font-family: var(--mono); font-size: 11.5px; letter-spacing: 1.6px; color: var(--primary); font-weight: 700; }
.gate-head-main h1 { margin: 6px 0 4px; font-size: 23px; font-weight: 800; letter-spacing: -.4px; }
.gate-head-main p { margin: 0; font-size: 13.5px; color: var(--text-2); }
.gate-head-right { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.gate-current { display: flex; flex-direction: column; gap: 5px; align-items: flex-end; padding: 8px 14px; border-radius: 13px; background: var(--primary-soft); max-width: 460px; }
.gate-current > span { font-size: 11.5px; color: var(--text-2); }
.gate-current-tags { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.gate-current-tags b { font-size: 12.5px; color: var(--primary); font-weight: 700; white-space: nowrap; }
.gate-quick { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.gate-quick .btn { font-size: 13px; padding: 7px 13px; border-radius: 9px; }
.gate-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.gate-tile {
  position: relative; aspect-ratio: 1 / 1; max-height: min(21vh, 198px); padding: 0; overflow: hidden; border: 0; border-radius: 18px;
  background: var(--surface-2); cursor: pointer; text-align: left;
  box-shadow: 0 4px 14px rgba(24, 36, 78, .09);
  transition: transform .18s ease, box-shadow .18s ease;
}
.gate-tile.locked { opacity: .58; filter: saturate(.7); }
.gate-tile.locked:hover { opacity: .82; }
.gate-tile.mine::before {
  content: "已开通"; position: absolute; z-index: 2; top: 12px; left: 12px;
  font-size: 11px; font-weight: 800; color: #fff; background: var(--success);
  padding: 3px 9px; border-radius: 999px; box-shadow: 0 3px 10px rgba(16, 24, 56, .22);
}
.gate-tile.mine .gt-no { display: none; }
.gate-tile.locked .gt-lock {
  position: absolute; z-index: 2; bottom: 12px; right: 12px; font-size: 14px;
  width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%;
  background: rgba(10, 16, 34, .55); color: #fff;
}
.gate-tile::after {
  content: ""; position: absolute; inset: 0; border-radius: 18px; border: 2px solid transparent;
  pointer-events: none; transition: border-color .18s ease;
}
.gate-tile:hover { transform: translateY(-5px); box-shadow: 0 16px 34px rgba(24, 36, 78, .18); }
.gate-tile.on { box-shadow: 0 16px 34px rgba(79, 70, 229, .24); }
.gate-tile.on::after { border-color: var(--primary); }
.gt-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.gate-tile:hover .gt-img { transform: scale(1.06); }
.gt-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(6, 12, 30, .02) 30%, rgba(6, 12, 30, .76) 100%); }
.gt-no {
  position: absolute; top: 12px; left: 13px; font-family: var(--mono); font-size: 11.5px; font-weight: 700;
  color: #fff; background: rgba(12, 20, 44, .38); border: 1px solid rgba(255, 255, 255, .28);
  padding: 3px 10px; border-radius: 999px; backdrop-filter: blur(4px);
}
.gt-check {
  position: absolute; top: 12px; right: 12px; width: 30px; height: 30px; border-radius: 50%;
  background: var(--primary); color: #fff; font-size: 16px; font-weight: 800;
  display: none; place-items: center; box-shadow: 0 4px 12px rgba(79, 70, 229, .55);
}
.gate-tile.on .gt-check { display: grid; }
.gt-body { position: absolute; left: 16px; right: 16px; bottom: 15px; display: flex; flex-direction: column; gap: 3px; }
.gt-emoji { font-size: 24px; line-height: 1.2; }
.gt-name {
  color: #fff; font-size: 18.5px; font-weight: 800; line-height: 1.35; letter-spacing: .2px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, .45);
}
.gate-tip {
  display: none; align-items: center; gap: 13px; margin-top: 12px; padding: 10px 16px;
  border-radius: 12px; background: var(--warn-soft); color: var(--warn);
  border: 1px solid color-mix(in srgb, var(--warn) 28%, transparent); animation: fade .22s;
}
.gate-tip.show { display: flex; }
.gt-ico { font-size: 27px; line-height: 1; flex: none; }
.gt-main { font-size: 15.5px; font-weight: 800; line-height: 1.55; }
.gt-sub { font-size: 13px; opacity: .9; margin-top: 3px; line-height: 1.6; }
/* 操作条固定在视口底部：任何屏幕高度下，进入 / 退出都无需下滑 */
.gate-foot {
  position: sticky; bottom: 0; z-index: 3;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  margin-top: 14px; padding: 12px 0 2px; border-top: 1px solid var(--border); background: var(--surface);
}
.gate-hint { font-size: 13.5px; color: var(--muted); }
.gate-hint b { color: var(--primary); }
.gate-actions { display: flex; align-items: center; gap: 12px; }
.gate-btn {
  border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text);
  font-size: 15px; font-weight: 700; letter-spacing: .3px;
  padding: 10px 26px; border-radius: 11px; cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, color .16s ease;
}
.gate-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(24, 36, 78, .14); }
.gate-btn:active { transform: none; }
.gate-btn.exit:hover { border-color: var(--danger); color: var(--danger); }
.gate-btn.primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-2)); border-color: transparent; color: #fff;
  box-shadow: 0 8px 20px rgba(79, 70, 229, .24);
}
.gate-btn.primary:hover { box-shadow: 0 12px 26px rgba(79, 70, 229, .34); }
@media (max-width: 900px) {
  .gate-shell { padding: 14px 12px 18px; }
  .gate-frame { padding: 16px 18px 12px; border-radius: 20px; }
  .gate-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  .gate-tile { max-height: min(16vh, 154px); }
  .gate-head { margin-bottom: 12px; }
  .gate-head-right { align-items: flex-start; }
  .gate-current { align-items: flex-start; }
  .gate-current-tags { justify-content: flex-start; }
  .gate-quick { justify-content: flex-start; }
  .gate-head-main h1 { font-size: 21px; }
  .gt-name { font-size: 16px; }
  .login-side { padding: 24px 16px; }
  .login-card { padding: 22px 18px; }
}
@media (max-width: 560px) {
  .gate-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .gate-frame { padding: 14px 14px 10px; }
  .gate-head { margin-bottom: 10px; }
  .gate-head-main h1 { font-size: 19px; }
  .gate-head-main p { font-size: 12.5px; }
  .gate-tile { max-height: 118px; }
  .gate-current { padding: 7px 11px; }
  .gate-quick .btn { font-size: 12px; padding: 6px 9px; }
  .gate-foot { justify-content: center; }
  .gate-hint { width: 100%; text-align: center; font-size: 12.5px; }
  .gate-actions { width: 100%; }
  .gate-btn { flex: 1; padding: 10px 12px; font-size: 14px; }
  .gt-name { font-size: 14.5px; }
  .content { padding: 18px 14px 32px; }
  body.fullscreen-page.gate-float-open .exam-float:not(.mini),
  body.fullscreen-page.gate-float-open .notice-float:not(.mini) { width: min(268px, 86vw); }
}

/* 答案勾选框需要高于 .field label / #modal-form .field > label 的优先级 */
#modal-form .ans-picker {
  display: grid; place-items: center; margin: 0; padding: 0;
  width: 28px; height: 28px; font-size: 14px; font-weight: 400; color: inherit;
  cursor: pointer; flex: none;
}
#modal-form .field.opt-field > label:first-of-type { margin: 0; }
#modal-form .field.opt-field .hint { margin-top: 0; }


/* ============================================================
   V2.4.0 · 管理员「考场异常」
   ============================================================ */
.viol-shot {
  position: relative; width: 148px; height: 94px; padding: 0; border: 1px solid var(--border-strong);
  border-radius: 9px; overflow: hidden; background: #10182e; cursor: zoom-in;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.viol-shot img { width: 100%; height: 100%; object-fit: contain; display: block; }
.viol-shot:hover { border-color: var(--primary); box-shadow: 0 6px 16px rgba(24, 36, 78, .16); transform: translateY(-2px); }
.vs-zoom { position: absolute; right: 4px; bottom: 4px; font-size: 12px; line-height: 1;
  background: rgba(10, 16, 34, .74); color: #fff; padding: 4px 6px; border-radius: 6px; }
.viol-shot-full {
  width: 100%; height: auto; object-fit: contain; display: block;
  border: 1px solid var(--border); border-radius: 12px; background: #10182e;
}
.viol-shot-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- 全屏高清原图查看器（替代被浏览器拦截的 data: 新标签页） ---------- */
.shot-lightbox {
  position: fixed; inset: 0; z-index: 95; display: flex; flex-direction: column;
  background: rgba(8, 12, 26, .96); color: #eef2ff; animation: fade .16s;
}
.slb-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  padding: 12px 18px; border-bottom: 1px solid rgba(255, 255, 255, .12); flex: none;
}
.slb-title { font-size: 15px; font-weight: 800; }
.slb-tools { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.slb-tools .btn { min-width: 34px; }
.slb-zoom { font-family: var(--mono); font-size: 12.5px; min-width: 66px; text-align: center; color: #b9c6ef; }
.slb-stage {
  flex: 1; min-height: 0; overflow: auto; display: flex;
  padding: 18px; cursor: grab;
}
.slb-stage.grabbing { cursor: grabbing; }
.slb-img {
  display: block; flex: none; margin: auto; border-radius: 6px; background: #10182e;
  box-shadow: 0 12px 44px rgba(0, 0, 0, .5); user-select: none; -webkit-user-drag: none;
}
.slb-img.fit { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.slb-img:not(.fit) { max-width: none; max-height: none; height: auto; }
.slb-foot {
  padding: 11px 18px; border-top: 1px solid rgba(255, 255, 255, .12);
  font-size: 12.5px; color: #b9c6ef; line-height: 1.7; flex: none;
}
body[data-theme="dark"] .shot-lightbox { background: rgba(4, 7, 16, .97); }
@media (max-width: 720px) {
  .slb-bar { padding: 10px 12px; }
  .slb-tools .btn { padding: 6px 9px; font-size: 12.5px; }
  .slb-foot { padding: 9px 12px; font-size: 11.5px; }
}
.vdf-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; }
.vdf-row {
  display: flex; gap: 10px; align-items: flex-start; padding: 10px 13px; font-size: 14px;
  border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border);
}
.vdf-row span { color: var(--muted); min-width: 76px; flex: none; font-size: 13px; }
.vdf-row b { font-weight: 700; line-height: 1.6; word-break: break-all; }
@media (max-width: 680px) { .vdf-grid { grid-template-columns: 1fr; } }

/* ============================================================
   管理员端 · Excel 批量创建学生账号
   ============================================================ */
.bi-wrap { display: flex; flex-direction: column; gap: 14px; }
.bi-steps { display: flex; flex-wrap: wrap; gap: 8px; }
.bi-steps span {
  flex: 1; min-width: 118px; text-align: center; padding: 9px 12px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface-2);
  font-size: 13px; font-weight: 700; color: var(--muted);
}
.bi-steps span.on { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.bi-card { padding: 16px 18px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-2); }
.bi-card-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.bi-card-h b { font-size: 15px; }
.bi-drop {
  padding: 22px 16px; text-align: center; cursor: pointer;
  border: 2px dashed var(--border-strong); border-radius: 14px; background: var(--surface);
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
}
.bi-drop:hover, .bi-drop.over { border-color: var(--primary); background: var(--primary-soft); transform: translateY(-1px); }
.bi-drop-ico { font-size: 32px; line-height: 1.2; margin-bottom: 8px; }
.bi-preview { margin-top: 14px; }
.bi-hint {
  padding: 14px 16px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); color: var(--muted); font-size: 13.5px; line-height: 1.7;
}
.bi-summary { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 4px 0 8px; }
.bi-errors, .bi-warns { margin-top: 12px; padding: 12px 16px; border-radius: 10px; font-size: 13.5px; line-height: 1.7; }
.bi-errors { background: var(--danger-soft); border: 1px solid color-mix(in srgb, var(--danger) 30%, transparent); color: var(--danger); }
.bi-warns { background: var(--warn-soft); border: 1px solid color-mix(in srgb, var(--warn) 30%, transparent); color: var(--warn); }
.bi-errors ul, .bi-warns ul { margin: 8px 0 0; padding-left: 20px; }
.bi-errors li, .bi-warns li { margin-bottom: 4px; }
.bi-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  font-size: 12.5px; color: var(--muted);
}
@media (max-width: 620px) {
  .bi-card { padding: 14px 12px; }
  .bi-steps span { min-width: 44%; flex: 1; }
  .bi-drop { padding: 18px 10px; }
}
