:root {
  --bg-outer: #07080a;
  --bg-monitor: #0f1115;
  --bg-panel: #171a21;
  --bg-panel-hover: #1f242e;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --cinema-yellow: #f5c518;
  --cinema-yellow-dim: rgba(245, 197, 24, 0.14);
  --rec-red: #ff3b30;
  --rec-red-dim: rgba(255, 59, 48, 0.15);
  --pass-green: #30d158;
  --pass-green-dim: rgba(48, 209, 88, 0.16);
  --anamorphic-blue: #38bdf8;
  --text-primary: #f3f5f8;
  --text-secondary: #9aa3b2;
  --text-muted: #667085;
  --font-sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", sans-serif;
  --font-mono: "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  height: 100%;
  background: var(--bg-outer);
  color: var(--text-primary);
  font-family: var(--font-sans);
  overflow: hidden;
}

.studio-backdrop {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 20% 15%, rgba(245, 197, 24, 0.06), transparent 40%),
    radial-gradient(circle at 80% 85%, rgba(56, 189, 248, 0.06), transparent 40%),
    var(--bg-outer);
}

.device-frame {
  width: 100%;
  max-width: 430px;
  height: 100%;
  max-height: 860px;
  background: var(--bg-monitor);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  border-left: 1px solid var(--border-subtle);
  border-right: 1px solid var(--border-subtle);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.75);
}

@media (min-width: 480px) {
  .device-frame {
    height: 94vh;
    border-radius: 24px;
    border: 1px solid var(--border-strong);
  }
}

/* 顶部监视器 HUD */
.monitor-hud {
  height: 48px;
  padding: 0 14px;
  background: #0b0d11;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  flex-shrink: 0;
  z-index: 10;
}

.hud-left, .hud-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.rec-indicator {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text-secondary);
  font-weight: 700;
  letter-spacing: 0.06em;
}

.rec-indicator.live {
  color: var(--rec-red);
}

.rec-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-muted);
}

.rec-indicator.live .rec-dot {
  background: var(--rec-red);
  box-shadow: 0 0 8px var(--rec-red);
  animation: pulseRec 1.1s infinite;
}

@keyframes pulseRec {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.85); }
}

.hud-divider {
  color: var(--border-strong);
}

.hud-tag {
  color: var(--cinema-yellow);
  font-weight: 700;
  letter-spacing: 0.05em;
}

.timecode {
  color: var(--text-secondary);
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
}

.hud-icon-btn {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-panel);
  color: var(--text-primary);
  font-size: 13px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s, background 0.15s;
}

.hud-icon-btn:hover {
  border-color: var(--cinema-yellow);
  background: var(--bg-panel-hover);
}

/* 主视图容器 */
.screen-stage {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  position: relative;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.15) transparent;
}

/* 底部监视器参数条 */
.monitor-footer {
  height: 34px;
  padding: 0 14px;
  background: #0b0d11;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.meta-rank {
  color: var(--cinema-yellow);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 11px;
}

/* 通用按钮 */
.primary-btn {
  background: var(--cinema-yellow);
  color: #0b0d11;
  border: none;
  border-radius: 12px;
  padding: 13px 18px;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  letter-spacing: 0.02em;
  transition: transform 0.12s ease, filter 0.15s ease;
}

.primary-btn:hover {
  filter: brightness(1.06);
}

.primary-btn:active {
  transform: scale(0.98);
}

.secondary-btn {
  background: var(--bg-panel);
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: border-color 0.15s, background 0.15s;
}

.secondary-btn:hover {
  border-color: var(--cinema-yellow);
  background: var(--bg-panel-hover);
}

.full-width {
  width: 100%;
}

/* 首页：场记板封面 */
.home-view {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-bottom: 12px;
}

.slate-hero {
  background: linear-gradient(160deg, #1b1f29 0%, #12151c 100%);
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  overflow: hidden;
  position: relative;
}

.clapper-stripes {
  height: 22px;
  background: repeating-linear-gradient(
    -55deg,
    #f5c518 0px,
    #f5c518 16px,
    #111318 16px,
    #111318 32px
  );
  border-bottom: 2px solid #0b0d11;
}

.slate-body {
  padding: 18px 16px 16px;
  position: relative;
}

.slate-eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--cinema-yellow);
  letter-spacing: 0.14em;
  margin-bottom: 6px;
}

.slate-title {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.slate-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 14px;
}

.slate-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  border-top: 1px dashed var(--border-strong);
  padding-top: 12px;
}

.stat-cell {
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 8px 6px;
  text-align: center;
}

.stat-val {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 800;
  color: var(--cinema-yellow);
}

.stat-label {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* 幕次卡片 */
.act-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.2s;
}

.act-card.unlocked {
  border-color: rgba(245, 197, 24, 0.32);
}

.act-card.locked {
  opacity: 0.72;
}

.act-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.act-pill {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--cinema-yellow-dim);
  color: var(--cinema-yellow);
  letter-spacing: 0.06em;
}

.act-pill.blue {
  background: rgba(56, 189, 248, 0.14);
  color: var(--anamorphic-blue);
}

.act-pill.orange {
  background: rgba(255, 107, 53, 0.16);
  color: #ff6b35;
}

.act-status {
  font-size: 11px;
  color: var(--text-secondary);
}

.act-title {
  font-size: 17px;
  font-weight: 800;
}

.act-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.progress-track {
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 99px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #f5c518, #ff9f0a);
  border-radius: 99px;
  transition: width 0.35s ease;
}

/* 快捷互动试玩条 */
.quick-lab-box {
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed var(--border-strong);
  border-radius: 14px;
  padding: 12px;
}

.quick-lab-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.lab-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.lab-chip {
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 9px 10px;
  text-align: left;
  color: var(--text-primary);
  cursor: pointer;
  transition: border-color 0.15s, transform 0.12s;
}

.lab-chip:hover {
  border-color: var(--cinema-yellow);
  transform: translateY(-1px);
}

.lab-chip-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--cinema-yellow);
  display: block;
  margin-bottom: 2px;
}

.lab-chip-name {
  font-size: 12px;
  font-weight: 700;
}

/* 答题页 */
.quiz-view {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-bottom: 16px;
}

.stage-progress-bar {
  display: flex;
  align-items: center;
  gap: 4px;
}

.stage-pip {
  flex: 1;
  height: 5px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.1);
  transition: background 0.25s;
}

.stage-pip.done {
  background: var(--pass-green);
}

.stage-pip.current {
  background: var(--cinema-yellow);
  box-shadow: 0 0 8px rgba(245, 197, 24, 0.5);
}

.stage-pip.minigame {
  flex: 0.65;
  background: rgba(56, 189, 248, 0.25);
}

.stage-pip.minigame.done {
  background: var(--anamorphic-blue);
}

.stage-pip.minigame.current {
  background: var(--anamorphic-blue);
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.6);
}

.question-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
}

.q-badge {
  font-family: var(--font-mono);
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--bg-panel);
  border: 1px solid var(--border-strong);
  color: var(--cinema-yellow);
  font-weight: 700;
}

.q-diff {
  font-family: var(--font-mono);
  color: var(--text-secondary);
}

.question-box {
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 14px 15px;
  position: relative;
}

.question-box::before,
.question-box::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  border-color: var(--cinema-yellow);
  border-style: solid;
  opacity: 0.55;
}

.question-box::before {
  top: 7px;
  left: 7px;
  border-width: 1.5px 0 0 1.5px;
}

.question-box::after {
  bottom: 7px;
  right: 7px;
  border-width: 0 1.5px 1.5px 0;
}

.question-scene {
  font-size: 11px;
  color: var(--cinema-yellow);
  margin-bottom: 5px;
  font-weight: 600;
}

.question-text {
  font-size: 16px;
  font-weight: 800;
  line-height: 1.48;
  color: var(--text-primary);
}

/* 图形选择卡片 */
.options-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.options-grid.single-col {
  grid-template-columns: 1fr;
}

.visual-card {
  background: var(--bg-panel);
  border: 1.5px solid var(--border-subtle);
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  transition: transform 0.14s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.visual-card:hover:not(:disabled) {
  border-color: var(--cinema-yellow);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.visual-card:active:not(:disabled) {
  transform: scale(0.98);
}

.visual-card.correct {
  border-color: var(--pass-green);
  box-shadow: 0 0 0 2px var(--pass-green-dim);
}

.visual-card.wrong {
  border-color: var(--rec-red);
  box-shadow: 0 0 0 2px var(--rec-red-dim);
}

.visual-card:disabled {
  cursor: default;
}

.card-art {
  width: 100%;
  aspect-ratio: 16 / 11;
  background: #0b0d12;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.options-grid.single-col .card-art {
  aspect-ratio: 16 / 6.2;
}

.card-art svg {
  width: 100%;
  height: 100%;
  display: block;
}

.card-body {
  padding: 10px 11px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.card-opt-head {
  display: flex;
  align-items: center;
  gap: 6px;
}

.opt-letter {
  width: 19px;
  height: 19px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.08);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--cinema-yellow);
  flex-shrink: 0;
}

.card-opt-title {
  font-size: 14px;
  font-weight: 800;
  line-height: 1.25;
}

.card-opt-sub {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.35;
}

/* 图形互动关卡 */
.minigame-view {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 16px;
}

.mg-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mg-pill {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  color: #0b0d11;
  background: var(--anamorphic-blue);
  padding: 4px 10px;
  border-radius: 99px;
  letter-spacing: 0.04em;
}

.mg-title {
  font-size: 18px;
  font-weight: 900;
}

.mg-mission {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.5;
  background: var(--bg-panel);
  border-left: 3px solid var(--cinema-yellow);
  padding: 9px 12px;
  border-radius: 0 10px 10px 0;
}

.monitor-viewport {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #08090c;
  border: 1.5px solid var(--border-strong);
  border-radius: 14px;
  position: relative;
  overflow: hidden;
  user-select: none;
  touch-action: none;
}

.viewport-overlay-hud {
  position: absolute;
  top: 8px;
  left: 10px;
  right: 10px;
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.86);
  pointer-events: none;
  z-index: 6;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
}

.telemetry-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.telemetry-box {
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 8px 6px;
  text-align: center;
}

.telemetry-label {
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.telemetry-value {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 800;
  color: var(--cinema-yellow);
}

.slider-panel {
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.slider-labels {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
}

.cinema-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.12);
  outline: none;
}

.cinema-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--cinema-yellow);
  border: 3px solid #0b0d11;
  box-shadow: 0 0 10px rgba(245, 197, 24, 0.55);
  cursor: pointer;
}

.mg-hint {
  font-size: 12px;
  text-align: center;
  min-height: 18px;
  color: var(--text-secondary);
}

.mg-hint.error {
  color: var(--rec-red);
}

/* 画幅遮幅互动 */
.letterbox-bar {
  position: absolute;
  left: 0;
  right: 0;
  background: #000000;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
}

.letterbox-top {
  top: 0;
  border-bottom: 2px solid var(--cinema-yellow);
}

.letterbox-bottom {
  bottom: 0;
  border-top: 2px solid var(--cinema-yellow);
}

.drag-handle-pill {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  background: var(--cinema-yellow);
  color: #0b0d11;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  padding: 2px 10px;
  border-radius: 99px;
  cursor: ns-resize;
  white-space: nowrap;
  z-index: 7;
}

.letterbox-top .drag-handle-pill {
  bottom: -11px;
}

.letterbox-bottom .drag-handle-pill {
  top: -11px;
}

/* 三点布光互动 */
.lighting-layout {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 10px;
  align-items: stretch;
}

.studio-floor {
  aspect-ratio: 1 / 1;
  background:
    radial-gradient(circle at 50% 50%, rgba(245, 197, 24, 0.06) 0%, transparent 62%),
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px),
    #0b0d12;
  background-size: 100% 100%, 24px 24px, 24px 24px, 100% 100%;
  border: 1.5px solid var(--border-strong);
  border-radius: 14px;
  position: relative;
  overflow: hidden;
  touch-action: none;
  user-select: none;
}

.light-node {
  position: absolute;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 800;
  cursor: grab;
  z-index: 5;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6);
  border: 2px solid #0b0d11;
}

.light-node:active {
  cursor: grabbing;
  transform: translate(-50%, -50%) scale(1.1);
}

.light-node.key {
  background: #f5c518;
  color: #0b0d11;
}

.light-node.fill {
  background: #38bdf8;
  color: #0b0d11;
}

.light-node.rim {
  background: #ff9f0a;
  color: #0b0d11;
}

.portrait-preview-card {
  background: #0b0d12;
  border: 1.5px solid var(--border-strong);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 8px;
}

.preview-caption {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  text-align: center;
}

.light-checklist {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
}

.light-check-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-muted);
}

.light-check-item.ok {
  color: var(--pass-green);
  font-weight: 700;
}

/* 弹窗 */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 6, 9, 0.78);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
  z-index: 100;
}

.modal-backdrop.hidden {
  display: none;
}

.modal-card {
  width: 100%;
  max-width: 400px;
  background: #151820;
  border: 1.5px solid var(--border-strong);
  border-radius: 18px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: slideUp 0.2s ease-out;
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-stamp {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 900;
  padding: 4px 10px;
  border-radius: 6px;
  letter-spacing: 0.08em;
}

.modal-stamp.pass {
  background: var(--pass-green-dim);
  color: var(--pass-green);
  border: 1px solid rgba(48, 209, 88, 0.35);
}

.modal-stamp.ng {
  background: var(--rec-red-dim);
  color: var(--rec-red);
  border: 1px solid rgba(255, 59, 48, 0.35);
}

.modal-badge {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--cinema-yellow);
  font-weight: 700;
}

.modal-title {
  font-size: 18px;
  font-weight: 900;
}

.modal-desc {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.pro-tip-box {
  background: rgba(245, 197, 24, 0.08);
  border: 1px solid rgba(245, 197, 24, 0.25);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pro-tip-label {
  font-size: 11px;
  font-weight: 800;
  color: var(--cinema-yellow);
}

.pro-tip-text {
  font-size: 12px;
  color: var(--text-primary);
  line-height: 1.5;
}

/* 通关战绩页 */
.summary-view {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-top: 8px;
}

.wrap-card {
  background: linear-gradient(160deg, #1b202b 0%, #11141a 100%);
  border: 1.5px solid var(--cinema-yellow);
  border-radius: 18px;
  overflow: hidden;
}

.wrap-body {
  padding: 20px 18px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.wrap-stamp {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 900;
  color: #0b0d11;
  background: var(--cinema-yellow);
  padding: 4px 12px;
  border-radius: 99px;
  letter-spacing: 0.1em;
}

.wrap-rank {
  font-size: 26px;
  font-weight: 900;
  color: var(--text-primary);
}

.wrap-sub {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.wrap-metrics {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 6px;
}

/* =========================================================
 * 通关彩色气球 & 彩带喷射特效层
 * ========================================================= */
.celebration-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 60;
}

.confetti-ribbon {
  position: absolute;
  bottom: -10px;
  border-radius: 2px;
  opacity: 0;
  animation: confettiSpray var(--dur, 2.6s) cubic-bezier(0.16, 0.84, 0.44, 1) forwards;
}

@keyframes confettiSpray {
  0% {
    transform: translate(0, 0) rotate(0deg) scale(0.6);
    opacity: 1;
  }
  28% {
    transform: translate(var(--dx-peak), var(--dy-peak)) rotate(var(--rot-mid)) scale(1.05);
    opacity: 1;
  }
  100% {
    transform: translate(var(--dx-end), var(--dy-end)) rotate(var(--rot-end)) scale(0.9);
    opacity: 0;
  }
}

.party-balloon {
  position: absolute;
  bottom: -90px;
  width: var(--size, 36px);
  height: calc(var(--size, 36px) * 1.22);
  border-radius: 50% 50% 48% 48% / 44% 44% 56% 56%;
  background: radial-gradient(circle at 30% 28%, rgba(255, 255, 255, 0.65) 0%, var(--b-color) 42%, rgba(0, 0, 0, 0.25) 100%);
  box-shadow: inset -4px -6px 10px rgba(0, 0, 0, 0.22);
  animation: balloonFloat var(--dur, 4.4s) ease-out forwards;
}

.party-balloon::before {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 7px;
  height: 5px;
  background: var(--b-color);
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
}

.party-balloon::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  width: 1.5px;
  height: 36px;
  background: rgba(255, 255, 255, 0.45);
  transform-origin: top;
}

@keyframes balloonFloat {
  0% {
    transform: translate(0, 0) rotate(-4deg);
    opacity: 0;
  }
  10% {
    opacity: 0.96;
  }
  50% {
    transform: translate(var(--sway, 18px), -420px) rotate(6deg);
    opacity: 0.95;
  }
  100% {
    transform: translate(calc(var(--sway, 18px) * -0.8), -920px) rotate(-5deg);
    opacity: 0;
  }
}

/* =========================================================
 * 结尾趣味导演署名：柯导就是玩儿。
 * ========================================================= */
.director-credit-card {
  margin-top: 4px;
  padding: 14px 14px 12px;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(245, 197, 24, 0.08), rgba(255, 107, 53, 0.06));
  border: 1px dashed rgba(245, 197, 24, 0.38);
  text-align: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.14s ease, border-color 0.2s ease;
}

.director-credit-card:hover {
  border-color: var(--cinema-yellow);
  transform: translateY(-1px);
}

.director-credit-card:active {
  transform: scale(0.98);
}

.credit-roll-label {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.credit-director-sign {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 99px;
  background: #0b0d11;
  border: 1.5px solid var(--cinema-yellow);
  color: var(--cinema-yellow);
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.04em;
  box-shadow: 0 4px 14px rgba(245, 197, 24, 0.18);
}

.credit-fun-quote {
  margin-top: 8px;
  font-size: 11.5px;
  color: var(--text-secondary);
  line-height: 1.45;
}

.credit-tap-hint {
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: rgba(245, 197, 24, 0.72);
}

/* =========================================================
 * 答错毒舌暴击条
 * ========================================================= */
.roast-banner {
  background: linear-gradient(135deg, rgba(255, 59, 48, 0.22), rgba(255, 107, 53, 0.16));
  border: 1.5px solid rgba(255, 59, 48, 0.65);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: roastShake 0.42s ease-in-out;
}

.roast-banner.hidden {
  display: none;
}

.roast-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.roast-text {
  font-size: 14px;
  font-weight: 900;
  color: #ffd6d4;
  line-height: 1.4;
}

@keyframes roastShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-7px); }
  40% { transform: translateX(7px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(5px); }
}

/* =========================================================
 * 终极通关强视觉激励 & 毒舌夸奖卡
 * ========================================================= */
.wrap-card.grand {
  border: 2px solid #f5c518;
  background:
    radial-gradient(circle at 50% 18%, rgba(245, 197, 24, 0.28) 0%, transparent 58%),
    linear-gradient(160deg, #251f14 0%, #11141a 100%);
  box-shadow: 0 0 36px rgba(245, 197, 24, 0.35);
  position: relative;
}

.wrap-card.grand::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 25%, rgba(255, 255, 255, 0.14) 50%, transparent 75%);
  transform: translateX(-120%);
  animation: goldShimmer 2.6s infinite;
  pointer-events: none;
}

@keyframes goldShimmer {
  0% { transform: translateX(-120%); }
  55%, 100% { transform: translateX(130%); }
}

.trophy-hero {
  font-size: 52px;
  line-height: 1;
  filter: drop-shadow(0 0 18px rgba(245, 197, 24, 0.65));
  animation: trophyPop 1.4s ease-in-out infinite;
}

@keyframes trophyPop {
  0%, 100% { transform: scale(1) rotate(-3deg); }
  50% { transform: scale(1.12) rotate(3deg); }
}

.savage-praise-box {
  width: 100%;
  background: rgba(245, 197, 24, 0.14);
  border: 1.5px solid rgba(245, 197, 24, 0.55);
  border-radius: 12px;
  padding: 11px 13px;
  font-size: 14px;
  font-weight: 900;
  color: #fef08a;
  line-height: 1.5;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
}
