:root {
  color-scheme: dark;
  --bg: #071016;
  --panel: #101d25;
  --line: #29404b;
  --text: #e8f2f4;
  --muted: #91a8b2;
  --cyan: #41d6c3;
  --amber: #ffbd59;
}
* { box-sizing: border-box; }
body { margin: 0; overflow-x: hidden; background: radial-gradient(circle at top right, #15333d, var(--bg) 42%); color: var(--text); font-family: Inter, "Microsoft YaHei", system-ui, sans-serif; }
main { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 48px 0 72px; }
header { max-width: 760px; margin-bottom: 28px; }
.panel, .controls > *, .grid > * { min-width: 0; }
.eyebrow { color: var(--cyan); letter-spacing: .18em; font-size: 12px; font-weight: 700; }
h1 { font-size: clamp(34px, 6vw, 62px); line-height: 1.04; margin: 10px 0 16px; overflow-wrap: anywhere; }
h2 { margin: 0 0 16px; font-size: 20px; }
.lead, #status { color: var(--muted); line-height: 1.7; }
.panel { background: color-mix(in srgb, var(--panel) 92%, transparent); border: 1px solid var(--line); border-radius: 18px; padding: 22px; box-shadow: 0 18px 50px #0006; }
.controls { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 18px; }
.controls label:nth-child(3), .controls label:nth-child(4), .controls #status { grid-column: 1 / -1; }
label { display: grid; gap: 8px; color: var(--muted); font-size: 13px; }
input, textarea, button { font: inherit; }
input, textarea { width: 100%; border: 1px solid var(--line); border-radius: 10px; background: #081219; color: var(--text); padding: 12px 13px; }
button { border: 0; border-radius: 10px; padding: 12px 16px; color: #05201c; background: var(--cyan); font-weight: 750; cursor: pointer; }
button:disabled { opacity: .42; cursor: not-allowed; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
video { display: block; width: 100%; min-height: 260px; max-height: 480px; border-radius: 12px; background: #020608; }
.frames { display: grid; grid-template-columns: repeat(8, 1fr); gap: 5px; margin-top: 12px; }
.frames img { display: block; width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 4px; }
.result-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
#latency { color: var(--amber); }
pre { min-height: 340px; margin: 0; padding: 16px; border-radius: 12px; background: #071016; color: #d7e7ea; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.65; }
.judgement { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 18px; text-align: center; }
.metrics div { display: grid; gap: 4px; }
.metrics strong { font-size: 28px; color: var(--cyan); }
.metrics span { color: var(--muted); font-size: 13px; }
@media (max-width: 780px) { .controls, .grid { grid-template-columns: 1fr; } .controls > * { grid-column: 1 !important; } .frames { grid-template-columns: repeat(4, 1fr); } }
