/* LiveSportsDash — hand-written styles (moved from dashboard.html's <style> block, unchanged).
   Loaded BEFORE tailwind.css, matching the old page where the Tailwind CDN injected its styles after this block. */
* {
  font-family: 'Helvetica', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif !important;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
}

body, html {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: #050505;
  color: #ffffff;
  user-select: none;
}

/* Peripheral soft vignette so center stage is crystal clear */
.perimeter-vignette {
  background: radial-gradient(
    ellipse at center,
    rgba(0, 0, 0, 0) 35%,
    rgba(0, 0, 0, 0.45) 75%,
    rgba(0, 0, 0, 0.85) 100%
  );
}

/* Floating high-contrast typography shadows */
.hud-glow {
  text-shadow: 0 1px 3px rgba(0,0,0,0.9), 0 3px 12px rgba(0,0,0,0.85), 0 0 24px rgba(0,0,0,0.7);
}
.hud-subtle {
  text-shadow: 0 1px 2px rgba(0,0,0,0.9), 0 2px 8px rgba(0,0,0,0.8);
}

/* Continuous smooth news marquee */
@keyframes marquee {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-50%, 0, 0); }
}
.animate-marquee {
  display: inline-flex;
  white-space: nowrap;
  animation: marquee 55s linear infinite;
}
.animate-marquee:hover {
  animation-play-state: paused;
}

/* Tactical chalkboard dashed route animation */
@keyframes dashCycle {
  to { stroke-dashoffset: -20; }
}
.chalk-line {
  stroke-dasharray: 6 4;
  animation: dashCycle 2s linear infinite;
}

/* Fluid Typography Classes for 10-foot scale readability
   (values scaled to 2/3 of original — all dashboard text reduced 1/3) */
.stat-text {
  font-size: clamp(0.6rem, 1.867cqw, 0.933rem);
  line-height: 1.2;
}
.stat-digits {
  font-size: clamp(0.667rem, 2.133cqw, 1.067rem);
  font-weight: 700;
}
/* Fluid chrome classes: the card-chrome boxes (header, dispatch box, stat panels)
   already scale their TEXT with card width via clamp()/cqw above, but their own
   padding/gaps were fixed rem — at small card sizes (many concurrent live games,
   narrow mobile cards) that fixed chrome doesn't shrink along with the card and can
   visually collide with neighboring boxes. These give the wrapping boxes the same
   fluid treatment so the whole card scales as one system, not just its text. */
.card-pad-lg { padding: clamp(0.25rem, 1.2cqw, 1rem); }
.card-pad-md { padding: clamp(0.2rem, 0.7cqw, 0.375rem) clamp(0.3rem, 1cqw, 0.75rem); }
.card-pad-sm { padding: clamp(0.2rem, 0.7cqw, 0.75rem); }
.card-gap-sm { gap: clamp(0.15rem, 0.5cqw, 0.5rem); }
.card-gap-md { gap: clamp(0.2rem, 0.8cqw, 1rem); }

/* Makes each card a CSS "container", so the cqw sizes above are a share of the CARD's width.
   The old page expected Tailwind's container-queries plugin to supply this, but loaded the
   Tailwind CDN without it, so cqw silently used the browser window's width instead: on laptop
   and desktop screens card text and boxes grew too big for the card and overlapped (5–20
   overlapping box pairs measured at 1280–1920 px wide; 0 with this rule). Delete this one
   rule to get the old sizing back. */
.\@container { container-type: inline-size; }

/* === Global text-size reduction ===========================================
   Every Tailwind text-size utility class actually used in this file,
   overridden to 2/3 of its default value (i.e. all text reduced by a
   third). !important is required here because Tailwind's CDN script
   injects its own utility stylesheet into <head><meta charset="utf-8"> at runtime, sometimes
   after this hand-written <style> block, so a same-specificity class
   selector alone isn't guaranteed to win the cascade. */
.text-xs { font-size: 0.5rem !important; }
.text-sm { font-size: 0.583rem !important; }
.text-2xl { font-size: 1rem !important; }
.text-5xl { font-size: 2rem !important; }
.text-\[8px\] { font-size: 6.5px !important; } /* floored above a literal 2/3 (5.33px) for legibility */
.text-\[9px\] { font-size: 6.5px !important; } /* floored above a literal 2/3 (6px) for legibility */
.text-\[10px\] { font-size: 6.67px !important; }
.text-\[11px\] { font-size: 7.33px !important; }
@media (min-width: 640px) {
  .sm\:text-sm { font-size: 0.583rem !important; }
  .sm\:text-2xl { font-size: 1rem !important; }
  .sm\:text-6xl { font-size: 2.5rem !important; }
}
@media (min-width: 768px) {
  .md\:text-7xl { font-size: 3rem !important; }
}

/* Kiosk/TV optimization: Zero visible scrollbars */
* {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

/* === Ad placements =========================================================
   Every ad box below reserves its exact pixel size the instant it's created
   (before any network request fires), so nothing about ad loading ever
   shifts the surrounding HUD layout — same principle as the rest of this
   dashboard's fixed-viewport design. */
.ad-slot {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: rgba(255,255,255,0.03);
  border-radius: 8px;
}
.ad-slot--empty {
  background: repeating-linear-gradient(45deg, rgba(255,255,255,0.03), rgba(255,255,255,0.03) 10px, rgba(255,255,255,0.06) 10px, rgba(255,255,255,0.06) 20px);
}
.ad-slot iframe { display: block; border: 0; }

/* Tactical-grid ad card: matches the exact card chrome (rounded-xl, aspect
   ratio, @container) used by real sport cards, so it visually scales with
   them. The ad creative itself stays pixel-perfect at its native size and
   is scaled as a whole via transform, rather than stretched, so nothing
   inside it is ever distorted. */
.ad-tactical-card .ad-slot-scaler {
  transform-origin: center center;
}

/* Persistent sidebar skyscraper */
#ad-sidebar-container .ad-slot {
  width: 160px;
  height: 600px;
}

/* Sticky bottom footer ad: only one of the two sizes is ever visible at a
   time, chosen by viewport width — the hidden one never intersects, so
   IntersectionObserver naturally skips loading it. */
.ad-slot[data-ad='footer-mobile'] { display: none; }
@media (max-width: 900px) {
  .ad-slot[data-ad='footer-leaderboard'] { display: none; }
  .ad-slot[data-ad='footer-mobile'] { display: flex; }
}

/* === Mobile portrait mode ==================================================
   Below 900px this stops being a fixed, non-scrolling kiosk screen and
   becomes a normal scrolling phone page. Live/upcoming game cards lead,
   with alerts/leaderboards, the clock/weather header, and the financial
   markets + news footer following underneath. Selectors below use the
   section IDs (or an ID-scoped child combinator) specifically because an
   ID beats the single-class Tailwind utilities already on these elements
   (.h-full, .flex-1, .items-center, etc.) without needing !important. The
   one exception is body/html height, which Tailwind's own `.h-screen`
   class on <body> outranks a bare tag selector for — that one override is
   deliberately !important. */
@media (max-width: 900px) {
  html, body {
    overflow: auto;
    height: auto !important;
    min-height: 100%;
  }

  #hud-burnin-wrapper {
    flex-direction: column;
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
  }

  #hud-main-column {
    height: auto;
    justify-content: flex-start;
  }

  /* Reorder: live game cards first, then alerts/leaderboards, then the
     clock/weather header, then the financial/news footer last. */
  #hud-main-column > main { order: 1; }
  #nfl-alerts-container { order: 2; }
  #leaderboard-strip-container { order: 3; }
  #hud-main-column > header { order: 4; }
  #hud-main-column > footer { order: 5; }

  #hud-main-column > main {
    flex: none;
    overflow: visible;
    align-items: stretch;
    justify-content: flex-start;
    margin: 0.75rem 0;
  }

  #playbook-hud-container {
    height: auto;
  }
}

/* Live soccer / hockey cards (assets/js/legacy/live-detail.js): ball & puck ping, goal light, players breathing */
@keyframes lsdPing { 0% { transform: scale(0.6); opacity: 0.95; } 100% { transform: scale(2.6); opacity: 0; } }
.lsd-ping { transform-box: fill-box; transform-origin: center; animation: lsdPing 1.6s ease-out infinite; }
@keyframes lsdLamp { 0%, 100% { opacity: 0.25; } 50% { opacity: 1; } }
.lsd-lamp { animation: lsdLamp 0.6s ease-in-out infinite; }
@keyframes lsdDrift { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(var(--dx, 4px), var(--dy, -4px)); } }
.lsd-drift { transform-box: fill-box; animation: lsdDrift 3.2s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .lsd-ping, .lsd-lamp, .lsd-drift { animation: none; } }