/* 画布脚本组件样式 */
.el-script { overflow: visible !important; }
.el-script .script-host { width: 100%; height: 100%; position: relative; overflow: hidden; pointer-events: auto; }
.el-script .scr-lottery-btn,
.el-script .scr-quiz-btn,
.el-script .scr-quiz-reveal,
.el-script .scr-quiz-opt,
.el-script .scr-quiz-diff,
.el-script .scr-quiz-cat { pointer-events: auto; cursor: pointer; }

/* ===== 计时器 ===== */
.scr-timer { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.scr-timer-inner { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; position: relative; box-sizing: border-box; }
.scr-timer-text { position: relative; z-index: 2; white-space: nowrap; font-family: PingFang SC, Microsoft YaHei, sans-serif; font-variant-numeric: tabular-nums; }

.scr-timer--gold .scr-timer-inner { background: rgba(0,0,0,0.65); color: #ffd700; font-weight: 700; border-radius: 8px; padding: 0 12px; }
.scr-timer--red .scr-timer-inner { background: #ff0050; color: #fff; font-weight: 700; border-radius: 999px; padding: 0 16px; }
.scr-timer--neon .scr-timer-inner { background: rgba(0,0,0,0.55); color: #00e676; font-weight: 700; border-radius: 8px; box-shadow: 0 0 12px rgba(0,230,118,0.35); padding: 0 12px; }
.scr-timer--gradient .scr-timer-inner { background: linear-gradient(90deg,#667eea,#764ba2); color: #fff; font-weight: 700; border-radius: 8px; padding: 0 12px; }
.scr-timer--minimal .scr-timer-inner { background: rgba(255,255,255,0.12); color: #fff; font-weight: 600; border-radius: 8px; padding: 0 12px; }
.scr-timer--flip .scr-timer-inner { background: #12121a; color: #fff; font-weight: 700; border-radius: 6px; border: 1px solid rgba(255,0,80,0.35); letter-spacing: 0.08em; padding: 0 12px; }

/* 闹钟 */
.scr-timer--alarm .scr-timer-inner { background: transparent; padding: 0; }
.scr-timer--alarm .scr-timer-alarm-body {
  width: 88%; height: 78%; margin-top: 14%; position: relative;
  background: radial-gradient(circle at 50% 45%, #fffde7, #ffe082 70%, #ffb300);
  border-radius: 50%; border: 4px solid #ff8f00;
  box-shadow: inset 0 -4px 8px rgba(0,0,0,0.15), 0 4px 12px rgba(0,0,0,0.35);
  display: flex; align-items: center; justify-content: center;
}
.scr-timer--alarm .scr-timer-alarm-body::before,
.scr-timer--alarm .scr-timer-alarm-body::after {
  content: ''; position: absolute; top: -28%; width: 22%; height: 32%;
  background: linear-gradient(180deg, #ffd54f, #ff8f00); border-radius: 50% 50% 30% 30%;
  border: 2px solid #e65100; box-shadow: 0 2px 4px rgba(0,0,0,0.25);
}
.scr-timer--alarm .scr-timer-alarm-body::before { left: 8%; transform: rotate(-18deg); }
.scr-timer--alarm .scr-timer-alarm-body::after { right: 8%; transform: rotate(18deg); }
.scr-timer--alarm .scr-timer-text { color: #5d4037; font-weight: 800; font-size: 0.55em; }
.scr-timer--alarm .scr-timer-alarm-foot {
  position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 14%; height: 10%; background: #6d4c41; border-radius: 2px 2px 4px 4px;
}

/* 秒表 */
.scr-timer--stopwatch .scr-timer-inner { background: transparent; padding: 0; }
.scr-timer--stopwatch .scr-timer-sw-crown {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 10%; height: 8%; background: #78909c; border-radius: 3px 3px 0 0; z-index: 3;
}
.scr-timer--stopwatch .scr-timer-sw-crown::before {
  content: ''; position: absolute; top: -60%; left: 50%; transform: translateX(-50%);
  width: 140%; height: 80%; border: 3px solid #90a4ae; border-bottom: none; border-radius: 8px 8px 0 0;
}
.scr-timer--stopwatch .scr-timer-sw-face {
  width: 82%; height: 82%; margin-top: 8%;
  background: radial-gradient(circle at 50% 40%, #fafafa, #eceff1 60%, #cfd8dc);
  border-radius: 50%; border: 4px solid #607d8b;
  box-shadow: inset 0 2px 6px rgba(255,255,255,0.8), 0 4px 10px rgba(0,0,0,0.3);
  display: flex; align-items: center; justify-content: center; position: relative;
}
.scr-timer--stopwatch .scr-timer-sw-face::before {
  content: ''; position: absolute; width: 4%; height: 28%; background: #37474f;
  top: 22%; left: 50%; transform: translateX(-50%); transform-origin: bottom center;
  border-radius: 2px;
}
.scr-timer--stopwatch .scr-timer-text { color: #263238; font-weight: 700; font-size: 0.42em; margin-top: 18%; }

/* 电子表 */
.scr-timer--digital .scr-timer-inner {
  background: linear-gradient(180deg, #1a1a1a, #0d0d0d); border-radius: 10px;
  border: 3px solid #333; box-shadow: inset 0 0 20px rgba(0,0,0,0.8), 0 2px 8px rgba(0,0,0,0.5);
  padding: 8% 6%;
}
.scr-timer--digital .scr-timer-digital-screen {
  width: 100%; height: 100%; background: #0a1f0a; border-radius: 4px;
  border: 1px solid #1b5e20; box-shadow: inset 0 0 12px rgba(0,255,100,0.08);
  display: flex; align-items: center; justify-content: center;
}
.scr-timer--digital .scr-timer-text {
  color: #39ff14; font-family: 'Courier New', Consolas, monospace; font-weight: 700;
  text-shadow: 0 0 8px rgba(57,255,20,0.6), 0 0 2px rgba(57,255,20,0.9);
  letter-spacing: 0.06em;
}

/* 翻牌数字 */
.scr-timer--segment .scr-timer-inner { background: transparent; gap: 4px; padding: 0; }
.scr-timer--segment .scr-timer-seg-row { display: flex; align-items: center; justify-content: center; gap: 3px; width: 100%; height: 100%; }
.scr-timer--segment .scr-timer-seg-digit {
  flex: 1; max-width: 18%; height: 75%; background: #1a1a2e; border-radius: 6px;
  border: 2px solid #ff0050; display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; box-shadow: 0 3px 0 #990030, inset 0 1px 0 rgba(255,255,255,0.1);
  font-size: 0.65em;
}
.scr-timer--segment .scr-timer-seg-colon { color: #ff0050; font-weight: 800; font-size: 0.7em; flex-shrink: 0; }

/* ===== 摇奖 ===== */
.scr-lottery { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; height: 100%; }
.scr-lottery-btn {
  padding: 8px 20px; background: #ff0050; color: #fff; border: none; border-radius: 6px;
  font-size: 13px; font-weight: 600; cursor: pointer; flex-shrink: 0;
}
.scr-lottery-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.scr-lottery-btn-static { text-align: center; }

/* 老虎机 — 九宫格跑马灯 */
.scr-lottery--slot { gap: 6px; }
.scr-slot-machine {
  width: 100%; flex: 1; display: flex; flex-direction: column; min-height: 0;
  background: linear-gradient(180deg, #8b0000 0%, #5c0000 40%, #3d0000 100%);
  border-radius: 14px; border: 3px solid #ffd700;
  box-shadow: inset 0 2px 0 rgba(255,215,0,0.4), 0 4px 16px rgba(0,0,0,0.5);
  padding: 6px; position: relative; overflow: hidden;
}
.scr-slot-machine::before {
  content: '幸运摇奖'; position: absolute; top: 5px; left: 50%; transform: translateX(-50%);
  font-size: 11px; font-weight: 900; color: #ffd700; letter-spacing: 2px; text-shadow: 0 0 6px rgba(255,215,0,0.8);
  white-space: nowrap;
}
.scr-slot-grid-area {
  flex: 1 1 auto; min-height: 0; width: 100%; margin-top: 18px; margin-bottom: 4px;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle, #1a1a1a 0%, #0a0a0a 100%);
  border-radius: 10px; border: 2px solid #ffd700; padding: 8px;
}
.scr-slot-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr);
  gap: 5px; width: 100%; max-height: 100%; aspect-ratio: 1; height: auto;
}
.scr-slot-cell {
  display: flex; align-items: center; justify-content: center;
  border-radius: 6px; border: 2px solid rgba(255,255,255,0.15);
  box-sizing: border-box; min-height: 0;
  transition: transform 0.08s ease, box-shadow 0.08s ease, border-color 0.08s ease;
}
.scr-slot-cell-text {
  font-weight: 800; color: #fff; text-align: center; line-height: 1.15;
  padding: 2px; word-break: break-all; text-shadow: 0 1px 3px rgba(0,0,0,0.65);
}
.scr-slot-cell.is-consolation .scr-slot-cell-text { font-weight: 600; font-size: 9px; }
.scr-slot-cell.is-again .scr-slot-cell-text { font-weight: 800; font-size: 10px; }
.scr-slot-cell-center .scr-slot-cell-text { font-size: 18px; color: #5d4037; text-shadow: none; }
.scr-slot-cell.is-active {
  transform: scale(1.06); border-color: #ffd700;
  box-shadow: 0 0 12px rgba(255,215,0,0.95), inset 0 0 8px rgba(255,255,255,0.35); z-index: 2;
}
.scr-slot-cell.is-win {
  transform: scale(1.08); border-color: #fff;
  box-shadow: 0 0 16px #ffd700, inset 0 0 10px rgba(255,255,255,0.5); z-index: 3;
}
.scr-slot-lights { display: flex; justify-content: space-around; padding: 2px 8px 4px; flex-shrink: 0; }
.scr-slot-light {
  width: 8px; height: 8px; border-radius: 50%; background: #ffd700;
  box-shadow: 0 0 6px #ffd700; animation: scrSlotBlink 1s ease-in-out infinite alternate;
}
.scr-slot-light:nth-child(2n) { animation-delay: 0.5s; background: #ff0050; box-shadow: 0 0 6px #ff0050; }
@keyframes scrSlotBlink { from { opacity: 0.4; } to { opacity: 1; } }

/* 大转盘 */
.scr-lottery--wheel { gap: 6px; }
.scr-wheel-wrap {
  flex: 1; width: 100%; min-height: 0; position: relative;
  display: flex; align-items: center; justify-content: center;
}
.scr-wheel-pointer {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%); z-index: 5;
  width: 22px; height: 16px; display: block; pointer-events: none;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,0.5));
}
.scr-wheel-disk {
  width: min(100%, 100%); aspect-ratio: 1; max-height: 100%; border-radius: 50%;
  border: 5px solid #ffd700; box-shadow: 0 0 0 3px #8b6914, 0 4px 16px rgba(0,0,0,0.5);
  transition: transform 4s cubic-bezier(0.17, 0.67, 0.12, 0.99); position: relative;
  overflow: hidden; background: #263238; transform-origin: center center;
}
.scr-wheel-svg {
  position: absolute; inset: 0; width: 100%; height: 100%; display: block;
}
.scr-wheel-svg-text {
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  paint-order: stroke fill;
  stroke: rgba(0, 0, 0, 0.45);
  stroke-width: 0.35;
}
.scr-wheel-svg-consolation { font-weight: 600; fill: #eceff1; }
.scr-wheel-label {
  position: absolute; top: 50%; left: 50%; width: 34%; text-align: center;
  transform-origin: 0 0; font-size: 10px; font-weight: 700; color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8); white-space: normal; line-height: 1.15;
  word-break: keep-all; overflow-wrap: break-word;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  pointer-events: none;
}
.scr-wheel-label.is-consolation { font-size: 9px; font-weight: 600; color: #eceff1; }
.scr-wheel-hub {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 18%; height: 18%; background: radial-gradient(circle, #ffd700, #b8860b);
  border-radius: 50%; border: 2px solid #fff; z-index: 2; box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

/* 竖向滚轮 */
.scr-lottery--scroll { gap: 6px; }
.scr-scroll-frame {
  flex: 1; width: 100%; min-height: 0; position: relative;
  background: linear-gradient(180deg, #2a2a38, #1a1a24);
  border-radius: 12px; border: 3px solid #ff0050;
  box-shadow: inset 0 0 24px rgba(0,0,0,0.6), 0 4px 12px rgba(0,0,0,0.4);
  overflow: hidden; display: flex; align-items: center; justify-content: center;
  padding: 12px 10px;
}
.scr-scroll-window {
  width: 100%; position: relative; display: flex; align-items: center; justify-content: center;
}
.scr-scroll-viewport {
  width: 100%; overflow: hidden; position: relative;
  background: rgba(0,0,0,0.55); border-radius: 8px;
  border: 2px solid rgba(255,0,80,0.45);
  box-shadow: inset 0 0 16px rgba(0,0,0,0.5);
}
.scr-scroll-track { will-change: transform; backface-visibility: hidden; }
.scr-scroll-item {
  display: flex; align-items: center; justify-content: center;
  text-align: center; font-weight: 700; color: #ffd700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  padding: 0 12px; box-sizing: border-box;
}
.scr-scroll-item.is-consolation { color: #90a4ae; font-weight: 600; font-size: 0.9em; }
.scr-scroll-marker {
  position: absolute; inset: 0; pointer-events: none; z-index: 2;
  border-top: 2px solid rgba(255,215,0,0.55);
  border-bottom: 2px solid rgba(255,215,0,0.55);
  box-shadow: inset 0 0 12px rgba(255,0,80,0.12);
}
.scr-scroll-window::before, .scr-scroll-window::after {
  content: ''; position: absolute; left: 0; right: 0; height: 22%; z-index: 3; pointer-events: none;
}
.scr-scroll-window::before { top: 0; background: linear-gradient(180deg, rgba(26,26,36,0.75), transparent); }
.scr-scroll-window::after { bottom: 0; background: linear-gradient(0deg, rgba(26,26,36,0.75), transparent); }

/* 九宫格翻牌 */
.scr-lottery--flip {
  gap: 6px; padding: 6px; box-sizing: border-box;
}
.scr-grid-stage {
  flex: 1; width: 100%; min-height: 0;
  display: flex; align-items: center; justify-content: center; padding: 0;
}
.scr-lottery--flip .scr-grid-stage { min-height: 0; }
.scr-grid-9 {
  display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr);
  gap: 6px; width: 100%; aspect-ratio: 1; max-height: 100%; max-width: 100%;
}
.scr-grid-cell { cursor: pointer; perspective: 600px; min-height: 0; aspect-ratio: 1; container-type: size; overflow: hidden; }
.scr-grid-cell.is-shuffling .scr-grid-card { transform: scale(0.92) rotateY(15deg); opacity: 0.75; }
.scr-grid-card {
  width: 100%; height: 100%; min-height: 0; position: relative;
  transform-style: preserve-3d; transition: transform 0.55s ease;
}
.scr-grid-card.is-flipped { transform: rotateY(180deg); }
.scr-grid-face {
  position: absolute; inset: 0; backface-visibility: hidden; border-radius: 8px;
  display: flex; align-items: center; justify-content: center; text-align: center;
  font-weight: 800; padding: 4px; box-sizing: border-box;
  overflow: hidden; line-height: 1.1; word-break: break-all;
}
.scr-grid-front {
  background: linear-gradient(135deg, #667eea, #764ba2); color: #fff;
  border: 2px solid rgba(255,255,255,0.25);
  font-size: 42cqmin;
}
.scr-grid-back {
  transform: rotateY(180deg); font-size: 17cqmin; line-height: 1.15;
}
.scr-grid-back.is-prize {
  background: linear-gradient(135deg, #ffd700, #ff8f00); color: #5d4037;
  border: 2px solid #ff8f00;
}
.scr-grid-back.is-consolation {
  background: linear-gradient(135deg, #546e7a, #37474f); color: #eceff1;
  border: 2px solid #78909c; font-size: 15cqmin;
}
.scr-lottery--flip .scr-grid-shuffle-btn {
  margin-top: 0; flex-shrink: 0; height: 36px; padding: 0 12px; font-size: 14px;
}

/* 通用滚轮（fallback） */
.scr-lottery-viewport {
  width: 100%; flex: 1; overflow: hidden; border-radius: 10px;
  background: rgba(0,0,0,0.65); border: 2px solid rgba(255,0,80,0.45);
  display: flex; align-items: center; justify-content: center;
}
.scr-lottery-track { display: flex; flex-direction: column; align-items: center; width: 100%; }
.scr-lottery-item { padding: 6px 12px; color: #aaa; text-align: center; transition: color 0.15s, transform 0.15s; }
.scr-lottery-item.is-active { color: #ffd700; font-weight: 700; transform: scale(1.05); }

/* ===== 文本轮播 ===== */
.scr-carousel { width: 100%; height: 100%; }
.scr-carousel-box { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; overflow: hidden; box-sizing: border-box; font-family: PingFang SC, Microsoft YaHei, sans-serif; }
.scr-carousel-text { position: relative; z-index: 1; }

.scr-carousel--pill .scr-carousel-box { background: rgba(255,0,80,0.88); color: #fff; border-radius: 999px; padding: 0 20px; font-weight: 600; }
.scr-carousel--card .scr-carousel-box {
  background: rgba(0,0,0,0.72); color: #fff; border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.15); padding: 8px 16px; font-weight: 600;
  align-items: stretch; flex-direction: column; justify-content: center;
}
.scr-carousel--card .scr-scroll-lines-viewport { flex: 1; min-height: 0; }
.scr-scroll-lines-viewport { width: 100%; overflow: hidden; }
.scr-scroll-lines-track { will-change: transform; }
.scr-scroll-line {
  display: flex; align-items: center; justify-content: center; width: 100%;
  text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  box-sizing: border-box; padding: 0 8px; line-height: 1.3;
}
.scr-carousel--marquee .scr-carousel-box { background: transparent; color: #ffd700; font-weight: 600; }
.scr-carousel--marquee .scr-marquee-track { display: inline-block; white-space: nowrap; animation: scrMarquee 8s linear infinite; }
.scr-carousel--stack .scr-carousel-box { background: rgba(102,126,234,0.25); color: #fff; border-radius: 10px; border: 1px solid rgba(102,126,234,0.5); padding: 0 16px; font-weight: 600; }
.scr-carousel--neon .scr-carousel-box { background: rgba(0,0,0,0.5); color: #00e676; border-radius: 8px; border: 2px solid #00e676; box-shadow: 0 0 12px rgba(0,230,118,0.25); padding: 0 16px; font-weight: 600; }
.scr-carousel--minimal .scr-carousel-box { background: rgba(255,255,255,0.1); color: #eee; border-radius: 6px; padding: 0 16px; font-weight: 600; }

/* 新闻播报条 */
.scr-carousel--broadcast .scr-carousel-box {
  background: linear-gradient(90deg, rgba(180,0,0,0.9), rgba(120,0,0,0.85));
  color: #fff; border-radius: 4px; padding: 0 12px 0 0; font-weight: 600; justify-content: flex-start; gap: 10px;
}
.scr-carousel--broadcast .scr-broadcast-tag {
  flex-shrink: 0; background: #ff0050; color: #fff; font-size: 0.75em; font-weight: 800;
  padding: 4px 10px; border-radius: 2px; letter-spacing: 1px;
  animation: scrBroadcastPulse 2s ease-in-out infinite;
}
@keyframes scrBroadcastPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.75; } }

/* 字幕条 */
.scr-carousel--subtitle .scr-carousel-box {
  background: rgba(0,0,0,0.72); color: #fff; border-radius: 2px;
  padding: 8px 24px; font-weight: 500; letter-spacing: 0.05em;
  align-items: stretch; flex-direction: column; justify-content: center;
}
.scr-carousel--subtitle .scr-scroll-lines-viewport { flex: 1; min-height: 0; }

/* 票券 */
.scr-carousel--ticket .scr-carousel-box {
  background: linear-gradient(135deg, #fff8e1, #ffe082); color: #5d4037;
  border-radius: 8px; border: 2px dashed #ff8f00; padding: 0 20px; font-weight: 700;
  position: relative;
}
.scr-carousel--ticket .scr-carousel-box::before,
.scr-carousel--ticket .scr-carousel-box::after {
  content: ''; position: absolute; top: 50%; width: 14px; height: 14px;
  background: #1a1a2e; border-radius: 50%; transform: translateY(-50%);
}
.scr-carousel--ticket .scr-carousel-box::before { left: -7px; }
.scr-carousel--ticket .scr-carousel-box::after { right: -7px; }

/* 飘带 */
.scr-carousel--ribbon .scr-carousel-box {
  background: linear-gradient(90deg, #ff0050, #ff4081); color: #fff; font-weight: 700;
  padding: 0 28px; clip-path: polygon(8px 0, calc(100% - 8px) 0, 100% 50%, calc(100% - 8px) 100%, 8px 100%, 0 50%);
  box-shadow: 0 3px 8px rgba(255,0,80,0.35);
}

/* 气泡 */
.scr-carousel--bubble .scr-carousel-box {
  background: #fff; color: #333; border-radius: 16px; padding: 0 20px; font-weight: 600;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15); position: relative; margin-bottom: 8px;
}
.scr-carousel--bubble .scr-carousel-box::after {
  content: ''; position: absolute; bottom: -10px; left: 24px;
  border: 10px solid transparent; border-top-color: #fff; border-bottom: none;
}

@keyframes scrMarquee { 0% { transform: translateX(100%); } 100% { transform: translateX(-100%); } }

/* ===== 答题器 ===== */
.scr-quiz {
  display: flex; flex-direction: column; gap: 6px; width: 100%; height: 100%;
  border-radius: 12px; padding: 10px 12px; box-sizing: border-box; overflow: hidden;
}
.scr-quiz-top { display: flex; gap: 6px; align-items: flex-end; flex-shrink: 0; }
.scr-quiz-diffs { display: flex; gap: 3px; flex-shrink: 0; }
.scr-quiz-diff {
  padding: 4px 8px; border: 1px solid rgba(255,255,255,0.2); background: rgba(0,0,0,0.3);
  color: #aaa; border-radius: 4px; font-size: 10px; cursor: pointer;
}
.scr-quiz-diff.active { background: #ff0050; border-color: #ff0050; color: #fff; }
.scr-quiz-label { font-size: 10px; color: #888; display: flex; flex-direction: column; gap: 2px; }
.scr-quiz-cats { display: flex; gap: 6px; flex: 1; min-width: 0; }
.scr-quiz-cats .scr-quiz-label { flex: 1; min-width: 0; }
.scr-quiz-main, .scr-quiz-sub, .scr-quiz-cat {
  width: 100%; padding: 4px; background: #0e0e12; border: 1px solid #2a2a38;
  border-radius: 4px; color: #ccc; font-size: 10px;
}
.scr-quiz-q {
  flex-shrink: 0; color: #fff; line-height: 1.4; min-height: 0;
  font-size: 11px; max-height: 36px; overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.scr-quiz-opts {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px; flex: 1; min-height: 0; overflow: hidden;
}
.scr-quiz-opt {
  display: flex; align-items: center; gap: 4px; padding: 4px 6px;
  border: 1px solid rgba(255,255,255,0.15); border-radius: 4px;
  background: rgba(0,0,0,0.25); color: #ddd; font-size: 10px; cursor: pointer;
  text-align: left; min-width: 0;
}
.scr-quiz-opt-k { flex-shrink: 0; font-weight: 700; color: #ffd700; }
.scr-quiz-opt-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scr-quiz-opt.selected { border-color: #ffd700; background: rgba(255,215,0,0.12); }
.scr-quiz-opt.correct { border-color: #00e676; background: rgba(0,230,118,0.15); color: #fff; }
.scr-quiz-opt.wrong { border-color: #ff5252; background: rgba(255,82,82,0.12); }
.scr-quiz-answer { flex-shrink: 0; font-size: 11px; color: #00e676; font-weight: 600; line-height: 1.35; }
.scr-quiz-actions { display: flex; gap: 6px; flex-shrink: 0; }
.scr-quiz-btn, .scr-quiz-reveal {
  flex: 1; padding: 6px; border: none; border-radius: 6px;
  font-size: 11px; font-weight: 600; cursor: pointer; flex-shrink: 0;
}
.scr-quiz-reveal { background: rgba(255,255,255,0.12); color: #fff; border: 1px solid rgba(255,255,255,0.2); }
.scr-quiz-btn-static { text-align: center; }
.scr-quiz-cat-label { font-size: 11px; color: #888; }
.scr-quiz-meta { display: flex; justify-content: space-between; font-size: 10px; color: #888; }
.scr-quiz-diff-tag { color: #ffd700; }
.scr-quiz-opts-static .scr-quiz-opt-static { font-size: 10px; padding: 2px 0; color: #ccc; }
.scr-quiz-opts-static .scr-quiz-opt-static.correct { color: #00e676; font-weight: 600; }

.scr-quiz--classic { background: rgba(0,0,0,0.55); border: 1px solid rgba(255,255,255,0.12); }
.scr-quiz--game {
  background: linear-gradient(180deg, #1a0a2e 0%, #0d0518 100%);
  border: 2px solid #ffd700; box-shadow: inset 0 0 30px rgba(255,215,0,0.08), 0 0 20px rgba(255,0,80,0.15);
}
.scr-quiz--game .scr-quiz-q {
  background: rgba(255,255,255,0.06); border-radius: 8px; padding: 10px 14px;
  border: 1px solid rgba(255,215,0,0.25); text-align: center; justify-content: center;
}
.scr-quiz--game .scr-quiz-btn {
  background: linear-gradient(180deg, #ffd700, #ff8f00); color: #5d4037;
  border: 2px solid #fff; box-shadow: 0 3px 0 #b8860b; font-weight: 800;
}
.scr-quiz--board {
  background: #2e4a3e; border: 4px solid #8d6e63;
  box-shadow: inset 0 0 40px rgba(0,0,0,0.3);
}
.scr-quiz--board .scr-quiz-q {
  color: #e8f5e9; font-family: 'KaiTi', 'STKaiti', serif;
  text-shadow: 1px 1px 0 rgba(0,0,0,0.3); padding: 8px;
}
.scr-quiz--board .scr-quiz-main, .scr-quiz--board .scr-quiz-sub {
  background: rgba(0,0,0,0.25); border-color: rgba(255,255,255,0.15); color: #c8e6c9;
}
.scr-quiz--board .scr-quiz-btn { background: #558b2f; border: 2px solid #33691e; }
.scr-quiz--neon {
  background: rgba(0,0,0,0.75); border: 2px solid #00e5ff;
  box-shadow: 0 0 20px rgba(0,229,255,0.2), inset 0 0 30px rgba(0,229,255,0.05);
}
.scr-quiz--neon .scr-quiz-q { color: #00e5ff; text-shadow: 0 0 10px rgba(0,229,255,0.5); }
.scr-quiz--neon .scr-quiz-btn { background: transparent; border: 2px solid #00e5ff; color: #00e5ff; box-shadow: 0 0 12px rgba(0,229,255,0.3); }
.scr-quiz--paper {
  background: #fffef5; border: 1px solid #ddd; box-shadow: 2px 3px 8px rgba(0,0,0,0.12);
}
.scr-quiz--paper .scr-quiz-q { color: #333; border-left: 3px solid #ff0050; padding-left: 12px; }
.scr-quiz--paper .scr-quiz-label { color: #666; }
.scr-quiz--paper .scr-quiz-main, .scr-quiz--paper .scr-quiz-sub {
  background: #f5f5f5; border-color: #ccc; color: #333;
}
.scr-quiz--paper .scr-quiz-btn { background: #ff0050; }

.scr-unknown { color: #666; font-size: 12px; text-align: center; padding: 12px; }

/* 多页顶栏 */
.canvas-page-bar {
  display: flex; align-items: center; gap: 8px; margin-left: auto;
  flex-shrink: 0; max-width: 55%;
}
.canvas-page-tabs { display: flex; gap: 3px; flex-wrap: wrap; }
.canvas-page-tab {
  min-width: 24px; height: 24px; padding: 0 6px; background: #0e0e12;
  border: 1px solid #2a2a38; border-radius: 4px; color: #888; cursor: pointer; font-size: 11px;
}
.canvas-page-tab.active { background: #ff0050; border-color: #ff0050; color: #fff; }
.canvas-page-tab:hover { border-color: #ff0050; color: #fff; }
.canvas-page-btn {
  width: 24px; height: 24px; background: #0e0e12; border: 1px solid #2a2a38;
  border-radius: 4px; color: #ccc; cursor: pointer; font-size: 14px; line-height: 1;
}
.canvas-page-btn:hover { border-color: #ff0050; color: #fff; }
.canvas-page-meta { font-size: 11px; color: #888; white-space: nowrap; }
.canvas-page-exit {
  padding: 2px 8px; background: transparent; border: 1px solid #444; border-radius: 4px;
  color: #888; cursor: pointer; font-size: 10px;
}
.canvas-page-save {
  padding: 2px 10px; background: transparent; border: 1px solid #444; border-radius: 4px;
  color: #aaa; cursor: pointer; font-size: 10px; flex-shrink: 0;
}
.canvas-page-save:hover { border-color: #00e676; color: #00e676; }
.canvas-page-exit:hover { border-color: #ff0050; color: #fff; }

.script-quiz-preview {
  padding: 12px; background: #0e0e12; border: 1px solid #2a2a38;
  border-radius: 6px; color: #aaa; font-size: 12px; min-height: 48px; line-height: 1.5;
}
.script-quiz-preview-opts { margin-top: 8px; display: grid; gap: 4px; }
.script-quiz-preview-opt { font-size: 11px; color: #ccc; }
.script-quiz-preview-opt.correct { color: #00e676; font-weight: 600; }
.script-quiz-count { color: #666; font-weight: 400; font-size: 10px; }
.script-quiz-diff-row { display: flex; gap: 6px; }
.script-diff-pick {
  padding: 6px 14px; background: #0e0e12; border: 1px solid #2a2a38;
  border-radius: 6px; color: #888; cursor: pointer; font-size: 12px;
}
.script-diff-pick.active { background: #ff0050; border-color: #ff0050; color: #fff; }
