:root {
  color-scheme: dark;
  --bg: #0b0b0e;
  --fg: #e6e6e8;
  --muted: #7a7a85;
  --accent: #6ea8ff;
  --offline: #f06060;
  --online: #4ad27f;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--fg);
  font: 15px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

main {
  display: flex;
  flex-direction: column;
  height: 100dvh;
}

#stage {
  flex: 1;
  position: relative;
  background: #000;
  overflow: hidden;
}

#video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  display: block;
}

#overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  pointer-events: none;
  background: rgba(0, 0, 0, 0.55);
  transition: opacity 250ms ease;
}

#overlay-text {
  font-size: 1.4rem;
  letter-spacing: 0.02em;
}

#overlay-sub {
  font-size: 0.85rem;
  color: var(--muted);
  max-width: 28rem;
  text-align: center;
  padding: 0 1rem;
}

/* Hide overlay once playback starts. */
#stage[data-state="playing"] #overlay {
  opacity: 0;
}

#stage[data-state="offline"] #overlay-text { color: var(--offline); }
#stage[data-state="error"]   #overlay-text { color: var(--offline); }

footer {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  background: #111114;
  border-top: 1px solid #1d1d22;
  font-size: 0.85rem;
  color: var(--muted);
}

footer a {
  color: var(--accent);
  text-decoration: none;
}
footer a:hover { text-decoration: underline; }

.spacer { flex: 1; }

#status-dot {
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--muted);
  transition: background 200ms ease;
}

#stage[data-state="playing"] ~ footer #status-dot { background: var(--online); }
#stage[data-state="offline"] ~ footer #status-dot,
#stage[data-state="error"]   ~ footer #status-dot { background: var(--offline); }
