:root {
  color-scheme: dark;
  --bg: #060915;
  --bg-soft: #0d1326;
  --panel: rgba(13, 19, 38, 0.82);
  --panel-strong: rgba(19, 28, 54, 0.96);
  --line: rgba(255, 255, 255, 0.08);
  --text: #eef3ff;
  --muted: #9da9c8;
  --soft: #7583a7;
  --blue: #5d7bff;
  --cyan: #56d6ff;
  --violet: #8d63ff;
  --gold: #ffd36f;
  --green: #53d88d;
  --red: #ff6d7a;
  --shadow: 0 32px 90px rgba(0, 0, 0, 0.42);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(93, 123, 255, 0.19), transparent 26%),
    radial-gradient(circle at 90% 0%, rgba(86, 214, 255, 0.14), transparent 24%),
    linear-gradient(180deg, #070b16, #03050d 38%, #02040a);
}

.ambient {
  position: fixed;
  inset: auto;
  pointer-events: none;
  width: 44vw;
  height: 44vw;
  filter: blur(80px);
  opacity: 0.45;
  z-index: 0;
}

.ambient-left {
  top: -10vw;
  left: -12vw;
  background: rgba(93, 123, 255, 0.24);
}

.ambient-right {
  top: 12vw;
  right: -14vw;
  background: rgba(86, 214, 255, 0.18);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

.shell {
  width: min(1280px, calc(100vw - 40px));
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(22px);
  background: rgba(6, 9, 21, 0.82);
  border-bottom: 1px solid var(--line);
}

.nav-shell {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.brand img {
  width: 46px;
  height: 46px;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 15px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.brand small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.nav-links,
.nav-actions,
.hero-actions,
.player-toolbar,
.stream-row,
.studio-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-links {
  flex-wrap: wrap;
  justify-content: center;
}

.nav-links a {
  padding: 10px 12px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.nav-links a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.18);
}

.button.primary {
  color: #07111d;
  background: linear-gradient(135deg, #9fd0ff, #6ae4ff 42%, #ffd36f 100%);
  border-color: rgba(255, 255, 255, 0.14);
}

.button.ghost {
  background: transparent;
}

.hero,
.section {
  padding: 36px 0 0;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(420px, 1.05fr);
  gap: 26px;
  align-items: stretch;
}

.hero-copy,
.hero-stage,
.channel-card,
.schedule-item,
.studio-sidebar article,
.studio-panel,
.distribution-grid article {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(15, 21, 39, 0.95), rgba(8, 12, 24, 0.96));
  box-shadow: var(--shadow);
}

.hero-copy {
  padding: 38px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-copy h1,
.section-head h2 {
  margin: 16px 0 0;
  font-size: clamp(34px, 4vw, 60px);
  line-height: 1.04;
}

.lead,
.section-head p,
.channel-card p,
.schedule-item p,
.studio-sidebar span,
.distribution-grid p,
#saveStatus,
#heroChannelMeta,
#overlayDescription {
  color: var(--muted);
}

.lead {
  margin: 20px 0 0;
  font-size: 17px;
  line-height: 1.72;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 34px;
}

.hero-stats article,
.overlay-metrics span {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
}

.hero-stats article {
  padding: 16px;
}

.hero-stats strong,
.channel-card strong,
.schedule-item strong,
.studio-sidebar strong,
.distribution-grid strong {
  display: block;
}

.hero-stats strong {
  font-size: 18px;
}

.hero-stats span {
  display: block;
  margin-top: 8px;
  color: var(--soft);
  font-size: 13px;
  line-height: 1.5;
}

.hero-stage {
  padding: 18px;
  overflow: hidden;
}

.stage-topline {
  display: grid;
  gap: 4px;
}

.live-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(83, 216, 141, 0.13);
  color: #95efba;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.player-stage {
  position: relative;
  margin-top: 16px;
  border-radius: 20px;
  overflow: hidden;
  min-height: 520px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(10, 15, 31, 0.95), rgba(3, 6, 15, 0.98));
}

.signal-grid {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0.22;
}

#signalCanvas,
#liveVideo,
#liveEmbedFrame {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#liveEmbedFrame {
  border: 0;
  background: #02050b;
}

.broadcast-bug,
.scorebug {
  position: absolute;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 12px;
}

.broadcast-bug {
  top: 18px;
  left: 18px;
}

.broadcast-brand,
.broadcast-live-flag,
.scorebug {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(6, 9, 21, 0.82);
  backdrop-filter: blur(16px);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.28);
}

.broadcast-brand {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 16px;
}

.broadcast-brand-mark {
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.broadcast-brand small {
  color: #d3def5;
  font-size: 12px;
  font-weight: 700;
}

.broadcast-live-flag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 999px;
  color: #fff1f2;
}

.broadcast-live-flag .dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #ff4d61;
  box-shadow: 0 0 0 8px rgba(255, 77, 97, 0.12);
}

.broadcast-live-flag strong {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.scorebug {
  left: 18px;
  bottom: 18px;
  padding: 12px 14px;
  border-radius: 18px;
}

.scorebug-event {
  display: grid;
  gap: 4px;
  margin-right: 8px;
}

.scorebug-event small {
  color: #9fd0ff;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.scorebug-event strong,
.scorebug-clock,
.scorebug-board span {
  font-weight: 900;
}

.scorebug-board {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px;
}

.scorebug-board span {
  font-size: 22px;
}

.scorebug-board .divider {
  color: rgba(255, 255, 255, 0.38);
}

.scorebug-clock {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  font-size: 16px;
}

.player-overlay {
  position: absolute;
  inset: auto 0 0 0;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 26px;
  background: linear-gradient(180deg, transparent, rgba(6, 9, 21, 0.9) 36%, rgba(6, 9, 21, 0.98));
}

.overlay-label {
  margin: 0;
  color: #9fd0ff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.player-overlay h2 {
  margin: 10px 0 0;
  font-size: clamp(28px, 3vw, 46px);
  line-height: 1.04;
}

#overlayDescription {
  margin: 12px 0 0;
  max-width: 620px;
  line-height: 1.6;
}

.overlay-metrics {
  display: grid;
  gap: 10px;
  align-content: end;
}

.overlay-metrics span {
  padding: 12px 14px;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 700;
}

.player-toolbar {
  flex-wrap: wrap;
  margin-top: 18px;
}

.player-toolbar label,
.stream-entry,
.studio-panel label {
  display: grid;
  gap: 8px;
}

.player-toolbar label,
.studio-panel label {
  color: var(--soft);
  font-size: 13px;
  font-weight: 700;
}

select,
input,
textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  padding: 13px 14px;
}

select:focus,
input:focus,
textarea:focus {
  outline: none;
  border-color: rgba(106, 228, 255, 0.7);
  box-shadow: 0 0 0 3px rgba(86, 214, 255, 0.15);
}

.stream-entry {
  margin-top: 18px;
}

.stream-entry label {
  color: var(--soft);
  font-size: 13px;
  font-weight: 700;
}

.stream-row input {
  flex: 1;
}

.section-head {
  max-width: 880px;
}

.section-head h2 {
  font-size: clamp(28px, 3.2vw, 46px);
}

.section-head p {
  margin: 14px 0 0;
  line-height: 1.7;
}

.channel-grid,
.distribution-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.sports-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) 360px;
  gap: 18px;
  margin-top: 24px;
}

.sports-stage,
.sports-stack,
.sports-rail-card,
.sports-ad-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(15, 21, 39, 0.95), rgba(8, 12, 24, 0.96));
  box-shadow: var(--shadow);
}

.sports-stage {
  padding: 22px;
}

.sports-stage-head,
.sports-stack-head,
.sports-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sports-stage-head {
  flex-wrap: wrap;
}

.sports-stage-head strong,
.sports-stack-head strong {
  display: block;
  margin-top: 10px;
  font-size: 22px;
}

.sports-stack-head span {
  color: var(--muted);
  font-size: 13px;
}

.sports-monitor {
  position: relative;
  margin-top: 18px;
  min-height: 360px;
  padding: 28px;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at 18% 20%, rgba(31, 208, 127, 0.34), transparent 25%),
    radial-gradient(circle at 82% 30%, rgba(123, 230, 125, 0.24), transparent 26%),
    linear-gradient(160deg, rgba(3, 9, 12, 0.92), rgba(4, 23, 18, 0.94) 48%, rgba(5, 10, 22, 0.96));
}

.sports-monitor::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 32px 32px;
  opacity: 0.18;
  pointer-events: none;
}

.sports-monitor-copy,
.sports-monitor-meta,
.sports-monitor-bars,
.sports-ticker {
  position: relative;
  z-index: 1;
}

.sports-monitor-copy small {
  color: #a6f1c3;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.sports-monitor-copy h3 {
  margin: 14px 0 0;
  font-size: clamp(28px, 3vw, 44px);
  line-height: 1.05;
}

.sports-monitor-copy p {
  max-width: 620px;
  margin: 14px 0 0;
  color: #d2ddf5;
  line-height: 1.72;
}

.sports-monitor-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.sports-monitor-meta span {
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #ecfff3;
  font-size: 12px;
  font-weight: 800;
}

.sports-monitor-bars {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 8px;
  align-items: end;
  margin-top: 28px;
  min-height: 96px;
}

.sports-monitor-bars span {
  display: block;
  border-radius: 999px 999px 8px 8px;
  background: linear-gradient(180deg, rgba(123, 230, 125, 0.98), rgba(31, 208, 127, 0.38));
  animation: sportsBars 1400ms ease-in-out infinite alternate;
}

.sports-monitor-bars span:nth-child(1) { height: 36px; animation-delay: 0ms; }
.sports-monitor-bars span:nth-child(2) { height: 72px; animation-delay: 90ms; }
.sports-monitor-bars span:nth-child(3) { height: 50px; animation-delay: 180ms; }
.sports-monitor-bars span:nth-child(4) { height: 86px; animation-delay: 270ms; }
.sports-monitor-bars span:nth-child(5) { height: 42px; animation-delay: 360ms; }
.sports-monitor-bars span:nth-child(6) { height: 90px; animation-delay: 450ms; }
.sports-monitor-bars span:nth-child(7) { height: 58px; animation-delay: 540ms; }
.sports-monitor-bars span:nth-child(8) { height: 76px; animation-delay: 630ms; }

.sports-ticker {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  line-height: 1.6;
}

.sports-controls {
  flex-wrap: wrap;
  margin-top: 18px;
}

.sports-live-config {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
}

.sports-live-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.sports-live-grid label {
  display: grid;
  gap: 8px;
  color: var(--soft);
  font-size: 13px;
  font-weight: 700;
}

.score-inline-inputs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.sports-live-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
}

#sportsLiveStatus {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.sports-sidebar-panel {
  display: grid;
  gap: 18px;
}

.sports-stack {
  padding: 18px;
}

.sports-clip-rail,
.sports-ad-rail {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.sports-rail-card,
.sports-ad-card {
  width: 100%;
  padding: 16px;
  text-align: left;
}

.sports-rail-card strong,
.sports-ad-card strong {
  display: block;
  font-size: 17px;
}

.sports-rail-card span,
.sports-rail-card small,
.sports-ad-card span,
.sports-ad-card p {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.55;
}

.sports-rail-card.active,
.sports-ad-card.active {
  border-color: rgba(123, 230, 125, 0.45);
  background: linear-gradient(180deg, rgba(18, 33, 28, 0.98), rgba(8, 17, 13, 0.96));
}

.channel-card {
  padding: 20px;
}

.channel-card header,
.schedule-item header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.channel-card h3,
.schedule-item h3 {
  margin: 0;
  font-size: 22px;
}

.tone-pill,
.tag-pill {
  padding: 8px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tone-pill.news { background: rgba(86, 214, 255, 0.15); color: #8de9ff; }
.tone-pill.sport { background: rgba(83, 216, 141, 0.14); color: #9bf2bf; }
.tone-pill.cinema { background: rgba(141, 99, 255, 0.16); color: #bea7ff; }
.tone-pill.docs { background: rgba(255, 211, 111, 0.16); color: #ffe39a; }
.tone-pill.music { background: rgba(255, 109, 122, 0.15); color: #ff9aa5; }
.tone-pill.lounge { background: rgba(255, 255, 255, 0.08); color: #dce4ff; }

.channel-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.channel-meta span {
  padding: 9px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--soft);
  font-size: 12px;
  font-weight: 700;
}

.channel-card p {
  margin: 14px 0 0;
  line-height: 1.6;
}

.channel-card button {
  margin-top: 18px;
  width: 100%;
}

.schedule-grid {
  display: grid;
  gap: 14px;
  margin-top: 24px;
}

.schedule-item {
  padding: 18px 20px;
}

.schedule-item header small {
  color: #9fd0ff;
  font-size: 13px;
  font-weight: 800;
}

.schedule-item p {
  margin: 10px 0 0;
}

.studio-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 18px;
  margin-top: 24px;
}

.studio-sidebar {
  display: grid;
  gap: 14px;
}

.studio-sidebar article,
.distribution-grid article {
  padding: 18px;
}

.studio-sidebar small {
  color: #9fd0ff;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.studio-sidebar strong {
  margin-top: 10px;
  font-size: 24px;
}

.studio-sidebar span {
  display: block;
  margin-top: 10px;
  line-height: 1.6;
}

.studio-panel {
  padding: 22px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.capture-shell {
  display: grid;
  grid-template-columns: minmax(320px, 1.1fr) minmax(260px, 0.9fr);
  gap: 16px;
  margin-top: 18px;
}

.capture-preview,
.capture-controls {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
}

.capture-preview {
  position: relative;
  min-height: 320px;
  overflow: hidden;
}

#studioPreviewVideo {
  display: block;
  width: 100%;
  min-height: 320px;
  height: 100%;
  object-fit: cover;
  background: #02050b;
}

.capture-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 10px;
  padding: 24px;
  text-align: center;
  background:
    radial-gradient(circle at center, rgba(93, 123, 255, 0.18), transparent 40%),
    linear-gradient(180deg, rgba(6, 9, 21, 0.3), rgba(6, 9, 21, 0.88));
}

.capture-placeholder strong {
  font-size: 20px;
}

.capture-placeholder span,
.capture-status {
  color: var(--muted);
  line-height: 1.6;
}

.capture-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 109, 122, 0.16);
  color: #ff9da5;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.capture-badge.live {
  background: rgba(83, 216, 141, 0.16);
  color: #9bf2bf;
}

.capture-controls {
  padding: 16px;
  display: grid;
  gap: 14px;
  align-content: start;
}

.capture-actions {
  display: grid;
  gap: 10px;
}

.full-width {
  margin-top: 16px;
}

textarea {
  min-height: 110px;
  resize: vertical;
}

.studio-actions {
  flex-wrap: wrap;
  margin-top: 18px;
}

#saveStatus {
  font-size: 14px;
  font-weight: 700;
}

.distribution-grid article p {
  margin: 12px 0 0;
  line-height: 1.6;
}

body.theater-mode .hero {
  grid-template-columns: 1fr;
}

body.theater-mode .hero-copy {
  order: 2;
}

body.theater-mode .hero-stage {
  order: 1;
}

body.theater-mode .player-stage {
  min-height: 72vh;
}

@keyframes sportsBars {
  from {
    transform: scaleY(0.72);
    opacity: 0.78;
  }
  to {
    transform: scaleY(1.06);
    opacity: 1;
  }
}

@media (max-width: 1100px) {
  .hero,
  .studio-layout,
  .sports-layout {
    grid-template-columns: 1fr;
  }

  .hero-copy,
  .hero-stage {
    min-width: 0;
  }

  .channel-grid,
  .distribution-grid,
  .hero-stats,
  .form-grid,
  .capture-shell,
  .sports-live-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 780px) {
  .shell {
    width: min(100vw - 24px, 1280px);
  }

  .nav-shell,
  .nav-links,
  .nav-actions,
  .player-toolbar,
  .stream-row,
  .studio-actions,
  .player-overlay,
  .broadcast-bug,
  .scorebug {
    flex-direction: column;
    align-items: stretch;
  }

  .channel-grid,
  .distribution-grid,
  .hero-stats,
  .form-grid,
  .capture-shell,
  .sports-live-grid {
    grid-template-columns: 1fr;
  }

  .hero-copy,
  .hero-stage,
  .studio-panel,
  .channel-card,
  .distribution-grid article {
    padding-left: 18px;
    padding-right: 18px;
  }

  .player-stage {
    min-height: 420px;
  }

  .player-overlay {
    padding: 18px;
  }

  .broadcast-bug {
    top: 12px;
    left: 12px;
    right: 12px;
  }

  .scorebug {
    left: 12px;
    right: 12px;
    bottom: 12px;
  }
}

/* ============================================================
   TFL TV — overrides for the real station (Esporte/Treino/Nutrição)
   ============================================================ */

:root {
  --accent-red: #ff3a2d;
  --accent-green: #9efb70;
  --accent-cyan: #56d6ff;
  --accent-amber: #ffd36f;
  --accent-violet: #c79bff;
  --paper: #f5efe6;
}

.public-body {
  background:
    radial-gradient(circle at top left, rgba(255, 58, 45, 0.10), transparent 28%),
    radial-gradient(circle at 92% 4%, rgba(86, 214, 255, 0.10), transparent 24%),
    linear-gradient(180deg, #070b16, #03050d 38%, #02040a);
}

/* Signal pill in header */
.signal-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.signal-pill .signal-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--accent-amber);
  box-shadow: 0 0 0 6px rgba(255, 211, 111, 0.18);
}
.signal-pill.is-live .signal-dot {
  background: var(--accent-red);
  box-shadow: 0 0 0 6px rgba(255, 58, 45, 0.22);
  animation: livePulse 1.4s ease-in-out infinite;
}
@keyframes livePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.92); }
}

/* HERO */
.hero-copy h1 {
  font-family: "Playfair Display", "Inter", serif;
  letter-spacing: -0.01em;
  font-weight: 900;
}
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}
.meta-pill {
  padding: 11px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 13px;
  color: var(--muted);
}
.meta-pill strong {
  color: var(--text);
  margin-right: 8px;
  letter-spacing: 0.04em;
}

/* PLAYER STAGE */
#heroVideo,
#heroImage {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}
.player-stage {
  min-height: 540px;
}

/* Quality badge */
.broadcast-quality {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 3;
  display: grid;
  gap: 2px;
  text-align: right;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(6, 9, 21, 0.7);
  backdrop-filter: blur(14px);
}
.broadcast-quality strong {
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.12em;
}
.broadcast-quality small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Lower-third (convidado) */
.lower-third {
  position: absolute;
  left: 24px;
  bottom: 130px;
  z-index: 3;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: stretch;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.5);
  animation: lowerThirdIn 480ms ease-out;
}
@keyframes lowerThirdIn {
  from { opacity: 0; transform: translateX(-16px); }
  to { opacity: 1; transform: translateX(0); }
}
.lower-third-mark {
  display: grid;
  place-items: center;
  padding: 12px 16px;
  background: linear-gradient(135deg, var(--accent-red), #c52015);
}
.lower-third-channel {
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.lower-third-text {
  padding: 12px 18px;
  background: linear-gradient(180deg, rgba(6, 9, 21, 0.95), rgba(6, 9, 21, 0.98));
  min-width: 280px;
}
.lower-third-text strong {
  display: block;
  font-family: "Playfair Display", "Inter", serif;
  font-size: 24px;
  line-height: 1.15;
}
.lower-third-text span {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Sponsor band */
.sponsor-band {
  position: absolute;
  right: 18px;
  bottom: 130px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(6, 9, 21, 0.85);
  backdrop-filter: blur(14px);
}
.sponsor-band small {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.sponsor-band strong {
  font-size: 18px;
  font-weight: 900;
  color: var(--text);
}
.sponsor-band span {
  font-size: 12px;
  color: var(--muted);
}

/* Programme overlay */
.program-overlay {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 2;
  padding: 28px 28px 24px;
  background: linear-gradient(180deg, transparent, rgba(4, 6, 14, 0.92) 50%, rgba(4, 6, 14, 0.98));
}
.overlay-label {
  margin: 0;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-amber);
}
.program-overlay h2 {
  margin: 8px 0 4px;
  font-family: "Playfair Display", serif;
  font-size: clamp(24px, 2.6vw, 38px);
  line-height: 1.1;
  font-weight: 900;
}
.program-overlay p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

/* Player toolbar (public) */
.player-now {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-left: auto;
}
.player-now span {
  padding: 9px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}
.player-now span:first-child {
  color: var(--text);
  background: rgba(255, 58, 45, 0.14);
}

/* Channel cards — new tones */
.tone-pill.training { background: rgba(86, 214, 255, 0.14); color: #b1ecff; }
.tone-pill.nutrition { background: rgba(158, 251, 112, 0.14); color: #d6ffb6; }
.tone-pill.guests { background: rgba(199, 155, 255, 0.16); color: #e6d5ff; }
.tone-pill.events { background: rgba(255, 211, 111, 0.16); color: #ffe39a; }

/* Channel grid wider for 5 channels */
.channel-grid {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

/* VIDEO GRID */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
  margin-top: 24px;
}
.video-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #000;
  overflow: hidden;
  cursor: pointer;
  transition: transform 200ms ease, border-color 200ms ease;
}
.video-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 58, 45, 0.4);
}
.video-card video {
  display: block;
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  background: #000;
}
.video-card-meta {
  position: absolute;
  inset: auto 0 0 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  padding: 14px 16px;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.78));
  pointer-events: none;
}
.video-card-meta strong {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.video-card-meta small {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.video-play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  border-radius: 999px;
  background: rgba(255, 58, 45, 0.92);
  color: #fff;
  display: grid;
  place-items: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 200ms ease;
  box-shadow: 0 14px 40px rgba(255, 58, 45, 0.4);
}
.video-card:hover .video-play-icon { opacity: 1; }
.video-play-icon::before {
  content: "";
  border-style: solid;
  border-width: 10px 0 10px 16px;
  border-color: transparent transparent transparent #fff;
  margin-left: 4px;
}

/* PHOTO GRID */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
  margin-top: 24px;
}
.photo-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: #000;
  aspect-ratio: 4/5;
  cursor: pointer;
  transition: transform 200ms ease;
}
.photo-card:hover { transform: translateY(-2px); }
.photo-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms ease, filter 300ms ease;
}
.photo-card:hover img { transform: scale(1.04); filter: brightness(1.1); }

/* SPONSOR GRID */
.sponsor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
  margin-top: 24px;
}
.sponsor-card {
  padding: 26px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(15, 21, 39, 0.95), rgba(8, 12, 24, 0.96));
  display: grid;
  gap: 10px;
}
.sponsor-card-mark {
  display: inline-block;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent-red), #c52015);
}
.sponsor-card strong {
  font-family: "Playfair Display", serif;
  font-size: 22px;
  font-weight: 900;
}
.sponsor-card span {
  color: var(--muted);
  font-size: 13px;
}

/* FOOTER */
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 36px 0 48px;
  margin-top: 40px;
  border-top: 1px solid var(--line);
}
.footer-left,
.footer-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.footer-left img { width: 34px; height: 34px; }
.footer-left strong { display: block; font-weight: 900; letter-spacing: 0.06em; }
.footer-left small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.footer-right { flex-direction: column; align-items: flex-end; gap: 4px; }
.footer-right span { font-size: 13px; color: var(--muted); }
.footer-right small { font-size: 11px; color: var(--soft); }

/* ============================================================
   STUDIO ADDITIONS (teleprompter, guest/host, sponsor controls)
   ============================================================ */

.studio-section-block {
  margin-top: 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(15, 21, 39, 0.95), rgba(8, 12, 24, 0.96));
}
.studio-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.studio-block-head h3 {
  margin: 0;
  font-size: 20px;
  letter-spacing: 0.01em;
}
.studio-block-head .pill-status {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}
.studio-block-head .pill-status.on { background: rgba(255, 58, 45, 0.18); color: #ffb6ad; }

/* Big LIVE toggle */
.live-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(40, 12, 14, 0.85), rgba(20, 8, 14, 0.95));
}
.live-toggle .toggle-copy strong {
  font-family: "Playfair Display", serif;
  font-size: 24px;
  display: block;
}
.live-toggle .toggle-copy span {
  color: var(--muted);
  font-size: 13px;
}
.live-toggle button {
  min-width: 200px;
  min-height: 56px;
  font-size: 15px;
  background: linear-gradient(135deg, var(--accent-red), #c52015);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.16);
}
.live-toggle button.is-live {
  background: linear-gradient(135deg, #777, #444);
}

/* Teleprompter editor */
.tele-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 16px;
}
.tele-controls {
  display: grid;
  gap: 12px;
  align-content: start;
}
.tele-controls label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  font-weight: 800;
  color: var(--soft);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.tele-preview {
  position: relative;
  border-radius: 16px;
  background: #000;
  padding: 24px;
  min-height: 240px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.tele-preview-track {
  font-family: "Playfair Display", "Inter", serif;
  font-weight: 700;
  line-height: 1.5;
  color: #fff;
  white-space: pre-wrap;
  transition: transform 80ms linear;
}
.tele-preview::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 80px;
  background: linear-gradient(180deg, transparent, #000);
  pointer-events: none;
}
.tele-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

/* Quick channel buttons */
.channel-rail {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.channel-rail button {
  flex: 1 1 auto;
  min-height: 44px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
}
.channel-rail button.active {
  background: linear-gradient(135deg, var(--accent-red), #c52015);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Toggle row helper */
.toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
}
.toggle-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent-red);
  margin: 0;
}

@media (max-width: 1000px) {
  .tele-grid { grid-template-columns: 1fr; }
  .video-grid { grid-template-columns: 1fr; }
  .photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-footer { flex-direction: column; align-items: flex-start; }
  .footer-right { align-items: flex-start; }
}
