/**
 * 地理考试分析与课堂抽签系统 V3.0 — 视觉与动效样式表（专业大屏克制版）
 * 设计取向：现代建筑感教学仪器 · 大字号高对比度 · 拟真紫檀木签筒与描金隐藏款动效
 */

:root {
  --bg-canvas: #f2f4f7;
  --bg-surface: #ffffff;
  --bg-subtle: #f8fafc;
  --bg-muted: #eef2f6;

  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;

  --border-hairline: #e2e8f0;
  --border-strong: #cbd5e1;

  --accent-primary: #1e293b;
  --accent-primary-hover: #0f172a;
  --accent-interactive: #0f4c81;
  --accent-interactive-light: #eff6ff;

  --high-bg: #f0fdf4;
  --high-border: #bbf7d0;
  --high-text: #14532d;
  --high-badge: #dcfce7;

  --low-bg: #fef2f2;
  --low-border: #fecaca;
  --low-text: #7f1d1d;
  --low-badge: #fee2e2;

  --overlap-bg: #fffbeb;
  --overlap-border: #fde68a;
  --overlap-text: #78350f;

  --danger: #b42318;
  --danger-bg: #fef3f2;
  --warning: #b54708;
  --warning-bg: #fffaeb;
  --success: #067647;
  --success-bg: #ecfdf3;

  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-serif: "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", "SimSun", serif;
  --font-num: "SF Pro Display", "Inter", "PingFang SC", sans-serif;

  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;

  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 20px 48px rgba(15, 23, 42, 0.16);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 18px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button,
input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

/* ==========================================================================
   顶部极简导航栏
   ========================================================================== */
.app-topbar {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-hairline);
  padding: 14px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.topbar-brand {
  display: flex;
  align-items: baseline;
  gap: 14px;
}

.topbar-title {
  font-size: 21px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.2px;
}

.topbar-exam-indicator {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-secondary);
  padding-left: 14px;
  border-left: 1px solid var(--border-strong);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mode-tag {
  font-size: 13px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-xs);
  background: var(--bg-muted);
  color: var(--text-secondary);
}

/* ==========================================================================
   通用按钮系统（大字号、触控与大屏友好）
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 16px;
  line-height: 1.25;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.1s ease;
  user-select: none;
  white-space: nowrap;
}

.btn:focus-visible {
  outline: 2px solid var(--accent-interactive);
  outline-offset: 2px;
}

.btn:active:not(:disabled) {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.btn-primary {
  background-color: var(--accent-primary);
  color: #ffffff;
}

.btn-primary:hover:not(:disabled) {
  background-color: var(--accent-primary-hover);
}

.btn-secondary {
  background-color: var(--bg-surface);
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.btn-secondary:hover:not(:disabled) {
  background-color: var(--bg-subtle);
  border-color: #94a3b8;
}

.btn-subtle {
  background-color: transparent;
  color: var(--text-secondary);
  border-color: transparent;
  padding: 8px 14px;
  font-size: 15px;
}

.btn-subtle:hover:not(:disabled) {
  background-color: var(--bg-muted);
  color: var(--text-primary);
}

.btn-danger {
  background-color: var(--danger-bg);
  color: var(--danger);
  border-color: #fecdca;
}

.btn-danger:hover:not(:disabled) {
  background-color: #fee4e2;
}

.btn-lg {
  padding: 14px 32px;
  font-size: 20px;
  border-radius: var(--radius-md);
}

.btn-draw-main {
  padding: 16px 48px;
  font-size: 23px;
  font-weight: 700;
  letter-spacing: 1px;
  border-radius: var(--radius-md);
  background: var(--accent-primary);
  color: #ffffff;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.18);
}

.btn-draw-main:hover:not(:disabled) {
  background: #090d16;
  box-shadow: 0 8px 26px rgba(15, 23, 42, 0.25);
}

/* ==========================================================================
   布局容器与基础卡片
   ========================================================================== */
.main-container {
  max-width: 1480px;
  margin: 0 auto;
  padding: 24px 32px 56px;
}

.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
  padding: 28px;
  margin-bottom: 20px;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-hairline);
  flex-wrap: wrap;
}

.card-title {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
}

/* 登录页 */
.login-wrapper {
  max-width: 440px;
  margin: 72px auto;
}

.login-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 40px 36px;
}

.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
  font-size: 16px;
}

.form-input,
.form-select {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: var(--text-primary);
  font-size: 16px;
}

.form-input:focus,
.form-select:focus {
  outline: none;
  border-color: var(--accent-interactive);
  box-shadow: 0 0 0 3px rgba(15, 76, 129, 0.12);
}

/* 状态提示条 */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  margin-bottom: 18px;
  font-size: 16px;
  line-height: 1.5;
}

.alert-info {
  background: var(--bg-subtle);
  border: 1px solid var(--border-strong);
  color: var(--text-secondary);
}

.alert-warning {
  background: var(--warning-bg);
  border: 1px solid #fedf89;
  color: var(--warning);
}

.alert-danger {
  background: var(--danger-bg);
  border: 1px solid #fecdca;
  color: var(--danger);
}

.alert-success {
  background: var(--success-bg);
  border: 1px solid #abefc6;
  color: var(--success);
}

/* ==========================================================================
   考试列表
   ========================================================================== */
.exam-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 20px;
}

.exam-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.exam-card:hover {
  border-color: #94a3b8;
  box-shadow: var(--shadow-sm);
}

.exam-card-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 8px;
}

.exam-meta-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: var(--radius-xs);
  font-size: 14px;
  font-weight: 600;
  background: var(--bg-muted);
  color: var(--text-secondary);
}

/* ==========================================================================
   课堂讲评导航栏（班级 A1-A6 与题号层级）
   ========================================================================== */
.classroom-nav {
  background: var(--bg-surface);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  padding: 18px 24px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-xs);
}

.nav-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.nav-row + .nav-row {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border-hairline);
}

.nav-label {
  font-weight: 600;
  font-size: 16px;
  color: var(--text-muted);
  min-width: 54px;
}

.class-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.class-pill {
  padding: 9px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 18px;
  cursor: pointer;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  transition: all 0.12s ease;
}

.class-pill:hover:not(.no-data) {
  border-color: var(--text-primary);
}

.class-pill.active {
  background: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
}

.class-pill.no-data {
  opacity: 0.45;
  background: var(--bg-subtle);
  color: var(--text-muted);
  border-style: dashed;
}

.class-pill-count {
  font-size: 14px;
  font-weight: 500;
  opacity: 0.78;
}

/* 题号选择器 */
.question-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  flex: 1;
}

.q-group {
  display: inline-flex;
  align-items: center;
  background: var(--bg-muted);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 2px;
  gap: 2px;
}

.q-btn {
  min-width: 48px;
  padding: 7px 14px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-hairline);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 18px;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: all 0.12s ease;
}

.q-group .q-btn {
  border-color: transparent;
  background: transparent;
}

.q-btn:hover {
  border-color: var(--text-secondary);
}

.q-btn.active {
  background: var(--accent-primary) !important;
  color: #ffffff !important;
  border-color: var(--accent-primary) !important;
}

.q-btn.sub-q {
  font-size: 16px;
  padding: 6px 12px;
}

.q-expand-toggle {
  padding: 6px 9px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  border-radius: var(--radius-xs);
  font-size: 14px;
  cursor: pointer;
  font-weight: 600;
}

.q-expand-toggle:hover {
  background: rgba(15, 23, 42, 0.08);
}

/* ==========================================================================
   单题主栏头部与统计指标条（克制、大字号、无冗余文本）
   ========================================================================== */
.stage-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.stage-title-wrap {
  display: flex;
  align-items: baseline;
  gap: 14px;
}

.stage-title {
  margin: 0;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-primary);
}

.stage-subtitle {
  font-size: 17px;
  font-weight: 500;
  color: var(--text-muted);
}

.stage-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.segmented-control {
  display: inline-flex;
  background: var(--bg-muted);
  padding: 4px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-hairline);
}

.seg-btn {
  padding: 8px 22px;
  border-radius: var(--radius-xs);
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 17px;
  cursor: pointer;
  transition: all 0.14s ease;
}

.seg-btn.active {
  background: var(--bg-surface);
  color: var(--text-primary);
  box-shadow: var(--shadow-xs);
}

/* 顶部统计栏：一体化建筑感分栏指标 */
.metrics-ribbon {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--bg-surface);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  box-shadow: var(--shadow-xs);
  overflow: hidden;
}

@media (max-width: 900px) {
  .metrics-ribbon {
    grid-template-columns: repeat(2, 1fr);
  }
}

.metric-cell {
  padding: 20px 26px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid var(--border-hairline);
}

.metric-cell:last-child {
  border-right: none;
}

.metric-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.metric-label {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-muted);
}

.metric-meta-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-interactive);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.metric-value {
  font-family: var(--font-num);
  font-size: 40px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -1px;
}

.metric-unit {
  font-size: 18px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-left: 4px;
  letter-spacing: 0;
}

.metric-sub {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 6px;
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   木质签筒抽签主舞台（居中克制布局 + 拟真紫檀木与老竹签材质）
   ========================================================================== */
.draw-theater {
  background: radial-gradient(ellipse at 50% 35%, #ffffff 0%, #f5f6f8 68%, #ebedf2 100%);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-lg);
  padding: 36px 32px 32px;
  min-height: 560px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-xs);
}

.cylinder-stage-center {
  position: relative;
  width: 360px;
  height: 410px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  user-select: none;
}

/* 抽出的结果竹签（老竹纹理 + 朱砂雕花签头 + 宋刻大字） */
.drawn-slip-wrapper {
  position: absolute;
  bottom: 185px;
  left: 50%;
  transform: translateX(-50%) translateY(110px) scale(0.92);
  opacity: 0;
  pointer-events: none;
  z-index: 12;
  transition:
    transform 0.55s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.35s ease;
}

.drawn-slip-wrapper.is-visible {
  transform: translateX(-50%) translateY(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}

.drawn-slip-wrapper.is-sliding-down {
  transform: translateX(-50%) translateY(380px) scale(0.95);
  opacity: 0;
  transition:
    transform 0.6s cubic-bezier(0.5, 0, 0.75, 0),
    opacity 0.5s ease;
}

.bamboo-result-slip {
  min-width: 280px;
  max-width: 420px;
  padding: 26px 38px 28px;
  border-radius: 8px 8px 5px 5px;
  position: relative;
  text-align: center;
  /* 拟真陈年老竹面渐变与纤维质感 */
  background:
    repeating-linear-gradient(
      90deg,
      rgba(120, 78, 30, 0.045) 0px,
      rgba(120, 78, 30, 0.045) 1px,
      transparent 1px,
      transparent 4px
    ),
    linear-gradient(
      90deg,
      #c89f5d 0%,
      #dfc086 12%,
      #f2deB4 38%,
      #f7e8c6 50%,
      #eed8aa 65%,
      #d8b474 88%,
      #be924e 100%
    );
  border: 1.5px solid #96692e;
  box-shadow:
    0 22px 44px -8px rgba(28, 16, 6, 0.36),
    0 4px 12px rgba(28, 16, 6, 0.18),
    inset 0 1px 0 rgba(255, 252, 240, 0.85),
    inset 0 -2px 4px rgba(112, 72, 22, 0.35);
}

/* 竹签顶部朱砂漆头 */
.bamboo-result-slip::before {
  content: "";
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  height: 12px;
  border-radius: 7px 7px 0 0;
  background: linear-gradient(90deg, #6e140e 0%, #9e2218 25%, #b82c21 50%, #931e15 80%, #5e100b 100%);
  border-bottom: 1.5px solid #c59b49;
}

.slip-student-name {
  font-family: var(--font-serif);
  font-size: 56px;
  font-weight: 700;
  color: #1c1108;
  letter-spacing: 3px;
  line-height: 1.18;
  margin: 6px 0 0;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.65);
  word-break: keep-all;
}

.slip-wrong-option {
  display: inline-block;
  margin-top: 12px;
  padding: 4px 18px;
  border-radius: 999px;
  background: rgba(140, 29, 19, 0.1);
  border: 1px solid rgba(140, 29, 19, 0.35);
  color: #7f1d1d;
  font-family: var(--font-sans);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 1px;
}

/* 隐藏款：乌木描金签面（克制奢华黑金漆器质感，6.2 节） */
.bamboo-result-slip.is-hidden-gold {
  background:
    radial-gradient(ellipse at 50% 20%, rgba(243, 211, 130, 0.22) 0%, transparent 70%),
    linear-gradient(135deg, #1a1612 0%, #2a2118 45%, #17130f 100%);
  border: 1.5px solid #d4af37;
  box-shadow:
    0 24px 56px rgba(0, 0, 0, 0.65),
    0 0 36px rgba(212, 175, 55, 0.45),
    inset 0 0 18px rgba(243, 211, 130, 0.18);
  overflow: hidden;
}

.bamboo-result-slip.is-hidden-gold::before {
  background: linear-gradient(90deg, #8a6421 0%, #d4af37 35%, #f9e8a2 50%, #d4af37 65%, #7c581a 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
}

.bamboo-result-slip.is-hidden-gold::after {
  content: "";
  position: absolute;
  top: 0;
  left: -120%;
  width: 80%;
  height: 100%;
  background: linear-gradient(
    105deg,
    transparent 20%,
    rgba(255, 238, 170, 0.28) 50%,
    transparent 80%
  );
  animation: goldFoilSweep 1.8s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}

@keyframes goldFoilSweep {
  0% { left: -100%; }
  100% { left: 160%; }
}

.bamboo-result-slip.is-hidden-gold .slip-student-name {
  color: #f5dc98;
  text-shadow: 0 2px 14px rgba(212, 175, 55, 0.55);
  letter-spacing: 6px;
}

/* 拟真紫檀木签筒 SVG 舞台与物理摇晃动效 */
.wood-cylinder-rig {
  position: relative;
  width: 240px;
  height: 290px;
  transform-origin: 50% 90%;
  z-index: 6;
  will-change: transform;
}

.cylinder-svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}

.cylinder-floor-shadow {
  width: 220px;
  height: 24px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(25, 15, 8, 0.34) 0%, rgba(25, 15, 8, 0) 72%);
  margin-top: -12px;
  z-index: 2;
  transition: transform 0.2s ease;
}

/* 真实感物理摇晃关键帧（带重心位移与阻尼回弹） */
@keyframes cylinderPhysicalShake {
  0% { transform: translate3d(0, 0, 0) rotate(0deg); }
  8% { transform: translate3d(-10px, -6px, 0) rotate(-7.5deg); }
  18% { transform: translate3d(11px, -3px, 0) rotate(8deg); }
  28% { transform: translate3d(-12px, -8px, 0) rotate(-8.5deg); }
  38% { transform: translate3d(10px, -4px, 0) rotate(7.2deg); }
  48% { transform: translate3d(-9px, -7px, 0) rotate(-6.8deg); }
  58% { transform: translate3d(8px, -3px, 0) rotate(6deg); }
  68% { transform: translate3d(-6px, -5px, 0) rotate(-4.5deg); }
  78% { transform: translate3d(5px, -2px, 0) rotate(3.2deg); }
  88% { transform: translate3d(-2.5px, -1px, 0) rotate(-1.6deg); }
  100% { transform: translate3d(0, 0, 0) rotate(0deg); }
}

@keyframes sticksLayerBackBounce {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  22% { transform: translateY(-14px) rotate(-3.2deg); }
  48% { transform: translateY(-4px) rotate(3.6deg); }
  74% { transform: translateY(-16px) rotate(-2.5deg); }
}

@keyframes sticksLayerMidBounce {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  18% { transform: translateY(-18px) rotate(4deg); }
  44% { transform: translateY(-6px) rotate(-4.2deg); }
  70% { transform: translateY(-15px) rotate(2.8deg); }
}

@keyframes sticksLayerFrontBounce {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  26% { transform: translateY(-12px) rotate(-2.8deg); }
  54% { transform: translateY(-20px) rotate(3.2deg); }
  82% { transform: translateY(-7px) rotate(-2deg); }
}

.wood-cylinder-rig.is-shaking {
  animation: cylinderPhysicalShake 2.15s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

.wood-cylinder-rig.is-shaking .sticks-layer-back {
  transform-origin: 120px 130px;
  animation: sticksLayerBackBounce 0.36s ease-in-out infinite;
}

.wood-cylinder-rig.is-shaking .sticks-layer-mid {
  transform-origin: 120px 130px;
  animation: sticksLayerMidBounce 0.32s ease-in-out infinite;
}

.wood-cylinder-rig.is-shaking .sticks-layer-front {
  transform-origin: 120px 130px;
  animation: sticksLayerFrontBounce 0.4s ease-in-out infinite;
}

/* 抽签舞台底部极简控制栏 */
.draw-footer-bar {
  width: 100%;
  max-width: 720px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  z-index: 10;
}

.draw-primary-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.draw-secondary-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  color: var(--text-muted);
  font-size: 16px;
}

.draw-counter-text {
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  color: var(--text-muted);
  font-size: 16px;
}

/* ==========================================================================
   名单视图：大字号高对比学生网格与高低 20% 分栏
   ========================================================================== */
.student-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}

.student-item-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: var(--shadow-xs);
}

.student-item-name {
  font-size: 25px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.3px;
}

.wrong-opt-pill {
  padding: 4px 12px;
  border-radius: var(--radius-xs);
  background: var(--low-badge);
  color: var(--low-text);
  font-family: var(--font-num);
  font-weight: 700;
  font-size: 19px;
}

.score-pill-high {
  padding: 4px 14px;
  border-radius: var(--radius-xs);
  background: var(--high-badge);
  color: var(--high-text);
  font-family: var(--font-num);
  font-weight: 700;
  font-size: 21px;
  font-variant-numeric: tabular-nums;
}

.score-pill-low {
  padding: 4px 14px;
  border-radius: var(--radius-xs);
  background: var(--low-badge);
  color: var(--low-text);
  font-family: var(--font-num);
  font-weight: 700;
  font-size: 21px;
  font-variant-numeric: tabular-nums;
}

.subjective-bands-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

@media (max-width: 900px) {
  .subjective-bands-grid {
    grid-template-columns: 1fr;
  }
}

.band-panel {
  border-radius: var(--radius-md);
  padding: 24px;
  border: 1px solid var(--border-hairline);
}

.band-panel.high-band {
  background: var(--high-bg);
  border-color: var(--high-border);
}

.band-panel.low-band {
  background: var(--low-bg);
  border-color: var(--low-border);
}

.band-panel.overlap-band {
  background: var(--overlap-bg);
  border-color: var(--overlap-border);
  margin-top: 20px;
}

.band-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.band-title {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
}

.high-band .band-title { color: var(--high-text); }
.low-band .band-title { color: var(--low-text); }
.overlap-band .band-title { color: var(--overlap-text); }

.band-meta {
  font-size: 16px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  opacity: 0.85;
}

/* ==========================================================================
   A6 隐藏款专属黑金流光揭晓特效与居中礼盒弹窗 (Section 6.2)
   ========================================================================== */
.hidden-gold-stage-fx {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 900;
  background:
    radial-gradient(circle at 50% 44%, rgba(212, 175, 55, 0.28) 0%, rgba(180, 130, 30, 0.1) 38%, rgba(10, 12, 18, 0.78) 100%);
  opacity: 0;
  transition: opacity 0.5s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hidden-gold-stage-fx.active {
  opacity: 1;
}

.gold-halo-ring {
  width: 520px;
  height: 520px;
  border-radius: 50%;
  border: 1px solid rgba(243, 211, 130, 0.32);
  box-shadow:
    0 0 80px rgba(212, 175, 55, 0.35),
    inset 0 0 80px rgba(212, 175, 55, 0.22);
  animation: haloBreathe 2s ease-out forwards;
}

@keyframes haloBreathe {
  0% { transform: scale(0.72); opacity: 0; }
  35% { opacity: 1; }
  100% { transform: scale(1.12); opacity: 0.85; }
}

.gold-ember {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, #fffdf2 0%, #f3d382 55%, rgba(212, 175, 55, 0) 100%);
  box-shadow: 0 0 10px rgba(243, 211, 130, 0.8);
  animation: emberRise 2s cubic-bezier(0.2, 0.8, 0.4, 1) forwards;
}

@keyframes emberRise {
  0% {
    transform: translateY(36px) scale(0.5);
    opacity: 0;
  }
  25% {
    opacity: 0.92;
  }
  100% {
    transform: translateY(-130px) scale(1.1);
    opacity: 0;
  }
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 14, 22, 0.72);
  backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

/* 隐藏款黑金典藏弹窗 */
.hidden-edition-modal {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(212, 175, 55, 0.18) 0%, transparent 65%),
    linear-gradient(180deg, #181a20 0%, #101216 100%);
  border: 1px solid rgba(212, 175, 55, 0.65);
  border-radius: 20px;
  box-shadow:
    0 32px 80px rgba(0, 0, 0, 0.65),
    0 0 40px rgba(212, 175, 55, 0.2),
    inset 0 0 0 1px rgba(255, 235, 175, 0.12);
  max-width: 480px;
  width: 100%;
  padding: 42px 36px 34px;
  text-align: center;
  position: relative;
  animation: modalRevealPop 0.42s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalRevealPop {
  from {
    transform: translateY(18px) scale(0.94);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.hidden-modal-eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 4px;
  color: #c5a059;
  margin-bottom: 8px;
}

.hidden-modal-title {
  font-family: var(--font-serif);
  font-size: 42px;
  font-weight: 700;
  color: #f5dc98;
  margin: 0 0 24px;
  letter-spacing: 6px;
}

.hidden-avatar-frame {
  width: 196px;
  height: 196px;
  margin: 0 auto 22px;
  border-radius: 50%;
  padding: 5px;
  background: linear-gradient(135deg, #f5dc98 0%, #b88a32 50%, #f5dc98 100%);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5), 0 0 24px rgba(212, 175, 55, 0.28);
}

.hidden-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  background: #ffffff;
}

.hidden-student-name {
  font-family: var(--font-serif);
  font-size: 44px;
  font-weight: 700;
  color: #ffffff;
  margin: 4px 0 30px;
  letter-spacing: 4px;
}

.btn-gold {
  background: linear-gradient(180deg, #ebd18a 0%, #cda047 100%);
  color: #17130a;
  font-weight: 700;
  border: 1px solid #f7e4ac;
}

.btn-gold:hover:not(:disabled) {
  background: linear-gradient(180deg, #f3dd9d 0%, #d8ae56 100%);
}

.btn-dark-outline {
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-dark-outline:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.12);
}

/* 标准设置弹窗与数据表 */
.standard-modal {
  background: var(--bg-surface);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  max-width: 680px;
  width: 100%;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.standard-modal-header {
  padding: 20px 26px;
  border-bottom: 1px solid var(--border-hairline);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.standard-modal-body {
  padding: 24px 26px;
  overflow-y: auto;
}

.standard-modal-footer {
  padding: 16px 26px;
  border-top: 1px solid var(--border-hairline);
  background: var(--bg-subtle);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.data-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-sm);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
  background: var(--bg-surface);
}

.data-table th,
.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-hairline);
  text-align: left;
}

.data-table th {
  background: var(--bg-subtle);
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
}

/* 减少动态效果支持 */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body.reduced-motion *,
body.reduced-motion *::before,
body.reduced-motion *::after {
  animation-duration: 0.01ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.01ms !important;
}
