/* =====================================================================
   v5.18.0 — BROADCAST SPONSOR INTEGRATION
   Replaces the old top "sponsorBanner" with broadcast-style placements:
     1. Pitch-side LED loop: SPONSORED BY FREETIPS.COM
     2. Scorebar Stake broadcaster bug (decorative)
     3. Half-time bumper card "presented by Stake.com" + CTA
     4. End-of-match Stake interstitial modal (once per match)
   ===================================================================== */

/* ---------------------------------------------------------------------
   1. PITCH-SIDE LED HOARDING
   The actual LED loop is rendered IN the pitch canvas (match.js drawHoarding
   slots) so the perspective + scroll match the broadcast camera. The styles
   below are kept only for the optional CSS overlay path — currently disabled.
   --------------------------------------------------------------------- */
.pitch-wrap { position: relative; }

.led-hoarding { display: none !important; } /* canvas owns this now */

.led-hoarding-css-overlay {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 26px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(0,0,0,0.55), rgba(0,0,0,0.85)),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.04) 0 2px, transparent 2px 4px);
  border-top: 1px solid rgba(30,219,138,0.32);
  border-bottom: 1px solid rgba(0,0,0,0.5);
  box-shadow: 0 -2px 14px rgba(30,219,138,0.10) inset;
  pointer-events: none;
  z-index: 6;
  transform: perspective(420px) rotateX(8deg);
  transform-origin: bottom center;
}
.led-hoarding::before,
.led-hoarding::after {
  /* Soft side fades to imply curving touchline */
  content: "";
  position: absolute; top: 0; bottom: 0; width: 60px;
  pointer-events: none; z-index: 2;
}
.led-hoarding::before { left: 0;  background: linear-gradient(90deg, rgba(0,0,0,0.95), rgba(0,0,0,0)); }
.led-hoarding::after  { right: 0; background: linear-gradient(270deg, rgba(0,0,0,0.95), rgba(0,0,0,0)); }

.led-track {
  display: flex; align-items: center; height: 100%;
  white-space: nowrap;
  animation: ledScroll 22s linear infinite;
  will-change: transform;
}
.led-cell {
  display: inline-flex; align-items: center; gap: 14px;
  padding: 0 36px;
  font-family: 'Oswald', 'Inter', system-ui, sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 0 6px rgba(30,219,138,0.55), 0 0 18px rgba(30,219,138,0.25);
}
.led-cell .led-mark {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.22em;
  color: #1edb8a;
  border: 1px solid rgba(30,219,138,0.55);
  padding: 2px 7px;
  border-radius: 2px;
  background: rgba(30,219,138,0.08);
  text-shadow: none;
}
.led-cell .led-dot {
  display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: #1edb8a; box-shadow: 0 0 8px #1edb8a;
}

@keyframes ledScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@media (max-width: 620px) {
  .led-hoarding-css-overlay { height: 22px; transform: perspective(380px) rotateX(6deg); }
  .led-cell { font-size: 12px; padding: 0 28px; gap: 10px; }
  .led-cell .led-mark { font-size: 10px; padding: 1px 5px; }
}

/* Pause the LEDs when match is paused/finished/celebrating to keep focus on the moment */
body.match-paused .led-track,
body.celebrating  .led-track { animation-play-state: paused; }

/* ---------------------------------------------------------------------
   2. SCOREBAR STAKE BROADCASTER BUG
   Small decorative lockup tucked into the left of .sb-right.
   --------------------------------------------------------------------- */
.scorebar-stake-bug {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 8px;
  margin-right: 8px;
  border: 1px solid rgba(30,219,138,0.32);
  border-radius: 4px;
  background:
    linear-gradient(180deg, rgba(30,219,138,0.10), rgba(30,219,138,0.02));
  color: #e7edf5;
  font-family: 'Oswald', 'Inter', system-ui, sans-serif;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
  user-select: none;
  pointer-events: none; /* decorative only */
}
.scorebar-stake-bug .ssb-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #1edb8a;
  box-shadow: 0 0 6px #1edb8a;
  animation: ssbPulse 2.4s ease-in-out infinite;
}
.scorebar-stake-bug .ssb-pre {
  font-size: 8px;
  letter-spacing: 0.22em;
  color: #9fb6cd;
  font-weight: 500;
}
.scorebar-stake-bug .ssb-brand {
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.06em;
}
@keyframes ssbPulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.45; }
}
@media (max-width: 620px) {
  .scorebar-stake-bug { padding: 3px 6px; margin-right: 6px; font-size: 9px; gap: 4px; }
  .scorebar-stake-bug .ssb-pre { display: none; }
  .scorebar-stake-bug .ssb-brand { font-size: 10px; }
}

/* ---------------------------------------------------------------------
   3. HALF-TIME BUMPER CARD
   Centered overlay for ~4s when 1H ends.
   --------------------------------------------------------------------- */
.ht-bumper {
  position: fixed; inset: 0;
  display: none; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at center, rgba(5,10,18,0.62), rgba(5,10,18,0.88));
  z-index: 9990;
  pointer-events: none;
  opacity: 0;
  transition: opacity 280ms ease;
}
.ht-bumper.show { display: flex; opacity: 1; pointer-events: auto; }

.ht-bumper-card {
  position: relative;
  width: min(92vw, 560px);
  padding: 22px 26px 20px;
  border-radius: 10px;
  background:
    linear-gradient(180deg, #0b1320 0%, #07101a 100%);
  border: 1px solid rgba(30,219,138,0.42);
  box-shadow:
    0 0 0 1px rgba(0,0,0,0.6) inset,
    0 18px 60px rgba(0,0,0,0.7),
    0 0 32px rgba(30,219,138,0.18);
  transform: translateY(8px) scale(0.985);
  animation: htbIn 320ms cubic-bezier(.2,.8,.2,1) forwards;
  font-family: 'Inter', system-ui, sans-serif;
  color: #e7edf5;
}
@keyframes htbIn {
  to { transform: translateY(0) scale(1); }
}
.ht-bumper-eyebrow {
  display: flex; align-items: center; gap: 10px;
  font-family: 'Oswald', sans-serif;
  font-size: 11px; letter-spacing: 0.24em; text-transform: uppercase;
  color: #1edb8a; font-weight: 700;
}
.ht-bumper-eyebrow .htb-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #1edb8a; box-shadow: 0 0 8px #1edb8a;
}
.ht-bumper-title {
  margin-top: 6px;
  font-family: 'Oswald', sans-serif;
  font-size: clamp(28px, 5.4vw, 44px);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #fff;
  line-height: 1;
}
.ht-bumper-presented {
  margin-top: 10px;
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px;
  font-size: 13px; letter-spacing: 0.06em; color: #9fb6cd;
  text-transform: uppercase; font-weight: 600;
}
.ht-bumper-presented .htb-by { color: #6b7d93; font-weight: 500; }
.ht-bumper-presented .htb-brand {
  color: #fff; font-family: 'Oswald', sans-serif; font-size: 18px;
  font-weight: 700; letter-spacing: 0.04em;
}
.ht-bumper-offer {
  margin-top: 14px;
  padding: 10px 12px;
  border-left: 3px solid #1edb8a;
  background: rgba(30,219,138,0.06);
  border-radius: 0 4px 4px 0;
  font-size: 14px; line-height: 1.4; color: #e7edf5;
}
.ht-bumper-offer b {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px; letter-spacing: 0.14em;
  background: #1edb8a; color: #051d0d;
  padding: 2px 7px; border-radius: 2px;
  font-weight: 700;
}
.ht-bumper-cta {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 14px;
  padding: 12px 18px;
  background: linear-gradient(90deg, #1ad977 0%, #14b45e 100%);
  color: #051d0d;
  border-radius: 4px;
  font-family: 'Oswald', sans-serif;
  font-size: 15px; letter-spacing: 0.10em; text-transform: uppercase;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(30,219,138,0.25);
  transition: transform 120ms ease, box-shadow 120ms ease;
}
.ht-bumper-cta:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(30,219,138,0.32); }
.ht-bumper-cta .htb-arrow { transition: transform 160ms ease; }
.ht-bumper-cta:hover .htb-arrow { transform: translateX(3px); }
.ht-bumper-fineprint {
  margin-top: 10px;
  font-size: 10px; letter-spacing: 0.10em; color: #6b7d93;
  text-transform: uppercase;
}
.ht-bumper-progress {
  position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
  background: rgba(255,255,255,0.05); border-radius: 0 0 10px 10px; overflow: hidden;
}
.ht-bumper-progress > i {
  display: block; height: 100%; width: 100%;
  background: linear-gradient(90deg, #1edb8a, #14b45e);
  transform-origin: left center;
  animation: htbProg 4000ms linear forwards;
}
@keyframes htbProg {
  from { transform: scaleX(1); }
  to   { transform: scaleX(0); }
}
.ht-bumper-close {
  position: absolute; top: 8px; right: 8px;
  width: 28px; height: 28px;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 1px solid rgba(255,255,255,0.10);
  border-radius: 4px;
  color: #9fb6cd; font-size: 14px; cursor: pointer;
  font-family: inherit;
}
.ht-bumper-close:hover { color: #fff; border-color: rgba(255,255,255,0.25); }

@media (max-width: 620px) {
  .ht-bumper-card { padding: 18px 18px 16px; }
  .ht-bumper-cta { width: 100%; justify-content: center; }
}

/* ---------------------------------------------------------------------
   4. END-OF-MATCH STAKE INTERSTITIAL MODAL
   Fires once per match on full-time. localStorage-keyed.
   --------------------------------------------------------------------- */
.fm-modal {
  position: fixed; inset: 0;
  display: none; align-items: center; justify-content: center;
  background: rgba(2,6,12,0.78);
  z-index: 10010;
  opacity: 0;
  transition: opacity 240ms ease;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.fm-modal.show { display: flex; opacity: 1; }

.fm-modal-card {
  width: min(92vw, 480px);
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(30,219,138,0.12), transparent 60%),
    linear-gradient(180deg, #0b1320 0%, #07101a 100%);
  border: 1px solid rgba(30,219,138,0.42);
  border-radius: 10px;
  box-shadow:
    0 24px 80px rgba(0,0,0,0.7),
    0 0 36px rgba(30,219,138,0.20);
  padding: 24px 24px 22px;
  font-family: 'Inter', system-ui, sans-serif;
  color: #e7edf5;
  transform: translateY(10px) scale(0.985);
  animation: fmIn 320ms cubic-bezier(.2,.8,.2,1) forwards;
}
@keyframes fmIn { to { transform: translateY(0) scale(1); } }

.fm-eyebrow {
  display: flex; align-items: center; gap: 8px;
  font-family: 'Oswald', sans-serif;
  font-size: 11px; letter-spacing: 0.24em; text-transform: uppercase;
  color: #1edb8a; font-weight: 700;
}
.fm-eyebrow .fm-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #1edb8a; box-shadow: 0 0 8px #1edb8a;
}

.fm-title {
  margin-top: 8px;
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  font-size: clamp(22px, 4.6vw, 30px);
  line-height: 1.1;
  letter-spacing: 0.02em;
  color: #fff;
}
.fm-title .fm-brand { color: #1edb8a; }

.fm-body {
  margin-top: 10px;
  font-size: 14px; line-height: 1.5; color: #c8d4e2;
}
.fm-bullets {
  margin: 12px 0 4px;
  display: grid; gap: 6px;
}
.fm-bullets li {
  list-style: none; padding-left: 22px; position: relative;
  font-size: 13px; color: #e7edf5;
}
.fm-bullets li::before {
  content: ""; position: absolute; left: 4px; top: 7px;
  width: 6px; height: 6px; border-radius: 50%;
  background: #1edb8a; box-shadow: 0 0 6px #1edb8a;
}
.fm-bullets li b {
  font-family: 'JetBrains Mono', monospace;
  background: rgba(30,219,138,0.10);
  border: 1px solid rgba(30,219,138,0.32);
  color: #1edb8a;
  padding: 1px 6px; border-radius: 3px;
  font-size: 11px; letter-spacing: 0.08em; font-weight: 700;
}

.fm-actions {
  margin-top: 18px;
  display: flex; flex-direction: column; gap: 10px;
}
.fm-cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 18px;
  background: linear-gradient(90deg, #1ad977 0%, #14b45e 100%);
  color: #051d0d;
  border-radius: 4px;
  font-family: 'Oswald', sans-serif;
  font-size: 16px; letter-spacing: 0.10em; text-transform: uppercase;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 8px 22px rgba(30,219,138,0.28);
  transition: transform 120ms ease, box-shadow 120ms ease;
}
.fm-cta:hover { transform: translateY(-1px); box-shadow: 0 12px 28px rgba(30,219,138,0.35); }
.fm-cta .fm-arrow { transition: transform 160ms ease; }
.fm-cta:hover .fm-arrow { transform: translateX(3px); }

.fm-secondary {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.12);
  color: #c8d4e2;
  font-family: 'Oswald', sans-serif;
  font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase;
  font-weight: 600;
  padding: 11px 14px;
  border-radius: 4px;
  cursor: pointer;
  transition: border-color 120ms ease, color 120ms ease;
}
.fm-secondary:hover { border-color: rgba(255,255,255,0.28); color: #fff; }

.fm-fineprint {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.06);
  font-size: 10px; letter-spacing: 0.08em;
  color: #6b7d93; text-transform: uppercase; line-height: 1.5;
}

.fm-close {
  position: absolute; top: 10px; right: 10px;
  width: 30px; height: 30px;
  background: transparent; border: 1px solid rgba(255,255,255,0.10);
  border-radius: 4px; color: #9fb6cd;
  font-size: 14px; cursor: pointer; font-family: inherit;
  display: inline-flex; align-items: center; justify-content: center;
}
.fm-close:hover { color: #fff; border-color: rgba(255,255,255,0.25); }

.fm-modal-card { position: relative; }

@media (max-width: 620px) {
  .fm-modal-card { padding: 20px 18px 18px; }
}
