/* ==============================================================================
 * LIVETOCAST · DEDICATED INTERNATIONAL SPORTS TV PLAYER STYLESHEET
 * Scoped exclusively to sports_viewer.html (Cricket, Football, Kabaddi & TV Decks)
 * ============================================================================== */

:root {
  --bg-deep: #06080d;
  --neon-cyan: #00f0ff;
  --neon-cyan-glow: rgba(0, 240, 255, 0.45);
  --neon-red: #ff3344;
  --neon-red-glow: rgba(255, 51, 68, 0.55);
  --neon-yellow: #facc15;
  --border-subtle: rgba(255, 255, 255, 0.12);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

html, body {
  width: 100%;
  height: 100%;
  background: #000;
  color: var(--text-main);
  font-family: var(--font-sans);
  overflow: hidden;
  user-select: none;
}

.sports-stage {
  position: relative;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}

.sports-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* TOP-LEFT CLIENT BRAND / LOGO SLOT */
.client-brand-slot {
  position: absolute;
  top: 18px;
  left: 20px;
  z-index: 32;
  display: none;
  align-items: center;
  gap: 10px;
  background: rgba(6, 8, 13, 0.78);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(0, 240, 255, 0.28);
  border-radius: 10px;
  padding: 6px 12px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.6);
  pointer-events: none;
}

.client-brand-slot img {
  height: 32px;
  max-width: 150px;
  object-fit: contain;
  display: none;
}

.client-brand-text {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
}

/* POWERED BY BADGE (Free trials only; Turnkey opt-out hides this) */
.powered-by-badge {
  position: absolute;
  top: 18px;
  right: 20px;
  z-index: 35;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(6, 7, 9, 0.78);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 5px 12px;
  text-decoration: none;
  color: #94a3b8;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.powered-by-badge img {
  height: 18px;
  width: auto;
  object-fit: contain;
}

.sponsor-bug {
  display: none;
  position: absolute;
  top: 56px;
  right: 20px;
  z-index: 30;
  pointer-events: none;
  background: rgba(6, 7, 9, 0.68);
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
}

.sponsor-bug img {
  height: 30px;
  max-width: 125px;
  object-fit: contain;
}

.unmute-prompt {
  display: none;
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 40;
  background: rgba(0, 0, 0, 0.86);
  border: 1px solid var(--neon-cyan);
  padding: 9px 18px;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0, 240, 255, 0.3);
}

.unmute-prompt span {
  color: var(--neon-cyan);
  font-size: 0.85rem;
  font-weight: 700;
}

.overlay-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 20;
}

/* LOWER THIRD (Raised cleanly above bottom Cricket Scorebug) */
.lower-third-dock {
  position: absolute;
  bottom: 112px;
  left: 20px;
  max-width: min(560px, calc(100% - 40px));
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  z-index: 28;
}

.lower-third-dock.visible {
  opacity: 1;
  transform: translateY(0);
}

.lower-third-chassis {
  background: rgba(11, 15, 23, 0.9);
  backdrop-filter: blur(16px);
  border-left: 5px solid var(--neon-cyan);
  border-radius: 0 10px 10px 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  padding: 12px 22px;
}

.lt-badge {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: var(--neon-cyan);
  margin-bottom: 2px;
  text-transform: uppercase;
}

.lt-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
}

.lt-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 2px;
}

/* MID-SCREEN FLASH ANNOUNCEMENT */
.flash-announcement-backdrop {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(6, 8, 13, 0.7);
  backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 50;
}

.flash-announcement-backdrop.visible {
  opacity: 1;
  pointer-events: auto;
}

.flash-card {
  background: linear-gradient(135deg, rgba(17, 23, 36, 0.96), rgba(11, 15, 23, 0.96));
  border: 2px solid var(--neon-cyan);
  box-shadow: 0 0 40px var(--neon-cyan-glow);
  border-radius: 16px;
  padding: 30px 45px;
  text-align: center;
  max-width: 600px;
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.flash-announcement-backdrop.visible .flash-card {
  transform: scale(1);
}

.flash-badge {
  display: inline-block;
  background: var(--neon-red);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 2px;
  padding: 5px 14px;
  border-radius: 50px;
  margin-bottom: 12px;
}

.flash-headline {
  font-size: 1.8rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 8px;
  line-height: 1.2;
}

.flash-subtext {
  font-size: 1rem;
  color: var(--text-muted);
}

/* TICKER */
.ticker-dock {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 32px;
  background: rgba(6, 8, 13, 0.95);
  border-top: 1px solid var(--border-subtle);
  overflow: hidden;
  display: none;
  align-items: center;
  z-index: 32;
}

.ticker-content {
  white-space: nowrap;
  animation: tickerSlide 25s linear infinite;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

@keyframes tickerSlide {
  0% { transform: translateX(100vw); }
  100% { transform: translateX(-100%); }
}

/* CRICKET SCOREBUG RIBBON */
.cricket-tv-scorebug {
  position: absolute;
  bottom: 40px;
  left: 20px;
  right: 20px;
  max-width: 1280px;
  margin: 0 auto;
  height: 58px;
  background: linear-gradient(90deg, rgba(7, 12, 22, 0.96) 0%, rgba(13, 22, 38, 0.94) 50%, rgba(7, 12, 22, 0.96) 100%);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(0, 240, 255, 0.35);
  border-radius: 8px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.8), 0 0 20px rgba(0, 240, 255, 0.15);
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  font-family: var(--font-sans);
  z-index: 26;
  pointer-events: auto;
}

.c-team-box { display: flex; align-items: center; gap: 12px; height: 100%; }
.c-team-badge { background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%); color: #fff; font-weight: 900; font-size: 0.85rem; padding: 6px 14px; border-radius: 6px; letter-spacing: 1.5px; box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4); }
.c-score-wrap { display: flex; flex-direction: column; justify-content: center; }
.c-score-main { font-size: 1.6rem; font-weight: 900; color: #fff; font-family: var(--font-mono); letter-spacing: -0.5px; line-height: 1; }
.c-overs-main { font-size: 0.75rem; color: var(--neon-cyan); font-weight: 800; letter-spacing: 0.5px; margin-top: 2px; }
.c-equation-box { display: flex; flex-direction: column; justify-content: center; border-left: 1px solid rgba(255, 255, 255, 0.1); padding: 0 14px; font-size: 0.72rem; line-height: 1.3; }
.c-eq-crr { color: #94a3b8; font-weight: 700; }
.c-eq-target { color: #fef08a; font-weight: 800; }
.c-batters-box { display: flex; flex-direction: column; justify-content: center; gap: 3px; border-left: 1px solid rgba(255, 255, 255, 0.1); border-right: 1px solid rgba(255, 255, 255, 0.1); padding: 0 16px; min-width: 200px; }
.c-batter-row { font-size: 0.78rem; font-weight: 700; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.c-batter-row.striker { color: #fff; }
.c-batter-row.striker .c-batter-name { color: var(--neon-cyan); font-weight: 800; }
.c-batter-row.striker .c-batter-score { font-weight: 900; color: #fff; font-family: var(--font-mono); }
.c-batter-row.non-striker { color: #94a3b8; }
.c-batter-row.non-striker .c-batter-score { font-family: var(--font-mono); }
.c-bowler-box { display: flex; flex-direction: column; justify-content: center; text-align: right; padding: 0 14px; }
.c-bowler-name { font-size: 0.78rem; color: #fef08a; font-weight: 800; }
.c-bowler-stats { font-size: 0.72rem; color: #cbd5e1; font-family: var(--font-mono); font-weight: 700; }
.c-over-wrapper { display: flex; flex-direction: column; align-items: flex-end; border-left: 1px solid rgba(255, 255, 255, 0.1); padding-left: 14px; }
.c-over-label { font-size: 9px; font-weight: 800; color: #64748b; letter-spacing: 0.08em; margin-bottom: 3px; }
.c-recent-pills { display: flex; gap: 5px; align-items: center; }
.c-ball { width: 24px; height: 24px; border-radius: 50%; background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.12); display: flex; align-items: center; justify-content: center; font-size: 0.68rem; font-weight: 800; font-family: var(--font-mono); color: #cbd5e1; }
.c-ball.dot { background: rgba(255, 255, 255, 0.05); color: #64748b; }
.c-ball.four { background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%); color: #fff; border-color: #38bdf8; box-shadow: 0 0 8px rgba(56, 189, 248, 0.6); }
.c-ball.six { background: linear-gradient(135deg, #16a34a 0%, #15803d 100%); color: #fff; border-color: #4ade80; box-shadow: 0 0 10px rgba(74, 222, 128, 0.7); }
.c-ball.w { background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%); color: #fff; border-color: #f87171; box-shadow: 0 0 10px rgba(248, 113, 113, 0.8); font-weight: 900; }
.c-ball.extra { background: linear-gradient(135deg, #d97706 0%, #b45309 100%); color: #fff; border-color: #fbbf24; }

/* FOOTBALL & KABADDI SCOREBUGS */
.football-tv-scorebug { position: absolute; top: 64px; left: 20px; display: flex; align-items: center; background: rgba(11, 15, 23, 0.92); backdrop-filter: blur(14px); border: 1px solid var(--border-subtle); border-radius: 8px; overflow: hidden; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6); z-index: 25; }
.fb-team { padding: 8px 16px; font-weight: 800; font-size: 0.9rem; letter-spacing: 1px; }
.fb-score-pill { background: rgba(0, 240, 255, 0.15); color: var(--neon-cyan); font-family: var(--font-mono); font-size: 1.3rem; font-weight: 900; padding: 8px 14px; border-left: 1px solid var(--border-subtle); border-right: 1px solid var(--border-subtle); }
.fb-time-pill { padding: 8px 14px; font-size: 0.85rem; font-weight: 800; color: var(--neon-yellow); font-family: var(--font-mono); }

.kabaddi-tv-scorebug { position: absolute; top: 64px; left: 20px; display: flex; align-items: center; gap: 12px; background: rgba(11, 15, 23, 0.92); backdrop-filter: blur(14px); border: 1px solid var(--border-subtle); border-radius: 8px; padding: 8px 16px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6); z-index: 25; }
.kb-raid-clock-circle { width: 44px; height: 44px; border-radius: 50%; border: 3px solid var(--neon-red); box-shadow: 0 0 10px var(--neon-red-glow); display: flex; align-items: center; justify-content: center; font-size: 1.1rem; font-weight: 900; font-family: var(--font-mono); color: #fff; }

/* GENERIC SPORTS DOCK */
.scoreboard-dock { position: absolute; top: 64px; left: 20px; background: rgba(11, 15, 23, 0.9); backdrop-filter: blur(12px); border: 1px solid var(--border-subtle); border-radius: 8px; display: flex; align-items: center; overflow: hidden; box-shadow: 0 10px 25px rgba(0,0,0,0.5); z-index: 25; }
.team-box { display: flex; align-items: center; padding: 8px 16px; gap: 12px; }
.team-name { font-size: 0.9rem; font-weight: 800; letter-spacing: 1px; }
.team-score { font-size: 1.4rem; font-weight: 900; color: var(--neon-cyan); font-family: var(--font-mono); }
.score-divider { width: 1px; height: 35px; background: var(--border-subtle); }
.match-clock { background: rgba(255, 255, 255, 0.05); padding: 8px 14px; font-size: 0.85rem; font-weight: 700; color: var(--neon-yellow); font-family: var(--font-mono); }

/* BIG EVENT FLASH BANNER (FOUR, SIX, WICKET, GOAL) */
.big-event-flash-banner { position: absolute; top: 25%; left: 50%; transform: translate(-50%, -50%) scale(0.85); background: linear-gradient(135deg, rgba(14, 20, 34, 0.96), rgba(11, 15, 23, 0.96)); border: 2px solid var(--neon-cyan); box-shadow: 0 0 45px var(--neon-cyan-glow); border-radius: 16px; padding: 24px 48px; text-align: center; opacity: 0; pointer-events: none; transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1); z-index: 60; }
.big-event-flash-banner.visible { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.flash-title-text { font-size: 2.4rem; font-weight: 900; letter-spacing: 2px; color: #fff; text-shadow: 0 0 20px rgba(255, 255, 255, 0.5); line-height: 1.1; }
.flash-subtitle-text { font-size: 1.1rem; color: var(--neon-cyan); font-weight: 700; margin-top: 6px; }

@media (max-width: 900px) {
  .cricket-tv-scorebug {
    height: auto;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 12px;
    bottom: 38px;
    left: 10px;
    right: 10px;
  }
  .c-equation-box, .c-over-wrapper { display: none; }
  .lower-third-dock {
    bottom: 118px;
    left: 10px;
    max-width: calc(100% - 20px);
  }
  .football-tv-scorebug, .kabaddi-tv-scorebug, .scoreboard-dock {
    top: 52px;
    left: 10px;
    transform: scale(0.9);
    transform-origin: top left;
  }
}

@media (max-width: 640px) {
  .client-brand-slot { top: 10px; left: 10px; padding: 4px 8px; }
  .client-brand-slot img { height: 24px; max-width: 110px; }
  .powered-by-badge { top: 10px; right: 10px; }
}

/* ==============================================================================
 * DEDICATED 9:16 VERTICAL OUTPUT MODE (YouTube Vertical Live & Instagram Live)
 * Keeps all graphics centered inside portrait crop & above bottom comment zone
 * ============================================================================== */
.sports-stage.aspect-9x16 {
  width: min(100vw, 56.25vh);
  height: 100vh;
  height: 100dvh;
  margin: 0 auto;
  border-left: 1px solid rgba(255, 255, 255, 0.14);
  border-right: 1px solid rgba(255, 255, 255, 0.14);
  overflow: hidden;
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.9);
}
.sports-stage.aspect-9x16 .sports-video {
  object-fit: cover;
}
.sports-stage.aspect-9x16 .client-brand-slot {
  top: 12px;
  left: 10px;
  padding: 4px 8px;
}
.sports-stage.aspect-9x16 .client-brand-slot img {
  height: 24px;
  max-width: 110px;
}
.sports-stage.aspect-9x16 .powered-by-badge {
  top: 12px;
  right: 10px;
}
.sports-stage.aspect-9x16 .sponsor-bug {
  top: 46px;
  right: 10px;
}
.sports-stage.aspect-9x16 .cricket-tv-scorebug {
  bottom: 84px;
  left: 8px;
  right: 8px;
  height: auto;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 10px;
}
.sports-stage.aspect-9x16 .c-score-main { font-size: 1.25rem; }
.sports-stage.aspect-9x16 .c-batters-box { min-width: 0; padding: 0 8px; flex: 1 1 55%; }
.sports-stage.aspect-9x16 .c-bowler-box { padding: 0 6px; text-align: left; }
.sports-stage.aspect-9x16 .c-equation-box,
.sports-stage.aspect-9x16 .c-over-wrapper { display: none; }
.sports-stage.aspect-9x16 .football-tv-scorebug,
.sports-stage.aspect-9x16 .kabaddi-tv-scorebug,
.sports-stage.aspect-9x16 .scoreboard-dock {
  top: 50px;
  left: 10px;
  max-width: calc(100% - 20px);
}
.sports-stage.aspect-9x16 .lower-third-dock {
  bottom: 184px;
  left: 10px;
  right: 10px;
  max-width: calc(100% - 20px);
}
.sports-stage.aspect-9x16 .big-event-flash-banner {
  padding: 16px 22px;
  width: calc(100% - 28px);
}
.sports-stage.aspect-9x16 .flash-title-text { font-size: 1.7rem; }
