:root {
  color-scheme: dark;
  --bg: #0a0d10;
  --panel: #12171c;
  --panel-strong: #181f26;
  --line: #29323a;
  --text: #f4f7f8;
  --muted: #99a6af;
  --accent: #d7ff3f;
  --accent-dark: #172000;
  --danger: #ff776d;
  --radius: 14px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

button, input { font: inherit; }
button { cursor: pointer; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
  padding: 14px clamp(20px, 5vw, 72px);
  border-bottom: 1px solid var(--line);
  background: rgba(10, 13, 16, 0.94);
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #111;
  font-weight: 900;
  letter-spacing: -0.08em;
}

.brand strong, .brand small { display: block; }
.brand strong { font-size: 15px; letter-spacing: 0.02em; }
.brand small { margin-top: 2px; color: var(--muted); font-size: 11px; letter-spacing: 0.13em; text-transform: uppercase; }

.header-actions { display: flex; align-items: center; gap: 10px; }

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.status-pill::before {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #66717a;
  content: "";
}

.status-pill[data-state="connected"]::before { background: var(--accent); box-shadow: 0 0 14px rgba(215, 255, 63, 0.6); }
.status-pill[data-state="loading"]::before { background: #ffd36a; }
.status-pill[data-state="error"]::before { background: var(--danger); }

main { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }

.auth-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: clamp(40px, 8vw, 120px);
  align-items: end;
  min-height: calc(100vh - 160px);
  padding: 80px 0;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

h1, h2, p { margin-top: 0; }
h1 { max-width: 760px; margin-bottom: 18px; font-size: clamp(42px, 7vw, 86px); line-height: 0.98; letter-spacing: -0.055em; }
h2 { margin-bottom: 0; font-size: clamp(24px, 3vw, 38px); letter-spacing: -0.035em; }
.lede { max-width: 620px; color: var(--muted); font-size: clamp(17px, 2vw, 21px); line-height: 1.55; }

.auth-form {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.auth-form label { display: block; margin-bottom: 10px; color: var(--muted); font-size: 13px; font-weight: 700; }
.input-row { display: flex; gap: 10px; }

input {
  width: 100%;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid #39434b;
  border-radius: 9px;
  outline: none;
  background: #090c0f;
  color: var(--text);
}

input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(215, 255, 63, 0.12); }

.button {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 9px;
  font-weight: 750;
  white-space: nowrap;
}

.button-primary, .button-play { background: var(--accent); color: #101400; }
.button-primary:hover, .button-play:hover { background: #e3ff73; }
.button-secondary { border-color: var(--line); background: var(--panel-strong); color: var(--text); }
.button-quiet { background: transparent; color: var(--muted); }
.button-quiet:hover { color: var(--text); }
.button:focus-visible { outline: 3px solid rgba(215, 255, 63, 0.45); outline-offset: 2px; }
.button:disabled { cursor: wait; opacity: 0.55; }
.form-error { min-height: 20px; margin: 12px 0 0; color: var(--danger); font-size: 13px; }

.dashboard { padding: 66px 0 80px; }
.page-heading, .player-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.page-heading h1 { margin-bottom: 0; font-size: clamp(42px, 6vw, 72px); }
.stream-summary { margin-bottom: 8px; color: var(--muted); }

.player-panel {
  scroll-margin-top: 94px;
  margin-top: 42px;
  padding: clamp(18px, 3vw, 30px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.video-frame { margin-top: 22px; overflow: hidden; border-radius: 10px; background: #000; aspect-ratio: 16 / 9; }
video { display: block; width: 100%; height: 100%; background: #000; }
.player-message { min-height: 20px; margin: 12px 0 0; color: var(--muted); font-size: 14px; }

.table-shell { margin-top: 36px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 18px 20px; border-bottom: 1px solid var(--line); text-align: left; }
th { color: var(--muted); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; }
td { color: #d7dde1; }
td:first-child { color: var(--text); }
td:last-child { width: 1%; text-align: right; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #161c21; }
code { color: #afbac1; font-size: 12px; }

.empty-state { padding: 64px 24px; text-align: center; }
.empty-state h2 { margin-bottom: 10px; }
.empty-state p { margin-bottom: 0; color: var(--muted); }

footer { padding: 28px 20px 44px; color: #6f7a82; font-size: 12px; text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }

@media (max-width: 760px) {
  .site-header { align-items: flex-start; padding-inline: 18px; }
  .header-actions { flex-wrap: wrap; justify-content: flex-end; }
  .status-pill { width: 100%; justify-content: flex-end; }
  main { width: min(100% - 28px, 1180px); }
  .auth-panel { grid-template-columns: 1fr; align-content: center; gap: 28px; padding: 50px 0; }
  .input-row { flex-direction: column; }
  .page-heading, .player-heading { align-items: flex-start; flex-direction: column; }
  .table-shell { overflow-x: auto; }
  table { min-width: 680px; }
}

