/* =========================================================
   Design tokens
   Palette: broadcast control-room — deep navy surfaces,
   "on-air" red as the single live accent, signal-green
   reserved only for the live/tally indicator dot.
   ========================================================= */
:root {
  --bg: #0a0e1a;
  --surface: #121a2c;
  --surface-2: #19233a;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);

  --text: #f3f5fb;
  --text-muted: #93a0c0;
  --text-faint: #5b6685;

  --accent: #ff3b30;       /* on-air red — primary action / live */
  --accent-dim: rgba(255, 59, 48, 0.16);
  --signal: #22d27a;       /* tally-light green — status dot only */

  --font-display: "Space Grotesk", "Inter", sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", monospace;

  --radius: 14px;
  --radius-sm: 9px;
  --shadow-card: 0 18px 40px -22px rgba(0, 0, 0, 0.65);
}

/* =========================================================
   Reset
   ========================================================= */
* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  background-image: radial-gradient(circle at 18% -8%, rgba(255, 59, 48, 0.14), transparent 55%);
  background-repeat: no-repeat;
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

img, svg, video, iframe {
  display: block;
  max-width: 100%;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* =========================================================
   Ambient scanline texture (signature detail, kept subtle)
   ========================================================= */
.scanlines {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: repeating-linear-gradient(
    to bottom,
    #ffffff 0px,
    #ffffff 1px,
    transparent 1px,
    transparent 3px
  );
}

/* =========================================================
   Page shell
   ========================================================= */
.page-shell {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 20px 72px;
}

.page-shell-narrow {
  max-width: 1000px;
}
.page-shell-watch {
  max-width: 1000px;
}

/* =========================================================
   Tally dot (shared signature element — live indicator)
   ========================================================= */
.tally-dot,
.chip-dot,
.pill-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--signal);
  margin-right: 7px;
  box-shadow: 0 0 0 0 rgba(34, 210, 122, 0.55);
  animation: tally-pulse 2.1s ease-out infinite;
  vertical-align: middle;
}

@keyframes tally-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(34, 210, 122, 0.55); }
  70%  { box-shadow: 0 0 0 7px rgba(34, 210, 122, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 210, 122, 0); }
}

/* =========================================================
   Hero
   ========================================================= */
.hero {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 8px 4px 36px;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 6vw, 3.25rem);
  line-height: 1.06;
  letter-spacing: -0.01em;
  color: var(--text);
}

.hero-copy {
  margin-top: 14px;
  max-width: 46ch;
  color: var(--text-muted);
  font-size: 1.02rem;
  line-height: 1.65;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 22px;
  align-self: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 22px;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-value {
  font-family: var(--font-mono);
  font-size: 1.3rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
}

.stat-label {
  font-size: 0.74rem;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.stat-divider {
  width: 1px;
  height: 30px;
  background: var(--border-strong);
}

/* =========================================================
   Alert / flash message
   ========================================================= */
.alert {
  background: rgba(34, 210, 122, 0.1);
  border: 1px solid rgba(34, 210, 122, 0.3);
  color: #b9f4d6;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 0.92rem;
  margin-bottom: 24px;
}

/* =========================================================
   Panel + gallery
   ========================================================= */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-card);
}

.panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.panel-kicker {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 6px;
}

.panel-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.25rem, 2.6vw, 1.65rem);
  color: var(--text);
}

.sort-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 9px 16px;
  transition: border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.sort-toggle:hover {
  border-color: var(--accent);
  color: var(--text);
  transform: translateY(-1px);
}

.sort-icon {
  font-size: 0.9rem;
}

/* Empty state */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding: 64px 20px;
  color: var(--text-muted);
}

.empty-icon {
  font-size: 2rem;
  color: var(--text-faint);
  margin-bottom: 4px;
}

.empty-state h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--text);
}

/* =========================================================
   Cards grid
   ========================================================= */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.stream-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  overflow: hidden;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.stream-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: var(--accent);
  opacity: 0.25;
  transition: opacity 0.18s ease;
}

.stream-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-card);
}

.stream-card:hover::before {
  opacity: 0.9;
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.card-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 6px;
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
}

.card-chip {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 10px 5px 8px;
}

.watch-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 0.92rem;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  transition: filter 0.18s ease, transform 0.18s ease;
}

.watch-button:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.watch-arrow {
  transition: transform 0.18s ease;
}

.watch-button:hover .watch-arrow {
  transform: translateX(3px);
}

/* =========================================================
   Watch page (standalone player)
   ========================================================= */
   
/* ===== Player iframe + chip overlay ===== */

.player-body {
    margin: 0;
    padding: 0;
    background: #000;
    overflow: hidden;
}

.player-frame-wrap {
    position: relative;
    width: 100vw;
    height: 100vh;
    background: #000;
}

.player-video,
.player-frame {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
    background: #000;
}

.player-fallback {
    color: #fff;
    font-family: system-ui, sans-serif;
    text-align: center;
    padding: 2rem;
}

/* ----- Overlays that hide the provider's chip / Copy Embed UI -----
   These sit ON TOP of the iframe (z-index: 10) so the chips are visually
   hidden. They use pointer-events: none so they don't block video clicks
   underneath. Tune width/height until only the chips are covered. */

.player-overlay {
    position: absolute;
    z-index: 10;
    background: #000;
    pointer-events: none;
}

/* Most providers put chips top-right (Copy Embed, Share, etc.) */
.player-overlay-top-right {
    top: 0;
    right: 0;
    width: 220px;
    height: 56px;
}

/* Some providers put chips top-left (filter dropdowns, logo) */
.player-overlay-top-left {
    top: 0;
    left: 0;
    width: 180px;
    height: 56px;
}

/* Some providers put a chip bottom-right (watermark, copy button) */
.player-overlay-bottom-right {
    bottom: 0;
    right: 0;
    width: 200px;
    height: 48px;
}

/* On small screens, shrink overlays so they don't cover the whole video */
@media (max-width: 640px) {
    .player-overlay-top-right {
        width: 140px;
        height: 44px;
    }
    .player-overlay-top-left {
        width: 120px;
        height: 44px;
    }
    .player-overlay-bottom-right {
        width: 130px;
        height: 40px;
    }
}
.standalone-player {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-top: 12px;
}

.back-link {
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-muted);
  padding: 8px 0;
  transition: color 0.18s ease;
}

.back-link:hover {
  color: var(--text);
}

.watch-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow-card);
}

.watch-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.watch-title {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 3vw, 1.7rem);
  font-weight: 600;
  margin-top: 4px;
}

.watch-subtitle {
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 0.92rem;
  max-width: 48ch;
}

.pill {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 14px 7px 11px;
  color: var(--text-muted);
}

.watch-player-shell {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.watch-player-shell iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.watch-footer {
  margin-top: 16px;
  display: flex;
  justify-content: flex-end;
}

.watch-meta {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-faint);
}

.watch-empty {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 48px 24px;
}

.watch-empty h1 {
  font-family: var(--font-display);
  font-size: 1.6rem;
}

.watch-empty p {
  color: var(--text-muted);
  max-width: 38ch;
}

/* =========================================================
   Player page (embedded, full-bleed)
   ========================================================= */
.player-body {
  background: #000;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.player-stage {
  width: 100%;
  height: 100vh;
}

.player-video,
.player-frame {
  width: 100%;
  height: 100%;
  border: 0;
  background: #000;
  object-fit: contain;
}

.player-fallback {
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.95rem;
}

/* =========================================================
   Responsive
   ========================================================= */
@media (min-width: 720px) {
  .hero {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    gap: 32px;
  }

  .hero-main {
    flex: 1;
  }
}

@media (max-width: 480px) {
  .page-shell {
    padding: 20px 14px 56px;
  }

  .panel {
    padding: 20px;
  }

  .hero-stats {
    width: 100%;
    justify-content: space-between;
  }

  .cards-grid {
    grid-template-columns: 1fr;
  }

  .watch-card {
    padding: 18px;
  }
}


