/* ITS-WEB main.css — 科技感双主题 v2.0 */
/* 字体引入已在 index.html 中通过 Google Fonts 加载 */

/* ═══════════════════════════════════════════════════════════
   CSS 变量 — 深色主题（默认）
═══════════════════════════════════════════════════════════ */
:root {
  --bg:          #080b11;
  --bg-card:     #0f1422;
  --bg-card2:    #141b2e;
  --bg-elevated: #1a2340;
  --border:      #1e293b;
  --border-faint:#0d1626;

  --primary:     #00f2fe;
  --primary-dim: rgba(0,242,254,.12);
  --primary-glow:rgba(0,242,254,.25);
  --success:     #10b981;
  --success-dim: rgba(16,185,129,.12);
  --warning:     #f59e0b;
  --warning-dim: rgba(245,158,11,.12);
  --danger:      #ef4444;
  --danger-dim:  rgba(239,68,68,.12);
  --purple:      #8b5cf6;
  --purple-dim:  rgba(139,92,246,.12);

  --text:        #e2e8f0;
  --text-muted:  #64748b;
  --text-sub:    #94a3b8;

  --font-sans:   'Noto Sans SC', system-ui, sans-serif;
  --font-mono:   'JetBrains Mono', 'Courier New', monospace;
  --font-display:'Space Grotesk', 'Noto Sans SC', sans-serif;

  --radius-sm:   8px;
  --radius:      12px;
  --radius-lg:   16px;
  --radius-xl:   20px;

  --shadow:      0 4px 24px rgba(0,0,0,.4);
  --shadow-sm:   0 2px 8px rgba(0,0,0,.3);
  --shadow-glow: 0 0 20px -4px rgba(0,242,254,.2);
}

/* 亮色主题 */
html.light {
  --bg:          #f1f5f9;
  --bg-card:     #ffffff;
  --bg-card2:    #f8fafc;
  --bg-elevated: #e2e8f0;
  --border:      #e2e8f0;
  --border-faint:#f1f5f9;

  --primary:     #0ea5e9;
  --primary-dim: rgba(14,165,233,.1);
  --primary-glow:rgba(14,165,233,.2);
  --success:     #059669;
  --success-dim: rgba(5,150,105,.1);
  --warning:     #d97706;
  --warning-dim: rgba(217,119,6,.1);
  --danger:      #dc2626;
  --danger-dim:  rgba(220,38,38,.1);

  --text:        #1e293b;
  --text-muted:  #64748b;
  --text-sub:    #475569;

  --shadow:      0 4px 24px rgba(0,0,0,.08);
  --shadow-sm:   0 2px 8px rgba(0,0,0,.06);
  --shadow-glow: 0 0 20px -4px rgba(14,165,233,.15);
}

/* ═══════════════════════════════════════════════════════════
   全局重置与基础
═══════════════════════════════════════════════════════════ */
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  transition: background .3s, color .3s;
  overflow-x: hidden;
}

/* 科技网格背景 */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(0,242,254,.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0,242,254,.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}
html.light body::before {
  background-image:
    linear-gradient(to right, rgba(0,0,0,.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0,0,0,.03) 1px, transparent 1px);
}

#app { position: relative; z-index: 1; }

/* 滚动条 */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 9999px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* 选中文字 */
::selection { background: var(--primary); color: #000; }

a { color: var(--primary); text-decoration: none; }

/* ═══════════════════════════════════════════════════════════
   导航栏
═══════════════════════════════════════════════════════════ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 60px;
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  background: rgba(8,11,17,.85);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
html.light .navbar {
  background: rgba(255,255,255,.85);
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  text-decoration: none;
  color: var(--text);
}

.brand-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: linear-gradient(145deg, #1c2230 0%, #0d121c 100%);
  border: 1px solid rgba(245, 158, 11, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  position: relative;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.brand-icon img { width: 22px; height: 22px; object-fit: contain; }

.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  letter-spacing: -.3px;
}
.brand-sub {
  font-family: var(--font-mono);
  font-size: .65rem;
  color: var(--text-muted);
  display: none;
}
@media(min-width:640px){ .brand-sub { display: block; } }

.navbar-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  flex-wrap: wrap;
}

.nav-link {
  font-family: var(--font-mono);
  font-size: .75rem;
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: all .2s;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}
.nav-link:hover {
  color: var(--primary);
  border-color: var(--border);
  background: var(--primary-dim);
}
.nav-link.active {
  color: var(--primary);
  border-color: rgba(0,242,254,.3);
  background: var(--primary-dim);
  font-weight: 600;
}

.theme-btn, .logout-btn {
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: .8rem;
  font-family: var(--font-mono);
  transition: all .2s;
  display: flex;
  align-items: center;
  gap: 4px;
}
.theme-btn:hover, .logout-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* ═══════════════════════════════════════════════════════════
   容器
═══════════════════════════════════════════════════════════ */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 24px 16px 40px;
}
.container-wide {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 16px 40px;
}

/* ═══════════════════════════════════════════════════════════
   卡片
═══════════════════════════════════════════════════════════ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
  transition: border-color .2s;
}
.card:hover { border-color: rgba(0,242,254,.15); }

.card-header {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
  padding-bottom: 16px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-header .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 8px var(--primary);
  animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
  0%,100%{ opacity:1; } 50%{ opacity:.4; }
}

/* ═══════════════════════════════════════════════════════════
   按钮
═══════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-family: var(--font-mono);
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.4;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #0ea5e9);
  color: #000;
  border-color: transparent;
  box-shadow: 0 4px 16px var(--primary-glow);
}
.btn-primary:hover { filter: brightness(1.1); box-shadow: 0 6px 24px var(--primary-glow); }

.btn-success {
  background: var(--success);
  color: #fff;
}
.btn-success:hover { filter: brightness(1.1); }

.btn-danger {
  background: var(--danger);
  color: #fff;
}
.btn-danger:hover { filter: brightness(1.1); }

.btn-outline {
  background: transparent;
  border-color: var(--border);
  color: var(--text-sub);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-dim); }

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--text-muted);
}
.btn-ghost:hover { background: var(--bg-elevated); color: var(--text); }

.btn-warning {
  background: var(--warning);
  color: #000;
}

.btn-sm { padding: 4px 12px; font-size: .75rem; }
.btn-lg { padding: 12px 28px; font-size: .9rem; }
.btn-block { width: 100%; }

/* ═══════════════════════════════════════════════════════════
   首页 Hero Banner
═══════════════════════════════════════════════════════════ */
.hero-banner {
  background: linear-gradient(135deg, #0a1628 0%, #0f1e38 40%, #08111f 100%);
  border: 1px solid rgba(0,242,254,.2);
  border-radius: var(--radius-xl);
  padding: 36px 28px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}
html.light .hero-banner {
  background: linear-gradient(135deg, #dbeafe 0%, #e0f2fe 100%);
  border-color: rgba(14,165,233,.3);
}
.hero-banner::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,242,254,.08) 0%, transparent 70%);
  pointer-events: none;
}
.hero-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}
html.light .hero-title { color: #0f172a; }
.hero-sub {
  font-family: var(--font-mono);
  font-size: .82rem;
  color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════════════
   功能卡片网格
═══════════════════════════════════════════════════════════ */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px,1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  cursor: pointer;
  transition: all .25s;
  text-align: center;
}
.feature-card:hover {
  border-color: var(--primary);
  background: var(--bg-card2);
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}
.feature-icon {
  font-size: 2.2rem;
  margin-bottom: 12px;
  line-height: 1;
}
.feature-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .95rem;
  color: var(--text);
  margin-bottom: 6px;
}
.feature-desc {
  font-size: .8rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* 统计卡片 */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px,1fr));
  gap: 12px;
}
.stat-card {
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
}
.stat-num {
  font-family: var(--font-mono);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.2;
}
.stat-label {
  font-size: .75rem;
  color: var(--text-muted);
  margin-top: 4px;
  font-family: var(--font-mono);
}
.text-success { color: var(--success) !important; }
.text-danger  { color: var(--danger) !important; }
.text-warning { color: var(--warning) !important; }
.text-muted   { color: var(--text-muted) !important; }
.text-primary { color: var(--primary) !important; }

/* ═══════════════════════════════════════════════════════════
   登录页
═══════════════════════════════════════════════════════════ */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.login-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 48px 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow), 0 0 60px rgba(0,242,254,.05);
  animation: slide-up .4s ease;
}
.login-logo {
  width: 64px; height: 64px;
  background: linear-gradient(135deg, #00f2fe, #0ea5e9);
  border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
  box-shadow: 0 8px 32px rgba(0,242,254,.3);
}
.login-logo img { width: 38px; height: 38px; object-fit: contain; }
.login-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 6px;
  color: var(--text);
}
.login-sub {
  font-family: var(--font-mono);
  font-size: .8rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 32px;
}
.form-group { margin-bottom: 20px; }
.form-label {
  display: block;
  font-family: var(--font-mono);
  font-size: .78rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.form-input {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: .95rem;
  font-family: var(--font-mono);
  transition: border-color .2s;
  outline: none;
}
.form-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-dim); }
.form-error { font-size: .8rem; color: var(--danger); margin-top: 6px; min-height: 20px; font-family: var(--font-mono); }

/* ═══════════════════════════════════════════════════════════
   步骤指示器
═══════════════════════════════════════════════════════════ */
.steps {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 28px;
  padding: 0 4px;
}
.step {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.step-dot {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--bg-elevated);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-size: .75rem;
  font-weight: 700;
  color: var(--text-muted);
  transition: all .2s;
}
.step.active .step-dot {
  border-color: var(--primary);
  background: var(--primary-dim);
  color: var(--primary);
  box-shadow: 0 0 12px var(--primary-glow);
}
.step.done .step-dot {
  border-color: var(--success);
  background: var(--success-dim);
  color: var(--success);
}
.step-label {
  font-family: var(--font-mono);
  font-size: .75rem;
  color: var(--text-muted);
}
.step.active .step-label { color: var(--primary); font-weight: 700; }
.step.done .step-label { color: var(--success); }
.step-line {
  flex: 1;
  height: 1px;
  background: var(--border);
  margin: 0 8px;
}
.step-line.done { background: var(--success); }

/* ═══════════════════════════════════════════════════════════
   区块标题
═══════════════════════════════════════════════════════════ */
.section-title {
  font-family: var(--font-mono);
  font-size: .8rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin: 20px 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-faint);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.section-title:first-child { margin-top: 0; }

/* ═══════════════════════════════════════════════════════════
   标签选择（题型/分类/材料/参数）
═══════════════════════════════════════════════════════════ */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}
.tag {
  padding: 5px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: .78rem;
  cursor: pointer;
  transition: all .15s;
  user-select: none;
}
.tag:hover { border-color: var(--primary); color: var(--primary); }
.tag.selected {
  border-color: var(--primary);
  background: var(--primary-dim);
  color: var(--primary);
  font-weight: 600;
}

/* 专项卡片 */
.spec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px,1fr));
  gap: 10px;
  margin-bottom: 8px;
}
.spec-card {
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  cursor: pointer;
  transition: all .15s;
}
.spec-card:hover { border-color: var(--primary); background: var(--primary-dim); }
.spec-card.selected { border-color: var(--primary); background: var(--primary-dim); }
.spec-card h3 { font-size: .85rem; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.spec-card p { font-family: var(--font-mono); font-size: .72rem; color: var(--text-muted); }
.spec-card.selected h3 { color: var(--primary); }

/* 题数选择 */
.count-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.count-btn {
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: .82rem;
  cursor: pointer;
  transition: all .15s;
  user-select: none;
}
.count-btn:hover { border-color: var(--primary); color: var(--primary); }
.count-btn.selected { border-color: var(--primary); background: var(--primary-dim); color: var(--primary); font-weight: 700; }

.count-custom {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: .8rem;
  color: var(--text-muted);
}
.count-custom input {
  width: 80px;
  padding: 6px 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: .82rem;
  outline: none;
  text-align: center;
}
.count-custom input:focus { border-color: var(--primary); }

/* 练习模式 */
.mode-selector {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.mode-tab {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: .78rem;
  cursor: pointer;
  transition: all .15s;
}
.mode-tab:hover { border-color: var(--primary); color: var(--primary); }
.mode-tab.active {
  border-color: var(--primary);
  background: var(--primary-dim);
  color: var(--primary);
  font-weight: 700;
}

/* 考核模式选择 */
.exam-mode-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}
.exam-mode-card {
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  cursor: pointer;
  transition: all .15s;
  text-align: center;
}
.exam-mode-card:hover { border-color: var(--primary); }
.exam-mode-card.selected { border-color: var(--primary); background: var(--primary-dim); }
.exam-mode-card h4 { font-size: .9rem; font-weight: 700; margin-bottom: 4px; color: var(--text); }
.exam-mode-card.selected h4 { color: var(--primary); }
.exam-mode-card p { font-size: .75rem; color: var(--text-muted); font-family: var(--font-mono); }

/* 角色卡片 */
.role-card {
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  cursor: pointer;
  transition: all .15s;
}
.role-card:hover { border-color: var(--primary); }
.role-card.selected { border-color: var(--primary); background: var(--primary-dim); }
.role-card h3 { font-size: .95rem; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.role-card.selected h3 { color: var(--primary); }
.role-card p { font-size: .78rem; color: var(--text-muted); font-family: var(--font-mono); line-height: 1.6; }

/* ═══════════════════════════════════════════════════════════
   题目区域
═══════════════════════════════════════════════════════════ */
.quiz-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: start;
}
@media(min-width:900px){
  .quiz-layout { grid-template-columns: 1fr 280px; }
}

.quiz-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.quiz-header {
  padding: 16px 24px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-card2);
}
.quiz-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.quiz-counter {
  font-family: var(--font-mono);
  font-size: .82rem;
  color: var(--text-muted);
}
.quiz-counter strong { color: var(--primary); font-size: 1rem; }
.quiz-timer {
  font-family: var(--font-mono);
  font-size: .9rem;
  font-weight: 700;
  color: var(--warning);
  background: var(--warning-dim);
  border: 1px solid rgba(245,158,11,.25);
  padding: 4px 12px;
  border-radius: 999px;
}
.quiz-timer.danger { color: var(--danger); background: var(--danger-dim); border-color: rgba(239,68,68,.25); animation: blink .8s infinite; }
@keyframes blink { 0%,100%{ opacity:1; } 50%{ opacity:.4; } }

.progress { height: 3px; background: var(--border); border-radius: 999px; overflow: hidden; margin-top: 8px; }
.progress-bar { height: 100%; background: linear-gradient(90deg, var(--primary), var(--success)); border-radius: 999px; transition: width .3s; }
.progress-label { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: .72rem; color: var(--text-muted); margin-bottom: 4px; }

.quiz-body { padding: 24px; }

.question-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: .72rem;
  font-weight: 700;
}
.badge-single { background: var(--primary-dim); color: var(--primary); border: 1px solid rgba(0,242,254,.25); }
.badge-multi  { background: var(--purple-dim);  color: var(--purple);  border: 1px solid rgba(139,92,246,.25); }
.badge-judge  { background: var(--warning-dim); color: var(--warning); border: 1px solid rgba(245,158,11,.25); }
.badge-danger { background: var(--danger-dim);  color: var(--danger);  border: 1px solid rgba(239,68,68,.25); }
.badge-success{ background: var(--success-dim); color: var(--success); border: 1px solid rgba(16,185,129,.25); }

.question-text {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text);
  margin-bottom: 20px;
  white-space: pre-wrap;
}

.option-list { display: flex; flex-direction: column; gap: 10px; }
.option-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card2);
  cursor: pointer;
  transition: all .15s;
  line-height: 1.5;
}
.option-item:hover:not(.disabled) { border-color: var(--primary); background: var(--primary-dim); }
.option-item.selected { border-color: var(--primary); background: var(--primary-dim); }
.option-item.correct  { border-color: var(--success); background: var(--success-dim); cursor: default; }
.option-item.wrong    { border-color: var(--danger);  background: var(--danger-dim);  cursor: default; }
.option-item.disabled { cursor: default; }
.option-item.answered { opacity: .7; cursor: pointer; }

.option-label {
  flex-shrink: 0;
  width: 28px; height: 28px;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-size: .8rem;
  font-weight: 700;
  color: var(--text-muted);
  transition: all .15s;
}
.option-item.selected .option-label { background: var(--primary); border-color: var(--primary); color: #000; }
.option-item.correct .option-label  { background: var(--success); border-color: var(--success); color: #fff; }
.option-item.wrong   .option-label  { background: var(--danger);  border-color: var(--danger);  color: #fff; }

.explanation {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  font-size: .88rem;
  line-height: 1.65;
}
.explanation-correct { border-color: rgba(16,185,129,.3); background: var(--success-dim); }
.explanation-wrong   { border-color: rgba(239,68,68,.3);  background: var(--danger-dim); }
.expl-result {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: .85rem;
  margin-bottom: 8px;
}
.expl-result.correct { color: var(--success); }
.expl-result.wrong   { color: var(--danger); }
.expl-text { color: var(--text-sub); }
.expl-label { font-family: var(--font-mono); font-size: .75rem; text-transform: uppercase; letter-spacing:.05em; color: var(--text-muted); margin-bottom:4px; }

/* 速记模式 */
.flash-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px;
}
.flash-answer {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid rgba(16,185,129,.3);
  background: var(--success-dim);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--success);
  text-align: center;
}

/* 答题工具栏 */
.quiz-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  flex-wrap: wrap;
}
.quiz-actions .ml-auto { margin-left: auto; }

/* ═══════════════════════════════════════════════════════════
   答题卡面板
═══════════════════════════════════════════════════════════ */
.answer-sheet {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  position: sticky;
  top: 76px;
}
.answer-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: .75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}
.answer-sheet-legend { display: flex; gap: 10px; flex-wrap: wrap; }
.legend-item { display: flex; align-items: center; gap: 4px; font-size: .7rem; color: var(--text-muted); }
.legend-dot { width: 8px; height: 8px; border-radius: 50%; }

.answer-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 4px;
  max-height: 320px;
  overflow-y: auto;
  padding-right: 2px;
}
.answer-dot {
  aspect-ratio: 1;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: .6rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-muted);
  transition: all .15s;
}
.answer-dot:hover { border-color: var(--primary); color: var(--primary); }
.answer-dot.current { border-color: var(--primary); background: var(--primary-dim); color: var(--primary); font-weight: 900; }
.answer-dot.correct { border-color: var(--success); background: var(--success-dim); color: var(--success); }
.answer-dot.wrong   { border-color: var(--danger);  background: var(--danger-dim);  color: var(--danger); }
.answer-dot.answered{ border-color: var(--border); background: var(--bg-card2); color: var(--text-sub); }

.answer-sheet-footer {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: .72rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
}

/* 移动端答题卡折叠 */
.sheet-toggle {
  display: none;
  width: 100%;
  padding: 8px;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: .78rem;
  cursor: pointer;
  text-align: center;
  margin-bottom: 8px;
}
@media(max-width:899px){
  .quiz-layout { grid-template-columns: 1fr; }
  .answer-sheet { position: static; order: -1; }
  .answer-sheet { display: none; }
  .answer-sheet.open { display: block; }
  .sheet-toggle { display: block; }
  .answer-grid { grid-template-columns: repeat(10,1fr); max-height: 200px; }
}

/* ═══════════════════════════════════════════════════════════
   结果页
═══════════════════════════════════════════════════════════ */
.score-circle {
  width: 140px; height: 140px;
  border-radius: 50%;
  border: 4px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  position: relative;
}
.score-circle::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: conic-gradient(var(--primary) 0%, transparent 0%);
  animation: score-fill 1s ease forwards;
}
.score-circle.pass  { border-color: var(--success); }
.score-circle.pass::before { background: conic-gradient(var(--success) 0%, transparent 0%); }
.score-circle.fail  { border-color: var(--danger); }
.score-circle.fail::before { background: conic-gradient(var(--danger) 0%, transparent 0%); }
@keyframes score-fill { from { background: conic-gradient(var(--primary) 0%, transparent 0%); } }

.score-num {
  font-family: var(--font-mono);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--primary);
  position: relative;
  z-index: 1;
}
.score-circle.pass .score-num { color: var(--success); }
.score-circle.fail .score-num { color: var(--danger); }
.score-total {
  font-family: var(--font-mono);
  font-size: .78rem;
  color: var(--text-muted);
  position: relative;
  z-index: 1;
}

/* 错题列表 */
.wrong-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 8px;
  overflow: hidden;
  transition: border-color .2s;
}
.wrong-item:hover { border-color: rgba(239,68,68,.3); }
.wrong-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  cursor: pointer;
  background: var(--bg-card2);
}
.wrong-item-header:hover { background: var(--bg-elevated); }
.wrong-item-body {
  display: none;
  padding: 16px;
  border-top: 1px solid var(--border);
  background: var(--bg-card);
  font-size: .88rem;
  line-height: 1.7;
}
.wrong-item.expanded .wrong-item-body { display: block; }
.wrong-count-badge {
  font-family: var(--font-mono);
  font-size: .72rem;
  color: var(--danger);
  background: var(--danger-dim);
  border: 1px solid rgba(239,68,68,.2);
  padding: 2px 8px;
  border-radius: 999px;
}

/* ═══════════════════════════════════════════════════════════
   加载遮罩
═══════════════════════════════════════════════════════════ */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  gap: 16px;
}
.spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
.loading-progress { width: 200px; height: 3px; background: var(--border); border-radius: 999px; overflow: hidden; }
.loading-bar { height: 100%; background: var(--primary); border-radius: 999px; transition: width .3s; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Toast */
.toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; }
.toast {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  box-shadow: var(--shadow);
  font-family: var(--font-mono);
  font-size: .82rem;
  color: var(--text);
  animation: toast-in .3s ease;
  max-width: 340px;
}
.toast.success { border-color: rgba(16,185,129,.4); }
.toast.error   { border-color: rgba(239,68,68,.4);  }
.toast.warning { border-color: rgba(245,158,11,.4); }
.toast.info    { border-color: rgba(0,242,254,.4);  }
@keyframes toast-in { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }

/* 空状态 */
.empty-state { text-align: center; padding: 40px 20px; color: var(--text-muted); }
.empty-icon { font-size: 3rem; margin-bottom: 12px; }

/* 分割线 */
.divider { height: 1px; background: var(--border); margin: 20px 0; }

/* 统计页进度条 */
.stat-row { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.stat-bar-wrap { flex: 1; height: 6px; background: var(--border); border-radius: 999px; overflow: hidden; }
.stat-bar { height: 100%; background: linear-gradient(90deg, var(--primary), var(--success)); border-radius: 999px; transition: width .6s ease; }
.stat-name { font-family: var(--font-mono); font-size: .75rem; color: var(--text-sub); min-width: 120px; }
.stat-pct  { font-family: var(--font-mono); font-size: .75rem; color: var(--primary); min-width: 40px; text-align: right; }

table { width: 100%; border-collapse: collapse; font-family: var(--font-mono); font-size: .8rem; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); }
th { color: var(--text-muted); font-weight: 700; text-transform: uppercase; font-size: .72rem; letter-spacing: .05em; }
td { color: var(--text-sub); }
tr:last-child td { border-bottom: none; }
.table-wrap { overflow-x: auto; }

/* 工具类 */
.flex { display: flex; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.items-center { align-items: center; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.ml-auto { margin-left: auto; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.text-center { text-align: center; }
.text-sm { font-size: .82rem; }
.font-mono { font-family: var(--font-mono); }
.font-bold { font-weight: 700; }

/* 考核说明卡片 */
.info-banner {
  background: var(--warning-dim);
  border: 1px solid rgba(245,158,11,.3);
  border-radius: var(--radius);
  padding: 14px 16px;
  font-size: .85rem;
  color: var(--text-sub);
  margin: 16px 0;
  font-family: var(--font-mono);
}

/* 面包屑 */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: .75rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.breadcrumb .sep { opacity: .4; }
.breadcrumb .current { color: var(--primary); font-weight: 700; }

/* 动画 */
.fade-in { animation: fade-in .3s ease; }
.slide-up { animation: slide-up .35s ease; }
@keyframes fade-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes slide-up { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* 响应式 */
@media(max-width:600px){
  .container, .container-wide { padding: 16px 12px 32px; }
  .card { padding: 16px; }
  .quiz-body { padding: 16px; }
  .hero-banner { padding: 24px 16px; }
  .login-card { padding: 32px 20px; }
  .hero-title { font-size: 1.2rem; }
  .navbar { padding: 0 12px; }
  .nav-link span { display: none; }
  .exam-mode-selector { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════════
   移动端与 iOS / iPad 深度适配 (iPhone & iPad PWA)
═══════════════════════════════════════════════════════════ */

/* iOS 禁用长按弹出呼出菜单和双击缩放 */
html, body {
  -webkit-touch-callout: none;
  -webkit-text-size-adjust: 100%;
}

/* 安全区适配 (刘海屏、灵动岛、底部Home条) */
body {
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
}

.navbar {
  padding-top: max(env(safe-area-inset-top, 0px), 0px);
}

/* 移动端 (iPhone 及各类手机，宽度 <= 640px) */
@media (max-width: 640px) {
  .navbar {
    height: auto;
    min-height: 52px;
    padding: 8px 12px;
    gap: 8px;
  }
  .brand-icon {
    width: 30px;
    height: 30px;
  }
  .brand-icon img {
    width: 18px;
    height: 18px;
  }
  .brand-name {
    font-size: 0.95rem;
  }
  .brand-sub {
    display: none !important;
  }
  
  .navbar-nav {
    gap: 2px;
  }
  .nav-link {
    padding: 5px 6px;
    font-size: 0.72rem;
  }
  .nav-text {
    display: none; /* 移动端隐藏文字，仅留 Emoji */
  }
  .theme-btn, .logout-btn {
    padding: 4px 6px;
    font-size: 0.75rem;
  }

  .container, .container-wide {
    padding: 12px 10px 48px;
  }
  .card {
    padding: 16px 14px;
    border-radius: var(--radius);
  }
  .hero-banner {
    padding: 20px 14px;
  }
  .hero-title {
    font-size: 1.15rem;
  }

  /* 选项按钮：触控友好，高度大于 44px */
  .option-item {
    min-height: 48px;
    padding: 10px 12px;
  }
  .option-label {
    width: 26px;
    height: 26px;
    font-size: 0.75rem;
  }

  /* 答题卡在手机端：作为底部上拉抽屉 */
  .sheet-toggle {
    display: block !important;
    width: 100%;
    margin-bottom: 12px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    background: var(--bg-card2);
    border: 1px solid var(--primary);
    color: var(--primary);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
  }
  .answer-sheet {
    display: none;
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    top: auto !important;
    z-index: 1000 !important;
    background: var(--bg-card) !important;
    border-top: 2px solid var(--primary) !important;
    border-radius: 20px 20px 0 0 !important;
    box-shadow: 0 -8px 32px rgba(0,0,0,0.7) !important;
    max-height: 75vh !important;
    padding: 20px 16px env(safe-area-inset-bottom, 20px) !important;
    overflow-y: auto !important;
    animation: slide-up .3s ease !important;
  }
  .answer-sheet.open {
    display: block !important;
  }
  .answer-sheet .close-sheet-btn {
    display: block !important;
  }
  .answer-grid {
    grid-template-columns: repeat(7, 1fr) !important;
    gap: 6px !important;
    max-height: 50vh !important;
  }
  .answer-dot {
    height: 36px !important;
    font-size: 0.75rem !important;
  }

  .quiz-actions {
    flex-direction: column-reverse;
    gap: 12px;
  }
  .quiz-actions .btn {
    width: 100%;
    min-height: 44px;
  }
  .quiz-actions .ml-auto {
    margin-left: 0;
    width: 100%;
  }

  .stat-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* iPad 及平板适配 (屏幕宽度 641px ~ 1024px) */
@media (min-width: 641px) and (max-width: 1024px) {
  .container-wide {
    padding: 20px 16px 40px;
  }
  .quiz-layout {
    grid-template-columns: 1fr 220px !important;
    gap: 14px;
  }
  .answer-grid {
    grid-template-columns: repeat(6, 1fr) !important;
    max-height: 400px;
  }
  .nav-text {
    display: inline;
  }
}

/* ── 视觉防抖与细腻平滑过渡 ───────────────────────── */
.brand-icon {
  background: linear-gradient(145deg, #1e2536 0%, #0e131d 100%) !important;
  border: 1px solid rgba(245, 158, 11, 0.38) !important;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
}

.quiz-card {
  min-height: 480px;
  display: flex;
  flex-direction: column;
}

.quiz-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 380px;
}

/* 局部题目平滑淡入效果（取代整页卡片瞬闪） */
.question-viewport {
  transition: opacity 0.18s ease-in-out;
  opacity: 1;
}

.question-viewport.changing {
  opacity: 0.15;
}

/* 错题专项分组操作栏 */
.spec-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 24px 0 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.spec-group-title {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.spec-group-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ═══════════════════════════════════════════════════════════
   胶囊式导航组件 (Capsule Nav Link)
═══════════════════════════════════════════════════════════ */
.capsule-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 9999px;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(51, 65, 85, 0.7);
  color: #cbd5e1;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
html.light .capsule-nav-link {
  background: rgba(241, 245, 249, 0.9);
  border-color: rgba(203, 213, 225, 0.9);
  color: #334155;
}
.capsule-nav-link:hover {
  border-color: var(--primary);
  background: var(--primary-dim);
  color: var(--primary);
  box-shadow: 0 0 12px var(--primary-glow);
  transform: translateY(-1px);
}
.capsule-nav-link.active {
  border-color: var(--primary);
  background: var(--primary-dim);
  color: var(--primary);
  font-weight: 700;
  box-shadow: 0 0 12px var(--primary-glow);
}
.capsule-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.capsule-dot.cyan    { background: #00f2fe; box-shadow: 0 0 6px #00f2fe; }
.capsule-dot.emerald { background: #10b981; box-shadow: 0 0 6px #10b981; }
.capsule-dot.crimson { background: #ef4444; box-shadow: 0 0 6px #ef4444; }
.capsule-dot.amber   { background: #f59e0b; box-shadow: 0 0 6px #f59e0b; }

/* ═══════════════════════════════════════════════════════════
   MoonTVPlus 风格现代化登录页
═══════════════════════════════════════════════════════════ */
.moontv-login-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  position: relative;
}

.login-top-actions {
  position: absolute;
  top: 24px;
  right: 28px;
  z-index: 10;
}

.moontv-theme-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: all 0.2s;
}
.moontv-theme-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: rotate(15deg);
}

.moontv-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 38px 32px 30px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5), 0 0 30px rgba(0, 242, 254, 0.05);
  animation: slide-up 0.35s ease;
  position: relative;
}

.moontv-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 28px;
}

.moontv-logo {
  width: 58px;
  height: 58px;
  border-radius: 14px;
  background: linear-gradient(145deg, #1e2536 0%, #0e131d 100%);
  border: 1px solid rgba(245, 158, 11, 0.4);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}
.moontv-logo img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.moontv-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.3px;
}

.moontv-sub {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.moontv-input-group {
  position: relative;
  margin-bottom: 16px;
}

.moontv-input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.95rem;
  pointer-events: none;
}

.moontv-input {
  width: 100%;
  height: 48px;
  padding: 0 42px 0 40px;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  outline: none;
  transition: all 0.2s;
}
.moontv-input:focus {
  border-color: var(--primary);
  background: var(--bg-elevated);
  box-shadow: 0 0 0 3px var(--primary-dim);
}

.moontv-eye-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}
.moontv-eye-btn:hover {
  color: var(--primary);
}
.moontv-eye-btn .svg-icon {
  width: 18px;
  height: 18px;
}

.moontv-check-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 12px 0 20px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.moontv-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}
.moontv-checkbox-label input[type="checkbox"] {
  accent-color: var(--primary);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.moontv-submit-btn {
  width: 100%;
  height: 48px;
  border-radius: 10px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff;
  border: none;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(16, 185, 129, 0.35);
  transition: all 0.2s;
}
.moontv-submit-btn:hover {
  filter: brightness(1.1);
  box-shadow: 0 6px 24px rgba(16, 185, 129, 0.5);
  transform: translateY(-1px);
}
.moontv-submit-btn:active {
  transform: translateY(1px);
}

.moontv-footer-link {
  text-align: center;
  margin-top: 18px;
}
.moontv-footer-link a {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: #10b981;
  text-decoration: none;
  cursor: pointer;
}
.moontv-footer-link a:hover {
  text-decoration: underline;
}

.moontv-version-note {
  margin-top: 28px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.moontv-version-note .check-circle {
  color: #10b981;
}

/* ═══════════════════════════════════════════════════════════
   exam_core.html 风格看板 & 倒计时时钟动画 & 快捷键提示条
═══════════════════════════════════════════════════════════ */
.exam-metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 16px 0;
  text-align: center;
  font-family: var(--font-mono);
}

.metric-item {
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 6px;
}
.metric-item-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.metric-item-val {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

/* 倒计时时钟微旋转动效 */
.clock-spin-icon {
  display: inline-block;
  animation: clockSpin 8s linear infinite;
}
@keyframes clockSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* 标星标记状态 */
.btn-marked {
  border-color: #f59e0b !important;
  color: #f59e0b !important;
  background: rgba(245, 158, 11, 0.12) !important;
}

.answer-dot.marked {
  border-color: #f59e0b !important;
  background: rgba(245, 158, 11, 0.18) !important;
  color: #f59e0b !important;
  font-weight: 900 !important;
  box-shadow: 0 0 6px rgba(245, 158, 11, 0.3) !important;
}

/* 快捷键提示栏 */
.keyboard-helper-bar {
  margin-top: 14px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-card2);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.keyboard-helper-bar kbd {
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--primary);
  font-weight: 700;
  font-size: 0.7rem;
}

/* ═══════════════════════════════════════════════════════════
   纯矢量 SVG 统一规范
═══════════════════════════════════════════════════════════ */
.svg-icon {
  width: 16px;
  height: 16px;
  display: inline-block;
  vertical-align: -0.15em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.svg-icon-lg {
  width: 22px;
  height: 22px;
}
.svg-icon-xl {
  width: 32px;
  height: 32px;
}

/* ═══════════════════════════════════════════════════════════
   登录面板回归青蓝主题色 & 取消旋转动效
═══════════════════════════════════════════════════════════ */
.moontv-submit-btn {
  background: linear-gradient(135deg, var(--primary) 0%, #0ea5e9 100%) !important;
  color: #041019 !important;
  box-shadow: 0 4px 18px var(--primary-glow) !important;
}
.moontv-submit-btn:hover {
  filter: brightness(1.1) !important;
  box-shadow: 0 6px 24px var(--primary-glow) !important;
}

.moontv-footer-link a {
  color: var(--primary) !important;
}

.moontv-version-note .check-circle {
  color: var(--primary) !important;
}

/* 彻底删除旋转动画，改为优雅微光 */
.moontv-theme-btn {
  transform: none !important;
}
.moontv-theme-btn:hover {
  transform: translateY(-1px) !important;
  border-color: var(--primary) !important;
  color: var(--primary) !important;
}

/* ═══════════════════════════════════════════════════════════
   顶部胶囊导航放大与间距拉大
═══════════════════════════════════════════════════════════ */
.navbar-nav {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
}

.capsule-nav-link {
  height: 36px !important;
  padding: 0 16px !important;
  gap: 8px !important;
  font-size: 0.84rem !important;
  font-weight: 600 !important;
  border-radius: 9999px !important;
}

/* ═══════════════════════════════════════════════════════════
   首页卡片 4 等分并排布局 (彻底解决 3+1 不对称)
═══════════════════════════════════════════════════════════ */
.card-grid-four {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 16px !important;
  margin-bottom: 24px !important;
}

@media (max-width: 1024px) {
  .card-grid-four {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 600px) {
  .card-grid-four {
    grid-template-columns: 1fr !important;
  }
}

/* ═══════════════════════════════════════════════════════════
   答题双栏结构彻底固定 (左答题大框，右上下分层)
═══════════════════════════════════════════════════════════ */
.quiz-fixed-layout {
  display: grid !important;
  grid-template-columns: 1fr 340px !important;
  gap: 20px !important;
  align-items: start !important;
  width: 100% !important;
}

@media (max-width: 960px) {
  .quiz-fixed-layout {
    grid-template-columns: 1fr !important;
  }
}

.quiz-right-sidebar {
  display: flex !important;
  flex-direction: column !important;
  gap: 16px !important;
  position: sticky !important;
  top: 76px !important;
}

/* 答题卡矩阵图例与错误高亮 */
.answer-dot.correct {
  border-color: #10b981 !important;
  background: rgba(16, 185, 129, 0.18) !important;
  color: #10b981 !important;
}

.answer-dot.wrong {
  border-color: #ef4444 !important;
  background: rgba(239, 68, 68, 0.22) !important;
  color: #ef4444 !important;
  font-weight: 700 !important;
}

/* ═══════════════════════════════════════════════════════════
   导航栏单行 Brand (ITS WEB · 建检技能考评（管理端）)
═══════════════════════════════════════════════════════════ */
.brand-text-row {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.brand-text-main {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.2px;
  color: var(--text);
}

.brand-text-sep {
  color: var(--text-muted);
  font-size: 0.9rem;
  opacity: 0.6;
}

.brand-text-sub {
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-sub);
}

.brand-text-role {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-dim);
  padding: 1px 7px;
  border-radius: 4px;
  border: 1px solid var(--primary);
  margin-left: 2px;
}

/* ═══════════════════════════════════════════════════════════
   学习图 1 的三行 Hero Banner 布局
═══════════════════════════════════════════════════════════ */
.sub-hero-banner {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px 36px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}

.sub-hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--primary);
  text-transform: uppercase;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.sub-hero-eyebrow::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 8px var(--primary);
}

.sub-hero-title-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}

.sub-hero-title-main {
  font-family: var(--font-display);
  font-size: 2.3rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.5px;
  line-height: 1.15;
}

.sub-hero-user-tip {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: normal;
}

.sub-hero-desc {
  font-family: var(--font-sans);
  font-size: 0.88rem;
  color: var(--text-sub);
  line-height: 1.7;
  max-width: 960px;
  margin: 0;
}

/* ═══════════════════════════════════════════════════════════
   最近一次选择记忆快捷恢复栏
═══════════════════════════════════════════════════════════ */
.memory-quick-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card2);
  border: 1px dashed var(--primary);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  margin-bottom: 18px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-sub);
}
.memory-quick-info {
  display: flex;
  align-items: center;
  gap: 8px;
}
.memory-quick-btn {
  padding: 4px 12px;
  border-radius: 6px;
  background: var(--primary);
  color: #041019;
  font-weight: 700;
  font-size: 0.78rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}
.memory-quick-btn:hover {
  filter: brightness(1.15);
  box-shadow: 0 0 10px var(--primary-glow);
}

/* ═══════════════════════════════════════════════════════════
   5 列自适应功能卡片网格
═══════════════════════════════════════════════════════════ */
.card-grid-five {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}
@media (max-width: 1200px) {
  .card-grid-five {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 768px) {
  .card-grid-five {
    grid-template-columns: 1fr;
  }
}

/* ═══════════════════════════════════════════════════════════
   结算面板 HUD 终端科技风格 (参考 gemini-code 融合升级)
═══════════════════════════════════════════════════════════ */
.terminal-card {
  position: relative;
  width: 100%;
  max-width: 780px;
  margin: 0 auto 24px auto;
  background: linear-gradient(180deg, var(--bg-card) 0%, var(--bg-card2) 100%);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.7), 0 0 40px -10px rgba(0, 242, 254, 0.08);
  padding: 32px 36px;
  overflow: hidden;
}

.terminal-card.card-danger {
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.7), 0 0 40px -10px rgba(244, 63, 94, 0.16);
}
.terminal-card.card-success {
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.7), 0 0 40px -10px rgba(16, 185, 129, 0.16);
}

/* 科技折角装饰 */
.corner-tag-tl {
  position: absolute;
  top: 0;
  left: 0;
  width: 14px;
  height: 14px;
  border-top: 2px solid var(--primary);
  border-left: 2px solid var(--primary);
}
.corner-tag-br {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 14px;
  height: 14px;
  border-bottom: 2px solid var(--primary);
  border-right: 2px solid var(--primary);
}
.card-danger .corner-tag-tl, .card-danger .corner-tag-br {
  border-color: #f43f5e;
}
.card-success .corner-tag-tl, .card-success .corner-tag-br {
  border-color: #10b981;
}

/* 顶部状态栏与工单 */
.terminal-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.system-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.status-ping {
  position: relative;
  display: flex;
  width: 8px;
  height: 8px;
}

.status-ping-glow {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  animation: ping 2s cubic-bezier(0, 0, 0.2, 1) infinite;
  opacity: 0.75;
}
.status-ping-glow.ping-cyan { background: #00f2fe; }
.status-ping-glow.ping-success { background: #10b981; }
.status-ping-glow.ping-danger { background: #f43f5e; }

.status-ping-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.status-ping-dot.ping-cyan { background: #00f2fe; }
.status-ping-dot.ping-success { background: #10b981; }
.status-ping-dot.ping-danger { background: #f43f5e; }

@keyframes ping {
  75%, 100% {
    transform: scale(2.2);
    opacity: 0;
  }
}

.status-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 1px;
}
.tag-cyan {
  background: var(--primary-dim);
  border: 1px solid var(--primary);
  color: var(--primary);
}
.tag-success {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
}
.tag-danger {
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.35);
  color: #fb7185;
}

/* 评定标题 */
.summary-heading {
  text-align: center;
  margin-bottom: 24px;
}

.summary-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}

.summary-desc {
  font-size: 13px;
  color: var(--text-muted);
  font-family: var(--font-sans);
}

/* 核心 HUD 评分仪表区 */
.hud-gauge {
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px 24px;
  margin-bottom: 24px;
}
.light .hud-gauge {
  background: var(--bg-card2);
}

.gauge-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 14px;
}

.score-group {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.score-value {
  font-family: var(--font-display);
  font-size: 52px;
  font-weight: 800;
  line-height: 1;
}
.score-value.val-danger {
  color: #f43f5e;
  text-shadow: 0 0 20px rgba(244, 63, 94, 0.4);
}
.score-value.val-success {
  color: #10b981;
  text-shadow: 0 0 20px rgba(16, 185, 129, 0.4);
}
.score-value.val-cyan {
  color: #00f2fe;
  text-shadow: 0 0 20px rgba(0, 242, 254, 0.4);
}

.score-denom {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text-muted);
}

.benchmark-delta {
  text-align: right;
  font-family: var(--font-mono);
}

.benchmark-delta .delta-main {
  font-size: 13px;
  font-weight: 600;
}
.benchmark-delta .delta-main.val-danger { color: #fb7185; }
.benchmark-delta .delta-main.val-success { color: #34d399; }
.benchmark-delta .delta-main.val-cyan { color: #38bdf8; }

.benchmark-delta .delta-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 3px;
}

/* 水平基准进度条 */
.gauge-track {
  position: relative;
  height: 10px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 5px;
  margin-bottom: 12px;
}
.light .gauge-track {
  background: rgba(0, 0, 0, 0.08);
}

.gauge-bar {
  height: 100%;
  border-radius: 5px;
  transition: width 0.8s ease;
}
.gauge-bar.bar-danger {
  background: linear-gradient(90deg, #e11d48, #f43f5e);
  box-shadow: 0 0 12px rgba(244, 63, 94, 0.5);
}
.gauge-bar.bar-success {
  background: linear-gradient(90deg, #059669, #10b981);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.5);
}
.gauge-bar.bar-cyan {
  background: linear-gradient(90deg, #00f2fe, #0ea5e9);
  box-shadow: 0 0 12px rgba(0, 242, 254, 0.5);
}

.pass-threshold {
  position: absolute;
  top: -4px;
  bottom: -4px;
  width: 2px;
  background: #00f2fe;
  box-shadow: 0 0 8px #00f2fe;
  z-index: 2;
}

.pass-tag {
  position: absolute;
  bottom: -22px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 10px;
  color: #00f2fe;
  white-space: nowrap;
  background: rgba(0, 242, 254, 0.1);
  padding: 1px 6px;
  border-radius: 3px;
  border: 1px solid rgba(0, 242, 254, 0.3);
}

.gauge-footer {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 20px;
}

/* 6 单元对称遥测网格 (2行3列) */
.telemetry-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 28px;
}

.tile {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.light .tile {
  background: var(--bg-card);
}

.tile:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.15);
}

.tile-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
  display: block;
}

.tile-val {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.tile-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 4px;
  display: block;
  opacity: 0.8;
}

.val-danger { color: #fb7185; }
.val-success { color: #34d399; }
.val-cyan { color: #38bdf8; }

/* 控制面板按钮组 */
.terminal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1.5fr;
  gap: 12px;
}

.action-btn {
  height: 44px;
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
  border: none;
}

.btn-neutral {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text-sub);
}
.btn-neutral:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border-color: var(--primary);
}

.btn-cyan-outline {
  background: var(--primary-dim);
  border: 1px solid var(--primary);
  color: var(--primary);
}
.btn-cyan-outline:hover {
  background: var(--primary-glow);
  box-shadow: 0 0 15px rgba(0, 242, 254, 0.2);
}

.btn-danger-solid {
  background: #e11d48;
  border: 1px solid #f43f5e;
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 0 16px rgba(244, 63, 94, 0.35);
}
.btn-danger-solid:hover {
  background: #f43f5e;
  box-shadow: 0 0 24px rgba(244, 63, 94, 0.55);
}

@media (max-width: 640px) {
  .terminal-card {
    padding: 24px 20px;
  }
  .telemetry-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .terminal-actions {
    grid-template-columns: 1fr;
  }
  .score-value {
    font-size: 40px;
  }
}

/* ═══════════════════════════════════════════════════════════
   评分评级与鼓励用语 UI (基于 ITS-AI 经典评价体系)
═══════════════════════════════════════════════════════════ */
.result-container {
  max-width: 780px;
  width: 100%;
  margin: 24px auto;
  padding: 0 16px;
  box-sizing: border-box;
}

.summary-title-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.eval-level-capsule {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  letter-spacing: 1px;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.eval-level-capsule.tag-master {
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid #10b981;
  color: #34d399;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.3);
}

.eval-level-capsule.tag-expert {
  background: rgba(0, 242, 254, 0.18);
  border: 1px solid #00f2fe;
  color: #38bdf8;
  box-shadow: 0 0 12px rgba(0, 242, 254, 0.3);
}

.eval-level-capsule.tag-advanced {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid #38bdf8;
  color: #7dd3fc;
}

.eval-level-capsule.tag-qualified {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid #f59e0b;
  color: #fbbf24;
}

.eval-level-capsule.tag-danger {
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid #f43f5e;
  color: #fb7185;
}

/* 优雅评语引用卡片 */
.eval-quote-box {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 660px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 10px 18px;
  margin: 0 auto;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-sub);
  font-family: var(--font-sans);
  text-align: center;
}
.light .eval-quote-box {
  background: var(--bg-card);
  border-color: var(--border);
}

.eval-quote-box.tag-master { border-color: rgba(16, 185, 129, 0.35); color: #a7f3d0; background: rgba(16, 185, 129, 0.05); }
.eval-quote-box.tag-expert { border-color: rgba(0, 242, 254, 0.35); color: #bae6fd; background: rgba(0, 242, 254, 0.05); }
.eval-quote-box.tag-advanced { border-color: rgba(56, 189, 248, 0.35); color: #bae6fd; background: rgba(56, 189, 248, 0.05); }
.eval-quote-box.tag-qualified { border-color: rgba(245, 158, 11, 0.35); color: #fde68a; background: rgba(245, 158, 11, 0.05); }
.eval-quote-box.tag-danger { border-color: rgba(244, 63, 94, 0.35); color: #fecdd3; background: rgba(244, 63, 94, 0.05); }

.eval-quote-mark {
  font-family: Georgia, serif;
  font-size: 18px;
  opacity: 0.6;
  margin: 0 4px;
}

/* 错题分析副卡片，宽度与终端主卡片 100% 严格一致 */
.terminal-subcard {
  padding: 24px 28px;
  margin-top: 20px;
  box-shadow: 0 15px 40px -10px rgba(0, 0, 0, 0.6);
}


/* ═══════════════════════════════════════════════════════════
   移动端 (iPhone / Android) 与平板 (iPad) 深度专属适配 v5.0
═══════════════════════════════════════════════════════════ */

/* 1. 顶栏导航重构：分离胶囊链接与右侧操作按钮 */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.navbar-nav.desktop-only {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 auto;
}

/* 2. iPad 平板端 (768px ~ 1024px) 适配 */
@media (min-width: 768px) and (max-width: 1024px) {
  .navbar {
    padding: 0 16px;
    gap: 10px;
  }
  .navbar-nav.desktop-only {
    gap: 6px;
  }
  .capsule-nav-link {
    padding: 6px 9px !important;
    font-size: 0.78rem !important;
    gap: 6px !important;
  }
  .brand-text-sub {
    font-size: 0.8rem !important;
  }
  .sub-hero-title-main {
    font-size: 1.85rem !important;
  }
  .card-grid-five {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .stat-grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }
  .stat-grid .stat-card:nth-child(4),
  .stat-grid .stat-card:nth-child(5) {
    grid-column: span 1;
  }
}

/* 3. 手机移动端 (< 768px, iPhone, iPad小窗) 彻底消除垂直堆叠 */
@media (max-width: 767px) {
  /* 顶栏单行高度与内边距 */
  .navbar {
    height: 54px !important;
    padding: 0 12px !important;
  }

  /* 彻底隐藏顶栏胶囊导航，杜绝 6 行折行垂直堆叠 */
  .navbar-nav.desktop-only {
    display: none !important;
  }

  /* 顶栏 Brand 极简防溢出 */
  .brand-icon {
    width: 30px !important;
    height: 30px !important;
  }
  .brand-icon img {
    width: 18px !important;
    height: 18px !important;
  }
  .brand-text-row {
    gap: 5px !important;
  }
  .brand-text-main {
    font-size: 1rem !important;
  }
  .brand-text-sep, .brand-text-sub {
    display: none !important; /* 手机端隐藏副标题，防止被挤压 */
  }
  .brand-text-role {
    font-size: 0.7rem !important;
    padding: 1px 5px !important;
  }

  .navbar-actions .moontv-theme-btn,
  .navbar-actions .logout-btn {
    padding: 5px 8px !important;
    font-size: 0.75rem !important;
  }

  /* 4. 移动端专属底部原生 TabBar */
  .mobile-tab-bar {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: calc(54px + env(safe-area-inset-bottom, 0px)) !important;
    padding-bottom: env(safe-area-inset-bottom, 0px) !important;
    background: rgba(15, 20, 34, 0.96) !important;
    border-top: 1px solid var(--border) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-around !important;
    z-index: 990 !important;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.45) !important;
  }
  html.light .mobile-tab-bar {
    background: rgba(255, 255, 255, 0.96) !important;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08) !important;
  }

  /* 移动端页面底部预留安全距离，防止内容被遮挡 */
  body, #app {
    padding-bottom: calc(58px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .mobile-tab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    flex: 1;
    height: 100%;
    color: var(--text-muted);
    text-decoration: none;
    cursor: pointer;
    user-select: none;
    transition: color 0.15s ease, transform 0.1s ease;
    position: relative;
    -webkit-tap-highlight-color: transparent;
  }
  .mobile-tab-item:active {
    transform: scale(0.92);
  }
  .mobile-tab-item.active {
    color: var(--primary) !important;
  }

  .mobile-tab-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
  }
  .mobile-tab-icon .svg-icon {
    width: 20px !important;
    height: 20px !important;
  }
  .mobile-tab-item.active .mobile-tab-icon .svg-icon {
    stroke: var(--primary) !important;
    filter: drop-shadow(0 0 6px rgba(0, 242, 254, 0.5));
  }

  .mobile-tab-label {
    font-size: 10px !important;
    font-weight: 500;
    line-height: 1;
    font-family: var(--font-sans);
  }
  .mobile-tab-item.active .mobile-tab-label {
    font-weight: 700 !important;
    color: var(--primary) !important;
  }

  .tab-badge {
    position: absolute;
    top: -3px;
    right: -7px;
    min-width: 14px;
    height: 14px;
    padding: 0 3px;
    border-radius: 7px;
    background: #ef4444;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    font-family: var(--font-mono);
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    border: 1.5px solid var(--bg-card);
  }
  .tab-badge.badge-amber {
    background: #f59e0b;
  }

  /* 5. 首页 Hero Banner 手机端优化 */
  .sub-hero-banner {
    padding: 18px 16px !important;
    border-radius: 14px !important;
    margin-bottom: 14px !important;
  }
  .sub-hero-eyebrow {
    font-size: 0.72rem !important;
    letter-spacing: 1.5px !important;
    margin-bottom: 6px !important;
  }
  .sub-hero-title-row {
    gap: 8px !important;
    margin-bottom: 8px !important;
  }
  .sub-hero-title-main {
    font-size: 1.5rem !important;
    line-height: 1.2 !important;
  }
  .sub-hero-user-tip {
    font-size: 0.8rem !important;
  }
  .sub-hero-desc {
    font-size: 0.78rem !important;
    line-height: 1.5 !important;
  }

  /* 6. 统计面板 5 模块在手机端完美对称 2x2 + 1 贯穿栏 */
  .stat-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
    margin-bottom: 16px !important;
  }
  .stat-card {
    padding: 12px 14px !important;
    border-radius: 12px !important;
  }
  .stat-num {
    font-size: 1.45rem !important;
  }
  .stat-label {
    font-size: 0.75rem !important;
  }
  .stat-grid .stat-card:nth-child(5) {
    grid-column: span 2 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 12px 18px !important;
  }
  .stat-grid .stat-card:nth-child(5) .stat-num {
    order: 2 !important;
    margin-bottom: 0 !important;
  }
  .stat-grid .stat-card:nth-child(5) .stat-label {
    order: 1 !important;
    font-size: 0.8rem !important;
  }

  /* 7. 功能卡片 手机端单列紧凑触控卡片 */
  .card-grid-five {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }
  .feature-card {
    padding: 14px 16px !important;
    border-radius: 12px !important;
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;
    text-align: left !important;
  }
  .feature-icon {
    margin-bottom: 0 !important;
    width: 44px !important;
    height: 44px !important;
    font-size: 1.4rem !important;
    flex-shrink: 0 !important;
  }
  .feature-card h3 {
    margin-bottom: 4px !important;
    font-size: 1rem !important;
  }
  .feature-card p {
    font-size: 0.78rem !important;
    line-height: 1.4 !important;
    margin: 0 !important;
  }

  /* 8. 答题界面手机端优化 */
  .quiz-layout {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }
  .question-card {
    padding: 16px 14px !important;
    border-radius: 12px !important;
  }
  .question-stem {
    font-size: 0.95rem !important;
    line-height: 1.55 !important;
  }
  .option-item {
    padding: 12px 14px !important;
    font-size: 0.9rem !important;
    min-height: 46px !important;
    border-radius: 10px !important;
  }
  .option-badge {
    width: 28px !important;
    height: 28px !important;
    font-size: 0.8rem !important;
  }

  /* 9. 记忆恢复栏手机端折叠为紧凑排版 */
  .memory-quick-bar {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 10px !important;
    padding: 12px 14px !important;
  }
  .memory-quick-btn {
    width: 100% !important;
    text-align: center !important;
    justify-content: center !important;
  }
}

/* 桌面端大于等于 768px 时强制隐藏移动端底部 TabBar */
@media (min-width: 768px) {
  .mobile-tab-bar {
    display: none !important;
  }
}


/* ═══════════════════════════════════════════════════════════
   管理后台与用户组织架构系统 (Admin Console & Modal) v5.0
═══════════════════════════════════════════════════════════ */

/* 顶栏用户头像胶囊按钮 */
.navbar-user-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: 20px;
  cursor: pointer;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  transition: all 0.2s ease;
  user-select: none;
}
.navbar-user-btn:hover {
  border-color: var(--primary);
  background: var(--primary-dim);
  box-shadow: 0 0 12px var(--primary-dim);
}
.navbar-user-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary-dim);
  border: 1px solid var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}
.navbar-user-avatar .svg-icon {
  width: 14px;
  height: 14px;
}
.navbar-user-role-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(0, 242, 254, 0.15);
  color: var(--primary);
}
.navbar-user-role-badge.role-admin {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

/* 管理后台选项卡 Header */
.admin-header {
  margin-bottom: 24px;
}
.admin-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 16px;
}
.admin-title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
  overflow-x: auto;
  white-space: nowrap;
}
.admin-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.admin-tab-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}
.admin-tab-btn.active {
  background: var(--primary-dim);
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: 0 0 12px var(--primary-dim);
}

/* 工具栏与检索过滤器 */
.admin-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
  padding: 14px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.admin-filter-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  flex: 1;
}
.admin-search-input {
  background: var(--bg-card2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 14px;
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  outline: none;
  min-width: 220px;
}
.admin-search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 10px var(--primary-dim);
}
.admin-select {
  background: var(--bg-card2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 12px;
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  outline: none;
  cursor: pointer;
}
.admin-actions-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* 专业数据表格 */
.admin-table-wrap {
  width: 100%;
  overflow-x: auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.85rem;
}
.admin-table th {
  background: var(--bg-card2);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-weight: 700;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
}
.admin-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-faint);
  color: var(--text);
  vertical-align: middle;
}
.admin-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* 状态徽章 */
.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
}
.badge-status.active {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.badge-status.disabled {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}
.badge-status.pending {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

/* 通用全屏模态弹窗系统 */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: modalFadeIn 0.2s ease-out;
}
@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  max-width: 580px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 30px var(--primary-dim);
  padding: 28px 32px;
  position: relative;
  animation: modalPopIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes modalPopIn {
  from { transform: scale(0.94); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.modal-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.4rem;
  line-height: 1;
  padding: 4px;
}
.modal-close-btn:hover {
  color: var(--text);
}

.modal-form-row {
  margin-bottom: 16px;
}
.modal-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-sub);
  margin-bottom: 6px;
  font-family: var(--font-sans);
}
.modal-input {
  width: 100%;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--text);
  font-size: 0.9rem;
  outline: none;
  font-family: var(--font-sans);
  box-sizing: border-box;
}
.modal-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 10px var(--primary-dim);
}

.modal-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

/* 策略管理可视化卡片 */
.strategy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}
.strategy-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  transition: all 0.2s ease;
}
.strategy-card:hover {
  border-color: var(--primary);
}
.strategy-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.strategy-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
}
.strategy-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px dashed rgba(255,255,255,0.06);
  font-size: 0.85rem;
}

/* 文件上传拖拽框 */
.file-dropzone {
  border: 2px dashed var(--primary);
  border-radius: 12px;
  padding: 32px 20px;
  text-align: center;
  background: var(--primary-dim);
  cursor: pointer;
  transition: all 0.2s ease;
}
.file-dropzone:hover {
  background: rgba(0, 242, 254, 0.18);
  border-color: #00f2fe;
}


/* ═══════════════════════════════════════════════════════════
   模态弹窗系统丝滑平滑过渡 (消除闪屏与突兀跳动)
═══════════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 1;
  transition: opacity 0.18s ease-out;
  animation: modalFadeIn 0.2s ease-out;
}
.modal-overlay.closing {
  opacity: 0 !important;
  pointer-events: none !important;
}
.modal-overlay.closing .modal-card {
  transform: scale(0.96) !important;
  opacity: 0 !important;
}
.modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  max-width: 580px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 30px var(--primary-dim);
  padding: 28px 32px;
  position: relative;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  animation: modalPopIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ═══════════════════════════════════════════════════════════
   表格紧凑防换行与严整排版 (彻底杜绝单个字折行竖排)
═══════════════════════════════════════════════════════════ */
.admin-table-wrap {
  width: 100%;
  overflow-x: auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}
.admin-table {
  width: 100%;
  min-width: 920px !important;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.85rem;
}
.admin-table th,
.admin-table td {
  white-space: nowrap !important;
  padding: 12px 14px !important;
  vertical-align: middle !important;
}
.badge-status,
.badge {
  white-space: nowrap !important;
  display: inline-flex !important;
  align-items: center !important;
  line-height: 1 !important;
}

/* ═══════════════════════════════════════════════════════════
   首页卡片平衡网格 (3x2 完美对称与原版色调)
═══════════════════════════════════════════════════════════ */
.card-grid-balanced {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
@media (max-width: 960px) {
  .card-grid-balanced {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 600px) {
  .card-grid-balanced {
    grid-template-columns: 1fr;
  }
}

/* ══════════════════════════════════════════════════════════
   ITS-WEB v7.0 全局页脚版权规范
══════════════════════════════════════════════════════════ */
.app-footer {
  margin-top: 48px;
  padding: 24px 20px 32px;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-muted);
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
}
.footer-copy {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.3px;
}
@media (max-width: 768px) {
  .app-footer {
    padding-bottom: 84px; /* 避让移动端底部原生 TabBar */
    margin-top: 32px;
  }
}


/* ═══════════════════════════════════════════════════════════
   Apple Liquid Glass (液态玻璃) + iOS 风格高级暖亮橙管理端主题
   明确区分 管理端 与 用户端 UI 视觉层级
═══════════════════════════════════════════════════════════ */
:root {
  --admin-orange: #FF9500;
  --admin-orange-hover: #FFA726;
  --admin-orange-light: #FFB74D;
  --admin-orange-dark: #F57C00;
  --admin-orange-glow: rgba(255, 149, 0, 0.35);
  --admin-orange-dim: rgba(255, 149, 0, 0.12);
  --admin-orange-border: rgba(255, 159, 10, 0.45);
  --admin-glass-bg: linear-gradient(135deg, rgba(255, 149, 0, 0.14) 0%, rgba(255, 107, 0, 0.05) 100%);
  --admin-glass-border: 1px solid rgba(255, 159, 10, 0.38);
  --admin-glass-shadow: 0 8px 32px 0 rgba(255, 140, 0, 0.22), inset 0 1px 1.5px 0 rgba(255, 255, 255, 0.35), inset 0 -1px 1px 0 rgba(255, 140, 0, 0.15);
}

/* 顶栏管理端角标 */
.brand-text-role.role-admin {
  color: #FF9500 !important;
  background: linear-gradient(135deg, rgba(255, 149, 0, 0.18) 0%, rgba(255, 107, 0, 0.08) 100%) !important;
  border: 1px solid rgba(255, 159, 10, 0.55) !important;
  box-shadow: 0 2px 10px rgba(255, 149, 0, 0.28), inset 0 1px 1px rgba(255, 255, 255, 0.35) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* 顶栏用户头像胶囊与管理端角标 */
.navbar-user-avatar.admin-avatar {
  background: rgba(255, 149, 0, 0.16) !important;
  border: 1px solid #FF9500 !important;
  color: #FF9500 !important;
  box-shadow: 0 0 10px rgba(255, 149, 0, 0.35) !important;
}
.navbar-user-btn.btn-admin-user:hover {
  border-color: #FF9500 !important;
  background: rgba(255, 149, 0, 0.1) !important;
  box-shadow: 0 0 14px rgba(255, 149, 0, 0.25) !important;
}
.navbar-user-role-badge.role-admin {
  background: linear-gradient(135deg, rgba(255, 149, 0, 0.22) 0%, rgba(255, 107, 0, 0.1) 100%) !important;
  border: 1px solid rgba(255, 159, 10, 0.55) !important;
  color: #FFA726 !important;
  box-shadow: 0 2px 8px rgba(255, 149, 0, 0.25) !important;
}

/* 顶栏管理中台导航项 */
.capsule-dot.orange {
  background: #FF9500 !important;
  box-shadow: 0 0 10px #FF9500 !important;
}
.capsule-nav-link.nav-link-admin {
  border-color: rgba(255, 159, 10, 0.35) !important;
}
.capsule-nav-link.nav-link-admin:hover,
.capsule-nav-link.nav-link-admin.active {
  border-color: #FF9500 !important;
  background: linear-gradient(135deg, rgba(255, 149, 0, 0.2) 0%, rgba(255, 107, 0, 0.1) 100%) !important;
  color: #FFA726 !important;
  box-shadow: 0 4px 18px rgba(255, 149, 0, 0.3), inset 0 1px 1px rgba(255, 255, 255, 0.25) !important;
}

/* 首页 Hero 标语 (管理员登录态) */
.sub-hero-eyebrow.eyebrow-admin {
  color: #FFA726 !important;
}
.sub-hero-eyebrow.eyebrow-admin::before {
  background: #FF9500 !important;
  box-shadow: 0 0 10px #FF9500 !important;
}

/* 首页第6张卡片：系统管理中台 Apple Liquid Glass 暖橙高光质感 */
.feature-card.feature-card-admin {
  border-color: rgba(255, 159, 10, 0.4) !important;
  background: linear-gradient(135deg, rgba(255, 149, 0, 0.08) 0%, rgba(13, 20, 36, 0.85) 100%) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35), inset 0 1px 1.5px rgba(255, 255, 255, 0.12);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.feature-card.feature-card-admin:hover {
  border-color: rgba(255, 159, 10, 0.75) !important;
  box-shadow: 0 14px 40px rgba(255, 140, 0, 0.28), inset 0 1px 1.5px rgba(255, 255, 255, 0.35) !important;
  transform: translateY(-4px);
}
.feature-icon.feature-icon-admin {
  color: #FF9500 !important;
  filter: drop-shadow(0 0 8px rgba(255, 149, 0, 0.4));
}
.feature-title.feature-title-admin {
  color: #FFA726 !important;
  background: linear-gradient(135deg, #FFB74D 0%, #FF9500 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ═══════════════════════════════════════════════════════════
   管理中心全界面 Apple Liquid Glass + iOS 风格暖亮橙主题
═══════════════════════════════════════════════════════════ */
.admin-theme-liquid .admin-title {
  background: linear-gradient(135deg, #ffffff 40%, #FFA726 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.admin-theme-liquid .admin-tab-btn.active {
  background: linear-gradient(135deg, rgba(255, 149, 0, 0.24) 0%, rgba(255, 107, 0, 0.14) 100%) !important;
  border-color: rgba(255, 159, 10, 0.6) !important;
  color: #FFA726 !important;
  box-shadow: 0 4px 18px rgba(255, 149, 0, 0.3), inset 0 1px 1.5px rgba(255, 255, 255, 0.35) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.admin-theme-liquid .admin-tab-btn:hover:not(.active) {
  color: #FFA726 !important;
  background: rgba(255, 149, 0, 0.08) !important;
}
.admin-theme-liquid .btn-primary {
  background: linear-gradient(135deg, #FF9F0A 0%, #FF6B00 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  box-shadow: 0 4px 16px rgba(255, 140, 0, 0.35), inset 0 1px 1px rgba(255, 255, 255, 0.4) !important;
  color: #ffffff !important;
}
.admin-theme-liquid .btn-primary:hover {
  background: linear-gradient(135deg, #FFA726 0%, #FF7A00 100%) !important;
  box-shadow: 0 6px 22px rgba(255, 140, 0, 0.45), inset 0 1px 1.5px rgba(255, 255, 255, 0.5) !important;
}
.admin-theme-liquid .admin-search-input:focus {
  border-color: rgba(255, 159, 10, 0.65) !important;
  box-shadow: 0 0 14px rgba(255, 149, 0, 0.28) !important;
}

/* ═══════════════════════════════════════════════════════════
   Apple Liquid Glass + iOS 风格高级浮动气泡 Toast
   脱离普通文档流，固定悬浮于页脚线以上，永不顶起页脚或干扰布局
═══════════════════════════════════════════════════════════ */
.toast {
  position: fixed !important;
  bottom: 42px !important;
  left: 36px !important;
  z-index: 10000 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 10px 22px !important;
  border-radius: 9999px !important;
  font-family: var(--font-sans) !important;
  font-size: 0.88rem !important;
  font-weight: 600 !important;
  color: #ffffff !important;
  background: rgba(15, 23, 42, 0.86) !important;
  backdrop-filter: blur(24px) saturate(190%) !important;
  -webkit-backdrop-filter: blur(24px) saturate(190%) !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45), 0 0 20px rgba(0, 240, 255, 0.15), inset 0 1px 1.5px rgba(255, 255, 255, 0.35) !important;
  pointer-events: none !important;
  animation: toastSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

@keyframes toastSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.94);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.toast.toast-hide {
  opacity: 0 !important;
  transform: translateY(16px) scale(0.94) !important;
}

/* 管理端 Apple Liquid Glass 暖亮橙高级气泡 */
.toast.toast-admin {
  background: linear-gradient(135deg, rgba(28, 22, 18, 0.92) 0%, rgba(20, 16, 14, 0.94) 100%) !important;
  border: 1px solid rgba(255, 159, 10, 0.45) !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), 0 0 24px rgba(255, 149, 0, 0.28), inset 0 1px 1.5px rgba(255, 255, 255, 0.4) !important;
  color: #fff7ed !important;
}

.toast.toast-success {
  border-color: rgba(16, 185, 129, 0.45) !important;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45), 0 0 20px rgba(16, 185, 129, 0.2), inset 0 1px 1.5px rgba(255, 255, 255, 0.35) !important;
}

.toast.toast-admin.toast-success {
  border-color: rgba(255, 159, 10, 0.55) !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), 0 0 24px rgba(255, 149, 0, 0.3), inset 0 1px 1.5px rgba(255, 255, 255, 0.4) !important;
}

.toast.toast-danger, .toast.toast-error {
  border-color: rgba(239, 68, 68, 0.45) !important;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45), 0 0 20px rgba(239, 68, 68, 0.2), inset 0 1px 1.5px rgba(255, 255, 255, 0.35) !important;
}

.toast-icon {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
}
.toast-icon svg {
  width: 16px !important;
  height: 16px !important;
}

@media (max-width: 768px) {
  .toast {
    left: 50% !important;
    bottom: 80px !important; /* 避让手机端原生底部 TabBar */
    transform: translateX(-50%) !important;
    animation: toastSlideUpMobile 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
  }
  @keyframes toastSlideUpMobile {
    from {
      opacity: 0;
      transform: translateX(-50%) translateY(20px) scale(0.94);
    }
    to {
      opacity: 1;
      transform: translateX(-50%) translateY(0) scale(1);
    }
  }
  .toast.toast-hide {
    transform: translateX(-50%) translateY(16px) scale(0.94) !important;
  }
}


/* ═══════════════════════════════════════════════════════════
   ITS-WEB v7.3 全局管理端 (Administrator) 专属 Apple Liquid Glass
   全场景主色调、光标框框、选中态、步骤圆点与呼吸发光体系
═══════════════════════════════════════════════════════════ */

/* 1. 角色标签高反差对照：管理员 (亮橙) vs 学员 (蓝绿科技色) */
.badge-role-admin {
  background: linear-gradient(135deg, rgba(255, 149, 0, 0.22) 0%, rgba(255, 107, 0, 0.1) 100%) !important;
  border: 1px solid rgba(255, 159, 10, 0.55) !important;
  color: #FFA726 !important;
  box-shadow: 0 2px 8px rgba(255, 149, 0, 0.25) !important;
  font-weight: 700 !important;
}
.badge-role-student {
  background: rgba(0, 242, 254, 0.12) !important;
  border: 1px solid rgba(0, 242, 254, 0.35) !important;
  color: #00f2fe !important;
  box-shadow: 0 2px 8px rgba(0, 242, 254, 0.18) !important;
  font-weight: 600 !important;
}

/* 2. 管理员端首页 ITS WEB / NEXT 字样与前面的 ▪ 点 微微缓慢呼吸发光闪烁 */
@keyframes adminEyebrowBreathe {
  0%, 100% {
    opacity: 0.76;
    text-shadow: 0 0 4px rgba(255, 149, 0, 0.2), 0 0 10px rgba(255, 149, 0, 0.1);
  }
  50% {
    opacity: 1;
    text-shadow: 0 0 10px #FFA726, 0 0 20px rgba(255, 149, 0, 0.7), 0 0 30px rgba(255, 107, 0, 0.45);
  }
}
@keyframes adminDotBreathe {
  0%, 100% {
    transform: scale(0.92);
    box-shadow: 0 0 6px #FF9500, 0 0 10px rgba(255, 149, 0, 0.3);
    opacity: 0.75;
  }
  50% {
    transform: scale(1.28);
    box-shadow: 0 0 12px #FFA726, 0 0 24px #FF9500, 0 0 36px rgba(255, 107, 0, 0.85);
    opacity: 1;
  }
}

.sub-hero-eyebrow.eyebrow-admin {
  color: #FFA726 !important;
  animation: adminEyebrowBreathe 3.5s ease-in-out infinite !important;
  letter-spacing: 2px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  user-select: none;
}
.sub-hero-eyebrow.eyebrow-admin::before {
  content: "" !important;
  display: inline-block !important;
  width: 7px !important;
  height: 7px !important;
  border-radius: 50% !important;
  background: #FF9500 !important;
  animation: adminDotBreathe 3.5s ease-in-out infinite !important;
}

/* 3. 全局管理端 (html.theme-admin / body.theme-admin) 主题色与所有高光边框 */
html.theme-admin,
body.theme-admin {
  --primary:      #FF9500 !important;
  --primary-hover:#FFA726 !important;
  --primary-dim:  rgba(255, 149, 0, 0.14) !important;
  --primary-glow: rgba(255, 149, 0, 0.35) !important;
  --shadow-glow:  0 0 20px -4px rgba(255, 149, 0, 0.35) !important;
}

/* 顶栏激活导航胶囊 (图一) */
body.theme-admin .capsule-nav-link.active {
  border-color: #FF9500 !important;
  color: #FFA726 !important;
  background: linear-gradient(135deg, rgba(255, 149, 0, 0.22) 0%, rgba(255, 107, 0, 0.12) 100%) !important;
  box-shadow: 0 4px 18px rgba(255, 149, 0, 0.3), inset 0 1px 1px rgba(255, 255, 255, 0.25) !important;
}
body.theme-admin .capsule-nav-link.active .capsule-dot {
  background: #FF9500 !important;
  box-shadow: 0 0 10px #FF9500 !important;
}

/* 答题/刷题步骤指示器 (图一) */
body.theme-admin .step.active .step-dot {
  border-color: #FF9500 !important;
  background: rgba(255, 149, 0, 0.16) !important;
  color: #FFA726 !important;
  box-shadow: 0 0 14px rgba(255, 149, 0, 0.4) !important;
}
body.theme-admin .step.active .step-label {
  color: #FFA726 !important;
  font-weight: 700 !important;
}
body.theme-admin .step.done .step-line,
body.theme-admin .step-line.done {
  background: #FF9500 !important;
  box-shadow: 0 0 8px rgba(255, 149, 0, 0.4) !important;
}

/* 专项卡片/分类卡片选中态 (图一) */
body.theme-admin .spec-card.selected,
body.theme-admin .drill-cat-card.selected,
body.theme-admin .role-card.selected {
  border-color: #FF9500 !important;
  background: linear-gradient(135deg, rgba(255, 149, 0, 0.14) 0%, rgba(255, 107, 0, 0.05) 100%) !important;
  box-shadow: 0 8px 24px rgba(255, 149, 0, 0.22), inset 0 1px 1.5px rgba(255, 255, 255, 0.25) !important;
}
body.theme-admin .spec-card.selected h3,
body.theme-admin .drill-cat-card.selected h3,
body.theme-admin .role-card.selected h3 {
  color: #FFA726 !important;
}
body.theme-admin .spec-card:hover:not(.selected) {
  border-color: rgba(255, 159, 10, 0.6) !important;
  background: rgba(255, 149, 0, 0.08) !important;
}

/* 面包屑当前项与子标题 (图一) */
body.theme-admin .breadcrumb .current,
body.theme-admin .section-title .breadcrumb .current {
  color: #FFA726 !important;
  text-shadow: 0 0 10px rgba(255, 149, 0, 0.35) !important;
}

/* 材料、参数、题型选择胶囊 (图一) */
body.theme-admin .tag.selected,
body.theme-admin .qtype-pill.selected,
body.theme-admin .count-pill.selected,
body.theme-admin .mode-pill.selected {
  border-color: #FF9500 !important;
  background: linear-gradient(135deg, rgba(255, 149, 0, 0.24) 0%, rgba(255, 107, 0, 0.14) 100%) !important;
  color: #FFA726 !important;
  box-shadow: 0 3px 14px rgba(255, 149, 0, 0.3), inset 0 1px 1px rgba(255, 255, 255, 0.32) !important;
  font-weight: 700 !important;
}
body.theme-admin .tag:hover:not(.selected) {
  border-color: rgba(255, 159, 10, 0.55) !important;
  color: #FFA726 !important;
}

/* 系统管理中台 Header 与 返回按钮 (图二) */
body.theme-admin .admin-title .svg-icon {
  color: #FF9500 !important;
  filter: drop-shadow(0 0 8px rgba(255, 149, 0, 0.45)) !important;
}
body.theme-admin .admin-header .btn-outline {
  border-color: rgba(255, 159, 10, 0.45) !important;
  color: #FFA726 !important;
}
body.theme-admin .admin-header .btn-outline:hover {
  border-color: #FF9500 !important;
  background: rgba(255, 149, 0, 0.12) !important;
  color: #FFB74D !important;
  box-shadow: 0 0 14px rgba(255, 149, 0, 0.28) !important;
}

/* 个人中心与账号设置弹窗 (图三) */
body.theme-admin .modal-header .svg-icon {
  color: #FF9500 !important;
}
body.theme-admin .modal-card {
  border-color: rgba(255, 159, 10, 0.35) !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(255, 149, 0, 0.15) !important;
}
body.theme-admin .modal-card .btn-outline {
  border-color: rgba(255, 255, 255, 0.15) !important;
  color: var(--text) !important;
}
body.theme-admin .modal-card .btn-outline:hover {
  border-color: #FF9500 !important;
  background: rgba(255, 149, 0, 0.1) !important;
  color: #FFA726 !important;
  box-shadow: 0 4px 16px rgba(255, 149, 0, 0.25) !important;
}
body.theme-admin .modal-card .btn-outline .svg-icon {
  color: #FF9500 !important;
}

/* 表单输入与光标聚焦框 */
body.theme-admin input:focus,
body.theme-admin .modal-input:focus,
body.theme-admin select:focus,
body.theme-admin textarea:focus,
body.theme-admin .admin-search-input:focus {
  border-color: rgba(255, 159, 10, 0.7) !important;
  box-shadow: 0 0 14px rgba(255, 149, 0, 0.3) !important;
}

/* 答题卡点位与选项选中态 */
body.theme-admin .answer-dot.current {
  border-color: #FF9500 !important;
  background: rgba(255, 149, 0, 0.18) !important;
  color: #FFA726 !important;
}
body.theme-admin .answer-dot.answered {
  border-color: rgba(255, 159, 10, 0.5) !important;
  background: rgba(255, 149, 0, 0.14) !important;
  color: #FFA726 !important;
}
body.theme-admin .option-item.selected {
  border-color: #FF9500 !important;
  background: rgba(255, 149, 0, 0.14) !important;
}
body.theme-admin .option-item.selected .option-label {
  background: #FF9500 !important;
  color: #fff !important;
}
body.theme-admin .progress-bar {
  background: linear-gradient(90deg, #FF9500, #FFA726) !important;
  box-shadow: 0 0 10px rgba(255, 149, 0, 0.4) !important;
}


/* ═══════════════════════════════════════════════════════════
   ITS-WEB v7.4 彻底根除管理端所有残留蓝绿杂色
   涵盖：做题中台、组卷策略规则、结算报告HUD看板、通关基准线与操作按钮
═══════════════════════════════════════════════════════ */

/* 1. 全局统一 .btn-primary 纯暖橙高光液态玻璃渐变 (杜绝任何 #0ea5e9 两截色) */
html.theme-admin .btn-primary,
body.theme-admin .btn-primary {
  background: linear-gradient(135deg, #FF9F0A 0%, #FF6B00 100%) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.22) !important;
  box-shadow: 0 4px 18px rgba(255, 140, 0, 0.35) !important;
}
html.theme-admin .btn-primary:hover,
body.theme-admin .btn-primary:hover {
  background: linear-gradient(135deg, #FFA726 0%, #FF7A00 100%) !important;
  box-shadow: 0 6px 24px rgba(255, 140, 0, 0.48) !important;
  filter: none !important;
}

/* 2. 题型与专项徽章 (判断、专项来源统一为暖亮橙) */
body.theme-admin .badge-judge,
body.theme-admin #quizBadgeSource {
  background: rgba(255, 149, 0, 0.16) !important;
  color: #FFA726 !important;
  border: 1px solid rgba(255, 159, 10, 0.5) !important;
  box-shadow: 0 2px 8px rgba(255, 149, 0, 0.22) !important;
}

/* “检测”与“单选题”专属科技蓝绿徽章 (无论普通端还是管理端均保持蓝绿，彻底根除撞色) */
.badge-single,
body.theme-admin .badge-single,
.badge-cyan {
  background: rgba(0, 242, 254, 0.12) !important;
  color: #00f2fe !important;
  border: 1px solid rgba(0, 242, 254, 0.35) !important;
  box-shadow: 0 2px 8px rgba(0, 242, 254, 0.18) !important;
}

/* 3. 实时答题看板及顶栏所有 cyan 呼吸点在管理端全面转为亮橙 (图一) */
body.theme-admin .capsule-dot.cyan {
  background: #FF9500 !important;
  box-shadow: 0 0 10px #FF9500 !important;
}

/* 4. 结算页面 HUD 看板与遥测指标 (图三 & 图四) */
body.theme-admin .val-cyan,
body.theme-admin .tile-val.val-cyan,
body.theme-admin .benchmark-delta .delta-main.val-cyan {
  color: #FFA726 !important;
}
body.theme-admin .score-value.val-cyan {
  color: #FFA726 !important;
  text-shadow: 0 0 24px rgba(255, 149, 0, 0.45) !important;
}

/* 5. 结算进度条轨槽与指示条 (图三) */
body.theme-admin .gauge-bar.bar-cyan {
  background: linear-gradient(90deg, #FF9F0A, #FF6B00) !important;
  box-shadow: 0 0 14px rgba(255, 149, 0, 0.5) !important;
}
body.theme-admin .status-ping-glow.ping-cyan {
  background: #FF9500 !important;
  box-shadow: 0 0 10px #FF9500 !important;
}
body.theme-admin .status-ping-dot.ping-cyan {
  background: #FF9500 !important;
}
body.theme-admin .status-tag.tag-cyan {
  border-color: rgba(255, 159, 10, 0.45) !important;
  color: #FFA726 !important;
  background: rgba(255, 149, 0, 0.12) !important;
}

/* 6. 考核基准标线与标签 (图四: 彻底告别蓝绿基准线) */
body.theme-admin .pass-threshold {
  background: #FF9500 !important;
  box-shadow: 0 0 12px #FF9500 !important;
}
body.theme-admin .pass-tag {
  color: #FFA726 !important;
  background: rgba(255, 149, 0, 0.16) !important;
  border: 1px solid rgba(255, 159, 10, 0.55) !important;
  box-shadow: 0 2px 8px rgba(255, 149, 0, 0.25) !important;
}

/* 7. 结算控制面板按钮高光与边框 (图三 & 图四: 回到首页、查看收藏) */
body.theme-admin .btn-cyan-outline {
  background: rgba(255, 149, 0, 0.12) !important;
  border: 1px solid rgba(255, 159, 10, 0.55) !important;
  color: #FFA726 !important;
}
body.theme-admin .btn-cyan-outline:hover {
  background: rgba(255, 149, 0, 0.22) !important;
  border-color: #FF9500 !important;
  color: #FFB74D !important;
  box-shadow: 0 0 16px rgba(255, 149, 0, 0.35) !important;
}
body.theme-admin .action-btn.btn-neutral:hover {
  border-color: #FF9500 !important;
  color: #FFA726 !important;
}
body.theme-admin .card-cyan {
  border-color: rgba(255, 159, 10, 0.35) !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45), 0 0 20px rgba(255, 149, 0, 0.12) !important;
}
body.theme-admin .card-cyan .corner-tag-tl,
body.theme-admin .card-cyan .corner-tag-br {
  border-color: #FF9500 !important;
}
body.theme-admin .eval-level-capsule.tag-expert {
  background: rgba(255, 149, 0, 0.18) !important;
  border-color: #FF9500 !important;
  color: #FFA726 !important;
  box-shadow: 0 0 12px rgba(255, 149, 0, 0.3) !important;
}
