:root {
  --bg: #0f1115;
  --surface: #1a1d24;
  --border: #2a2f3a;
  --text: #e6e8ec;
  --muted: #8a93a6;
  --accent: #4ea1ff;
  --danger: #ef4444;
  --success: #10b981;
  --warn: #f59e0b;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}
.container { max-width: 900px; margin: 0 auto; padding: 32px 24px; }
h1 { margin: 0 0 12px; font-size: 24px; }
h2 { margin: 0 0 12px; font-size: 14px; color: var(--muted); font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px; }
.notice {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  padding: 16px 18px;
  margin: 16px 0 20px;
  line-height: 1.55;
}
.notice ul { margin: 8px 0 0; padding-left: 20px; }
.notice li { margin: 4px 0; }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 16px;
}
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
input[type=text] {
  flex: 1;
  min-width: 0;
  background: #0c0e12;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  padding: 10px 12px;
  font-size: 18px;
  font-family: 'SF Mono', Menlo, Consolas, monospace;
  letter-spacing: 4px;
  text-align: center;
}
input[type=text]:focus { outline: none; border-color: var(--accent); }
button {
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: 6px;
  padding: 11px 18px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: filter 0.15s;
}
button:hover:not(:disabled) { filter: brightness(1.1); }
button:disabled { opacity: 0.5; cursor: not-allowed; }
button.danger { background: var(--danger); }
.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  background: #0c0e12;
  border: 1px solid var(--border);
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.dot.live { background: var(--danger); animation: pulse 1.5s infinite; }
.dot.ok { background: var(--success); }
.dot.warn { background: var(--warn); }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
.log {
  max-height: 240px;
  overflow-y: auto;
  font-family: 'SF Mono', Menlo, Consolas, monospace;
  font-size: 12px;
  color: var(--muted);
  background: #0c0e12;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 12px;
}
.log-entry { margin: 3px 0; line-height: 1.5; }
.log-entry .ts { color: #5a6376; margin-right: 8px; }
video {
  width: 100%;
  background: #000;
  border-radius: 8px;
  border: 1px solid var(--border);
  display: block;
  max-height: 480px;
  object-fit: contain;
}
.code-display {
  font-family: 'SF Mono', Menlo, Consolas, monospace;
  font-size: 36px;
  letter-spacing: 12px;
  text-align: center;
  padding: 18px;
  background: #0c0e12;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--accent);
  font-weight: 600;
}
.banner-live {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fecaca;
  padding: 12px 16px;
  border-radius: 8px;
  margin: 0 0 12px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
}
.hint { color: var(--muted); font-size: 13px; margin: 6px 0 0; }
