:root {
  color-scheme: dark;
  --bg: #11161b;
  --panel: rgba(255, 255, 255, 0.1);
  --panel-strong: rgba(255, 255, 255, 0.16);
  --ink: #f8fbfb;
  --muted: #aebec4;
  --gold: #ffd166;
  --teal: #30d5c8;
  --red: #ff6b5f;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 18% 14%, rgba(255, 209, 102, 0.22), transparent 34%),
    radial-gradient(circle at 82% 22%, rgba(48, 213, 200, 0.18), transparent 32%),
    linear-gradient(135deg, #15191f, #0d1217 58%, #15191f);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.tv-stage {
  display: grid;
  gap: 26px;
  min-height: 100vh;
  padding: clamp(20px, 3vw, 46px);
}

.tv-header,
.tv-live-grid,
.tv-called-section {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 20px;
  background: rgba(10, 15, 20, 0.72);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
}

.tv-header {
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
}

.tv-brand {
  display: flex;
  gap: 16px;
  align-items: center;
}

.tv-logo {
  display: grid;
  place-items: center;
  width: 70px;
  height: 70px;
  border: 6px solid rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  background: radial-gradient(circle at 35% 24%, #fff8a8, var(--gold) 54%, #b7791f);
  color: #07090a;
  font-size: 1.55rem;
  font-weight: 1000;
  box-shadow: 0 0 26px rgba(255, 209, 102, 0.45);
}

h1,
p {
  margin: 0;
}

h1 {
  font-size: clamp(2rem, 4vw, 4.2rem);
  line-height: 1;
}

p,
small,
label {
  color: var(--muted);
  font-weight: 800;
}

.tv-code-form,
.tv-audio-controls {
  display: flex;
  gap: 10px;
  align-items: end;
}

.tv-code-form label {
  display: grid;
  gap: 6px;
  font-size: 0.74rem;
  text-transform: uppercase;
}

.tv-code-form input,
.tv-code-form button,
.tv-audio-controls button {
  min-height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  font: inherit;
  font-weight: 1000;
}

.tv-code-form input {
  width: 108px;
  background: rgba(255, 255, 255, 0.12);
  color: var(--ink);
  padding: 0 18px;
  text-align: center;
  text-transform: uppercase;
}

.tv-code-form button,
.tv-audio-controls button {
  background: var(--teal);
  color: #041112;
  cursor: pointer;
  padding: 0 20px;
}

.tv-audio-controls {
  align-items: center;
}

.tv-audio-controls button {
  background: rgba(255, 255, 255, 0.12);
  color: var(--ink);
}

.tv-audio-controls button.active {
  background: var(--teal);
  color: #041112;
}

.tv-live-grid {
  display: grid;
  grid-template-columns: 1.35fr repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding: 16px;
}

.tv-current-ball,
.tv-room-panel {
  display: grid;
  align-content: center;
  min-height: 190px;
  border-radius: 16px;
  background: var(--panel);
  padding: 24px;
}

.tv-current-ball {
  background:
    radial-gradient(circle at 50% 52%, rgba(255, 255, 255, 0.18), transparent 45%),
    linear-gradient(145deg, rgba(255, 209, 102, 0.28), rgba(255, 107, 95, 0.18));
}

.tv-current-ball span,
.tv-room-panel span,
.tv-called-header span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 1000;
  text-transform: uppercase;
}

.tv-current-ball strong {
  margin-top: 8px;
  font-size: clamp(5rem, 12vw, 10rem);
  line-height: 0.9;
}

.tv-room-panel strong {
  margin-top: 8px;
  font-size: clamp(1.9rem, 4vw, 4rem);
  line-height: 1;
}

.tv-room-panel.jackpot strong {
  color: var(--gold);
}

.tv-called-section {
  display: grid;
  align-content: start;
  gap: 18px;
  min-height: 34vh;
  padding: 22px;
}

.tv-called-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tv-called-header strong {
  font-size: 1.35rem;
}

.tv-called-balls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.tv-ball {
  display: grid;
  place-items: center;
  width: clamp(58px, 5.5vw, 86px);
  aspect-ratio: 1;
  border: 5px solid #fff;
  border-radius: 999px;
  background: radial-gradient(circle at 35% 22%, #fff, var(--ball-color, #ef4444) 58%, #6b1111);
  color: #08090a;
  font-size: clamp(1.05rem, 2vw, 1.65rem);
  font-weight: 1000;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.32);
}

@media (max-width: 760px) {
  .tv-header,
  .tv-code-form,
  .tv-audio-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .tv-live-grid {
    grid-template-columns: 1fr;
  }
}
