:root {
  color-scheme: dark;
  --bg: #111418;
  --card: #1b2027;
  --text: #e8eaed;
  --muted: #9aa0a6;
  --accent: #4c8bf5;
  --live: #34a853;
  --busy: #f9ab00;
  --error: #ea4335;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  padding: 16px;
}

.card {
  max-width: 960px;
  margin: 0 auto;
  background: var(--card);
  border-radius: 12px;
  padding: 20px;
}

h1 { font-size: 1.3rem; margin: 0 0 12px; }

.status {
  padding: 10px 12px;
  border-radius: 8px;
  background: #262c35;
  border-left: 4px solid var(--muted);
}
.status[data-kind="live"] { border-color: var(--live); }
.status[data-kind="busy"] { border-color: var(--busy); }
.status[data-kind="error"] { border-color: var(--error); }

.row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }

button, input {
  font: inherit;
  border-radius: 8px;
  border: 1px solid #3a414c;
  padding: 10px 16px;
}
button { background: var(--accent); color: #fff; border: none; cursor: pointer; }
button.secondary { background: #3a414c; }
button:disabled { opacity: 0.5; cursor: default; }
input { background: #0f1216; color: var(--text); flex: 1; min-width: 0; letter-spacing: 0.1em; }

video {
  display: block;
  width: 100%;
  margin-top: 14px;
  border-radius: 8px;
  background: #000;
  aspect-ratio: 16 / 9;
}

.tips { color: var(--muted); font-size: 0.9rem; padding-left: 1.2em; }

/* Blackout mode: pure black so OLED panels draw almost no power. */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: #000;
  cursor: none;
}
.overlay-hint {
  position: absolute;
  bottom: 32px;
  width: 100%;
  text-align: center;
  color: #444;
  font-size: 14px;
  transition: opacity 1.5s;
}
.overlay-hint.faded { opacity: 0; }
/* Dim red dot while streaming, so people on site know they are live. */
.overlay-dot {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #6b0000;
}
[hidden] { display: none !important; }
