/* ─── Variáveis de tema - Premium Dark Mode (SofaScore Style) ─────────────── */
:root {
  --bg: #f4f6fb; --bg3: #eef1f7; --border: #dde2ef;
  --text: #1a1d2e; --text2: #4b5563; --text3: #9ca3af;
  --card: #fff; --sidebar: #fff; --header: #fff; --accent: #2563eb;
  --live: #ef4444; --live-bg: rgba(239, 68, 68, 0.12);
  --success: #10b981; --success-bg: rgba(16, 185, 129, 0.12);
  --warning: #f59e0b; --warning-bg: rgba(245, 158, 11, 0.12);
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1);
  --radius-sm: 6px; --radius-md: 10px; --radius-lg: 14px;
  --transition-fast: 150ms; --transition-base: 200ms; --transition-slow: 300ms;
}
[data-theme="dark"] {
  --bg: #0a0b0f; --bg3: #14151c; --border: #252836;
  --text: #f1f3f8; --text2: #9ca3b0; --text3: #6b7280;
  --card: #14151c; --sidebar: #0f1015; --header: #0f1015; --accent: #4f8ef7;
  --live: #f55; --live-bg: rgba(255, 85, 85, 0.15);
  --success: #34d399; --success-bg: rgba(52, 211, 153, 0.15);
  --warning: #fbbf24; --warning-bg: rgba(251, 191, 36, 0.15);
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.4);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.5);
  /* Gradientes premium */
  --gradient-card: linear-gradient(135deg, rgba(79,142,247,0.03) 0%, transparent 50%);
  --gradient-sidebar: linear-gradient(180deg, var(--sidebar) 0%, rgba(15,16,21,0.95) 100%);
}

/* ─── CoreScore Premium Animations ───────────────────────────────────────── */
@keyframes coreFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes coreSlideIn {
  from { opacity: 0; transform: translateX(-8px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes corePulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
@keyframes coreGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(79, 142, 247, 0.4); }
  50% { box-shadow: 0 0 0 6px rgba(79, 142, 247, 0); }
}
@keyframes coreShimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* Skeleton premium */
.skeleton-premium {
  background: linear-gradient(90deg, var(--bg3) 25%, var(--border) 50%, var(--bg3) 75%);
  background-size: 200% 100%;
  animation: coreShimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

/* Score update flash */
@keyframes scoreFlash {
  0% { transform: scale(1); }
  50% { transform: scale(1.08); }
  100% { transform: scale(1); }
}
.score-flash { animation: scoreFlash 0.4s ease-out; }

/* Sprint 6.A: incident flash - usado pelo diff-applier ao receber novo
   incident (gol, cartao, sub) via delta. Diferente do scoreFlash que
   so' escala; este pisca borda+fundo pra chamar mais atencao. */
@keyframes incidentFlash {
  0%   { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.6); }
  50%  { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0.0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.0); }
}
.incident-flash { animation: incidentFlash 1.2s ease-out; }

/* 24/05/2026 - eventos tipados (match-events-fx.js). Cada kind tem cor
   distinta pra leitura visual rapida. Duracao 1.6s (FLASH_DURATION_MS). */
@keyframes eventFlashGoal {
  0%   { box-shadow: 0 0 0 0 rgba(250, 204, 21, 0.7); background-color: rgba(250, 204, 21, 0.12); }
  60%  { box-shadow: 0 0 0 10px rgba(250, 204, 21, 0); }
  100% { box-shadow: 0 0 0 0 rgba(250, 204, 21, 0); background-color: transparent; }
}
.event-flash-goal { animation: eventFlashGoal 1.6s ease-out; }

@keyframes eventFlashYellowCard {
  0%   { box-shadow: inset 0 0 0 2px rgba(234, 179, 8, 0.7); }
  60%  { box-shadow: inset 0 0 0 2px rgba(234, 179, 8, 0); }
  100% { box-shadow: inset 0 0 0 0 rgba(234, 179, 8, 0); }
}
.event-flash-yellow-card { animation: eventFlashYellowCard 1.6s ease-out; }

@keyframes eventFlashRedCard {
  0%   { box-shadow: inset 0 0 0 2px rgba(239, 68, 68, 0.85); background-color: rgba(239, 68, 68, 0.1); }
  60%  { box-shadow: inset 0 0 0 2px rgba(239, 68, 68, 0); }
  100% { box-shadow: inset 0 0 0 0 rgba(239, 68, 68, 0); background-color: transparent; }
}
.event-flash-red-card { animation: eventFlashRedCard 1.6s ease-out; }

@keyframes eventFlashCorner {
  0%   { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.55); }
  60%  { box-shadow: 0 0 0 6px rgba(59, 130, 246, 0); }
  100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); }
}
.event-flash-corner { animation: eventFlashCorner 1.4s ease-out; }

@keyframes eventFlashSub {
  0%   { opacity: 0.7; }
  50%  { opacity: 1; }
  100% { opacity: 1; }
}
.event-flash-sub { animation: eventFlashSub 0.9s ease-out; }

/* Sprint 12: indicador de transport realtime (SSE+WS+Redis). */
.rt-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 10px;
  font-weight: 700;
  letter-spacing: 0.4px;
  cursor: default;
  user-select: none;
  transition: background-color 0.25s ease, color 0.25s ease;
}
.rt-status .rt-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: currentColor;
  display: inline-block;
}
.rt-status-unknown {
  background: rgba(107, 114, 128, 0.18);
  color: #9ca3af;
}
.rt-status-connected {
  background: rgba(34, 197, 94, 0.16);
  color: #22c55e;
}
.rt-status-connected .rt-dot { animation: rtPulse 1.6s ease-in-out infinite; }
.rt-status-stale {
  background: rgba(234, 179, 8, 0.18);
  color: #eab308;
}
.rt-status-offline {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}
@keyframes rtPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.6; transform: scale(1.3); }
}

/* Sprint 15: alerts banner */
.alerts-banner-hidden { display: none; }
.alerts-banner {
  cursor: pointer;
  padding: 8px 14px;
  font-size: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: background-color 0.2s ease;
  user-select: none;
}
.alerts-banner.sev-critical { background: rgba(239, 68, 68, 0.15); color: #fecaca; border-left: 4px solid #ef4444; }
.alerts-banner.sev-high     { background: rgba(249, 115, 22, 0.15); color: #fed7aa; border-left: 4px solid #f97316; }
.alerts-banner.sev-warning  { background: rgba(234, 179, 8, 0.13); color: #fef3c7; border-left: 4px solid #eab308; }
.alerts-banner.sev-info     { background: rgba(59, 130, 246, 0.12); color: #bfdbfe; border-left: 4px solid #3b82f6; }
.alerts-banner-row { display: flex; align-items: center; gap: 8px; }
.alerts-banner-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: currentColor;
  animation: rtPulse 1.4s ease-in-out infinite;
}
.alerts-banner-text { flex: 1; }
.alerts-banner-toggle { font-size: 10px; opacity: 0.7; }
.alerts-banner-list { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.alerts-banner-item {
  background: rgba(0,0,0,0.18);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 11px;
  border-left: 3px solid currentColor;
}
.alerts-banner-name { font-weight: 700; margin-right: 6px; }
.alerts-banner-sev { font-size: 10px; opacity: 0.7; text-transform: uppercase; }
.alerts-banner-summary-text { margin-top: 2px; opacity: 0.95; }
.alerts-banner-desc { margin-top: 4px; font-size: 10.5px; opacity: 0.7; }

/* Sprint 16: badge PG ready */
.pg-ready-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 8px;
  background: rgba(59, 130, 246, 0.18);
  color: #93c5fd;
  letter-spacing: 0.4px;
  pointer-events: none;
  user-select: none;
  z-index: 5;
}
.pg-ready-badge.pg-with-lineup {
  background: rgba(34, 197, 94, 0.18);
  color: #86efac;
}

/* Live dot premium */
.live-dot-premium {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--live);
  animation: corePulse 1.2s ease-in-out infinite;
  box-shadow: 0 0 8px var(--live);
}

/* ─── Reset ──────────────────────────────────────────────────────────────── */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg); color: var(--text); min-height: 100vh;
  transition: background .25s, color .25s;
}

/* Seguindo modulos:
     styles-layout.css     - layout shell
     styles-analysis.css   - analysis components
     styles-premium.css    - premium UI
     styles-responsive.css - breakpoints
     styles-live.css       - estatisticas ao vivo
   (FASE E 22/05/2026) */
