:root {
  --bg: #0b1220;
  --panel: #131c2e;
  --panel-2: #1a2540;
  --line: #2a3756;
  --text: #e8edf7;
  --muted: #93a0bb;
  --accent: #ffb020;
  --ok: #34d399;
  --bad: #f87171;
  --smoke: #ff4d4f;
  --radius: 14px;
  font-family: "Noto Sans TC", "Microsoft JhengHei", "PingFang TC", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
button { font: inherit; cursor: pointer; }
.hidden { display: none !important; }

.btn {
  border: 1px solid var(--line); background: var(--panel-2); color: var(--text);
  padding: 10px 16px; border-radius: 10px; font-weight: 600;
}
.btn:hover { border-color: var(--muted); }
a.btn { display: inline-block; text-decoration: none; }
.btn.primary { background: var(--accent); color: #1a1200; border-color: var(--accent); }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* 進度條：五個階段 */
.stages { display: flex; gap: 8px; list-style: none; margin: 0; padding: 0; }
.stage {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 10px 4px; border-radius: 10px; background: var(--panel-2); color: var(--muted);
  border: 1px solid transparent; text-align: center;
}
.stage .dot {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--line); color: var(--text); font-weight: 700; font-size: 14px;
}
.stage .name { font-size: 14px; font-weight: 600; }
.stage .ms { font-size: 12px; min-height: 1em; }
.stage.active { border-color: var(--accent); color: var(--text); }
.stage.active .dot { background: var(--accent); color: #1a1200; animation: pulse 1s infinite; }
.stage.done { color: var(--text); }
.stage.done .dot { background: var(--ok); color: #04210f; }
.stage.error { border-color: var(--bad); }
.stage.error .dot { background: var(--bad); }
@keyframes pulse { 50% { transform: scale(1.15); } }

/* 一組畫面：原圖｜合成＋辨識 */
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.shot { position: relative; border-radius: 12px; overflow: hidden; background: #000; }
.shot img { display: block; width: 100%; height: auto; }
.shot .cap {
  position: absolute; left: 10px; top: 10px; padding: 4px 10px; border-radius: 8px;
  background: rgba(0, 0, 0, .65); font-size: 14px; font-weight: 600;
}
.shot .tag {
  position: absolute; right: 10px; bottom: 10px; padding: 3px 8px; border-radius: 6px;
  background: rgba(255, 176, 32, .9); color: #1a1200; font-size: 12px; font-weight: 700;
}
/* 影片逐格播放：直式影片限制高度，避免撐爆畫面 */
.shot.clip canvas { display: block; margin: 0 auto; max-width: 100%; max-height: 70vh; width: auto; height: auto; }
.shot .live {
  position: absolute; left: 10px; bottom: 10px; padding: 4px 10px; border-radius: 8px;
  background: rgba(0, 0, 0, .65); font-size: 14px; font-weight: 600;
}
.shot .live:empty { display: none; }
.shot .live.on { background: var(--smoke); color: #fff; }
.box { position: absolute; border: 3px solid var(--smoke); border-radius: 4px; box-shadow: 0 0 0 1px rgba(0,0,0,.4); }
.box span {
  position: absolute; left: -3px; top: -26px; white-space: nowrap; padding: 2px 8px; border-radius: 6px 6px 6px 0;
  background: var(--smoke); color: #fff; font-size: 13px; font-weight: 700;
}
.verdict { margin-top: 12px; padding: 12px 16px; border-radius: 12px; background: var(--panel-2); font-weight: 700; }
.verdict.hit { border-left: 6px solid var(--smoke); }
.verdict.miss { border-left: 6px solid var(--muted); }
.verdict small { display: block; margin-top: 4px; color: var(--muted); font-weight: 400; }

.disclaimer { color: var(--muted); font-size: 13px; line-height: 1.6; }
