:root {
  color-scheme: dark;
  --bg: #0f1115;
  --panel: #181b22;
  --text: #e6e8ee;
  --muted: #9aa1b2;
  --accent: #5865f2; /* Discord blurple */
  --live: #e5484d;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
}

body.center { display: grid; place-items: center; padding: 16px; }

.card {
  max-width: 420px;
  padding: 32px;
  background: var(--panel);
  border-radius: 12px;
  text-align: center;
}
.card h1 { margin: 0 0 8px; font-size: 22px; }
.card p { color: var(--muted); }

.button {
  display: inline-block;
  margin-top: 8px;
  padding: 10px 18px;
  border-radius: 8px;
  background: #2b2f3a;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
}
.button.discord { background: var(--accent); }

code.id {
  display: inline-block;
  padding: 6px 10px;
  background: var(--bg);
  border-radius: 6px;
  font-size: 16px;
  user-select: all;
}

header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
}
header form { margin: 0; }
.spacer { flex: 1; }
.who { color: var(--muted); }

.badge {
  padding: 2px 8px;
  border-radius: 4px;
  background: #2b2f3a;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.badge.live { background: var(--live); }

main { padding: 0 16px 16px; }

.player {
  position: relative;
  max-width: 1280px;
  margin: 0 auto;
  background: #000;
  aspect-ratio: 16 / 9;
  max-height: calc(100vh - 110px);
}
.player video { width: 100%; height: 100%; display: block; }

.overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, .6);
  color: var(--muted);
  pointer-events: none;
}
.overlay[hidden] { display: none; }

.meta {
  max-width: 1280px;
  margin: 8px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}
.hint { margin-left: auto; }

.viewers {
  max-width: 1280px;
  margin: 16px auto 0;
  padding: 14px 16px 16px;
  border: 1px solid #343944;
  border-radius: 14px;
  background: var(--panel);
}
.viewers h2 {
  margin: 0 0 11px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.viewers ul {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.viewers li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px 5px 5px;
  border-radius: 999px;
  background: #22262f;
}
.viewers img {
  width: 36px;
  height: 36px;
  border: 2px solid #7fae98;
  border-radius: 50%;
  background: #fff3d6;
  object-fit: cover;
}
.viewers .viewers-empty {
  padding: 0;
  background: none;
  color: var(--muted);
  font-size: 13px;
}

button.link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent);
  font: inherit;
  cursor: pointer;
}
button.link:hover { text-decoration: underline; }
