/* ═══════════════════════════════════════════════════════════════
   CLIPRAIDER - “Radar Console” dark theme
   A live-signal
   command console: angular tech display type (Chakra Petch) over a
   readable body (Manrope), an animated radar sweep in the hero, and
   every accent driven by --red/* vars so the platform theming
   (Twitch/Kick/YouTube) flips the whole page with one swap.
   ═══════════════════════════════════════════════════════════════ */

:root {
  --bg: #060606;
  --bg-2: #0d0d0d;
  --panel: #111113;
  --panel-2: #17171a;
  --line: #232326;
  --text: #f2f2f2;
  --muted: #8b8b93;
  --dim: #808089; /* 4.5:1+ on --bg/--panel (WCAG AA) - was #5a5a62 (2.97:1) */
  --red: #e50914;
  --red-bright: #ff2233;
  --red-dark: #b0060f;
  --yellow: #ffd400;
  --green: #2ecc71;
  --font-display: "Chakra Petch", "Arial Narrow", Impact, sans-serif;
  --font-body: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --radius: 10px;
  /* Radar atmosphere */
  --grid-line: rgba(255, 255, 255, 0.03);
  --scan-faint: rgba(255, 255, 255, 0.05);
}

/* Reduced motion - vestibulary-sensitive viewers get a still page: kill
   every animation/transition (the hero pulse, card hovers, skeletons, the
   ad countdown bar) without changing any layout. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

* { margin: 0; padding: 0; box-sizing: border-box; }

.skip-link {
  position: fixed;
  left: 16px;
  top: 8px;
  z-index: 300;
  transform: translateY(-160%);
  padding: 10px 14px;
  border-radius: 7px;
  background: var(--red);
  color: #fff;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.8px;
}
.skip-link:focus { transform: translateY(0); outline: 3px solid #fff; outline-offset: 2px; }

html {
  scroll-behavior: smooth;
  /* Reserve the vertical scrollbar gutter: toggling body overflow:hidden for
     the age gate makes a real scrollbar appear/disappear (an ~11px content
     reflow on Windows/headless - a genuine CLS source). With the gutter
     always reserved, the overlay shows and hides shift-free. */
  scrollbar-gutter: stable;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  /* Console atmosphere: a faint blue-grey grid + top glow, painted on the
     body canvas so every page (legal pages included) inherits it. */
  background-image:
    radial-gradient(ellipse 900px 480px at 50% -120px, var(--accent-glow), transparent 65%),
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: auto, 44px 44px, 44px 44px;
}

::selection { background: var(--red); color: #fff; }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

.hidden { display: none !important; }

/* The `hidden` attribute must always win - even over `display: flex` on the
   same element. Without this, a class like .player-overlay { display:flex }
   silently overrides hidden and the modal shows up on page load with no way
   to close it. */
[hidden] { display: none !important; }

/* ─────────────────────────── TOP BAR ─────────────────────────── */

.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(6, 6, 6, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.logo-globe {
  font-size: 26px;
  filter: grayscale(0.2);
  display: inline-block;
  animation: spin-slow 24s linear infinite;
}

@keyframes spin-slow { to { transform: rotate(360deg); } }

.logo-text {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 1.5px;
  color: #fff;
  white-space: nowrap;
}

.logo-text em {
  font-style: normal;
  color: var(--red-bright);
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}

.nav-link {
  padding: 8px 14px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--muted);
  border-radius: 6px;
  transition: color 0.18s ease, background 0.18s ease;
  position: relative;
}

.nav-link:hover { color: #fff; background: var(--panel); }

.nav-link.active { color: #fff; }
.nav-link.active::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 2px;
  height: 2px;
  background: var(--red);
  border-radius: 2px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  display: grid;
  place-items: center;
  transition: border-color 0.18s, background 0.18s, transform 0.12s;
}

.icon-btn:hover { border-color: var(--red); background: var(--panel-2); transform: translateY(-1px); }

/* Fight-type dropdown - navigates to the server-rendered /type/<slug> hub
   pages (shareable, indexable category listings). Native <details> = zero JS
   + keyboard friendly (Enter/Space to open). */
.type-menu { position: relative; }
.type-menu-summary {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 13px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.5px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: border-color 0.18s, background 0.18s, color 0.18s;
}
.type-menu-summary::-webkit-details-marker { display: none; }
.type-menu-summary:hover { border-color: var(--red); color: #fff; background: var(--panel-2); }
.type-menu[open] .type-menu-summary { border-color: var(--red); color: #fff; }
.type-menu-summary svg { transition: transform 0.18s; }
.type-menu[open] .type-menu-summary svg { transform: rotate(180deg); }
.type-menu-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 40;
  min-width: 212px;
  padding: 6px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.type-menu-panel a {
  padding: 9px 12px;
  border-radius: 6px;
  color: var(--text);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.6px;
  white-space: nowrap;
  transition: background 0.14s, color 0.14s;
}
.type-menu-panel a:hover { background: var(--red); color: #fff; }

.btn-hot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 8px;
  border: 1px solid var(--red);
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 2px;
  box-shadow: 0 0 18px rgba(229, 9, 20, 0.35);
  transition: transform 0.15s, box-shadow 0.2s;
}

.btn-hot:hover { transform: translateY(-1px) scale(1.02); box-shadow: 0 0 28px rgba(229, 9, 20, 0.55); }

.btn-clips {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid var(--green);
  border-radius: 8px;
  color: var(--green);
  background: rgba(34, 255, 136, 0.06);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  white-space: nowrap;
  transition: background 0.18s, color 0.18s, transform 0.15s;
}
.btn-clips:hover {
  color: #050505;
  background: var(--green);
  transform: translateY(-1px);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.7);
  animation: pulse 1.8s infinite;
}

/* Offline feed indicator - yellow dot instead of the green online one
   (app.js builds the LIVE chip with this class; no inline styles). */
.pulse-dot.warn { background: var(--yellow); box-shadow: 0 0 0 0 rgba(255, 212, 0, 0.6); }

.btn-hot .pulse-dot { background: #fff; box-shadow: 0 0 0 0 rgba(255,255,255,0.6); }

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.6); }
  70% { box-shadow: 0 0 0 9px rgba(46, 204, 113, 0); }
  100% { box-shadow: 0 0 0 0 rgba(46, 204, 113, 0); }
}

/* search bar */
.search-bar {
  border-top: 1px solid var(--line);
  background: var(--bg-2);
}

.search-bar-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--muted);
}

.search-bar input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 16px;
  font-family: var(--font-body);
}

.search-bar input::placeholder { color: var(--dim); }

.search-hint {
  font-size: 11px;
  color: var(--dim);
  border: 1px solid var(--line);
  padding: 3px 8px;
  border-radius: 5px;
  letter-spacing: 0.5px;
}

/* The "ESC to close" hint is desktop-only - phones have no Escape key.
   Hide it so it can't mislead touch users. */
@media (max-width: 640px) {
  .search-hint { display: none; }
}

/* ─────────────────────────── TICKER ─────────────────────────── */

.ticker {
  background: var(--red);
  overflow: hidden;
  white-space: nowrap;
  padding: 8px 0;
  border-bottom: 1px solid #000;
  /* moving scanline sheen - the console feel */
  background-image: linear-gradient(
    115deg,
    rgba(255, 255, 255, 0) 30%,
    rgba(255, 255, 255, 0.14) 50%,
    rgba(255, 255, 255, 0) 70%
  );
  background-size: 220% 100%;
  animation: ticker-sheen 7s linear infinite;
}

@keyframes ticker-sheen {
  0% { background-position: 120% 0; }
  100% { background-position: -120% 0; }
}

.ticker-track {
  display: flex;
  width: max-content;
  animation: ticker 40s linear infinite;
  /* Pause on hover so anyone can actually read a streamer name - a
     live ticker that never stops is just noise. */
  will-change: transform;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 3px;
  color: #fff;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
}

.ticker:hover .ticker-track {
  animation-play-state: paused;
}

.ticker-sep {
  white-space: nowrap;
  padding-right: 4px;
}

@keyframes ticker {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ─────────────────────────── HERO ─────────────────────────── */

.hero {
  position: relative;
  /* Compact by design: the community-ranking rails (MOST TALKED first)
     must start above the fold, so the hero leads with the fight title
     without eating the whole first viewport. */
  min-height: 340px;
  display: flex;
  align-items: flex-end;
  /* The featured fight's own thumbnail is layered in by app.js (via
     --hero-img) as a dimmed, darkened backdrop - the gradient + grid stay
     on top so text always reads. No image = the plain gradient below. */
  background:
    linear-gradient(180deg, rgba(6, 6, 6, 0.88) 0%, rgba(5, 5, 5, 0.55) 45%, rgba(5, 5, 5, 0.92) 100%),
    radial-gradient(ellipse at 30% 20%, rgba(229, 9, 20, 0.22), transparent 55%),
    linear-gradient(180deg, #0a0a0a 0%, #050505 100%),
    var(--hero-img, none);
  background-size: auto, auto, auto, cover;
  background-position: center;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 50% 0%, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, black 30%, transparent 75%);
}

.hero-shell {
  position: relative;
  z-index: 2;
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
  padding: 40px 24px 32px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--red);
  color: #fff;
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 3px;
  padding: 8px 16px;
  border-radius: 6px;
  margin-bottom: 22px;
  box-shadow: 0 4px 24px rgba(229, 9, 20, 0.4);
}

.hero-badge .pulse-dot { background: #fff; box-shadow: 0 0 0 0 rgba(255,255,255,0.6); animation: pulse 1.6s infinite; }

/* When the hero features the hottest fight right now (app.js flips the
   label to 🔥 TRENDING), the badge turns gold - the same heat color as the
   🔥 badges, so the fastest-rising fight reads as the site's live signal. */
.hero-badge.trending {
  background: linear-gradient(135deg, #ff7a00, #ffd400);
  color: #000;
  box-shadow: 0 4px 24px rgba(255, 170, 0, 0.45);
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(26px, 4.2vw, 52px);
  line-height: 1.12;
  max-width: 900px;
  text-transform: uppercase;
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.8);
  /* Clamp + reserve: the SSR hero ships a 1-line placeholder ("Loading the
     latest fights…") that the client replaces with the REAL title, which can
     wrap far taller at mobile widths - the hero grows and shoves the grid
     down (the homepage's biggest CLS source, and it clipped the meta row
     off-screen). Capping at 3 lines + a matching min-height makes the hero
     the same height in both states, so the swap is layout-shift-free. */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 3.36em; /* 3 lines @ line-height 1.12 */
}

.hero-meta {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 600;
  /* Reserve the row while empty (SSR state) so populating it never grows
     the hero (paired with the .hero-title clamp - the two are the only
     client-side hero changes). Hidden on mobile via the ≤480px rule. */
  min-height: 20px;
}

.hero-meta .views { color: var(--yellow); font-weight: 800; }

.hero-meta .hero-heat { color: var(--yellow); font-weight: 800; }

.hero-meta .hero-live-for { color: var(--green); font-weight: 700; }

.btn-play-hero {
  margin-top: 26px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  color: #000;
  border: none;
  font-family: var(--font-display);
  font-size: 15px;
  letter-spacing: 2px;
  padding: 15px 30px;
  border-radius: 8px;
  transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

.btn-play-hero:hover {
  transform: translateY(-2px) scale(1.03);
  background: var(--red);
  color: #fff;
  box-shadow: 0 12px 40px rgba(229, 9, 20, 0.45);
}

/* Compact variant - the player overlay's TRY AGAIN button (was an inline
   style on the placeholder template; now a class). */
.btn-play-hero.compact { margin-top: 0; padding: 11px 22px; font-size: 12px; }

/* ─────────────── HERO MARK (skull) ───────────────
   Replaces the old rotating radar sweep: a single static skull emoji,
   no spin, no motion. Sits behind the hero shell text; hidden on phones
   where the hero is a compact banner. */

.hero-radar {
  position: absolute;
  right: clamp(-40px, 5vw, 70px);
  top: 50%;
  transform: translateY(-50%);
  width: clamp(120px, 30vw, 440px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  pointer-events: none;
  z-index: 1;
  opacity: 0.9;
}

/* The skull mark - deliberately static (animation: none). */
.hero-skull {
  font-size: clamp(90px, 13vw, 190px);
  line-height: 1;
  filter: drop-shadow(0 0 26px rgba(229, 9, 20, 0.4));
  animation: none;
}

@media (max-width: 1100px) and (min-width: 768px) {
  /* Mid sizes: shrink so the skull tucks behind the headline. */
  .hero-radar {
    width: clamp(80px, 20vw, 150px);
    right: clamp(-30px, -2vw, -10px);
    top: 55%;
    opacity: 0.5;
  }
  .hero-skull { font-size: clamp(64px, 12vw, 110px); }
}

@media (max-width: 767px) {
  .hero-radar { display: none; }
}

/* ─────────────── MOBILE HERO - compact banner ───────────────
   On phones the full-height hero eats the whole first viewport, pushing
   the rails below the fold. Collapse it into a compact banner: small
   min-height, a row of badge + play button with the title beneath (full
   width), the meta row hidden, so the MOST TALKED rail starts within the
   initial viewport. */
@media (max-width: 480px) {
  .hero {
    min-height: 140px;
    align-items: center;
  }
  .hero-shell {
    padding: 18px 16px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 12px;
  }
  .hero-badge { order: 1; font-size: 9px; letter-spacing: 1.5px; padding: 4px 10px; }
  .btn-play-hero {
    order: 2;
    margin-top: 0;
    margin-left: auto;
    padding: 9px 16px;
    font-size: 11px;
    letter-spacing: 1.4px;
    gap: 7px;
  }
  .hero-title {
    order: 3;
    flex: 1 1 100%;
    max-width: 100%;
    font-size: clamp(17px, 4.6vw, 24px);
    line-height: 1.18;
    min-height: 3.54em; /* 3 lines @ the 1.18 mobile line-height - same as base */
  }
  .hero-meta { display: none; }
}

/* ─────────────────────────── MAIN GRID ─────────────────────────── */

.discovery-strip {
  margin: 0 0 28px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--red);
  border-radius: var(--radius);
  background: linear-gradient(110deg, rgba(255,255,255,.045), rgba(255,255,255,.015));
}
.discovery-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.discovery-caption { color: var(--muted); font-size: 12px; }
.category-index-copy {
  margin: -4px 0 14px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.category-seo-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 14px;
}

.category-seo-links a {
  color: var(--green);
  white-space: nowrap;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
}

.category-seo-links a:hover {
  text-decoration: underline;
}

.category-list {
  contain: layout style;
 display: flex; gap: 8px; overflow-x: auto; scrollbar-width: thin; padding-bottom: 2px; }
.category-chip { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); color: var(--text); font-size: 11px; font-weight: 800; letter-spacing: .45px; transition: border-color .15s, background .15s, transform .15s; }
.category-chip:hover, .category-chip.active { border-color: var(--red); background: rgba(229,9,20,.13); transform: translateY(-1px); }
.category-chip small { color: var(--muted); font-weight: 700; }
.card-streamer-link, .category-link { display: block; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .5px; margin-top: 7px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-streamer-link:hover, .category-link:hover { color: var(--red-bright); }
.category-link { margin-top: 0; margin-bottom: 5px; color: var(--red-bright); }\n\n@media (max-width: 640px) {\n  .feed-status { flex: 1 0 100%; order: 5; }\n  .discovery-heading { align-items: flex-start; flex-direction: column; gap: 4px; }\n}\n\n.streamer-page { max-width: 900px; min-height: 70vh; margin: 0 auto; padding: 96px 24px; }\n.streamer-visual { width: min(100%, 760px); aspect-ratio: 16 / 7; margin-bottom: 28px; border: 1px solid var(--line); border-radius: 12px; background-position: center; background-size: cover; box-shadow: 0 20px 60px rgba(0,0,0,.28); position: relative; overflow: hidden; }
.streamer-visual::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(6,6,6,.62), rgba(6,6,6,.08) 65%, rgba(6,6,6,.5)); }
.streamer-page-kicker { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.streamer-signal { color: var(--green); font-size: 10px; font-weight: 800; letter-spacing: 1.2px; }
.streamer-page h1 { margin-top: 12px; font-family: var(--font-display); font-size: clamp(40px, 8vw, 88px); line-height: .98; letter-spacing: 1px; text-transform: uppercase; }\n.streamer-title { max-width: 720px; margin-top: 24px; color: var(--muted); font-size: clamp(18px, 2.4vw, 28px); line-height: 1.35; }\n.streamer-facts { display: flex; flex-wrap: wrap; gap: 10px; margin: 24px 0 32px; }\n.streamer-facts span { padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); color: var(--text); font-size: 12px; font-weight: 800; letter-spacing: .45px; }\n.streamer-facts span:first-child { border-color: var(--red); color: var(--red-bright); }\n.streamer-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; }
.streamer-actions .btn-play-hero { margin-top: 0; }
.streamer-backlink { color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: 1px; }
.streamer-backlink:hover { color: var(--red-bright); }
.streamer-page .player-note { margin-top: 22px; }

/* Streamer pages on phones: the desktop 96px top padding + 24px gutters
   waste screen space - tighten to match the rest of the mobile layout. */
@media (max-width: 640px) {
  .streamer-page { padding: 24px 16px 56px; }
  .streamer-page h1 { font-size: clamp(30px, 9vw, 44px); }
  .streamer-title { font-size: clamp(16px, 4vw, 19px); }
  .streamer-facts { margin: 18px 0 24px; }
}

.main {
  max-width: 1440px;
  margin: 0 auto;
  padding: 40px 24px 60px;
}

/* Phones: tighter gutters so the grid uses the full width. */
@media (max-width: 640px) {
  .main { padding: 24px 14px 48px; }
}

.grid-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 22px;
}

.grid-title {
  font-family: var(--font-display);
  font-size: 26px;
  letter-spacing: 2px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 12px;
}

.grid-title::before {
  content: "";
  width: 6px;
  height: 30px;
  background: var(--red);
  border-radius: 3px;
}

.feed-status { color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .35px; }
.clear-follows { border: 0; background: transparent; color: var(--dim); font-size: 10px; font-weight: 800; letter-spacing: .5px; text-decoration: underline; text-underline-offset: 3px; }
.clear-follows:hover { color: var(--red-bright); }
.offline-note.partial { border-color: rgba(255, 212, 0, .35); }

.grid-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.sort-pills {
  display: flex;
  gap: 6px;
  background: var(--panel);
  padding: 4px;
  border-radius: 9px;
  border: 1px solid var(--line);
}

.pill {
  padding: 8px 16px;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.8px;
  transition: all 0.18s;
}

.pill:hover { color: #fff; background: var(--panel-2); }
.pill.active { background: var(--red); color: #fff; box-shadow: 0 2px 12px var(--accent-glow); }
.pill.active:hover { background: var(--red); }

.refresh-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.8px;
  transition: all 0.18s;
}

.refresh-btn:hover { border-color: var(--red); color: var(--red-bright); }
.refresh-btn.spinning svg { animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* fight-type filter pills */
.fight-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 26px;
}

/* Hybrid pill: the label is the instant client-side filter, the ↗ icon is
   the taxonomy link. The wrapper keeps the pill look; the button owns the
   label padding, the link sits behind a hairline divider. */
.fight-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  overflow: hidden; /* clips the link's corners to the pill radius */
  transition: all 0.16s;
}

.fight-pill-btn {
  appearance: none;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  padding: 9px 8px 9px 18px;
  cursor: pointer;
}

.fight-pill-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  padding: 0 12px;
  border-left: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  line-height: 1;
  text-decoration: none;
  transition: color 0.15s ease;
}

.fight-pill:hover { border-color: var(--red); color: #fff; transform: translateY(-1px); }
.fight-pill-btn:hover { color: #fff; }
.fight-pill-link:hover { color: var(--red); }
.fight-pill.active {
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  border-color: var(--red);
  color: #fff;
  box-shadow: 0 3px 16px rgba(229, 9, 20, 0.4);
}
.fight-pill.active .fight-pill-link { border-left-color: rgba(255, 255, 255, 0.28); }

/* tag row */
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 26px;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.16s;
}

.tag-chip:hover { border-color: var(--red); color: #fff; }

/* offline-mode notice - shown when the WSH feed is down and the grid is
   running on demo cards. Yellow = degraded but browsable, matching the
   LIVE-dot's offline color. */
.offline-note {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  background: rgba(255, 212, 0, 0.06);
  border: 1px solid rgba(255, 212, 0, 0.35);
  border-left: 4px solid var(--yellow);
  border-radius: var(--radius);
  padding: 13px 18px;
  margin-bottom: 22px;
  animation: card-in 0.35s ease both;
}

.offline-icon { font-size: 18px; line-height: 1; }

.offline-msg {
  flex: 1;
  min-width: 220px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.offline-msg strong { color: var(--yellow); }

.offline-refresh {
  padding: 8px 18px;
  border-radius: 8px;
  border: 1px solid rgba(255, 212, 0, 0.4);
  background: transparent;
  color: var(--yellow);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  transition: all 0.18s;
}

.offline-refresh:hover { background: var(--yellow); color: #000; }
.offline-refresh:disabled { opacity: 0.5; cursor: wait; }

/* video grid */
.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

@media (max-width: 1180px) { .grid { grid-template-columns: repeat(3, 1fr); } }
/* With side rails present (1200-1439px viewport) the main column is ~860px
   wide, so 4 columns would cramp cards to ~180px. Drop to 3 while rails
   are shown. */
@media (min-width: 1200px) and (max-width: 1439px) { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 860px)  { .grid { grid-template-columns: repeat(2, 1fr); gap: 16px; } }
@media (max-width: 520px)  { .grid { grid-template-columns: 1fr; } }

/* ─────────────── MOST TALKED (community's picks) ───────────────
   A horizontal rail of the fights with the most comment activity on this
   site (our own comments + likes). Snap-scrolling; hidden until enough
   fights have real engagement. */

.most-talked {
  margin-bottom: 36px;
}

.most-talked-title {
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.most-talked-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* The LAST 24H chip - makes the window explicit so the rail reads as a
   "right now" ranking, not the all-time leaderboard. */
.mt-window {
  font-family: var(--font-body);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 1.2px;
  color: var(--yellow);
  border: 1px solid rgba(255, 212, 0, 0.35);
  border-radius: 999px;
  padding: 3px 9px;
  white-space: nowrap;
}

/* The 24H / 7 DAYS / ALL TIME segmented toggle - switches the 🔥 Most
   Talked rail between its windowed rankings (24h and 7-day counts, then
   the lifetime list). Replaces the static LAST 24H chip on that rail. */
.mt-window-toggle {
  display: inline-flex;
  gap: 2px;
  margin-left: 8px;
  padding: 2px;
  border: 1px solid rgba(255, 212, 0, 0.35);
  border-radius: 999px;
  background: rgba(255, 212, 0, 0.06);
  vertical-align: middle;
}
.mt-window-btn {
  font-family: var(--font-body);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--yellow);
  background: transparent;
  border: none;
  border-radius: 999px;
  padding: 3px 8px;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.mt-window-btn:hover { background: rgba(255, 212, 0, 0.12); }
.mt-window-btn.active {
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  color: #fff;
}

.most-talked-rail {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 8px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: var(--red) transparent;
}

.mt-card {
  flex: 0 0 210px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  color: inherit;
  transition: transform 0.18s, border-color 0.18s, box-shadow 0.18s;
}

.mt-card:hover {
  border-color: var(--red);
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}

.mt-card:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

.mt-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #000;
  display: block;
}

/* the ⭐ community badge pinned to the rail-card thumb corner (visuals
   come from .community-badge) - compact for the narrower mt-cards */
.mt-community {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 2;
  font-size: 8px;
  letter-spacing: 0.7px;
  padding: 3px 7px;
  border-radius: 4px;
}

.mt-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}

.mt-card:hover .mt-thumb img {
  transform: scale(1.06);
}

.mt-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 11px 13px 13px;
}

.mt-title {
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 33px;
}

.mt-meta {
  font-size: 11px;
  color: var(--yellow);
  font-weight: 800;
}

@media (max-width: 520px) {
  .mt-card {
    flex-basis: 168px;
  }
}

/* ─────────────── TOP FIGHTS (the fights that travel) ───────────────
   The admin dashboard's Top Fights ranking surfaced publicly - plays +
   embeds×2 + comments×5 (lifetime, not the 24h rails). Snap-scrolling;
   hidden until enough fights have real engagement. */

.top-fights {
  margin-bottom: 36px;
}

.top-fights-title {
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.top-fights-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* The ALL TIME chip - makes the lifetime window explicit so the rail reads
   as the all-time marquee, not a 24h "right now" ranking. */
.tf-window {
  font-family: var(--font-body);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 1.2px;
  color: var(--yellow);
  border: 1px solid rgba(255, 212, 0, 0.35);
  border-radius: 999px;
  padding: 3px 9px;
  white-space: nowrap;
}

.top-fights-rail {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 8px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: var(--red) transparent;
}

.tf-card {
  flex: 0 0 210px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  color: inherit;
  transition: transform 0.18s, border-color 0.18s, box-shadow 0.18s;
}

.tf-card:hover {
  border-color: var(--red);
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}

.tf-card:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

.tf-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #000;
  display: block;
}

.tf-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}

.tf-card:hover .tf-thumb img {
  transform: scale(1.06);
}

/* the 🔥 TOP badge pinned to the thumb corner (visuals come from .heat-badge) */
.tf-heat {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
}

.tf-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 11px 13px 13px;
}

.tf-title {
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 33px;
}

.tf-meta {
  font-size: 11px;
  color: var(--yellow);
  font-weight: 800;
}

@media (max-width: 520px) {
  .tf-card {
    flex-basis: 168px;
  }
}

/* ─────────────── TRENDING (fastest-rising right now) ───────────────
   The fights with the most COMMENT HEAT in the last 24h (hot24h - the
   exact field the 🔥 badges read), ranked by the 24h window. Snap-
   scrolling rail, hidden until at least 3 fights are actually hot. Each
   card reuses .heat-badge, pinned to the thumb corner via .tr-heat. */

.trending {
  margin-bottom: 36px;
}

.trending-title {
  font-family: var(--font-display);
  font-size: 17px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.trending-title::before {
  content: "";
  width: 6px;
  height: 22px;
  background: var(--red);
  border-radius: 3px;
}

.trending-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--line), transparent);
}

.trending-rail {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 8px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: var(--red) transparent;
}

.tr-card {
  flex: 0 0 210px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  color: inherit;
  transition: transform 0.18s, border-color 0.18s, box-shadow 0.18s;
}

.tr-card:hover {
  border-color: var(--red);
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}

.tr-card:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

.tr-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #000;
  display: block;
}

.tr-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}

.tr-card:hover .tr-thumb img {
  transform: scale(1.06);
}

/* the 🔥 heat badge pinned to the thumb corner (visuals come from .heat-badge) */
.tr-heat {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 1;
}

.tr-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 11px 13px 13px;
}

.tr-title {
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 33px;
}

.tr-meta {
  font-size: 11px;
  color: var(--yellow);
  font-weight: 800;
}

@media (max-width: 520px) {
  .tr-card {
    flex-basis: 168px;
  }
}

/* ─────────────── NEW TODAY (fresh fights, last 24h) ───────────────
   Reuses the same card/rail classes as Trending - the same horizontal
   snap-scroll strip, same skeleton pattern (mt-sk). Newest-first sort
   with a relative-timestamp meta line. */

.new-today {
  margin-bottom: 36px;
}

.new-today-title {
  font-family: var(--font-display);
  font-size: 17px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.new-today-title::before {
  content: "";
  width: 6px;
  height: 22px;
  background: var(--red);
  border-radius: 3px;
}

.new-today-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--line), transparent);
}

.new-today-rail {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 8px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: var(--red) transparent;
}

.nt-card {
  flex: 0 0 210px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  color: inherit;
  transition: transform 0.18s, border-color 0.18s, box-shadow 0.18s;
}

.nt-card:hover {
  border-color: var(--red);
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}

.nt-card:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

.nt-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #000;
  display: block;
}

.nt-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}

.nt-card:hover .nt-thumb img {
  transform: scale(1.06);
}

.nt-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 11px 13px 13px;
}

.nt-title {
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 33px;
}

.nt-meta {
  font-size: 11px;
  color: var(--muted);
  font-weight: 800;
}

@media (max-width: 520px) {
  .nt-card {
    flex-basis: 168px;
  }
}

/* ─────────────── VIDEO CARD ─────────────── */

.vcard {
  position: relative;
  position: relative;
  cursor: pointer;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  transition: transform 0.22s cubic-bezier(0.2, 0.7, 0.3, 1.2), border-color 0.22s, box-shadow 0.22s;
  animation: card-in 0.42s cubic-bezier(0.2, 0.7, 0.3, 1) both;
}

/* Staggered grid reveal - the first rows sweep in one after another so
   the grid reads like a radar filling up (capped at 12 so deep grids
   don't stack delays). */
.vcard:nth-child(1) { animation-delay: 0.02s; }
.vcard:nth-child(2) { animation-delay: 0.06s; }
.vcard:nth-child(3) { animation-delay: 0.1s; }
.vcard:nth-child(4) { animation-delay: 0.14s; }
.vcard:nth-child(5) { animation-delay: 0.18s; }
.vcard:nth-child(6) { animation-delay: 0.22s; }
.vcard:nth-child(7) { animation-delay: 0.26s; }
.vcard:nth-child(8) { animation-delay: 0.3s; }
.vcard:nth-child(9) { animation-delay: 0.34s; }
.vcard:nth-child(10) { animation-delay: 0.38s; }
.vcard:nth-child(11) { animation-delay: 0.42s; }
.vcard:nth-child(12) { animation-delay: 0.46s; }

@keyframes card-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Corner brackets - the targeting reticle motif, drawn on hover/focus. */
.vcard::before,
.vcard::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  z-index: 3;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.vcard::before {
  top: 7px;
  left: 7px;
  border-top: 2px solid var(--red-bright);
  border-left: 2px solid var(--red-bright);
  border-top-left-radius: 4px;
}
.vcard::after {
  bottom: 7px;
  right: 7px;
  border-bottom: 2px solid var(--red-bright);
  border-right: 2px solid var(--red-bright);
  border-bottom-right-radius: 4px;
}

.vcard:hover,
.vcard:focus-visible {
  transform: translateY(-5px);
  border-color: var(--red);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.6), 0 0 0 1px var(--accent-glow);
}

.vcard:hover::before,
.vcard:hover::after,
.vcard:focus-visible::before,
.vcard:focus-visible::after {
  opacity: 1;
}

.vcard:focus-visible {
  outline: 2px solid var(--red-bright);
  outline-offset: 3px;
}

.thumb-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #000;
}

.thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

/* Thumbnail fallback - when a platform thumbnail fails to load, the card
   keeps its frame with a platform-tinted placeholder instead of a blank
   hole (app.js adds .thumb-fallback on <img> error). */
.thumb-wrap.thumb-fallback {
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 30% 20%, rgba(229, 9, 20, 0.16), #0a0a0a 70%);
}
.thumb-wrap.thumb-fallback::after {
  content: "🟣";
  font-size: 44px;
  opacity: 0.85;
}
.thumb-wrap.thumb-fallback[data-platform="kick"] {
  background: radial-gradient(circle at 30% 20%, rgba(23, 204, 66, 0.16), #0a0a0a 70%);
}
.thumb-wrap.thumb-fallback[data-platform="kick"]::after { content: "🟢"; }
.thumb-wrap.thumb-fallback[data-platform="youtube"] {
  background: radial-gradient(circle at 30% 20%, rgba(255, 34, 51, 0.16), #0a0a0a 70%);
}
.thumb-wrap.thumb-fallback[data-platform="youtube"]::after { content: "🔴"; }

/* New-version banner - shown when the service worker picks up a fresh
   deploy, so visitors can reload into it instead of silently running the
   old shell (ads.js builds it; every page loads ads.js). */
.sw-update {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 400;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px 10px 18px;
  border-radius: 10px;
  border: 1px solid var(--red);
  background: rgba(6, 6, 6, 0.95);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: var(--text);
}
.sw-update button {
  border: 1px solid var(--red);
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  color: #fff;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.2px;
  padding: 7px 14px;
  border-radius: 7px;
  cursor: pointer;
  box-shadow: 0 0 14px rgba(229, 9, 20, 0.35);
}
.sw-update button:hover { filter: brightness(1.1); }

.vcard:hover .thumb-wrap img { transform: scale(1.07); }

.thumb-grad {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, 0.75) 100%);
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.25);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.vcard:hover .play-overlay { opacity: 1; }

.play-circle {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: var(--red);
  display: grid;
  place-items: center;
  color: #fff;
  box-shadow: 0 0 0 0 rgba(229, 9, 20, 0.7);
  transform: scale(0.7);
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.3, 1.4), box-shadow 0.25s;
}

.vcard:hover .play-circle { transform: scale(1); box-shadow: 0 0 40px rgba(229, 9, 20, 0.7); animation: pulse-ring 1.6s infinite; }

@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(229, 9, 20, 0.6); }
  70% { box-shadow: 0 0 0 18px rgba(229, 9, 20, 0); }
  100% { box-shadow: 0 0 0 0 rgba(229, 9, 20, 0); }
}

.duration-badge {
  position: absolute;
  right: 10px;
  bottom: 10px;
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  padding: 4px 8px;
  border-radius: 5px;
  letter-spacing: 0.5px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.badge-stack {
  position: absolute;
  left: 10px;
  top: 10px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  pointer-events: none;
}

.source-badge {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 1.2px;
  padding: 4px 9px;
  border-radius: 5px;
  text-transform: uppercase;
}

.fight-badge {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.1px;
  padding: 4px 9px;
  border-radius: 5px;
  text-transform: uppercase;
  background: var(--red);
  color: #fff;
  box-shadow: 0 2px 10px rgba(229, 9, 20, 0.5);
  /* It's a hub link now (SPA player + grid cards) - show the affordance. */
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s;
}

.fight-badge:hover {
  background: var(--red-bright);
  box-shadow: 0 2px 14px rgba(255, 34, 51, 0.7);
}

/* 🔥 heat badge - the hot-accent tag pinned to card thumbs (trending /
   clip cards). Gold-ish for the trend rails, accent-colored elsewhere. */
.heat-badge {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.9px;
  padding: 4px 9px;
  border-radius: 5px;
  text-transform: uppercase;
  background: linear-gradient(135deg, #ff7a00, #ffd400);
  color: #000;
  box-shadow: 0 2px 12px rgba(255, 170, 0, 0.45);
  animation: heat-pulse 2.4s ease-in-out infinite;
}

@keyframes heat-pulse {
  0%, 100% { box-shadow: 0 2px 12px rgba(255, 170, 0, 0.45); }
  50% { box-shadow: 0 2px 18px rgba(255, 170, 0, 0.75); }
}

/* ⭐ community badge - only in the 🔥 Most Talked view: marks fights with
   REAL engagement from OUR community (ourComments > 0). Solid gold (vs the
   pulsing gradient heat badge) so the ranked-by-activity view visibly
   separates "people are talking" from "this is hot right now". */
.community-badge {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.9px;
  padding: 4px 9px;
  border-radius: 5px;
  text-transform: uppercase;
  background: #f5c518;
  color: #241a00;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 2px 10px rgba(245, 197, 24, 0.4);
}

.source-badge.demo { background: var(--panel-2); color: var(--dim); border: 1px solid var(--line); }

/* UNCUT card badge - was an inline override on the demo badge; now a class. */
.source-badge.demo.uncut { border-color: var(--red); color: var(--red-bright); }

.card-body {
  padding: 14px 16px 16px;
}

.card-title {
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 39px;
  transition: color 0.18s;
}

.vcard:hover .card-title { color: var(--red-bright); }

.card-meta {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--dim);
  font-weight: 600;
}

.card-meta .views { color: var(--muted); }

.card-tags {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.card-tag {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: var(--muted);
  background: var(--panel-2);
  border: 1px solid var(--line);
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  /* Hub link (grid cards) - same affordance as the watch-page chips. */
  text-decoration: none;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.card-tag:hover {
  color: #fff;
  border-color: var(--red);
}

/* skeleton */
/* Skeleton cards must EXACTLY match .vcard height - thumb (aspect-ratio
   16/9) + .card-body (126px) - so the client grid swap is layout-shift-free.
   The CWV audit's CLS regression gate keeps them honest if they drift. */
.skeleton-card {
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--line);
  overflow: hidden;
}
.sk-thumb {
  aspect-ratio: 16 / 9;
  background: linear-gradient(100deg, var(--panel) 40%, var(--panel-2) 50%, var(--panel) 60%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}
.sk-body {
  padding: 14px 16px 16px; /* == .card-body */
}
.sk-title {
  height: 39px; /* == .card-title min-height (2 lines @ 14.5px × 1.35) */
  border-radius: 6px;
  background: linear-gradient(100deg, var(--panel) 40%, var(--panel-2) 50%, var(--panel) 60%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}
.sk-meta {
  margin-top: 10px; /* == .card-meta */
  height: 16px;
  width: 45%;
  border-radius: 6px;
  background: linear-gradient(100deg, var(--panel) 40%, var(--panel-2) 50%, var(--panel) 60%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}
.sk-line {
  height: 12px;
  border-radius: 6px;
  background: linear-gradient(100deg, var(--panel) 40%, var(--panel-2) 50%, var(--panel) 60%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}
.sk-tags {
  margin-top: 10px; /* == .card-tags */
  display: flex;
  gap: 6px;
}
.sk-tag {
  height: 21px; /* == .card-tag chip */
  width: 54px;
  border-radius: 10px;
  background: linear-gradient(100deg, var(--panel) 40%, var(--panel-2) 50%, var(--panel) 60%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}

/* Rail skeleton strips - mirror .mt-card dimensions (thumb 16/9 + body) so
   the SSR-visible rails (MOST TALKED / TRENDING / TOP FIGHTS) keep their
   height when the client fills them - the last CLS source on the homepage. */
.mt-sk {
  flex: 0 0 210px; /* == .mt-card width */
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.mt-sk .sk-body { padding: 11px 13px 13px; } /* == .mt-body */
.mt-sk .sk-line + .sk-line { margin-top: 8px; }
.mt-sk .sk-line.w70 { width: 70%; }
/* Skeleton width variants - used by the player overlay placeholder AND the
   .mt-sk rail skeletons (unscoped so both match). */
.sk-line.w62 { width: 62%; }
.sk-line.w38 { width: 38%; }

/* Turnstile CAPTCHA host - the comment + admin-login widgets sit in a
   centered flex row (was an inline style on the div; now a class shared by
   the SSR watch page, the SPA shell and admin-login). */
.turnstile-host { display: flex; justify-content: center; min-height: 0; margin: 4px 0 8px; }

/* JS-off fallback (noscript block on the SPA shell) - was all inline
   styles; now classes. */
.js-off { max-width: 560px; margin: 80px auto; padding: 0 24px; text-align: center; font-family: var(--font-body); color: #8b8b93; line-height: 1.7; }
.js-off-brand { font-family: var(--font-display); letter-spacing: 2px; color: #f2f2f2; font-size: 28px; margin-bottom: 10px; }
.js-off-brand em { font-style: normal; color: #ff2233; }

/* Visually-hidden helper - for JS-filled elements that need non-empty
   content before the app hydrates (e.g. the player title). */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.js-off p { margin-top: 14px; }
.js-off .js-off-links { margin-top: 22px; font-size: 13px; }
.js-off .js-off-links a { color: #e50914; font-weight: 700; }

@keyframes shimmer { to { background-position: -200% 0; } }

/* ─────────────── LOAD MORE ─────────────── */

.load-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-top: 36px;
}

.load-more {
  padding: 15px 44px;
  border-radius: 8px;
  border: 2px solid var(--red);
  background: transparent;
  color: var(--red-bright);
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 3px;
  transition: all 0.2s;
}

.load-more:hover { background: var(--red); color: #fff; box-shadow: 0 6px 30px var(--accent-glow-strong); transform: translateY(-1px); }
.load-more:active { transform: translateY(0); }

.load-status { font-size: 13px; color: var(--dim); min-height: 18px; }

/* Full-grid error/empty states - was inline (grid-column etc.) on the
   load-status template in app.js; now classes. */
.load-status.full { grid-column: 1/-1; text-align: center; padding: 60px 0; }
.btn-retry {
  background: var(--red);
  border: none;
  color: #fff;
  padding: 8px 18px;
  border-radius: 6px;
  font-weight: 800;
  margin-left: 6px;
  cursor: pointer;
}
.btn-retry:hover { filter: brightness(1.12); }

/* ─────────────── AD SLOTS (mid-grid / side rails / bottom) ─────────────── */

/* Mid-page ad slot - a normal full-width box in the page flow (the ad
   "between content" above the video grid). No sticky overlays. */
.ad-slot {
  margin-top: 48px;
}

.ad-label {
  display: block;
  text-align: center;
  font-size: 10.5px;
  letter-spacing: 3px;
  color: var(--dim);
  margin-bottom: 10px;
}

.ad-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  padding: 44px 20px;
  text-align: center;
  background: var(--panel);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.ad-box:hover { border-color: var(--red); box-shadow: 0 0 30px rgba(229, 9, 20, 0.15); }

.ad-box-big {
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 3px;
  color: var(--muted);
}

.ad-box-contact {
  font-size: 13px;
  font-weight: 700;
  color: var(--red-bright);
  letter-spacing: 0.5px;
}

/* shared banner (side rails + bottom strip) */
.ad-banner,
.ad-box {
  position: relative;
}

.ad-banner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  text-align: center;
  /* min-height animates so a size rotation morphs smoothly as the ad fades
     back in, instead of the grid below snapping up/down */
  transition: opacity 0.35s ease, min-height 0.45s ease, border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.ad-box {
  transition: opacity 0.35s ease, min-height 0.45s ease, border-color 0.2s, box-shadow 0.2s;
}

/* fade-out phase while a rotating ad swaps its creative */
.ad-fading { opacity: 0; }

/* ── rotating creative size variants ── */
.ad-size-h1 { min-height: 64px; }
.ad-size-h2 { min-height: 96px; }
.ad-size-h3 { min-height: 128px; }

.ad-size-v1 { min-height: 300px; }
.ad-size-v2 { min-height: 380px; }
.ad-size-v3 { min-height: 460px; }

.ad-size-m1 { min-height: 200px; }
.ad-size-m2 { min-height: 260px; }
.ad-size-m3 { min-height: 320px; }

/* ── rotating creative color themes ── */
.ad-theme-classic { background: var(--panel); }

.ad-theme-sponsored {
  border-color: var(--red-dark);
  background: linear-gradient(180deg, #1a0d0e, var(--panel));
}
.ad-theme-sponsored .ad-tag {
  border-color: var(--red);
  color: var(--red-bright);
}

.ad-theme-promoted {
  border-color: #8a6d00;
  background: linear-gradient(180deg, #171503, var(--panel));
}
.ad-theme-promoted .ad-tag {
  border-color: var(--yellow);
  color: var(--yellow);
}

.ad-theme-gradient {
  border-color: #7a1f2a;
  background: linear-gradient(135deg, #1c0d10, #141419 55%, #1d0f06);
}
.ad-theme-gradient .ad-tag {
  border-color: #c2303e;
  color: #ff5a66;
}

/* click counter badge removed - no visible analytics on ads */

.ad-banner:hover {
  border-color: var(--red);
  box-shadow: 0 0 34px rgba(229, 9, 20, 0.2);
  transform: translateY(-2px);
}

.ad-tag {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--dim);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 2px 7px;
}

.ad-text {
  font-family: var(--font-display);
  letter-spacing: 2px;
  color: var(--muted);
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
}

/* sponsor image banner (AD_IMG / per-slot img) - fills the slot's frame */
.ad-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
  display: block;
}

/* rails are narrow (vertical slots) - the image adapts to the frame */
.ad-banner-v .ad-img {
  width: 100%;
  height: auto;
}

/* horizontal banners (bottom strip, in-grid) keep the image centered */
.ad-banner-h .ad-img,
.ad-in-grid .ad-img {
  max-height: 120px;
}

/* mid-page box variant */
.ad-box .ad-img {
  max-height: 160px;
}

.ad-contact {
  font-weight: 700;
  color: var(--red-bright);
  font-size: 12px;
  word-break: break-all;
}

/* page shell - main column flanked by sticky side rails */
.page-shell {
  max-width: 1780px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: flex-start;
  gap: 24px;
}

.page-shell .main {
  flex: 1 1 auto;
  min-width: 0;
  max-width: none;
}

.ad-rail {
  flex: 0 0 170px;
  width: 170px;
  /* Side ads scroll with the page as normal boxes - nothing pinned - and
     KEEP COMING BACK: app.js appends a fresh set of boxes further down
     the sidebar as you scroll, so the sides never run dry and ads pop
     up on the sides as you scroll down. */
  align-self: flex-start;
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 40px;
}

.ad-rail .ad-banner-v {
  flex: 0 0 auto;
}

.ad-banner-v { padding: 26px 12px; }
.ad-banner-v .ad-text { font-size: 11px; letter-spacing: 1px; }
.ad-banner-v .ad-contact { font-size: 9px; letter-spacing: 0.2px; }

/* bottom strip - stuck to the page, not the viewport: it sits between
   the content and the footer and scrolls away with the page, so it never
   follows you around the screen. */
.ad-bottom {
  max-width: 1780px;
  margin: 0 auto;
  padding: 10px 24px;
}
.ad-bottom .ad-banner-h {
  box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.35);
}

.ad-banner-h {
  flex-direction: row;
  gap: 22px;
  padding: 20px 32px;
}

.ad-banner-h .ad-text { font-size: 20px; }
.ad-banner-h .ad-contact { font-size: 15px; }

/* in-grid ad - full-width banner row spanning all grid columns, a normal
   box in the grid flow (App.js appends it directly to the grid). */
.ad-in-grid {
  grid-column: 1 / -1;
  flex-direction: row;
  gap: 22px;
  padding: 20px 32px;
}

.ad-in-grid .ad-text { font-size: 20px; }
.ad-in-grid .ad-contact { font-size: 15px; }

/* Side rails NEVER disappear - they slim down as the viewport shrinks
   (170px desktop / 140px laptop / 120px small window) and on phones they
   turn into horizontal scroll rows below the grid, so the ads are always
   there at every size. */
@media (max-width: 1199px) and (min-width: 1001px) {
  .ad-rail { flex: 0 0 140px; width: 140px; }
  .ad-banner-v { padding: 20px 10px; }
}
@media (max-width: 1000px) and (min-width: 641px) {
  .ad-rail { flex: 0 0 120px; width: 120px; }
  .ad-banner-v { padding: 18px 8px; }
}
@media (max-width: 640px) {
  .page-shell { flex-direction: column; }
  .page-shell .main { order: 1; width: 100%; }
  .ad-rail {
    order: 2;
    flex: none;
    width: 100%;
    flex-direction: row;
    overflow-x: auto;
    gap: 12px;
    margin-top: 24px;
  }
  .ad-rail-right { order: 3; }
  .ad-rail .ad-banner-v { flex: 0 0 140px; min-height: 140px; padding: 16px 8px; }
}

@media (max-width: 720px) {
  .ad-banner-h,
  .ad-in-grid { flex-direction: column; gap: 8px; text-align: center; }
}

/* ─────────────── SEO NOTE (visible keyword-rich intro) ─────────────── */

.seo-note {
  max-width: 860px;
  margin: 0 auto;
  padding: 48px 24px 40px;
  text-align: center;
  border-top: 1px solid var(--line);
}

.seo-note-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 14px;
}

.seo-note-p {
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.75;
  max-width: 700px;
  margin: 0 auto 12px;
}

.seo-note-p strong { color: #fff; font-weight: 700; }
.seo-note-p a { color: var(--green); text-decoration: none; font-weight: 600; }
.seo-note-p a:hover { text-decoration: underline; }

@media (max-width: 560px) {
  .seo-note { padding: 36px 20px 32px; }
  .seo-note-title { font-size: 14px; }
}

/* ─────────────── FAQ (long-tail Q&A, mirrors FAQPage schema) ─────────────── */

.seo-faq {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px 56px;
}

.seo-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
  color: var(--dim);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .7px;
  text-transform: uppercase;
}
.seo-breadcrumbs a { color: var(--muted); }
.seo-breadcrumbs a:hover { color: var(--red-bright); }
.seo-breadcrumbs span:last-child { color: var(--red-bright); }

.seo-faq-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #fff;
  text-align: center;
  margin-bottom: 22px;
}

/* Phones: shrink the FAQ gutters and give summaries a taller tap target. */
@media (max-width: 560px) {
  .seo-faq { padding: 0 16px 40px; }
  .seo-faq-item summary { padding: 14px 14px; }
}

.seo-faq-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  margin-bottom: 10px;
  overflow: hidden;
}

.seo-faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 14px 18px;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.3px;
  display: flex;
  align-items: center;
  gap: 10px;
  user-select: none;
}

.seo-faq-item summary::before {
  content: "▸";
  color: var(--green);
  font-size: 12px;
  transition: transform 0.18s ease;
}

.seo-faq-item[open] summary::before {
  transform: rotate(90deg);
}

.seo-faq-item summary::-webkit-details-marker { display: none; }
.seo-faq-item summary:focus-visible { outline: 2px solid var(--green); outline-offset: -2px; }

.seo-faq-item p {
  padding: 0 18px 16px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.7;
}

/* ─────────────── FOOTER ─────────────── */

.footer {
  border-top: 1px solid var(--line);
  background: var(--bg-2);
  padding: 48px 24px 40px;
}

.footer-inner {
  max-width: 1440px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr 1fr;
  gap: 40px;
}

@media (max-width: 900px) { .footer-inner { grid-template-columns: 1fr 1fr; gap: 28px; } }
@media (max-width: 560px) { .footer-inner { grid-template-columns: 1fr; } }

.footer-brand p {
  margin-top: 14px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.6;
  max-width: 360px;
}

.footer-col { display: flex; flex-direction: column; gap: 11px; }
.footer-col-title {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 4px;
}
.footer-col a { color: var(--muted); font-size: 13.5px; font-weight: 600; transition: color 0.15s, padding-left 0.15s; }
.footer-col a:hover { color: var(--red-bright); padding-left: 4px; }

.footer-note { color: var(--dim); font-size: 12.5px; line-height: 1.7; }
.footer-note strong { color: var(--muted); }

/* ─────────────── PLAYER MODAL ─────────────── */

.player-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fade-in 0.22s ease;
}

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

.player-shell {
  position: relative;
  width: min(1080px, 100%);
  max-height: 94vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.8);
  animation: modal-in 0.28s cubic-bezier(0.2, 0.8, 0.3, 1.2);
}

@keyframes modal-in {
  from { opacity: 0; transform: scale(0.94) translateY(16px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.player-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 5;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  display: grid;
  place-items: center;
  backdrop-filter: blur(6px);
  transition: background 0.18s, transform 0.15s;
}

.player-close:hover { background: var(--red); transform: rotate(90deg); }

.player-stage {
  position: relative;
  background: #000;
  /* The stage shrink-wraps whatever the video renders at, capped so it
     never exceeds the modal or the viewport height. No fixed aspect-ratio:
     portrait fights (9:16) get a tall centered box, landscape (16:9) get
     a wide one - exactly like a YouTube/TikTok player. */
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 240px;    /* skeleton area while metadata loads */
  max-height: 72vh;
  max-width: 100%;
  align-self: center;   /* don't stretch to the shell's full width */
  /* The modal shell is a column flex with max-height - without this it
     squashes the stage below the video's natural height and the video
     spills out of its box. The stage must keep the video's size. */
  flex: 0 0 auto;
}

.player-stage video {
  /* Let the video's OWN intrinsic ratio decide its box: width/height auto
     + max constraints = scales down to fit without ever distorting or
     overflowing. The old fixed height:100% made the stage balloon to the
     video's full resolution (only its top-left corner visible). */
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 72vh;
  display: block;
  object-fit: contain;
}

.player-stage iframe.player-frame {
  /* YouTube cards: the iframe fills the stage like the video would (16:9
     aspect), capped to the same box so the modal never balloons. */
  width: min(100%, 960px);
  aspect-ratio: 16 / 9;
  max-height: 72vh;
  display: block;
  border: 0;
  background: #000;
}

.player-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* skeleton loader for the player (replaces the old spinner) */
.player-skeleton {
  width: 78%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Player-overlay placeholder text helpers - was inline styles on the
   PLACEHOLDER_* templates in app.js; now classes. */
.ph-msg { margin-top: 14px; }

.sk {
  border-radius: 6px;
  background: linear-gradient(100deg, #19191d 40%, #25252b 50%, #19191d 60%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}

.sk-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  border: 1px solid var(--line);
}

.sk-line { height: 14px; }

.player-info { padding: 22px 26px 26px; overflow-y: auto; }

/* Phones: the player goes full-bleed (no gutters, no rounded frame) so
   the video + info use the whole screen - the modal feels native. Placed
   AFTER the base rules so it actually overrides them. */
@media (max-width: 640px) {
  .player-overlay { padding: 0; }
  .player-shell {
    width: 100%;
    max-height: 100dvh;
    height: 100dvh;
    border-radius: 0;
    border: 0;
  }
  .player-stage { max-height: 45vh; min-height: 200px; }
  .player-stage iframe.player-frame { max-height: 45vh; }
  .player-info { padding: 18px 16px 24px; }
  .player-close { top: 10px; right: 10px; width: 40px; height: 40px; }
}

.player-badges { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }

.player-title {
  font-family: var(--font-display);
  font-size: clamp(18px, 2.4vw, 26px);
  line-height: 1.25;
  text-transform: uppercase;
}

.player-meta {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.player-meta .views { color: var(--yellow); }

.player-meta .emb-zero { color: var(--dim); opacity: 0.8; }

.player-tags { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px; }

/* share row - per-fight shareable /watch/<id> URLs (X, WhatsApp, copy,
   native sheet). Hidden until a fight with an id is open. */
.player-share {
  margin-top: 18px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.player-share-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--dim);
  margin-right: 4px;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.16s;
}

.share-btn:hover {
  color: #fff;
  border-color: var(--red);
  transform: translateY(-1px);
}

/* "Watch on [platform]" - the direct link out stands apart from the
   share actions (accent-filled, like the load-more button). */
.share-watch {
  border-color: var(--red);
  background: var(--red);
  color: #fff;
  font-weight: 700;
}

.share-watch:hover {
  background: var(--red-bright);
  border-color: var(--red-bright);
  color: #fff;
}

.share-x:hover { background: #000; border-color: #444; }
.share-wa:hover { background: #075e54; border-color: #075e54; }
.share-tg:hover { background: #229ed9; border-color: #229ed9; }
.share-rd:hover { background: #ff4500; border-color: #ff4500; }
.share-fb:hover { background: #1877f2; border-color: #1877f2; }
.share-copy:hover { background: var(--red); border-color: var(--red); }
.share-embed:hover { background: var(--panel-2); border-color: var(--yellow); color: var(--yellow); }
.share-native:hover { background: var(--panel-2); border-color: var(--red); }

/* Embed reveal panel - the same copy-paste surface as the watch page:
   selectable code, copy button, live ?embed=1 preview. Inline in the app
   player so the snippet it offers is always the same embeddable player. */
.embed-panel {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  padding: 14px;
}

.embed-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.embed-title {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--muted);
  text-transform: uppercase;
}

.embed-close {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--muted);
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  transition: all 0.16s;
}

.embed-close:hover {
  border-color: var(--red);
  color: #fff;
}

.embed-intro {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: 10px;
}

.embed-code {
  width: 100%;
  min-height: 64px;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11.5px;
  line-height: 1.5;
  padding: 10px 12px;
  resize: vertical;
  outline: none;
}

.embed-code:focus { border-color: var(--red); }

.embed-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.embed-copy {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: 8px;
  border: none;
  background: var(--red);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.18s;
}

.embed-copy:hover {
  background: var(--red-bright);
  transform: translateY(-1px);
  box-shadow: 0 4px 18px rgba(229, 9, 20, 0.4);
}

.embed-hint {
  font-size: 11px;
  color: var(--dim);
  font-weight: 600;
}

.embed-preview {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #000;
}

.embed-preview iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16/9;
  border: 0;
  background: #000;
}

/* ─────────────── MOBILE TOPBAR FIX ───────────────
   On narrow phones the logo (195px) + actions (135px) + gaps + padding
   exceeded 379px, shaving the LIVE button's edge and overflowing the
   layout. Tighter paddings/gaps + a shrinkable logo keep everything in
   bounds down to ~320px wide. */

@media (max-width: 480px) {
  .topbar-inner { padding: 0 14px; gap: 12px; }
  .logo { gap: 8px; }
  .logo-globe { font-size: 20px; }
  .logo-text { font-size: 15px; letter-spacing: 0.5px; }
  .topbar-actions { gap: 8px; }
  .btn-hot { padding: 7px 10px; font-size: 10px; gap: 5px; }
  .btn-clips { min-height: 34px; padding: 0 8px; font-size: 9px; letter-spacing: .5px; }
  .icon-btn { width: 34px; height: 34px; }
  /* narrow screens: the platform dropdown hides - the filter pills + tag
     chips below the hero still reach every platform. */
  .type-menu { display: none; }
}

/* ══════════ Platform theming ══════════
   When a platform filter is active, the whole accent palette flips to
   that platform's brand color (Twitch purple, Kick green, YouTube red)
   while the background stays black. Driven by [data-theme] on <html>,
   set by app.js when the user picks a platform. The accent vars below
   are what every red-tinted element reads (ticker, pills, buttons,
   badges, play overlays), so one swap re-themes the whole page. */

html[data-theme="twitch"] {
  --red: #9146ff;
  --red-bright: #b17dff;
  --red-dark: #6b21d9;
  --accent-glow: rgba(145, 70, 255, 0.35);
  --accent-glow-strong: rgba(145, 70, 255, 0.55);
}

html[data-theme="kick"] {
  --red: #17cc42;
  --red-bright: #53e676;
  --red-dark: #0e8f2e;
  --accent-glow: rgba(23, 204, 66, 0.35);
  --accent-glow-strong: rgba(23, 204, 66, 0.55);
}

html[data-theme="youtube"] {
  --red: #ff2233;
  --red-bright: #ff5a64;
  --red-dark: #cc1b29;
  --accent-glow: rgba(255, 34, 51, 0.35);
  --accent-glow-strong: rgba(255, 34, 51, 0.55);
}

/* default (all platforms) stays the classic red */
:root {
  --accent-glow: rgba(229, 9, 20, 0.35);
  --accent-glow-strong: rgba(229, 9, 20, 0.55);
}

/* The site hardcodes a few rgba(229,9,20,…) glow shadows instead of using
   a var - remap them through the glow vars so themes reach everywhere. */
.btn-hot {
  box-shadow: 0 0 18px var(--accent-glow);
}
.btn-hot:hover {
  box-shadow: 0 0 28px var(--accent-glow-strong);
}
.pill.active {
  box-shadow: 0 2px 12px var(--accent-glow);
}
.hero-badge {
  box-shadow: 0 4px 24px var(--accent-glow);
}
.vcard:hover {
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.6), 0 0 0 1px var(--accent-glow);
}
.play-circle {
  box-shadow: 0 0 0 0 var(--accent-glow);
}
.vcard:hover .play-circle {
  box-shadow: 0 0 40px var(--accent-glow-strong);
}
@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 var(--accent-glow); }
  70% { box-shadow: 0 0 0 18px rgba(229, 9, 20, 0); }
  100% { box-shadow: 0 0 0 0 rgba(229, 9, 20, 0); }
}
.offline-note {
  border-left: 4px solid var(--yellow);
}
.hero {
  background:
    linear-gradient(180deg, rgba(6, 6, 6, 0.88) 0%, rgba(5, 5, 5, 0.55) 45%, rgba(5, 5, 5, 0.92) 100%),
    radial-gradient(ellipse at 30% 20%, var(--accent-glow), transparent 55%),
    linear-gradient(180deg, #0a0a0a 0%, #050505 100%),
    var(--hero-img, none);
}

/* ══════════ CLIPRAIDER stream additions (append - win specificity) ══════════ */

.live-badge {
  position: absolute;
  left: 10px;
  top: 10px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.8px;
  padding: 4px 9px;
  border-radius: 5px;
  text-transform: uppercase;
  color: #fff;
  background: rgba(0, 0, 0, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.live-badge.platform-twitch { background: rgba(145, 70, 255, 0.88); border-color: rgba(177, 113, 255, 0.5); }
.live-badge.platform-kick { background: rgba(23, 204, 66, 0.85); border-color: rgba(83, 230, 118, 0.45); }
.live-badge.platform-youtube { background: rgba(255, 34, 51, 0.88); border-color: rgba(255, 90, 100, 0.5); }

.follow-star-btn {
  position: absolute;
  right: 10px;
  top: 10px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.72);
  color: #cfcfd6;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform 0.15s, color 0.15s, background 0.15s;
  z-index: 2;
}

.follow-star-btn:hover { transform: scale(1.14); color: #ffd75e; }
.follow-star-btn.on { color: #ffd400; background: rgba(60, 44, 0, 0.85); }

/* Touch: the 32px star is below the ~44px recommended tap target - bump
   it on coarse pointers so following isn't a fat-finger exercise. */
@media (pointer: coarse) {
  .follow-star-btn { width: 40px; height: 40px; font-size: 19px; }
}

.empty-note {
  grid-column: 1 / -1;
  padding: 56px 20px;
  text-align: center;
  color: var(--dim);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent);
  /* faint scanline - the console "no signal" look */
  background-image: repeating-linear-gradient(
    0deg,
    transparent 0 2px,
    rgba(255, 255, 255, 0.02) 2px 3px
  );
}

.pill-badge {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 5px 11px;
  border-radius: 5px;
  text-transform: uppercase;
  color: #fff;
  background: var(--panel-2);
  border: 1px solid var(--line);
}
.pill-badge.platform-twitch { background: #9146ff; border-color: #b17dff; }
.pill-badge.platform-kick { background: #17cc42; border-color: #53e676; }
.pill-badge.platform-youtube { background: #ff2233; border-color: #ff5a64; }

.follow-btn {
  margin-top: 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 11px 20px;
  border-radius: var(--radius);
  cursor: pointer;
  background: var(--panel-2);
  color: var(--dim);
  border: 1px solid var(--line);
  transition: all 0.18s;
}
.follow-btn:hover { border-color: #ffd400; color: #fff; transform: translateY(-2px); }
.follow-btn.on {
  background: linear-gradient(135deg, #ff7a00, #ffd400);
  color: #241a00;
  border-color: transparent;
  box-shadow: 0 4px 22px rgba(255, 190, 0, 0.35);
}
.follow-star { font-size: 16px; }

.player-note {
  margin-top: 14px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}
.player-note b { color: var(--dim); }

#liveBtn.is-live .pulse-dot { animation: pulse-ring 1.6s infinite; }

/* TOP CLIPS rail - same snap-rail treatment as the stream rails. */
.top-clips {
  margin-bottom: 36px;
}

.top-clips-title {
  font-family: var(--font-display);
  font-size: 17px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.top-clips-title::before {
  content: "";
  width: 6px;
  height: 22px;
  background: var(--red);
  border-radius: 3px;
}

.top-clips-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--line), transparent);
}

.top-clips-rail {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 8px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: var(--red) transparent;
}

.top-clips-rail .tr-card {
  flex: 0 0 210px;
  scroll-snap-align: start;
}

@media (max-width: 520px) {
  .top-clips-rail .tr-card {
    flex-basis: 168px;
  }
}

/* Narrow screens: let the platform pills + refresh button wrap onto a
   second line instead of pushing the page wide (horizontal overflow). */
@media (max-width: 620px) {
  .sort-pills {
    flex-wrap: wrap;
  }
  .grid-controls {
    width: 100%;
  }
}

/* Anchor targets clear the sticky topbar + ticker so deep links like
   /#topClips land on the section heading instead of under the header. */
#heroSection, #trending, #newToday, #topClips, #top-clips {
  scroll-margin-top: 96px;
}

/* ─────────────── BACK TO TOP ───────────────
   Floating button that appears after scrolling; the ring around the
   arrow is a scroll-progress arc (conic-gradient driven by --progress,
   set from app.js). Accent color themes with the platform, like
   everything else. Sits above the sticky bottom ad bar. */

.to-top {
  position: fixed;
  right: 24px;
  bottom: 96px;
  z-index: 90;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  transition: transform 0.18s, border-color 0.18s, color 0.18s;
  background-image: conic-gradient(
    var(--red) calc(var(--progress, 0) * 1turn),
    rgba(255, 255, 255, 0.09) 0
  );
}

.to-top::before {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: var(--panel-2);
  border: 1px solid var(--line);
}

.to-top svg {
  position: relative;
  z-index: 1;
  transition: transform 0.18s;
}

.to-top:hover {
  transform: translateY(-2px);
  border-color: var(--red);
  color: var(--red-bright);
}
.to-top:hover svg { transform: translateY(-2px); }
.to-top:focus-visible { outline: 2px solid var(--red-bright); outline-offset: 3px; }

@media (max-width: 640px) {
  .to-top {
    right: 14px;
    bottom: 86px;
    width: 42px;
    height: 42px;
  }
}

/* feed-freshness chip next to Refresh */
.updated-chip {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: var(--dim);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* toast */
.toast {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 300;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-left: 4px solid var(--green);
  color: var(--text);
  padding: 13px 22px;
  border-radius: 9px;
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
  animation: toast-in 0.3s cubic-bezier(0.2, 0.8, 0.3, 1.3);
}

.toast.error { border-left-color: var(--red); }

@keyframes toast-in {
  from { opacity: 0; transform: translateX(-50%) translateY(16px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* scrollbar */
::-webkit-scrollbar { width: 11px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--panel-2); border-radius: 6px; border: 2px solid var(--bg); }

/* Global visible focus - every interactive element gets a clear focus
   ring for keyboard users. Elements with their own :focus-visible rule
   (cards, to-top) keep it; this catches pills, links, buttons, chips. */
:focus-visible {
  outline: 2px solid var(--red-bright);
  outline-offset: 2px;
}
::-webkit-scrollbar-thumb:hover { background: var(--red-dark); }

/* ─────────────── MOBILE POLISH (touch feel + safe areas) ───────────────
   No grey tap-flash on links/buttons, and every fixed overlay respects
   the home-indicator notch via env(safe-area-inset-bottom) so nothing
   sits under the gesture bar. */

* { -webkit-tap-highlight-color: transparent; }

@media (max-width: 640px) {
  /* the live ticker is 12px/3px spacing on desktop - too wide for a
     phone screen, so tighten it so names don't overlap the edges. */
  .ticker-track { font-size: 10.5px; letter-spacing: 2px; }
  /* toast: wider + centered text so it reads on a small screen. */
  .toast {
    bottom: calc(18px + env(safe-area-inset-bottom));
    width: min(92vw, 420px);
    text-align: center;
    padding: 12px 16px;
  }
  /* back-to-top clears the home-indicator notch. */
  .to-top { bottom: calc(86px + env(safe-area-inset-bottom)); }
  /* update banner: full-width bar instead of a cramped floating chip. */
  .sw-update {
    left: 12px;
    right: 12px;
    transform: none;
    justify-content: space-between;
    bottom: calc(12px + env(safe-area-inset-bottom));
  }
  /* bottom ad strip: pads above the notch and tightens the gutters. */
  .ad-bottom { padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); }
}
