/* ══════════════════════════════════════════
   RPL Simulator — palette из эмблемы РПЛ-Мир
   Primary: #2484c6 (blue)
   Accent:  #ef4044 (red)
   Bg:      #0a0e1a (near-black)
   ══════════════════════════════════════════ */

:root {
  --bg:        #0a0e1a;
  --bg2:       #141a2e;
  --bg3:       #1d2440;
  --bg4:       #2a3255;
  --purple:    #2484c6;
  --purple2:   #43aff7;
  --gold:      #ef4044;
  --gold2:     #ff6b6b;
  --white:     #ffffff;
  --text:      #e8ecf5;
  --muted:     #7f8aa8;
  --home-clr:  #43aff7;
  --away-clr:  #ef4044;
  --red-card:  #ef4444;
  --yellow-card: #facc15;
  --radius:    8px;
  --shadow:    0 4px 24px rgba(0,0,0,0.5);
}

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

body {
  font-family: 'Segoe UI', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── SCREENS ── */
.screen { display: none; min-height: 100vh; }
.screen.active { display: flex; flex-direction: column; }

/* ── LOADING ── */
#screen-loading { align-items: center; justify-content: center; }
.loading-wrap { text-align: center; padding: 40px; }
.rpl-emblem { margin-bottom: 24px; }
.rpl-title {
  font-size: 1.8rem; font-weight: 900; letter-spacing: 3px;
  background: linear-gradient(135deg, var(--gold), var(--gold2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  margin-bottom: 32px;
}
.loading-bar-wrap {
  width: 280px; height: 4px; background: var(--bg3);
  border-radius: 2px; margin: 0 auto 16px; overflow: hidden;
}
.loading-bar {
  height: 100%; width: 0; background: linear-gradient(90deg, var(--purple), var(--gold));
  border-radius: 2px; transition: width 0.3s ease;
}
.loading-text { color: var(--muted); font-size: 0.9rem; }

/* ── LEAGUE SELECT ── */
#screen-league { align-items: center; justify-content: center; padding: 24px; overflow-y: auto; }
.league-wrap { width: 100%; max-width: 860px; text-align: center; }

.league-featured {
  margin: 24px auto 20px;
  display: flex; justify-content: center; gap: 16px; flex-wrap: wrap;
}
.league-card--wc2026 {
  border-color: var(--gold) !important;
  background: linear-gradient(145deg, rgba(239,64,68,0.18), rgba(239,64,68,0.08)) !important;
  box-shadow: 0 0 32px rgba(239,64,68,0.30), 0 4px 12px rgba(0,0,0,0.4) !important;
}
.league-card--wc2026:hover { background: #ffffff !important; animation: cardGlow 1.5s infinite alternate; }
.league-card--wc2026 .league-card__logo--hover { display: none; }
.league-card--wc2026:hover .league-card__logo--default { display: none; }
.league-card--wc2026:hover .league-card__logo--hover { display: inline; }
.league-card--featured {
  padding: 20px 40px; gap: 12px;
  flex-direction: column; align-items: center;
  border: 2px solid var(--purple2) !important;
  background: linear-gradient(145deg, rgba(67,175,247,0.22), rgba(67,175,247,0.12)) !important;
  width: 220px; min-width: 220px;
  box-shadow: 0 0 32px rgba(67,175,247,0.35), 0 4px 12px rgba(0,0,0,0.4);
  animation: cardEntry 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
}
.league-card--featured:hover {
  background: #ffffff !important;
  animation: cardGlow 1.5s infinite alternate;
}
.league-card--featured .league-card__logo { width: 80px; height: 80px; object-fit: contain; }
.league-card--featured .league-card__name { font-size: 1rem; font-weight: 900; color: var(--gold2); letter-spacing: 1px; transition: opacity 0.2s; }
.league-card--featured .league-card__modes { font-size: 0.72rem; color: var(--muted); margin-top: 4px; transition: opacity 0.2s; }
.league-card--featured:hover .league-card__name,
.league-card--featured:hover .league-card__modes { opacity: 0; }

.league-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 12px;
  margin: 0 auto;
}
.league-card {
  display: flex; flex-direction: column; align-items: center;
  padding: 14px 8px; gap: 8px; border-radius: var(--radius);
  border: 1px solid rgba(67,175,247,0.5);
  background: linear-gradient(145deg, rgba(67,175,247,0.18), rgba(67,175,247,0.06));
  cursor: pointer; transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1); color: var(--text);
  box-shadow: 0 2px 6px rgba(67,175,247,0.15);
  animation: cardEntry 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
}
.league-card:hover {
  border-color: var(--purple2);
  background: #ffffff;
  color: var(--purple);
  transform: translateY(-4px);
  animation: cardGlow 1.5s infinite alternate;
}

@keyframes cardEntry {
  from { opacity: 0; transform: translateY(20px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes cardGlow {
  0% { box-shadow: 0 6px 16px rgba(67,175,247,0.4); }
  100% { box-shadow: 0 6px 28px rgba(67,175,247,0.8); }
}

.league-card__logo { 
  width: 48px; height: 48px; object-fit: contain; 
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.league-card:hover .league-card__logo {
  transform: translateY(4px) scale(1.6);
}

/* Для главной плашки РПЛ (2 строки текста) смещение вниз должно быть больше */
.league-card--featured:hover .league-card__logo {
  transform: translateY(16px) scale(1.6);
}

/* Увеличиваем логотип NL1 на 50% */
.league-card[data-league="NL1"] .league-card__logo {
  transform: scale(1.5);
}
.league-card[data-league="NL1"]:hover .league-card__logo {
  transform: translateY(4px) scale(2.0);
}

/* GB1: логотипы 105% (было 150% −30%) */
.league-card[data-league="GB1"] .league-card__logo {
  transform: scale(1.05);
}
.league-card[data-league="GB1"]:hover .league-card__logo {
  transform: translateY(4px) scale(1.4);
  filter: invert(0.85) brightness(0.4);
}

.league-card__name { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.5px; text-align: center; transition: opacity 0.2s; }
.league-card:hover .league-card__name { opacity: 0; }

/* ── Randomness toggle ── */
.randomness-block {
  margin-top: 28px; text-align: center;
}
.randomness-label {
  font-size: 0.65rem; font-weight: 800; letter-spacing: 2px;
  color: var(--muted); margin-bottom: 10px;
}
.randomness-toggle {
  display: inline-flex; gap: 6px;
  background: var(--bg2); border-radius: 12px; padding: 4px;
}
.rnd-btn {
  padding: 7px 18px; border: none; border-radius: 9px;
  background: transparent; color: var(--muted);
  font-size: 0.78rem; font-weight: 700; cursor: pointer;
  letter-spacing: 0.5px; transition: background 0.18s, color 0.18s;
}
.rnd-btn:hover { color: var(--white); }
.rnd-btn.active {
  background: var(--purple); color: var(--white);
}
.randomness-hint {
  font-size: 0.68rem; color: var(--muted); margin-top: 8px;
  min-height: 1.2em; letter-spacing: 0.3px;
}

/* ── Coach Brain toggle ── */
.coach-brain-block {
  margin-top: 18px; text-align: center;
}
.coach-brain-btn {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--bg2); border: 1.5px solid var(--bg4);
  border-radius: 24px; padding: 7px 18px 7px 12px;
  cursor: pointer; transition: border-color 0.2s, background 0.2s;
}
.coach-brain-btn:hover { border-color: var(--muted); }
.coach-brain-btn.active {
  border-color: var(--gold);
  background: linear-gradient(135deg, rgba(239,64,68,0.12), rgba(36,132,198,0.12));
}
.cb-icon { font-size: 1.1rem; line-height: 1; }
.cb-track {
  position: relative; width: 36px; height: 20px;
  background: var(--bg4); border-radius: 10px;
  transition: background 0.25s;
}
.coach-brain-btn.active .cb-track { background: var(--gold); }
.cb-thumb {
  position: absolute; top: 3px; left: 3px;
  width: 14px; height: 14px;
  background: var(--muted); border-radius: 50%;
  transition: transform 0.25s, background 0.25s;
}
.coach-brain-btn.active .cb-thumb {
  transform: translateX(16px); background: #1a1a2e;
}
.cb-label {
  font-size: 0.72rem; font-weight: 800; letter-spacing: 1.5px;
  color: var(--muted); transition: color 0.2s; min-width: 26px;
}
.coach-brain-btn.active .cb-label { color: var(--gold); }

.btn-back-league {
  position: absolute; top: 16px; left: 16px;
  background: none; border: none; color: var(--muted);
  font-size: 0.82rem; cursor: pointer; padding: 4px 8px;
  transition: color 0.2s;
}
.btn-back-league:hover { color: var(--text); }

/* ── SEASON SELECT ── */
#screen-season { align-items: center; justify-content: center; padding: 24px; position: relative; }
.season-wrap { width: 100%; max-width: 700px; text-align: center; }
.select-block { margin: 28px 0; }
.select-label {
  font-size: 0.75rem; font-weight: 700; letter-spacing: 2px;
  color: var(--gold); margin-bottom: 14px;
}
.season-grid {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center;
}
.season-chip {
  padding: 8px 16px; border-radius: 20px; border: 1px solid var(--bg4);
  background: var(--bg2); color: var(--text); cursor: pointer;
  font-size: 0.85rem; font-weight: 600; transition: all 0.2s;
}
.season-chip:hover { border-color: var(--gold); color: var(--gold); }
.season-chip.active {
  background: var(--purple); border-color: var(--gold);
  color: var(--gold); box-shadow: 0 0 12px rgba(239,64,68,0.3);
}
.mode-row { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.mode-btn {
  display: flex; flex-direction: column; align-items: center;
  padding: 20px 32px; border-radius: var(--radius);
  border: 2px solid var(--bg4); background: var(--bg2);
  cursor: pointer; transition: all 0.2s; min-width: 180px;
  color: var(--text);
}
.mode-btn:hover { border-color: var(--purple2); }
.mode-btn.active {
  border-color: var(--gold); background: rgba(239,64,68,0.1);
  box-shadow: 0 0 20px rgba(239,64,68,0.2);
}
.mode-icon { font-size: 2rem; margin-bottom: 8px; }
.mode-name { font-size: 0.85rem; font-weight: 800; letter-spacing: 1px; margin-bottom: 4px; }
.mode-desc { font-size: 0.72rem; color: var(--muted); }

/* ── BUTTONS ── */
.continue-block { margin-top: 20px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.btn-continue {
  padding: 14px 48px; border-radius: 4px;
  background: linear-gradient(135deg, #1a5e2a, #2d8a3e);
  border: 1px solid #4ade80; color: #4ade80;
  font-size: 1rem; font-weight: 800; letter-spacing: 2px;
  cursor: pointer; transition: all 0.2s;
  box-shadow: 0 0 16px rgba(74,222,128,0.3);
}
.btn-continue:hover { box-shadow: 0 0 28px rgba(74,222,128,0.5); transform: translateY(-1px); }
.continue-info { font-size: 0.75rem; color: var(--muted); }

.btn-primary {
  padding: 14px 48px; border-radius: 4px;
  background: linear-gradient(135deg, var(--purple), var(--purple2));
  border: 1px solid var(--gold); color: var(--gold);
  font-size: 1rem; font-weight: 800; letter-spacing: 2px;
  cursor: pointer; transition: all 0.2s; margin-top: 16px;
}
.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--purple2), var(--purple));
  box-shadow: 0 0 20px rgba(239,64,68,0.4);
}
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-big {
  padding: 16px 56px; font-size: 1.1rem; font-weight: 900;
  letter-spacing: 3px; border-radius: 4px;
  background: linear-gradient(135deg, var(--gold), var(--gold2));
  border: none; color: var(--white); cursor: pointer;
  transition: all 0.2s; margin-top: 20px;
}
.btn-big:hover { box-shadow: 0 0 30px rgba(239,64,68,0.6); transform: translateY(-1px); }
.btn-big.pulse { animation: pulse 2s infinite; }
@keyframes pulse {
  0%,100% { box-shadow: 0 0 0 rgba(239,64,68,0.5); }
  50% { box-shadow: 0 0 24px rgba(239,64,68,0.8); }
}

.btn-secondary {
  padding: 14px 28px; font-size: 0.95rem; font-weight: 800;
  letter-spacing: 1.5px; border-radius: 4px; margin-top: 20px;
  background: transparent; border: 2px solid var(--purple2);
  color: var(--purple2); cursor: pointer; transition: all 0.2s;
}
.btn-secondary:hover {
  background: var(--purple2); color: var(--white);
  box-shadow: 0 0 20px rgba(67,175,247,0.4);
}

.btn-ghost {
  padding: 7px 16px; border-radius: var(--radius);
  border: 1px solid var(--bg4); background: transparent;
  color: var(--muted); font-size: 0.8rem; cursor: pointer; transition: all 0.2s;
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }

.btn-back {
  padding: 8px 16px; border-radius: var(--radius);
  border: 1px solid var(--bg4); background: var(--bg2);
  color: var(--muted); font-size: 0.85rem; cursor: pointer;
  margin: 16px; transition: all 0.2s;
}
.btn-back:hover { color: var(--gold); border-color: var(--gold); }

.btn-skip {
  padding: 8px 20px; border-radius: var(--radius);
  border: 1px solid var(--bg4); background: var(--bg2);
  color: var(--muted); font-size: 0.8rem; cursor: pointer;
  margin-left: auto; transition: all 0.2s;
}
.btn-skip:hover { border-color: var(--gold); color: var(--gold); }

/* ── APP HEADER ── */
.app-header {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 20px; background: var(--bg2);
  border-bottom: 1px solid var(--bg4); flex-shrink: 0;
}
.header-brand { display: flex; align-items: center; gap: 10px; }
.header-title { font-size: 1rem; font-weight: 800; letter-spacing: 1px; color: var(--white); }
.header-meta { display: flex; gap: 8px; margin-left: 12px; flex-wrap: wrap; }
.hdr-chip {
  padding: 3px 10px; border-radius: 12px;
  background: var(--bg3); font-size: 0.72rem; color: var(--muted);
  font-weight: 600; white-space: nowrap;
}

/* ── TABS ── */
.tab-bar {
  display: flex; background: var(--bg2);
  border-bottom: 2px solid var(--bg4); flex-shrink: 0;
}
.tab-btn {
  padding: 12px 24px; border: none; background: none;
  color: var(--muted); font-size: 0.85rem; font-weight: 700;
  letter-spacing: 1px; cursor: pointer; transition: all 0.2s;
  border-bottom: 3px solid transparent; margin-bottom: -2px;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--gold); border-bottom-color: var(--gold); }
.tab-pane { display: none; flex: 1; overflow-y: auto; }
.tab-pane.active { display: block; }

/* ── MATCH STATES ── */
.match-state { padding: 20px; }

/* PRE-MATCH */
.prematch-card {
  max-width: 700px; margin: 0 auto;
  background: var(--bg2); border-radius: 12px;
  border: 1px solid var(--bg4); padding: 32px;
  text-align: center;
  transition: background-image 0.8s ease;
  background-size: cover; background-position: center;
}
.prematch-round {
  font-size: 0.75rem; font-weight: 700; letter-spacing: 2px;
  color: var(--gold); margin-bottom: 16px;
}
.prematch-fixture {
  display: flex; align-items: center; justify-content: center;
  gap: 20px; margin-bottom: 16px;
}
.prematch-team { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.prematch-team-name { font-size: 1rem; font-weight: 700; }
.prematch-vs {
  font-size: 1.4rem; font-weight: 900; color: var(--muted);
}
.prematch-odds {
  display: flex; gap: 20px; justify-content: center;
  margin-bottom: 24px;
}
.odds-item { text-align: center; }
.odds-label { font-size: 0.65rem; color: var(--muted); letter-spacing: 1px; }
.odds-val { font-size: 1.4rem; font-weight: 800; color: var(--gold); }

/* ═══════════════════ BETTING UI (compact 50%) ═══════════════════ */
.prematch-betting {
  margin: 0 auto 14px;
  max-width: 320px;
  background: rgba(29, 36, 64, 0.5);
  border-radius: 8px;
  border: 1px solid rgba(42, 50, 85, 0.5);
  padding: 10px 14px;
  text-align: center;
}
.bet-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 8px;
}
.bet-header-title {
  font-size: 0.58rem; font-weight: 800; letter-spacing: 1.5px;
  color: var(--gold);
}
.bet-header-balance {
  font-size: 0.58rem; color: var(--muted);
}
.bet-header-balance b {
  color: var(--white); font-weight: 700;
}
.bet-odds-row {
  display: flex; gap: 6px; justify-content: center;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.bet-odds-row .bet-bookmaker-hint { width: 100%; }
.bet-odds-btn {
  flex: 1; max-width: 52px;
  padding: 5px 3px; border-radius: 7px;
  border: 1.5px solid var(--bg4);
  background: linear-gradient(180deg, rgba(36,132,198,0.12), rgba(36,132,198,0.04));
  cursor: pointer; transition: all 0.25s cubic-bezier(0.2,0.8,0.2,1);
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  position: relative; overflow: hidden;
}
.bet-odds-btn::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(255,255,255,0.06), transparent 70%);
  opacity: 0; transition: opacity 0.25s;
}
.bet-odds-btn:hover::before { opacity: 1; }
.bet-odds-btn:hover {
  border-color: var(--purple2);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(67,175,247,0.25);
}
.bet-odds-btn:active { transform: scale(0.96); }
.bet-odds-label {
  font-size: 0.46rem; font-weight: 700; letter-spacing: 0.8px;
  color: var(--muted); text-transform: uppercase;
}
.bet-odds-val {
  font-size: 1.09rem; font-weight: 900; color: var(--gold);
  letter-spacing: 0.3px; line-height: 1;
}
.bet-odds-btn.selected {
  border-color: var(--gold) !important;
  background: linear-gradient(180deg, rgba(239,64,68,0.3), rgba(239,64,68,0.12)) !important;
  animation: betPulse 1.8s ease-in-out infinite;
  /* glow intensity overridden by JS via style attribute */
}
.bet-odds-btn.selected .bet-odds-label { color: var(--gold2); }
.bet-odds-btn.selected .bet-odds-val { color: var(--white); text-shadow: 0 0 8px rgba(239,64,68,0.6); }
@keyframes betPulse {
  0%, 100% { box-shadow: 0 0 14px rgba(239,64,68,0.4), inset 0 0 6px rgba(239,64,68,0.1); }
  50% { box-shadow: 0 0 24px rgba(239,64,68,0.7), inset 0 0 12px rgba(239,64,68,0.25); }
}
.bet-odds-btn:disabled {
  opacity: 0.35; cursor: not-allowed; pointer-events: none;
  filter: grayscale(0.4);
}

/* ── Confidence slider ── */
.bet-amount-row {
  margin-bottom: 6px;
}
.bet-slider-wrap {
  padding: 0 4px;
}
.bet-slider {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 5px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--bg4), var(--purple), var(--gold));
  outline: none; cursor: pointer;
}
.bet-slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--gold2);
  border: 2px solid var(--white);
  cursor: pointer;
  box-shadow: 0 0 8px rgba(239,64,68,0.5);
  transition: transform 0.15s;
}
.bet-slider::-webkit-slider-thumb:hover { transform: scale(1.2); }
.bet-slider::-moz-range-thumb {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--gold2);
  border: 2px solid var(--white);
  cursor: pointer;
  box-shadow: 0 0 8px rgba(239,64,68,0.5);
}
.bet-slider-labels {
  display: flex; justify-content: space-between;
  font-size: 0.52rem; color: var(--muted);
  margin-top: 2px;
}
.bet-slider-val {
  font-weight: 800; color: var(--gold);
}
.bet-slider-amount {
  font-size: 0.95rem; font-weight: 800; color: var(--gold);
  margin-top: 4px; min-height: 1em;
}
.bet-slider-info {
  display: flex; flex-wrap: wrap; gap: 4px 8px; justify-content: center;
  align-items: baseline;
  margin-bottom: 6px;
}
.bet-slider-sum {
  font-size: 0.72rem; font-weight: 800; color: var(--gold);
}
.bet-slider-pct {
  font-size: 0.58rem; color: var(--muted);
}
.bet-slider-on {
  font-size: 0.58rem; color: var(--text);
  display: block; width: 100%; text-align: center;
}

/* ── Status & cancel ── */
.bet-status {
  font-size: 0.6rem; font-weight: 600;
  min-height: 1.2em; margin-top: 4px;
}
.bet-status.placed { color: #4ade80; }
.bet-status.error { color: #f87171; }
.bet-status.won {
  color: #4ade80; font-size: 0.7rem; font-weight: 800;
  animation: winFlash 0.6s ease-out;
}
.bet-status.lost { color: #f87171; font-size: 0.68rem; font-weight: 700; }
@keyframes winFlash {
  0% { transform: scale(1.3); opacity: 0.5; }
  100% { transform: scale(1); opacity: 1; }
}
.bet-cancel-btn {
  margin-top: 4px; padding: 3px 10px; border-radius: 8px;
  border: 1px solid var(--bg4); background: transparent;
  color: var(--muted); font-size: 0.55rem; cursor: pointer;
  transition: all 0.2s;
}
.bet-cancel-btn:hover { color: var(--gold); border-color: var(--gold); }

/* ── Place bet button ── */
.bet-place-row {
  display: flex; justify-content: center;
  margin: 6px 0 2px;
}
.bet-place-btn {
  width: 100%; padding: 8px 12px; border-radius: 9px;
  border: 1.5px solid var(--gold);
  background: linear-gradient(135deg, rgba(239,64,68,0.22), rgba(36,132,198,0.12));
  color: var(--gold); font-size: 0.72rem; font-weight: 800;
  letter-spacing: 0.8px; cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 0 10px rgba(239,64,68,0.18);
}
.bet-place-btn:hover {
  background: linear-gradient(135deg, rgba(239,64,68,0.38), rgba(36,132,198,0.22));
  box-shadow: 0 0 18px rgba(239,64,68,0.45);
  transform: translateY(-1px);
}
.bet-place-btn:active { transform: scale(0.97); }

/* Slider locked state (bet placed) */
.bet-slider-locked .bet-slider { opacity: 0.45; cursor: not-allowed; }
.bet-slider-locked .bet-slider-amount { opacity: 0.7; }
.bet-slider-locked .bet-slider-track-glow { opacity: 0.4 !important; }

/* ═══ HEADER BALANCE ═══ */
.header-balance {
  display: flex; align-items: center; gap: 6px;
  margin-left: auto; margin-right: 8px;
  padding: 4px 12px; border-radius: 14px;
  background: var(--bg3); border: 1px solid var(--bg4);
}
.balance-symbol {
  font-size: 0.85rem; font-weight: 900; color: var(--gold);
  font-family: 'Segoe UI', Arial, sans-serif;
}
.balance-amount {
  font-size: 0.72rem; font-weight: 700; color: var(--white);
  letter-spacing: 0.5px;
}
.balance-amount.changed-up { animation: balUp 0.5s ease-out; }
.balance-amount.changed-down { animation: balDown 0.5s ease-out; }
@keyframes balUp {
  0% { color: #4ade80; transform: scale(1.25); }
  100% { color: var(--white); transform: scale(1); }
}
@keyframes balDown {
  0% { color: #f87171; transform: scale(1.2); }
  100% { color: var(--white); transform: scale(1); }
}

/* ── Header balance — rolling digits + ghost ── */
.header-balance { position: relative; }
.balance-amount.rolling { display: inline-flex; gap: 0; overflow: hidden; align-items: baseline; }
.balance-roll-digit {
  display: inline-block; min-width: 0.55em; text-align: center;
  animation: balRoll 0.6s cubic-bezier(0.22, 0.61, 0.36, 1);
}
@keyframes balRoll {
  0%   { transform: translateY(-100%); opacity: 0; filter: blur(2px); }
  60%  { transform: translateY(15%);   opacity: 1; filter: blur(0); }
  100% { transform: translateY(0);     opacity: 1; }
}
.balance-ghost {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  font-size: 0.85rem; font-weight: 900; letter-spacing: 0.5px;
  pointer-events: none; opacity: 0; white-space: nowrap;
  text-shadow: 0 0 12px currentColor;
}
.balance-ghost.show-up   { color: #4ade80; animation: ghostUp   1.4s ease-out forwards; }
.balance-ghost.show-down { color: #f87171; animation: ghostDown 1.4s ease-out forwards; }
@keyframes ghostUp {
  0%   { transform: translate(0, -50%) scale(0.6); opacity: 0; }
  20%  { transform: translate(0, -120%) scale(1.2); opacity: 1; }
  100% { transform: translate(0, -260%) scale(0.95); opacity: 0; }
}
@keyframes ghostDown {
  0%   { transform: translate(0, -50%) scale(0.6); opacity: 0; }
  20%  { transform: translate(0, 20%) scale(1.15); opacity: 1; }
  100% { transform: translate(0, 160%) scale(0.95); opacity: 0; }
}

/* ── Confidence slider — sparkle trail ── */
.bet-slider-wrap { position: relative; }
.bet-slider-track-glow {
  position: absolute; left: 4px; right: 4px; top: 50%; height: 5px;
  transform: translateY(-50%);
  border-radius: 3px; pointer-events: none;
  background: linear-gradient(90deg, rgba(239,64,68,0.6), rgba(255,200,80,0.85));
  filter: blur(4px); opacity: 0; width: 0;
  transition: width 0.18s ease-out, opacity 0.3s;
}
.bet-slider-sparkle {
  position: absolute; top: 50%; left: 0; pointer-events: none;
  width: 6px; height: 6px; border-radius: 50%;
  background: radial-gradient(circle, #ffd86b 30%, rgba(255,216,107,0) 70%);
  opacity: 0;
  animation: sparkleFly 0.7s ease-out forwards;
}
@keyframes sparkleFly {
  0%   { transform: translate(-50%, -50%) scale(0.4); opacity: 1; }
  100% { transform: translate(calc(-50% + var(--sparkX, 0px)), calc(-50% + var(--sparkY, -22px))) scale(0.2); opacity: 0; }
}

/* ── SIDE BETS ── */
.bet-sidebets {
  margin-top: 10px; padding-top: 8px;
  border-top: 1px dashed rgba(255, 215, 0, 0.18);
  display: flex; flex-direction: column; gap: 4px;
}
.bet-sidebets-title {
  font-size: 0.55rem; font-weight: 800; letter-spacing: 1.3px;
  color: var(--gold); text-align: center; margin-bottom: 3px;
  opacity: 0.85;
}
.bet-sidebets-grid {
  display: flex; flex-direction: column; gap: 4px;
}
.bet-side-btn {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; padding: 5px 9px; border-radius: 6px;
  border: 1px solid rgba(67, 175, 247, 0.25);
  background: linear-gradient(90deg, rgba(36,132,198,0.10), rgba(36,132,198,0.02));
  cursor: pointer; transition: all 0.2s;
  color: var(--text);
  font-size: 0.62rem;
}
.bet-side-btn:hover {
  border-color: var(--gold);
  background: linear-gradient(90deg, rgba(255,215,0,0.10), rgba(255,215,0,0.02));
  transform: translateX(2px);
}
.bet-side-btn-label {
  display: flex; align-items: center; gap: 6px;
  font-weight: 600; letter-spacing: 0.3px;
}
.bet-side-btn-icon { font-size: 0.85rem; }
.bet-side-btn-odds {
  font-size: 0.95rem; font-weight: 900; color: var(--gold);
  letter-spacing: 0.4px;
}
.bet-side-btn.selected {
  border-color: var(--gold) !important;
  background: linear-gradient(90deg, rgba(255,215,0,0.22), rgba(255,215,0,0.06)) !important;
  box-shadow: 0 0 14px rgba(255,215,0,0.35), inset 0 0 6px rgba(255,215,0,0.18);
  animation: sideBetPulse 1.6s ease-in-out infinite;
}
@keyframes sideBetPulse {
  0%, 100% { box-shadow: 0 0 12px rgba(255,215,0,0.30), inset 0 0 5px rgba(255,215,0,0.15); }
  50%      { box-shadow: 0 0 22px rgba(255,215,0,0.55), inset 0 0 10px rgba(255,215,0,0.25); }
}
.bet-side-btn.selected .bet-side-btn-odds { color: #fff; text-shadow: 0 0 8px rgba(255,215,0,0.7); }
.bet-side-amount-row {
  display: flex; align-items: center; gap: 6px;
  padding: 4px 0 2px;
}
.bet-side-amount-input {
  flex: 1; padding: 4px 8px; border-radius: 6px;
  background: rgba(0,0,0,0.3); border: 1px solid var(--bg4);
  color: var(--white); font-size: 0.72rem; font-weight: 700;
  text-align: right; outline: none;
}
.bet-side-amount-input:focus { border-color: var(--gold); }
.bet-side-confirm-btn {
  padding: 4px 10px; border-radius: 6px; border: none;
  background: linear-gradient(135deg, var(--gold), #d49b00);
  color: #000; font-size: 0.6rem; font-weight: 800; letter-spacing: 1px;
  cursor: pointer; transition: all 0.2s;
}
.bet-side-confirm-btn:hover { filter: brightness(1.1); transform: translateY(-1px); }
.bet-side-cancel-btn {
  padding: 4px 8px; border-radius: 6px;
  border: 1px solid var(--bg4); background: transparent;
  color: var(--muted); font-size: 0.55rem; cursor: pointer;
}
.bet-side-cancel-btn:hover { color: #f87171; border-color: #f87171; }
.bet-side-placed {
  display: flex; justify-content: space-between; align-items: center;
  padding: 4px 8px; border-radius: 6px;
  background: rgba(74, 222, 128, 0.08);
  border: 1px solid rgba(74, 222, 128, 0.3);
  font-size: 0.6rem;
}
.bet-side-placed-label { color: var(--gold); font-weight: 700; }
.bet-side-placed-sum   { color: var(--white); font-weight: 800; }

/* ── BETTING TAB ── */
#tab-betting { padding: 14px 18px; }
.bet-tab-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 14px; padding-bottom: 8px;
  border-bottom: 1px solid var(--bg4);
}
.bet-tab-title {
  font-size: 1.1rem; font-weight: 800; letter-spacing: 1.5px;
  color: var(--gold); margin: 0;
}
.bet-tab-balance {
  display: flex; flex-direction: column; align-items: flex-end; gap: 1px;
}
.bet-tab-balance-label {
  font-size: 0.55rem; letter-spacing: 1.5px; color: var(--muted);
  text-transform: uppercase;
}
.bet-tab-balance-val {
  font-size: 1.2rem; font-weight: 900; color: var(--gold);
  letter-spacing: 0.5px;
}
.bet-tab-subtabs {
  display: flex; gap: 4px; margin-bottom: 12px;
  border-bottom: 1px solid var(--bg4);
}
.bet-subtab-btn {
  padding: 8px 16px; border: none; background: transparent;
  color: var(--muted); font-size: 0.68rem; font-weight: 700;
  letter-spacing: 1px; cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}
.bet-subtab-btn:hover { color: var(--text); }
.bet-subtab-btn.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
}
.bet-subpane { display: none; }
.bet-subpane.bet-subpane-active { display: block; }

/* Stats grid */
.bet-stats-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px; margin-bottom: 16px;
}
.bet-stat-card {
  padding: 12px 14px; border-radius: 10px;
  background: linear-gradient(135deg, rgba(36,132,198,0.10), rgba(36,132,198,0.03));
  border: 1px solid rgba(67,175,247,0.2);
  position: relative; overflow: hidden;
}
.bet-stat-card::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 100% 0%, rgba(255,215,0,0.10), transparent 60%);
  pointer-events: none;
}
.bet-stat-card-label {
  font-size: 0.52rem; letter-spacing: 1.2px; text-transform: uppercase;
  color: var(--muted); margin-bottom: 4px;
}
.bet-stat-card-val {
  font-size: 1.1rem; font-weight: 900; color: var(--white);
  letter-spacing: 0.3px;
}
.bet-stat-card-val.positive { color: #4ade80; }
.bet-stat-card-val.negative { color: #f87171; }
.bet-stat-card-val.gold     { color: var(--gold); }

/* History list */
.bet-history-list {
  display: flex; flex-direction: column; gap: 6px;
}
.bet-history-empty {
  text-align: center; color: var(--muted);
  padding: 36px 0; font-size: 0.78rem;
}
.bet-history-item {
  display: grid;
  grid-template-columns: 36px 1fr auto auto;
  gap: 10px; align-items: center;
  padding: 8px 12px; border-radius: 8px;
  background: var(--bg3); border: 1px solid var(--bg4);
  border-left: 4px solid var(--bg4);
  font-size: 0.7rem;
  transition: all 0.2s;
}
.bet-history-item:hover { background: var(--bg4); transform: translateX(2px); }
.bet-history-item.won  { border-left-color: #4ade80; }
.bet-history-item.lost { border-left-color: #f87171; }
.bet-history-icon {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  background: rgba(0,0,0,0.3);
}
.bet-history-item.won  .bet-history-icon { background: rgba(74,222,128,0.18); }
.bet-history-item.lost .bet-history-icon { background: rgba(248,113,113,0.18); }
.bet-history-main {
  display: flex; flex-direction: column; gap: 1px; min-width: 0;
}
.bet-history-teams {
  font-weight: 700; color: var(--white);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-size: 0.72rem;
}
.bet-history-meta {
  font-size: 0.58rem; color: var(--muted);
  letter-spacing: 0.4px;
}
.bet-history-bet-info {
  text-align: right; font-size: 0.6rem;
  color: var(--text); white-space: nowrap;
}
.bet-history-bet-info b {
  color: var(--gold); font-weight: 800;
}
.bet-history-result {
  text-align: right; font-weight: 900; font-size: 0.85rem;
  white-space: nowrap;
}
.bet-history-item.won  .bet-history-result { color: #4ade80; }
.bet-history-item.lost .bet-history-result { color: #f87171; }
.bet-history-trophy {
  margin-right: 4px; font-size: 0.85rem;
  filter: drop-shadow(0 0 4px rgba(255,215,0,0.6));
}

/* Active bet card */
.bet-active-empty {
  text-align: center; padding: 40px 20px;
  color: var(--muted); font-size: 0.78rem;
}
.bet-active-empty-icon { font-size: 2.4rem; margin-bottom: 8px; opacity: 0.5; }
.bet-active-card {
  padding: 16px 18px; border-radius: 12px;
  background: linear-gradient(135deg, rgba(255,215,0,0.10), rgba(255,215,0,0.02));
  border: 1px solid rgba(255,215,0,0.3);
  margin-bottom: 10px;
  position: relative; overflow: hidden;
}
.bet-active-card::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(255,215,0,0.12), transparent 70%);
  pointer-events: none;
}
.bet-active-card-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 10px;
}
.bet-active-card-type {
  font-size: 0.55rem; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--gold); font-weight: 800;
}
.bet-active-card-status {
  font-size: 0.58rem; color: var(--muted);
}
.bet-active-card-match {
  font-size: 0.9rem; font-weight: 800; color: var(--white);
  margin-bottom: 6px;
}
.bet-active-card-pick {
  font-size: 0.78rem; color: var(--text);
  margin-bottom: 8px;
}
.bet-active-card-pick b { color: var(--gold); font-weight: 800; }
.bet-active-card-footer {
  display: flex; gap: 14px; padding-top: 8px;
  border-top: 1px solid rgba(255,215,0,0.18);
  font-size: 0.7rem;
}
.bet-active-card-footer .lbl {
  color: var(--muted); font-size: 0.55rem;
  letter-spacing: 0.8px; text-transform: uppercase;
  display: block;
}
.bet-active-card-footer .val {
  color: var(--white); font-weight: 800; font-size: 0.85rem;
}
.bet-active-card-footer .val.potential { color: #4ade80; }

/* ── CONFETTI ── */
.bet-confetti {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none; z-index: 99999;
  overflow: hidden;
}
.confetti-piece {
  position: absolute; top: -10px;
  width: 9px; height: 14px;
  opacity: 0;
  animation: confettiFall var(--dur, 2.6s) cubic-bezier(0.2, 0.7, 0.4, 1) forwards;
}
@keyframes confettiFall {
  0%   { opacity: 1; transform: translate3d(0, -10px, 0) rotate(0deg); }
  100% { opacity: 0; transform: translate3d(var(--driftX, 0px), 105vh, 0) rotate(var(--rot, 720deg)); }
}

/* ── Live odds reveal (true vs displayed) ── */
.sb-odds-truth {
  font-size: 0.55rem; color: var(--muted);
  margin-top: 2px; letter-spacing: 0.3px;
}
.sb-odds-truth .err-pos { color: #4ade80; font-weight: 700; }
.sb-odds-truth .err-neg { color: #f87171; font-weight: 700; }
.bet-bookmaker-hint {
  font-size: 0.5rem; color: var(--muted);
  margin-top: 3px; opacity: 0.55; font-style: italic;
}
.prematch-lineups {
  display: flex; gap: 32px; justify-content: center;
  text-align: left; margin-top: 20px;
}
.lineup-col { min-width: 160px; }
.lineup-col-title {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 1px;
  color: var(--gold); margin-bottom: 8px; padding-bottom: 4px;
  border-bottom: 1px solid var(--bg4);
}
.lineup-player {
  font-size: 0.78rem; color: var(--text); padding: 3px 0;
  display: flex; align-items: center; gap: 6px;
}
.lineup-pos {
  font-size: 0.65rem; color: var(--muted); width: 28px;
}
.lineup-star { color: var(--gold); font-size: 0.65rem; }

/* ═══ LIVE SCOREBOARD ═══ */
.live-scoreboard {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--bg2), var(--bg3));
  border-radius: 10px 10px 0 0; border: 1px solid var(--bg4); border-bottom: none;
  padding: 20px 24px;
}
.sb-team { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.sb-center {
  flex: 0 0 200px; display: flex; flex-direction: column;
  align-items: center; gap: 6px;
}
.team-logo-lg { width: 110px; height: 110px; display: flex; align-items: center; justify-content: center; }
.team-logo-lg svg, .team-logo-lg img { width: 100%; height: 100%; object-fit: contain; }
.team-name-lg { font-size: 1rem; font-weight: 700; text-align: center; max-width: 170px; }

/* ─── Бейджи на табло: стэнс тренера + индикатор красных ─── */
.sb-badges {
  display: flex; align-items: center; justify-content: center;
  gap: 6px; min-height: 26px;
}
.sb-player-count:empty, .sb-stance:empty { display: none; }
.sb-redcard-badge {
  display: inline-flex; align-items: center; gap: 2px;
  background: rgba(239, 68, 68, 0.18);
  border: 1px solid rgba(239, 68, 68, 0.65);
  border-radius: 8px; padding: 2px 6px;
  font-size: 0.85rem; line-height: 1;
  animation: redcardBadgePulse 2s ease-in-out infinite;
}
/* Активный стэнс тренера на табло (только один значок) */
.sb-stance-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px;
  font-size: 0.95rem; line-height: 1;
  border-radius: 50%;
  cursor: help;
  transition: all 0.35s cubic-bezier(.2,.8,.2,1);
}
.sb-stance-icon[data-stance="defense"] {
  background: radial-gradient(circle, rgba(56,189,248,0.45), rgba(36,132,198,0.22));
  box-shadow: 0 0 10px rgba(56,189,248,0.6), inset 0 0 5px rgba(180,220,255,0.4);
}
.sb-stance-icon[data-stance="balance"] {
  background: radial-gradient(circle, rgba(250,204,21,0.40), rgba(120,80,30,0.18));
  box-shadow: 0 0 9px rgba(250,204,21,0.55), inset 0 0 5px rgba(255,235,150,0.4);
}
.sb-stance-icon[data-stance="attack"] {
  background: radial-gradient(circle, rgba(239,64,68,0.45), rgba(120,30,30,0.2));
  box-shadow: 0 0 12px rgba(239,64,68,0.65), inset 0 0 5px rgba(255,180,180,0.4);
  animation: stancePulse 2.4s ease-in-out infinite;
}
@keyframes redcardBadgePulse {
  0%, 100% { opacity: 0.80; }
  50%       { opacity: 1.00; border-color: rgba(239, 68, 68, 0.95); }
}
.live-badge {
  background: #ef4444; color: white; font-size: 0.65rem; font-weight: 800;
  letter-spacing: 2px; padding: 2px 8px; border-radius: 3px;
  animation: live-blink 1.5s infinite;
}
@keyframes live-blink { 0%,100%{opacity:1} 50%{opacity:0.5} }
.score-numbers {
  font-size: 3.5rem; font-weight: 900; line-height: 1;
  color: var(--white); display: flex; align-items: center; gap: 4px;
}
.score-colon { color: var(--muted); }
.match-minute { font-size: 0.85rem; color: var(--gold); font-weight: 700; }
.match-stoppage-badge {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 8px;
  border: 1.5px solid var(--gold);
  border-radius: 6px;
  background: rgba(239, 64, 68, 0.18);
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-shadow: 0 0 6px rgba(251, 191, 36, 0.45);
  animation: stoppageBadgePulse 1.4s ease-in-out infinite;
}
@keyframes stoppageBadgePulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 rgba(251,191,36,0); }
  50%      { transform: scale(1.05); box-shadow: 0 0 12px rgba(251,191,36,0.55); }
}
.match-minute--frozen {
  color: #fbbf24;
  text-shadow: 0 0 8px rgba(251,191,36,0.5);
  animation: minutePauseBlink 1s ease-in-out infinite;
}
.match-minute--frozen::before {
  content: '⏸ ';
  display: inline-block;
  margin-right: 2px;
}
@keyframes minutePauseBlink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.55; }
}

/* Подсветка предыдущей скорости когда выбрана пауза */
.spd-btn.last-active:not(.active) {
  border-color: var(--gold);
  color: var(--gold);
  opacity: 0.7;
}
.odds-row {
  display: flex; gap: 12px; font-size: 0.75rem; color: var(--muted); margin-top: 2px;
}
.odds-row span { font-weight: 600; }

/* ═══ LIVE SPEED BAR ═══ */
.live-speed-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 16px;
  background: var(--bg2); border-radius: 0 0 10px 10px;
  border: 1px solid var(--bg4); border-top: none;
  margin-bottom: 0;
}

/* ═══ LIVE STATS (inset inside events panel) ═══ */
.dash-stats-inset {
  display: grid; grid-template-columns: 1fr auto 1fr;
  gap: 2px 12px;
  padding: 8px 14px;
  background: var(--bg3);
}
.stat-home { text-align: right; font-weight: 700; color: var(--home-clr); font-size: 0.85rem; }
.stat-name { text-align: center; color: var(--muted); font-size: 0.72rem; white-space: nowrap; }
.stat-away { text-align: left; font-weight: 700; color: var(--away-clr); font-size: 0.85rem; }

/* ═══ LIVE POST-MATCH AREA ═══ */
.live-postmatch-area {
  background: var(--bg2); border-radius: 10px;
  border: 1px solid var(--bg4); padding: 24px;
  text-align: center;
}

/* GOAL BANNER */
.goal-banner {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
  background: rgba(10,14,26,0.95); border: 2px solid var(--gold);
  border-radius: 12px; padding: 28px 48px;
  display: flex; align-items: center; gap: 20px;
  z-index: 100; box-shadow: 0 0 60px rgba(239,64,68,0.6);
  animation: goalIn 0.4s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes goalIn { from{transform:translate(-50%,-50%) scale(0.5)} to{transform:translate(-50%,-50%) scale(1)} }
/* Правая колонка плашки: лого команды + фото игрока стопкой */
.goal-banner-right {
  display: flex; flex-direction: column;
  align-items: center; gap: 8px;
  flex-shrink: 0;
}
.goal-banner-photo {
  width: 78px; height: 96px; border-radius: 8px;
  border: 2px solid var(--gold);
  background-color: rgba(0,0,0,0.35);
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  /* Слоистый фон: фото сверху (cover), силуэт сзади (видно если фото не загрузилось) */
  background-image: url("data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2032%22%20fill%3D%22%23475569%22%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%229%22%20r%3D%225%22%2F%3E%3Cpath%20d%3D%22M2%2030%20Q2%2017%2012%2017%20Q22%2017%2022%2030%20Z%22%2F%3E%3C%2Fsvg%3E");
  background-size: 65%;
  background-position: center 35%;
  background-repeat: no-repeat;
  overflow: hidden;
}
.goal-banner-team-logo {
  width: 90px; height: 90px;
  display: flex; align-items: center; justify-content: center;
  filter: drop-shadow(0 0 12px rgba(239,64,68,0.55));
  animation: goalLogoPulse 0.9s ease-in-out infinite alternate;
}
.goal-banner-team-logo svg,
.goal-banner-team-logo img { width: 100%; height: 100%; object-fit: contain; }
@keyframes goalLogoPulse {
  from { transform: scale(1);    filter: drop-shadow(0 0 8px  rgba(239,64,68,0.45)); }
  to   { transform: scale(1.08); filter: drop-shadow(0 0 18px rgba(239,64,68,0.85)); }
}
.goal-banner-center { text-align: center; }
.goal-ball { font-size: 3rem; animation: spin 0.5s linear; }
@keyframes spin { from{transform:rotate(0)} to{transform:rotate(360deg)} }
.goal-word {
  font-size: 2.5rem; font-weight: 900; letter-spacing: 4px;
  background: linear-gradient(135deg, var(--gold), var(--gold2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.goal-scorer { font-size: 1rem; color: var(--text); margin-top: 8px; font-weight: 600; }
.goal-banner-xg {
  margin-top: 6px; font-size: 0.78rem;
  color: #fbbf24; font-weight: 700; letter-spacing: 1px;
}
.goal-banner-xg b { color: #fff; font-weight: 800; }

/* Mini-pitch infographic (goal banner + shot toast) */
.goal-banner-pitch {
  width: 110px; height: 121px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.goal-banner-pitch svg {
  width: 100%; height: 100%; display: block;
}

/* === Фазы плашки === */
/* Phase 1 — удар (без раскрытия исхода) */
.goal-banner.phase-shot {
  border-color: #fbbf24;
  box-shadow: 0 0 50px rgba(251,191,36,0.45);
}
.goal-banner.phase-shot .goal-word {
  background: linear-gradient(135deg, #fbbf24, #fb923c);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.goal-banner.phase-shot .goal-banner-team-logo {
  filter: drop-shadow(0 0 12px rgba(251,191,36,0.5));
  animation: shotLogoPulse 0.7s ease-in-out infinite alternate;
}
@keyframes shotLogoPulse {
  from { transform: scale(1);    filter: drop-shadow(0 0 8px  rgba(251,191,36,0.4)); }
  to   { transform: scale(1.05); filter: drop-shadow(0 0 16px rgba(251,191,36,0.75)); }
}

/* ПРОРЫВ ПО ФЛАНГУ — анимированная горизонтальная развёртка */
/* Базовый .goal-banner уже position: fixed + центрирование — не переопределяем здесь. */
.goal-banner.phase-flank {
  border-color: #38bdf8;
  box-shadow: 0 0 60px rgba(56,189,248,0.55);
  overflow: hidden;
}
.goal-banner.phase-flank .goal-word {
  background: linear-gradient(180deg, #38bdf8, #22d3ee);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  animation: flankWordSlideUp 1.6s ease-out forwards;
}
/* Вертикальная полоса-«забегающий» — движется снизу вверх вдоль фланга баннера. */
.goal-banner.phase-flank::before {
  content: '';
  position: absolute; left: 0; right: 0;
  height: 60%;
  background: linear-gradient(0deg, transparent 0%, rgba(56,189,248,0.55) 50%, transparent 100%);
  pointer-events: none;
  z-index: 1;
  /* Лёгкий уклон ~4° — «небольшое отклонение», но не диагональ. */
  transform: skewY(-3deg);
}
.goal-banner.phase-flank.flank-right::before {
  left: auto;
  right: 6%;
  width: 22%;
  bottom: -60%;
  animation: flankSweepUp 1.6s ease-out forwards;
}
.goal-banner.phase-flank.flank-left::before {
  right: auto;
  left: 6%;
  width: 22%;
  bottom: -60%;
  transform: skewY(3deg);
  animation: flankSweepUp 1.6s ease-out forwards;
}
@keyframes flankSweepUp {
  from { bottom: -60%; }
  to   { bottom: 130%; }
}
@keyframes flankWordSlideUp {
  0%   { transform: translateY(22px); opacity: 0; }
  35%  { transform: translateY(0);    opacity: 1; }
  100% { transform: translateY(0);    opacity: 1; }
}

/* Phase 2 — исход */
.goal-banner.phase-goal {
  border-color: #43d97f;
  box-shadow: 0 0 60px rgba(67,217,127,0.55);
}
.goal-banner.phase-goal .goal-word {
  background: linear-gradient(135deg, #43d97f, #22c55e);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.goal-banner.phase-goal .goal-banner-team-logo {
  filter: drop-shadow(0 0 12px rgba(67,217,127,0.6));
}

.goal-banner.phase-save {
  border-color: #fbbf24;
  box-shadow: 0 0 50px rgba(251,191,36,0.45);
}
.goal-banner.phase-save .goal-word {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

.goal-banner.phase-post {
  border-color: #fb923c;
  box-shadow: 0 0 50px rgba(251,146,60,0.5);
}
.goal-banner.phase-post .goal-word {
  background: linear-gradient(135deg, #fb923c, #f97316);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

.goal-banner.phase-miss {
  border-color: #94a3b8;
  box-shadow: 0 0 40px rgba(148,163,184,0.4);
}
.goal-banner.phase-miss .goal-word {
  background: linear-gradient(135deg, #cbd5e1, #94a3b8);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

.goal-banner.phase-penmiss {
  border-color: #f87171;
  box-shadow: 0 0 50px rgba(248,113,113,0.5);
}
.goal-banner.phase-penmiss .goal-word {
  background: linear-gradient(135deg, #f87171, #ef4444);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

.goal-banner.phase-block {
  border-color: #22d3ee;
  box-shadow: 0 0 50px rgba(34,211,238,0.45);
}
.goal-banner.phase-block .goal-word {
  background: linear-gradient(135deg, #22d3ee, #06b6d4);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

/* === Кнопка паузы (активная) === */
.spd-btn[data-speed="pause"].active {
  background: rgba(251,191,36,0.18);
  border-color: #fbbf24;
  color: #fbbf24;
}

@media (max-width: 600px) {
  .goal-banner-pitch { width: 90px; height: 99px; }
}

/* ═══ LIVE 3-COLUMN DASHBOARD ═══ */
.live-dashboard {
  display: grid;
  grid-template-columns: 240px 1fr 240px;
  gap: 12px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 12px 12px 20px;
  align-items: start;
}
.dash-panel {
  background: var(--bg2);
  border-radius: 10px;
  border: 1px solid var(--bg4);
  overflow: hidden;
}
.dash-lineup {
  display: flex; flex-direction: column;
}
.dash-lineup .player-list {
  flex: 1;
  max-height: 520px;
  overflow-y: auto;
}
.dash-center {
  display: flex; flex-direction: column; gap: 12px;
  min-height: 0;
}
/* ─── Match Overview: home strip + momentum + away strip ─── */
.match-overview {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.team-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  position: relative;
}
.team-strip-home {
  background: linear-gradient(90deg, rgba(67,175,247,0.13), transparent 55%);
  border-bottom: 2px solid var(--home-clr);
}
.team-strip-away {
  background: linear-gradient(90deg, rgba(239,64,68,0.13), transparent 55%);
  border-top: 2px solid var(--away-clr);
}
.team-strip-logo {
  width: 40px; height: 40px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
}
.team-strip-logo svg, .team-strip-logo img {
  width: 100%; height: 100%; object-fit: contain;
}
.team-strip-name {
  font-weight: 800;
  font-size: 0.82rem;
  flex-shrink: 0;
  min-width: 100px;
  max-width: 130px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.3px;
}
.team-strip-stats {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  flex: 1;
  min-width: 0;
}
.tstat-chip {
  text-align: center;
  padding: 5px 2px;
  background: rgba(0,0,0,0.30);
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.04);
  transition: transform 0.15s, background 0.15s;
}
.tstat-chip:hover {
  background: rgba(0,0,0,0.40);
  transform: translateY(-1px);
}
.tstat-val {
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.tstat-val-home { color: var(--home-clr); }
.tstat-val-away { color: var(--away-clr); }
.tstat-cards .tstat-val { font-size: 0.78rem; line-height: 1.2; }
.tstat-lbl {
  font-size: 0.55rem;
  color: var(--muted);
  letter-spacing: 0.4px;
  text-transform: uppercase;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.momentum-section {
  padding: 10px 14px 14px;
  background: linear-gradient(180deg, var(--bg2), var(--bg));
}
.momentum-section-title {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 2.5px;
  color: var(--muted);
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 6px;
}
.dash-bottom-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: stretch;
  flex: 1;
  min-height: 0;
}
.dash-panel.dash-events {
  display: flex; flex-direction: column;
  overflow: hidden;
}
.dash-events .dash-stats-inset {
  flex-shrink: 0;
}
.dash-events .col-header {
  flex-shrink: 0;
}
.dash-events .event-feed {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

/* MOMENTUM (shared) */
.momentum-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 10px;
}
.mom-team-name { font-size: 0.75rem; font-weight: 700; color: var(--muted); }
.mom-title { font-size: 0.7rem; font-weight: 700; letter-spacing: 2px; color: var(--gold); }
.momentum-chart-row { display: flex; align-items: center; gap: 10px; }
.mom-badge { width: 32px; height: 32px; flex-shrink: 0; }
.momentum-chart-wrap { flex: 1; overflow: hidden; border-radius: 6px; }
.momentum-svg { width: 100%; height: 120px; display: block; }

/* COL HEADER (shared) */
.col-header {
  padding: 10px 14px; background: var(--bg3);
  font-size: 0.7rem; font-weight: 700; letter-spacing: 2px;
  color: var(--gold); border-bottom: 1px solid var(--bg4);
}

/* ── Tactical Stance Indicator (🛡️ ⚖️ ⚔️ над составом) ── */
.stance-bar {
  display: flex; justify-content: center; gap: 4px;
  padding: 5px 8px;
  background: linear-gradient(180deg, rgba(36,132,198,0.06), transparent);
  border-bottom: 1px solid var(--bg4);
}
.stance-cell {
  flex: 0 0 auto;
  width: 28px; height: 28px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.05rem; line-height: 1;
  border-radius: 50%;
  background: rgba(255,255,255,0.03);
  filter: grayscale(0.8) opacity(0.35);
  transition: all 0.35s cubic-bezier(.2,.8,.2,1);
  cursor: help;
}
.stance-cell.active {
  filter: none;
  background: radial-gradient(circle, rgba(239,64,68,0.35), rgba(36,132,198,0.18));
  box-shadow: 0 0 12px rgba(239,64,68,0.55), inset 0 0 6px rgba(255,215,0,0.35);
  transform: scale(1.18);
  animation: stancePulse 2.4s ease-in-out infinite;
}
.stance-cell.active[data-stance="defense"] {
  background: radial-gradient(circle, rgba(56,189,248,0.45), rgba(36,132,198,0.22));
  box-shadow: 0 0 12px rgba(56,189,248,0.6), inset 0 0 6px rgba(180,220,255,0.4);
}
.stance-cell.active[data-stance="balance"] {
  background: radial-gradient(circle, rgba(250,204,21,0.40), rgba(120,80,30,0.18));
  box-shadow: 0 0 10px rgba(250,204,21,0.55), inset 0 0 6px rgba(255,235,150,0.4);
  animation: none;
}
.stance-cell.active[data-stance="attack"] {
  background: radial-gradient(circle, rgba(239,64,68,0.45), rgba(120,30,30,0.2));
  box-shadow: 0 0 14px rgba(239,64,68,0.65), inset 0 0 6px rgba(255,180,180,0.4);
}
@keyframes stancePulse {
  0%, 100% { transform: scale(1.18); }
  50%      { transform: scale(1.26); }
}

/* EVENT FEED */
.event-feed { padding: 8px; overflow-y: auto; }
.event-item {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 6px 4px; border-bottom: 1px solid var(--bg4);
  animation: slideIn 0.3s ease; font-size: 0.82rem;
}
@keyframes slideIn { from{opacity:0;transform:translateY(-8px)} to{opacity:1;transform:none} }
.event-item:last-child { border-bottom: none; }
.ev-min { color: var(--gold); font-weight: 700; font-size: 0.75rem; min-width: 28px; }
.ev-icon { font-size: 0.9rem; min-width: 20px; }
.ev-text { color: var(--text); }
.ev-text .ev-player { font-weight: 700; }
.ev-text .ev-team { color: var(--muted); font-size: 0.75rem; }
.ev-danger  { color: #93c5fd; font-style: italic; }
.ev-post    { color: #fbbf24; font-weight: 700; font-style: normal; }
.ev-pen-tag { font-size: 0.7rem; color: var(--gold); background: rgba(239,64,68,0.15); padding: 1px 5px; border-radius: 3px; }
.ev-misc    { color: #a0aec0; }
.ev-sub-on  { color: #4ade80; font-weight: 700; }
.ev-sub-off { color: #f87171; font-weight: 700; }
.ev-var     { color: #e2e8f0; font-weight: 600; }
.ev-var-bad  { color: #f87171 !important; }
.ev-var-good { color: #4ade80 !important; }
.ev-var-clear{ color: #a0aec0 !important; font-style: italic; }
.ev-var-check{
  color: #fbbf24 !important; font-weight: 700;
  animation: varPulse 1.2s ease-in-out infinite;
}
.ev-var-detail { font-size: 0.72rem; color: var(--muted); margin-left: 4px; }
@keyframes varPulse {
  0%, 100% { opacity: 1; text-shadow: 0 0 6px rgba(251,191,36,0.7); }
  50%      { opacity: 0.5; text-shadow: 0 0 0 transparent; }
}

/* ═══ PENALTY SHOOTOUT OVERLAY ═══ */
.pen-shootout-overlay {
  position: fixed; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: min(430px, 94vw);
  padding: 16px 20px 14px;
  background: rgba(10, 14, 26, 0.96);
  border: 2px solid var(--gold, #ef4044);
  border-radius: 12px;
  z-index: 96;
  display: flex; flex-direction: column; gap: 9px;
  box-shadow: 0 0 60px rgba(239, 64, 68, 0.55);
  animation: penOverlayIn 0.35s ease-out;
}
@keyframes penOverlayIn {
  from { transform: translate(-50%, -50%) scale(0.85); opacity: 0; }
  to   { transform: translate(-50%, -50%) scale(1);   opacity: 1; }
}
.pen-title {
  text-align: center; letter-spacing: 4px;
  font-size: 16px; font-weight: 800;
  color: var(--gold, #ef4044);
  text-shadow: 0 0 12px rgba(239, 64, 68, 0.4);
}
.pen-row {
  display: grid;
  grid-template-columns: 50px 1fr 44px;
  align-items: center;
  gap: 12px;
}
.pen-team-logo { width: 44px; height: 44px; display:flex; align-items:center; justify-content:center; }
.pen-team-logo svg, .pen-team-logo img { max-width: 100%; max-height: 100%; }
.pen-dots { display: flex; gap: 5px; flex-wrap: wrap; min-height: 18px; }
.pen-dot {
  width: 16px; height: 16px;
  border-radius: 50%;
  border: 1.5px solid #555;
  background: #1a1d2c;
  display: flex; align-items: center; justify-content: center;
}
.pen-dot::after { font-size: 9px; line-height: 1; font-weight: 900; color: #fff; display: block; }
.pen-dot.scored { background: #4caf50; border-color: #4caf50; box-shadow: 0 0 8px rgba(76,175,80,0.7); }
.pen-dot.scored::after { content: '✓'; }
.pen-dot.saved  { background: #fbbf24; border-color: #fbbf24; box-shadow: 0 0 8px rgba(251,191,36,0.7); }
.pen-dot.saved::after  { content: '✕'; }
.pen-dot.post   { background: #64748b; border-color: #64748b; box-shadow: 0 0 6px rgba(100,116,139,0.5); }
.pen-dot.post::after   { content: '|'; font-size: 11px; }
.pen-dot.missed { background: #ef4044; border-color: #ef4044; box-shadow: 0 0 8px rgba(239,64,68,0.7); }
.pen-dot.missed::after { content: '✕'; }
@keyframes penDotPop {
  0%   { transform: scale(0); opacity: 0; }
  55%  { transform: scale(1.6); opacity: 1; }
  80%  { transform: scale(0.88); }
  100% { transform: scale(1); }
}
.pen-dot.fresh { animation: penDotPop 0.45s cubic-bezier(0.175,0.885,0.32,1.275) forwards; }
.pen-score {
  font-size: 26px; font-weight: 800;
  text-align: center; color: #fff;
  font-variant-numeric: tabular-nums;
}
.pen-stage {
  display: flex;
  justify-content: center;
  align-items: center;
}
.pen-actor {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  text-align: center;
}
.pen-actor-photo {
  width: 70px; height: 88px;
  border-radius: 6px;
  border: 2px solid var(--purple, #2484c6);
  background: #1a1d2c center 35% / 90% no-repeat,
              url("data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2032%22%20fill%3D%22%23475569%22%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%229%22%20r%3D%225%22%2F%3E%3Cpath%20d%3D%22M2%2030%20Q2%2017%2012%2017%20Q22%2017%2022%2030%20Z%22%2F%3E%3C%2Fsvg%3E") center 60% / 60% no-repeat;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}
.pen-actor-keeper .pen-actor-photo { border-color: var(--gold, #ef4044); }
.pen-actor-name {
  font-size: 12px; font-weight: 700; color: #e8e8e8;
  line-height: 1.1; max-width: 92px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pen-actor-role {
  font-size: 10px; letter-spacing: 1.5px;
  color: #9aa0a6; font-weight: 600;
}
.pen-canvas {
  width: 100%; max-width: 390px; height: auto;
  display: block; margin: 0 auto;
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
}
.pen-shot-label {
  text-align: center;
  font-size: 14px; font-weight: 700;
  min-height: 18px; color: #d4d4d4;
  letter-spacing: 0.5px;
}
@media (max-width: 720px) {
  .pen-stage { grid-template-columns: 70px 1fr 70px; gap: 8px; }
  .pen-actor-photo { width: 56px; height: 70px; }
  .pen-actor-name { font-size: 11px; max-width: 70px; }
}
/* Score flip on update */
@keyframes penScoreFlip {
  0%   { transform: scaleY(1); }
  35%  { transform: scaleY(0.05); }
  70%  { transform: scaleY(1.15); }
  100% { transform: scaleY(1); }
}
.pen-score-flip { animation: penScoreFlip 0.35s ease-in-out; }
/* Goal flash overlay — радиальная вспышка от ворот, не глушит сцену целиком */
@keyframes penGoalFlash {
  0%   { opacity: 0; }
  18%  { opacity: 0.4; }
  100% { opacity: 0; }
}
.pen-shootout-overlay { overflow: hidden; }
.pen-shootout-overlay.pen-goal-flash::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  background: radial-gradient(ellipse 60% 50% at 50% 38%, #0be881 0%, rgba(11,232,129,0) 70%);
  pointer-events: none; z-index: 10;
  animation: penGoalFlash 0.5s ease-out forwards;
}
/* Decisive kick label */
@keyframes penDecisivePulse {
  0%, 100% { opacity: 1; letter-spacing: 4px; }
  50%       { opacity: 0.55; letter-spacing: 3px; }
}
.pen-decisive-label {
  text-align: center; min-height: 16px;
  font-size: 12px; font-weight: 800; letter-spacing: 4px;
  color: #fbbf24; text-shadow: 0 0 10px rgba(251,191,36,0.6);
}
.pen-decisive-label:not(:empty) { animation: penDecisivePulse 0.85s ease-in-out infinite; }
.pen-decisive-label.sd {
  color: #ef4044; text-shadow: 0 0 10px rgba(239,64,68,0.6);
}

/* VAR BANNER (overlay) */
.var-banner {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
  z-index: 95;
  animation: varBannerIn 0.35s ease-out;
}
@keyframes varBannerIn {
  from { transform: translate(-50%, -50%) scale(0.7); opacity: 0; }
  to   { transform: translate(-50%, -50%) scale(1);   opacity: 1; }
}
.var-banner-inner {
  background: rgba(10,14,26,0.97);
  border: 2px solid #fbbf24;
  border-radius: 14px;
  padding: 22px 36px;
  text-align: center;
  box-shadow: 0 0 50px rgba(251,191,36,0.45);
  min-width: 320px;
}
.var-screen {
  position: relative;
  background: linear-gradient(180deg, #1a1f35 0%, #0a0e1a 100%);
  border: 1px solid #2a3255;
  border-radius: 8px;
  padding: 28px 18px 18px;
  overflow: hidden;
}
.var-screen-scan {
  position: absolute; left: 0; right: 0;
  height: 3px; top: 0;
  background: linear-gradient(90deg, transparent, #fbbf24, transparent);
  box-shadow: 0 0 10px #fbbf24;
  animation: varScan 1.6s linear infinite;
}
@keyframes varScan {
  0%   { top: 0; }
  100% { top: 100%; }
}
.var-screen-icon { font-size: 2.2rem; margin-bottom: 6px; filter: drop-shadow(0 0 8px #fbbf24); }
.var-screen-label {
  font-size: 1.15rem; font-weight: 900; letter-spacing: 3px;
  color: #fbbf24;
}
.var-banner-sub {
  margin-top: 10px; font-size: 0.82rem; color: var(--muted);
}

/* Decision variants */
.var-banner.var-goal-cancelled .var-banner-inner { border-color: #f87171; box-shadow: 0 0 50px rgba(239,68,68,0.5); }
.var-banner.var-goal-cancelled .var-screen-label { color: #f87171; }
.var-banner.var-goal-cancelled .var-screen-scan  { background: linear-gradient(90deg, transparent, #f87171, transparent); box-shadow: 0 0 10px #f87171; animation: none; top: 50%; }
.var-banner.var-penalty-awarded .var-banner-inner { border-color: #4ade80; box-shadow: 0 0 50px rgba(74,222,128,0.5); }
.var-banner.var-penalty-awarded .var-screen-label { color: #4ade80; }
.var-banner.var-penalty-awarded .var-screen-scan  { background: linear-gradient(90deg, transparent, #4ade80, transparent); box-shadow: 0 0 10px #4ade80; animation: none; top: 50%; }
.var-banner.var-clear .var-banner-inner { border-color: #64748b; box-shadow: 0 0 40px rgba(100,116,139,0.4); }
.var-banner.var-clear .var-screen-label { color: #94a3b8; }
.var-banner.var-clear .var-screen-scan  { animation: none; opacity: 0; }
.var-banner.var-confirmed .var-banner-inner { border-color: #4ade80; box-shadow: 0 0 50px rgba(74,222,128,0.5); }
.var-banner.var-confirmed .var-screen-label { color: #4ade80; }
.var-banner.var-confirmed .var-screen-scan  { background: linear-gradient(90deg, transparent, #4ade80, transparent); box-shadow: 0 0 10px #4ade80; animation: none; top: 50%; }
.var-banner.var-red .var-banner-inner { border-color: #f97316; box-shadow: 0 0 50px rgba(249,115,22,0.5); }
.var-banner.var-red .var-screen-label { color: #f97316; }
.var-banner.var-red .var-screen-scan  { background: linear-gradient(90deg, transparent, #f97316, transparent); box-shadow: 0 0 10px #f97316; animation: none; top: 50%; }
.ev-counter { color: #fbbf24; font-weight: 700; }
.ev-tackle  { color: #6ee7b7; font-weight: 600; }   /* мятный — отбор */
.ev-duel    { color: #c4b5fd; font-weight: 600; }   /* лиловый — единоборство */
.ev-inj-tag { font-size: 0.65rem; background: rgba(239,68,68,0.2); color: #f87171; padding: 1px 5px; border-radius: 3px; }
.ev-rating-up   { font-size: 0.7rem; color: #4ade80; font-weight: 700; }
.ev-rating-down { font-size: 0.7rem; color: #f87171; font-weight: 700; }

/* STANDINGS TABLE */
#standingsTable, #standingsPost {
  font-size: 0.8rem; padding: 4px 10px;
}
.st-table { 
  width: 100%; border-collapse: separate; border-spacing: 0 4px;
}
.st-table th {
  padding: 8px 6px; color: var(--muted); font-size: 0.65rem;
  font-weight: 800; text-transform: uppercase; letter-spacing: 1px;
  text-align: center; border-bottom: none;
}
.st-table th:first-child, .st-table td:first-child { text-align: center; width: 32px; }
.st-table th:nth-child(2), .st-table td:nth-child(2) { text-align: left; padding-left: 10px; }
.st-table td {
  padding: 8px 6px; text-align: center; background: var(--bg2);
  border-top: 1px solid var(--bg4); border-bottom: 1px solid var(--bg4);
  transition: all 0.2s ease;
}
.st-table td:first-child { border-left: 1px solid var(--bg4); border-top-left-radius: 8px; border-bottom-left-radius: 8px; }
.st-table td:last-child { border-right: 1px solid var(--bg4); border-top-right-radius: 8px; border-bottom-right-radius: 8px; }
.st-table tbody .st-row:hover td { background: var(--bg3); border-top-color: var(--gold); border-bottom-color: var(--gold); }
.st-rank { color: var(--gold); font-size: 0.75rem; font-weight: 900; }
.st-team-cell { display: flex; align-items: center; gap: 8px; text-align: left !important; padding-left: 10px !important; min-width: 0; }
.st-logo { display: inline-flex; width: 22px; height: 22px; flex-shrink: 0; }
.st-logo img { width: 100%; height: 100%; object-fit: contain; }
.st-name { font-weight: 700; font-size: 0.85rem; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-pts { font-weight: 900; color: var(--gold); font-size: 0.95rem; }
.st-row.highlight td { background: rgba(251, 191, 36, 0.1); border-color: rgba(251, 191, 36, 0.3); }
.st-row.current-match td { background: rgba(239, 64, 68, 0.15); border-color: var(--purple); }

/* Live rank delta indicators (▲/▼) */
.st-rank {
  position: relative;
  white-space: nowrap;
  min-width: 42px;
  padding-right: 14px !important;
}
.st-rank-num { display: inline-block; }
.st-rank-delta {
  display: inline-block;
  margin-left: 4px;
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
  vertical-align: middle;
}
.st-rank-delta:empty { display: none; }
.st-row.rank-up .st-rank-delta { color: #4ade80; text-shadow: 0 0 6px rgba(74, 222, 128, 0.6); }
.st-row.rank-down .st-rank-delta { color: #ef4044; text-shadow: 0 0 6px rgba(239, 64, 68, 0.6); }
.st-row.rank-up.rank-flash td { animation: rankFlashUp 0.9s ease-out; }
.st-row.rank-down.rank-flash td { animation: rankFlashDown 0.9s ease-out; }
@keyframes rankFlashUp {
  0%   { background: rgba(74, 222, 128, 0.45); }
  100% { background: rgba(239, 64, 68, 0.15); }
}
@keyframes rankFlashDown {
  0%   { background: rgba(239, 64, 68, 0.55); }
  100% { background: rgba(239, 64, 68, 0.15); }
}

.tournament-wide-wrap { max-height: 420px; overflow: auto; padding-right: 4px; }
.tournament-wide-table .st-name { white-space: normal; }
.tournament-groups-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  max-height: 520px;
  overflow: auto;
  padding: 2px 4px 2px 0;
}
.tgroup-card {
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--bg4);
  border-radius: 8px;
  padding: 8px;
}
.tgroup-title {
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin: 2px 0 6px;
}
.tgroup-card .st-table th,
.tgroup-card .st-table td { padding: 6px 4px; }
.tgroup-card .st-table th:nth-child(7),
.tgroup-card .st-table th:nth-child(8),
.tgroup-card .st-table th:nth-child(9),
.tgroup-card .st-table td:nth-child(7),
.tgroup-card .st-table td:nth-child(8),
.tgroup-card .st-table td:nth-child(9) { display: none; }
.tcup-wrap { padding: 4px; }
.tcup-title {
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 10px;
}
/* Итоговые таблицы групп под сеткой плей-офф (после группового этапа) */
.tournament-final-groups {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--bg4);
}
.tfinal-groups-title {
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.tcup-pairs { display: grid; gap: 8px; }
.tcup-pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 54px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  background: var(--bg2);
  border: 1px solid var(--bg4);
  border-radius: 8px;
}
.tcup-pair.current { border-color: var(--gold); background: rgba(251, 191, 36, 0.08); }
.tcup-pair.decided { opacity: 0.78; }
.tcup-team {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-weight: 800;
}
.tcup-team span:not(.tcup-logo) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tcup-team-away { justify-content: flex-end; text-align: right; }
.tcup-team.winner { color: #4ade80; }
.tcup-logo { width: 24px; height: 24px; flex: 0 0 24px; display: inline-flex; }
.tcup-logo img { width: 100%; height: 100%; object-fit: contain; }
.tcup-score {
  text-align: center;
  color: var(--gold);
  font-weight: 900;
  font-size: 0.9rem;
}

/* ═══════════════ SQUADS TAB ═══════════════ */
.squads-toolbar {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px; background: var(--bg2);
  border: 1px solid var(--bg4); border-radius: 12px;
  margin-bottom: 16px; flex-wrap: wrap;
}
.squads-search {
  flex: 1; min-width: 220px;
  padding: 10px 14px; border-radius: 8px;
  border: 1px solid var(--bg4);
  background: var(--bg); color: var(--text);
  font-size: 0.9rem;
}
.squads-search::placeholder { color: var(--muted); }
.squads-search:focus { outline: none; border-color: var(--purple); }
.squads-filters { display: flex; gap: 6px; }
.sq-filter-btn {
  padding: 8px 14px; border-radius: 18px;
  border: 1px solid var(--bg4); background: var(--bg2);
  color: var(--muted); font-size: 0.8rem; font-weight: 700;
  cursor: pointer; transition: all 0.2s;
}
.sq-filter-btn:hover { border-color: var(--purple); color: var(--text); }
.sq-filter-btn.active {
  background: var(--purple); color: #fff; border-color: var(--purple);
}
.squads-content {
  display: flex; flex-direction: column; gap: 10px;
}
.sq-team-block {
  background: var(--bg2);
  border: 1px solid var(--bg4);
  border-radius: 14px;
  overflow: hidden;
}
.sq-team-header {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  padding: 12px 16px;
  background: var(--bg3);
  border: 0;
  border-bottom: 1px solid transparent;
  font-weight: 800; font-size: 0.95rem;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: background 0.15s;
  font-family: inherit;
}
.sq-team-header:hover { background: var(--bg4); }
.sq-team-block.expanded .sq-team-header { border-bottom-color: var(--bg4); }
.sq-team-logo { display: inline-flex; width: 32px; height: 32px; flex-shrink: 0; }
.sq-team-logo img { width: 100%; height: 100%; object-fit: contain; }
.sq-team-name { flex: 1; color: var(--text); }
.sq-team-rank {
  font-size: 0.72rem; color: var(--muted); font-weight: 700;
  padding: 2px 8px; border-radius: 10px;
  background: var(--bg2);
  border: 1px solid var(--bg4);
}
.sq-team-chips { display: flex; gap: 6px; align-items: center; }
.sq-team-size {
  font-size: 0.72rem; color: var(--muted); font-weight: 700;
  padding: 2px 8px; border-radius: 10px;
  background: var(--bg); border: 1px solid var(--bg4);
  min-width: 34px; text-align: center;
}
.sq-team-injured {
  font-size: 0.72rem; color: #ef4044; font-weight: 800;
  padding: 2px 8px; border-radius: 10px;
  background: rgba(239, 64, 68, 0.12);
  border: 1px solid rgba(239, 64, 68, 0.35);
}
.sq-team-chevron {
  font-size: 0.9rem; color: var(--muted);
  transition: transform 0.2s;
  margin-left: 4px;
}
.sq-team-block.expanded .sq-team-chevron { transform: rotate(180deg); color: var(--purple); }
.sq-team-players {
  padding: 8px;
  display: none;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 6px;
}
.sq-team-block.expanded .sq-team-players { display: grid; }
.sq-player-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  background: var(--bg); border-radius: 8px;
  cursor: pointer; transition: background 0.15s;
}
.sq-player-row:hover { background: var(--bg3); }
.sq-player-row.sq-player--injured { opacity: 0.85; }
.sq-player-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  object-fit: cover; background: var(--bg3);
  flex-shrink: 0;
}
.sq-player-avatar--placeholder {
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-weight: 900;
}
.sq-player-info { flex: 1; min-width: 0; }
.sq-player-name {
  font-weight: 700; font-size: 0.88rem; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sq-player-sub {
  font-size: 0.72rem; color: var(--muted); font-weight: 600;
}
.sq-inj-row {
  font-size: 0.72rem; font-weight: 700; margin-top: 2px;
}
.sq-returner { color: #eab308 !important; }
.sq-suspended { color: #ff6446 !important; }

/* Season stats line inside player row */
.sq-player-stats {
  display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px;
}
.sq-stat-chip {
  font-size: 0.66rem; font-weight: 700;
  padding: 1px 5px; border-radius: 4px;
  background: rgba(255,255,255,0.06);
  color: var(--muted);
  white-space: nowrap;
}
.sq-stat-goal   { color: #fbbf24; }
.sq-stat-assist { color: #43aff7; }
.sq-stat-cs     { color: #4ade80; }
.sq-stat-rating { font-weight: 800; }

/* Streak chips inside player row (next to name) */
.sq-streak {
  display: inline-block;
  font-size: 0.64rem; font-weight: 800;
  padding: 1px 6px; border-radius: 4px;
  margin-left: 6px;
  letter-spacing: 0.3px;
  vertical-align: 1px;
  white-space: nowrap;
}
.sq-streak-fire {
  background: rgba(251, 146, 60, 0.18);
  color: #fb923c;
  border: 1px solid rgba(251, 146, 60, 0.35);
}
.sq-streak-cold {
  background: rgba(96, 165, 250, 0.18);
  color: #60a5fa;
  border: 1px solid rgba(96, 165, 250, 0.35);
}
.sq-player-row.sq-player--fire {
  background: linear-gradient(90deg, rgba(251,146,60,0.08) 0%, transparent 60%);
}
.sq-player-row.sq-player--cold {
  background: linear-gradient(90deg, rgba(96,165,250,0.08) 0%, transparent 60%);
}
.sq-player-row.sq-player--fire:hover { background: var(--bg3); }
.sq-player-row.sq-player--cold:hover { background: var(--bg3); }

/* Team header chips for fire/cold counters */
.sq-team-fire,
.sq-team-cold {
  font-size: 0.74rem; font-weight: 800;
  padding: 3px 8px; border-radius: 10px;
  letter-spacing: 0.3px;
}
.sq-team-fire {
  background: rgba(251, 146, 60, 0.15);
  color: #fb923c;
}
.sq-team-cold {
  background: rgba(96, 165, 250, 0.15);
  color: #60a5fa;
}
.sq-player-rating {
  margin-left: auto;
  padding: 4px 10px; border-radius: 6px;
  font-weight: 900; font-size: 0.85rem;
  min-width: 36px; text-align: center;
  flex-shrink: 0;
}
.squads-empty {
  padding: 40px; text-align: center;
  color: var(--muted); font-size: 0.95rem;
}

/* ═══ Prematch weather ═══ */
.prematch-weather {
  min-height: 42px;
  margin-bottom: 14px;
}
.weather-loading {
  font-size: 0.78rem; color: var(--muted);
  letter-spacing: 0.5px; padding: 6px 0;
  animation: pulse-opacity 1.4s ease-in-out infinite;
}
@keyframes pulse-opacity { 0%,100%{opacity:.45} 50%{opacity:1} }

.weather-block {
  display: inline-flex; align-items: center; gap: 12px;
  background: linear-gradient(135deg, var(--bg3), var(--bg));
  border: 1px solid var(--bg4); border-radius: 10px;
  padding: 10px 18px; position: relative;
}
.weather-icon-big {
  font-size: 2rem; line-height: 1; flex-shrink: 0;
}
.weather-details {
  display: flex; flex-direction: column; gap: 2px; text-align: left;
}
.weather-city-name {
  font-size: 0.72rem; font-weight: 800; letter-spacing: 1px;
  color: var(--purple2); text-transform: uppercase;
}
.weather-desc-text {
  font-size: 0.88rem; font-weight: 600; color: var(--white);
}
.weather-numbers {
  font-size: 0.78rem; color: var(--muted); font-weight: 500;
}
.weather-tag {
  font-size: 0.62rem; font-weight: 800; letter-spacing: 1px;
  padding: 2px 7px; border-radius: 10px;
  align-self: flex-start; text-transform: uppercase;
  margin-left: 4px;
}
.weather-actual  { background: rgba(67,175,247,0.18); color: var(--purple2); border: 1px solid rgba(67,175,247,0.35); }
.weather-forecast{ background: rgba(239,64,68,0.15); color: var(--gold2); border: 1px solid rgba(239,64,68,0.35); }

/* ─── Weather impact (влияние на игру) ─── */
.weather-impact {
  margin-top: 8px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  animation: weatherImpactPulse 2.4s ease-in-out infinite;
}
.weather-impact-title {
  font-size: 0.68rem; font-weight: 800; letter-spacing: 1px;
  color: var(--purple2); text-transform: uppercase;
}
.weather-impact-list {
  display: inline-flex; flex-wrap: wrap; gap: 8px; justify-content: center;
}
.weather-impact-item {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.3px;
  padding: 3px 9px; border-radius: 10px;
  background: rgba(36, 132, 198, 0.10);
  border: 1px solid rgba(36, 132, 198, 0.35);
  color: var(--text);
}
.weather-impact-item.wi-bad  {
  color: var(--gold2);
  background: rgba(239, 64, 68, 0.10);
  border-color: rgba(239, 64, 68, 0.40);
}
.weather-impact-item.wi-good {
  color: #6dd58a;
  background: rgba(76, 175, 80, 0.10);
  border-color: rgba(76, 175, 80, 0.40);
}
@keyframes weatherImpactPulse {
  0%, 100% { opacity: 0.85; }
  50%      { opacity: 1.00; }
}

/* ─── Roof closed badge ─── */
.weather-impact.weather-roof-closed {
  margin-top: 8px;
  padding: 6px 12px;
  background: rgba(36, 132, 198, 0.12);
  border: 1px solid rgba(36, 132, 198, 0.45);
  border-radius: 10px;
  animation: none;
}
.weather-roof-closed .weather-impact-title {
  color: var(--purple2);
  font-size: 0.78rem;
}

/* ─── Altitude (Bolivia / La Paz) ─── */
.weather-altitude {
  margin-top: 6px;
  display: flex; justify-content: center;
}
.weather-altitude .weather-impact-item {
  background: rgba(239, 64, 68, 0.10);
  border-color: rgba(239, 64, 68, 0.45);
  color: var(--gold2);
}

/* ═══ Prematch injuries ═══ */
.prematch-injuries {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 12px; margin: 14px 0;
}
.inj-col {
  background: var(--bg); border: 1px solid var(--bg4);
  border-radius: 10px; padding: 10px 12px;
}
.inj-col-title {
  font-size: 0.75rem; color: #ef4044; font-weight: 800;
  margin-bottom: 6px;
}
.inj-col-body { display: flex; flex-wrap: wrap; gap: 6px; }
.inj-empty { color: var(--muted); font-size: 0.78rem; font-style: italic; }
.inj-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: 12px;
  background: rgba(239, 64, 68, 0.10);
  border: 1px solid rgba(239, 64, 68, 0.35);
  font-size: 0.74rem; font-weight: 700; color: var(--text);
}
.inj-chip-dur { color: var(--muted); font-weight: 500; }
.inj-chip.susp-chip {
  background: rgba(255, 100, 70, 0.12);
  border-color: rgba(255, 100, 70, 0.55);
  margin-left: 4px;
}

/* ═══ Injury severity inline (history event) ═══ */
.ev-inj-sev { font-weight: 700; font-size: 0.85em; margin-left: 4px; }

/* ═══ Injury block in player popup ═══ */
.pp-injury {
  margin: 10px 0;
  padding: 10px 14px;
  border: 2px solid #ef4044;
  border-radius: 10px;
  background: rgba(239, 64, 68, 0.08);
  font-size: 0.9rem; font-weight: 700;
}

@media (max-width: 760px) {
  .sq-team-players { grid-template-columns: 1fr; }
  .prematch-injuries { grid-template-columns: 1fr; }
}

/* SPEED BUTTONS (shared) */
.speed-label { font-size: 0.75rem; color: var(--muted); }
.spd-btn {
  padding: 6px 14px; border-radius: 16px;
  border: 1px solid var(--bg4); background: var(--bg2);
  color: var(--muted); font-size: 0.75rem; font-weight: 700;
  cursor: pointer; transition: all 0.2s;
}
.spd-btn:hover { border-color: var(--gold); color: var(--gold); }
.spd-btn.active { background: var(--purple); border-color: var(--gold); color: var(--gold); }

/* POST-MATCH (history detail) */
.postmatch-card {
  max-width: 700px; margin: 0 auto;
  background: var(--bg2); border-radius: 12px;
  border: 1px solid var(--bg4); padding: 32px;
  text-align: center; margin-bottom: 20px;
}
.result-row {
  display: flex; align-items: center; justify-content: center;
  gap: 20px; margin-bottom: 24px;
}
.result-team { font-size: 1.1rem; font-weight: 700; max-width: 150px; }
.result-score-big {
  font-size: 3rem; font-weight: 900; color: var(--white);
  background: var(--bg3); padding: 8px 24px; border-radius: 8px;
  border: 1px solid var(--bg4);
}
.match-stats-grid {
  display: grid; grid-template-columns: 1fr auto 1fr;
  gap: 4px 12px; margin: 16px 0; max-width: 420px; margin-left: auto; margin-right: auto;
}

.next-match-info { margin-top: 20px; }
#liveExtraTimeBlock { margin-top: 20px; text-align: center; }
.et-label { font-size: 0.75rem; letter-spacing: 2px; color: #fbbf24; font-weight: 700; margin-bottom: 10px; }
.next-fixture-preview {
  font-size: 0.85rem; color: var(--muted); margin-bottom: 8px;
}

.end-season { padding: 20px; }
.trophy-icon { font-size: 3rem; margin-bottom: 8px; }
.champion-text { font-size: 1.2rem; font-weight: 800; color: var(--gold); margin-bottom: 20px; }

/* WC2026: пост-матчевая панель — 2 кнопки + подпись (команды/дата/место). */
.wc-postmatch-actions {
  display: flex; gap: 12px; flex-wrap: wrap;
  justify-content: center; align-items: center;
  margin-top: 4px;
}
.wc-postmatch-actions .btn-big { margin-top: 0; }
.wc-postmatch-caption {
  margin-top: 10px;
  font-size: 0.78rem; color: var(--muted);
  letter-spacing: 0.3px;
}

.standings-postmatch {
  max-width: 700px; margin: 0 auto 20px;
  background: var(--bg2); border-radius: 12px;
  border: 1px solid var(--bg4); overflow: hidden;
}

/* HISTORY */
.history-empty { padding: 40px; text-align: center; color: var(--muted); }

/* Кнопка следующего матча в истории */
.hist-next-wrap {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  background: var(--bg2); border-radius: 12px; border: 1px solid var(--bg4);
  padding: 16px 20px; margin-bottom: 16px;
}
.hist-next-fixture { font-size: 0.9rem; color: var(--muted); margin-bottom: 4px; }
.hist-next-fixture b { color: var(--white); }
.hist-next-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.hist-next-actions .btn-big,
.hist-next-actions .btn-secondary { margin-top: 0; }
.prematch-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; align-items: center; }
.prematch-actions .btn-big,
.prematch-actions .btn-secondary { margin-top: 20px; }

/* Sub-tabs истории */
.history-subtabs {
  display: flex; gap: 6px; margin-bottom: 16px;
  border-bottom: 1px solid var(--bg4); padding-bottom: 10px;
}
.htab-btn {
  background: none; border: 1px solid var(--bg4); color: var(--muted);
  border-radius: 6px; padding: 6px 16px; cursor: pointer;
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.5px;
  transition: all 0.15s;
}
.htab-btn:hover { border-color: var(--purple2); color: var(--white); }
.htab-btn.active { background: var(--purple); border-color: var(--purple); color: var(--white); }
.htab-pane { display: none; }
.htab-pane.htab-active { display: block; }

/* Фильтр по конфедерациям (WC2026 history) */
.hist-conf-filter {
  display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px;
  padding-bottom: 10px; border-bottom: 1px dashed var(--bg4);
}
.hcf-btn {
  background: rgba(36, 132, 198, 0.08); border: 1px solid var(--bg4); color: var(--muted);
  border-radius: 999px; padding: 4px 12px; cursor: pointer;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.4px;
  display: inline-flex; align-items: center; gap: 6px;
  transition: all 0.15s;
}
.hcf-btn:hover { border-color: var(--purple2); color: var(--white); background: rgba(36, 132, 198, 0.18); }
.hcf-btn.active {
  background: linear-gradient(135deg, var(--purple), var(--purple2));
  border-color: var(--purple); color: var(--white);
}
.hcf-btn .hcf-count {
  background: rgba(0, 0, 0, 0.25); border-radius: 999px;
  padding: 1px 7px; font-size: 0.65rem; min-width: 18px; text-align: center;
}
.hcf-btn.active .hcf-count { background: rgba(255, 255, 255, 0.18); }

/* Группировка матчей по турам */
.history-list { padding: 0; max-width: 900px; margin: 0 auto; }

/* ─── Round group: collapsible ─── */
.hist-round-group { margin-bottom: 10px; }
.hist-round-toggle {
  width: 100%; display: flex; align-items: center; gap: 10px;
  background: var(--bg2); border: 1px solid var(--bg4);
  border-radius: 10px; padding: 11px 16px;
  cursor: pointer; transition: background 0.15s, border-color 0.15s;
  text-align: left;
}
.hist-round-toggle:hover { background: var(--bg3); border-color: var(--purple2); }
.hist-round-toggle.open { border-radius: 10px 10px 0 0; border-color: var(--purple2); }
.hist-round-num {
  font-size: 0.78rem; font-weight: 900; letter-spacing: 2px;
  color: var(--purple2); text-transform: uppercase; flex-shrink: 0;
}
.hist-round-count {
  font-size: 0.72rem; color: var(--muted); flex-shrink: 0;
}
.hist-round-mvp {
  display: flex; align-items: center; gap: 5px;
  font-size: 0.72rem; color: var(--gold2); flex: 1;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.hist-round-mvp b { color: var(--gold); }
.hist-toggle-arrow {
  font-size: 0.65rem; color: var(--muted); flex-shrink: 0;
  transition: transform 0.2s; display: inline-block;
}
.hist-round-toggle.open .hist-toggle-arrow { transform: rotate(180deg); }

.hist-round-body {
  background: var(--bg2); border: 1px solid var(--purple2);
  border-top: none; border-radius: 0 0 10px 10px;
  overflow: hidden; margin-bottom: 0;
}
.hist-round-matches { padding: 10px 12px; }

/* Матч в списке тура */
.history-item {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; border-radius: 8px;
  border: 1px solid var(--bg4); padding: 10px 14px;
  margin-bottom: 6px; cursor: pointer; transition: all 0.15s;
  background: var(--bg3);
}
.history-item:last-child { margin-bottom: 0; }
.history-item:hover { border-color: var(--gold); background: var(--bg4); }
.hist-teams {
  display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0;
}
.hist-club-logo { width: 20px; height: 20px; flex-shrink: 0; display: flex; align-items: center; }
.hist-club-logo svg, .hist-club-logo img { width: 100%; height: 100%; object-fit: contain; }
.hist-fixture { font-size: 0.85rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hist-fixture-away { text-align: right; }
.hist-score {
  font-size: 1rem; font-weight: 900; color: var(--white);
  background: var(--bg); padding: 3px 10px; border-radius: 5px;
  font-variant-numeric: tabular-nums; flex-shrink: 0;
}
.hist-pen { font-size: 0.7rem; font-weight: 600; color: var(--gold); margin-left: 4px; }
.result-pen-line { font-size: 1rem; font-weight: 600; color: var(--gold); margin-top: 2px; }
.hist-date { font-size: 0.68rem; color: var(--muted); white-space: nowrap; flex-shrink: 0; }

/* Таблица сезонной статистики (бомбардиры / рейтинги) */
.season-stats-wrap { max-width: 680px; margin: 0 auto; }
.season-stats-toggle {
  display: flex; gap: 8px; margin-bottom: 14px;
}
.sstog-btn {
  background: var(--bg3); border: 1px solid var(--bg4); color: var(--muted);
  border-radius: 6px; padding: 5px 14px; cursor: pointer;
  font-size: 0.78rem; font-weight: 700; transition: all 0.15s;
}
.sstog-btn.active { background: var(--gold); border-color: var(--gold); color: #fff; }
.season-stat-row {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg2); border-radius: 8px; border: 1px solid var(--bg4);
  padding: 10px 14px; margin-bottom: 6px;
}
.season-stat-rank {
  font-size: 0.72rem; font-weight: 800; color: var(--muted);
  min-width: 22px; text-align: center;
}
.season-stat-rank.top1 { color: #fbbf24; }
.season-stat-rank.top2 { color: #94a3b8; }
.season-stat-rank.top3 { color: #b45309; }
.season-stat-photo {
  width: 36px; height: 46px; border-radius: 5px;
  object-fit: cover; object-position: top;
  border: 1px solid var(--bg4); flex-shrink: 0;
}
.season-stat-photo-fallback {
  width: 36px; height: 46px; border-radius: 5px;
  background: var(--bg3); border: 1px solid var(--bg4);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; font-weight: 700; color: var(--muted); flex-shrink: 0;
}
.season-stat-club { width: 24px; height: 24px; flex-shrink: 0; }
.season-stat-info { flex: 1; min-width: 0; }
.season-stat-name {
  font-size: 0.85rem; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.season-stat-team { font-size: 0.7rem; color: var(--muted); }
.season-stat-val {
  font-size: 1.4rem; font-weight: 900; min-width: 36px; text-align: right;
  color: var(--gold);
}
.season-stat-sub { font-size: 0.65rem; color: var(--muted); text-align: right; }

/* СБОРНАЯ ТУРА */
.tor-wrap {
  background: linear-gradient(160deg, #0d1528, var(--bg2));
  border-bottom: 1px solid var(--bg4);
}
.tor-header {
  font-size: 0.65rem; font-weight: 800; letter-spacing: 2px;
  color: var(--purple2); text-transform: uppercase;
  padding: 10px 16px 6px; text-align: center;
}
.tor-body { padding: 6px 14px 14px; }
.tor-line {
  display: flex; justify-content: center; gap: 8px;
  margin-bottom: 10px; flex-wrap: wrap;
}
.tor-player {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  background: var(--bg3); border-radius: 8px; padding: 8px 6px;
  width: 74px; cursor: pointer; transition: background 0.15s, box-shadow 0.15s;
  border: 1px solid var(--bg4); position: relative;
}
.tor-player:hover { background: var(--bg4); border-color: var(--purple2); }
/* MVP player highlight */
.tor-player.tor-mvp {
  border-color: var(--gold);
  box-shadow: 0 0 12px rgba(239,160,68,0.35);
  background: linear-gradient(160deg, rgba(239,160,68,0.10), var(--bg3));
}
.tor-mvp-badge {
  position: absolute; top: -7px; left: 50%; transform: translateX(-50%);
  background: var(--gold); color: #0a0e1a;
  font-size: 0.5rem; font-weight: 900; letter-spacing: 1px;
  padding: 1px 5px; border-radius: 8px; white-space: nowrap;
}
.tor-photo {
  width: 44px; height: 56px; border-radius: 5px;
  object-fit: cover; object-position: top; border: 1px solid var(--bg4);
}
.tor-photo-fb {
  width: 44px; height: 56px; border-radius: 5px;
  background: var(--bg2); border: 1px solid var(--bg4);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; font-weight: 700; color: var(--muted);
}
.tor-name {
  font-size: 0.6rem; font-weight: 700; text-align: center;
  color: var(--white); line-height: 1.2;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 68px;
}
.tor-club { width: 16px; height: 16px; }
.tor-rating {
  font-size: 0.7rem; font-weight: 900; padding: 1px 6px;
  border-radius: 4px;
}

/* HISTORY DETAIL */
#tab-history-detail { padding: 0 16px 40px; }
.detail-header { margin-bottom: 24px; }
.detail-result-card {
  background: var(--bg2); border-radius: 12px;
  border: 1px solid var(--bg4); padding: 28px;
  text-align: center; margin-bottom: 20px;
  max-width: 700px; margin-left: auto; margin-right: auto;
}
.detail-match-meta {
  font-size: 0.68rem; font-weight: 700; letter-spacing: 1.5px;
  color: var(--muted); text-transform: uppercase; margin-bottom: 10px;
}
.detail-odds-row {
  display: flex; justify-content: center; gap: 24px;
  margin: 12px 0 4px; font-size: 0.9rem; font-weight: 700; color: var(--gold2);
}
.detail-odds-lbl { font-size: 0.65rem; color: var(--muted); font-weight: 600; margin-right: 4px; }
.detail-weather-row {
  display: flex; justify-content: center; gap: 14px; align-items: center;
  font-size: 0.78rem; color: var(--muted); margin: 6px 0 14px;
}
.detail-stats-grid {
  display: grid; grid-template-columns: 1fr auto 1fr;
  gap: 6px 16px; max-width: 480px; margin: 20px auto;
}
.detail-events { max-width: 700px; margin: 0 auto 20px; }
.detail-events .col-header { border-radius: 8px 8px 0 0; }
.detail-event-list { background: var(--bg2); border: 1px solid var(--bg4); border-top: none; border-radius: 0 0 8px 8px; padding: 8px; }

.gemini-section {
  max-width: 700px; margin: 0 auto;
  background: var(--bg2); border-radius: 12px;
  border: 1px solid var(--bg4); overflow: hidden;
}
.gemini-header {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px; background: var(--bg3);
  border-bottom: 1px solid var(--bg4);
}
.gemini-icon { font-size: 1.2rem; }
.gemini-title { font-size: 0.75rem; font-weight: 700; letter-spacing: 1px; color: var(--gold); }
.gemini-body { padding: 18px; }

/* Блок первоначальной настройки ключа */
.ai-setup-block { }
.ai-setup-hint {
  font-size: 0.83rem; color: var(--muted); line-height: 1.55; margin-bottom: 14px;
}
.ai-setup-hint b { color: var(--text); }
.ai-setup-link { color: var(--purple); text-decoration: underline; }
.ai-setup-link:hover { color: var(--gold); }

/* Строка ввода ключа */
.ai-key-row {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
}
.ai-key-input {
  flex: 1; min-width: 200px; padding: 9px 12px; border-radius: var(--radius);
  border: 1px solid var(--bg4); background: var(--bg3);
  color: var(--text); font-size: 0.82rem; outline: none; transition: border 0.2s;
  font-family: monospace;
}
.ai-key-input:focus { border-color: var(--gold); outline: none; }
.ai-key-input::placeholder { color: var(--muted); font-family: inherit; }
.btn-save-key {
  padding: 9px 18px; border-radius: var(--radius);
  background: var(--purple); border: 1px solid var(--purple);
  color: white; font-size: 0.82rem; font-weight: 700;
  cursor: pointer; transition: opacity 0.2s;
  white-space: nowrap;
}
.btn-save-key:hover { opacity: 0.85; }
.btn-skip-key {
  display: block; margin-top: 10px; padding: 6px 0;
  background: none; border: none; color: var(--muted);
  font-size: 0.78rem; cursor: pointer; text-decoration: underline;
}
.btn-skip-key:hover { color: var(--text); }

/* Блок «ключ есть» */
.ai-ready-block {
  display: flex; align-items: center; gap: 10px;
}
.btn-gemini {
  padding: 10px 24px; border-radius: var(--radius);
  background: linear-gradient(135deg, #2563eb, #16a34a);
  border: none; color: white; font-size: 0.85rem; font-weight: 700;
  cursor: pointer; transition: all 0.2s;
}
.btn-gemini:hover { opacity: 0.9; transform: translateY(-1px); }
.btn-gemini:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-change-key {
  padding: 8px 10px; border-radius: var(--radius);
  background: transparent; border: 1px solid var(--bg4);
  color: var(--muted); font-size: 0.9rem;
  cursor: pointer; transition: border-color 0.2s, color 0.2s;
}
.btn-change-key:hover { border-color: var(--gold); color: var(--gold); }

/* Вывод обзора */
.gemini-output {
  margin-top: 16px; padding: 16px; background: var(--bg3);
  border-radius: 8px; color: var(--text);
}
.ai-review-text {
  font-size: 0.9rem; line-height: 1.75; white-space: pre-wrap;
}
.ai-loading { font-size: 0.85rem; color: var(--muted); }
.ai-error-msg {
  font-size: 0.82rem; color: #f87171;
  padding: 4px 0;
}

/* TEAM LOGO SVG */
.team-logo svg, .team-logo-lg svg,
.mom-badge svg, .prematch-logo svg { display: block; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: var(--bg4); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--purple2); }

/* ═══ LIVE LINEUP CARDS ═══ */
.player-list {
  padding: 4px; max-height: 560px; overflow-y: auto;
}
.player-row {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 8px; border-radius: 6px; cursor: pointer;
  transition: background 0.15s, opacity 0.3s;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}
.player-row:hover { background: var(--bg3); }
.player-row .p-pos,
.lineup-player .p-pos,
.sq-player-sub .p-pos,
.season-stat-name .p-pos {
  font-size: 0.6rem; font-weight: 800;
  min-width: 26px; text-align: center;
  padding: 2px 3px; border-radius: 3px;
  letter-spacing: 0.3px;
}
.p-pos.GK  { background: rgba(252, 211, 77, 0.15); color: #fcd34d; }
.p-pos.DEF { background: rgba(96, 165, 250, 0.15); color: #60a5fa; }
.p-pos.MID { background: rgba(52, 211, 153, 0.15); color: #34d399; }
.p-pos.ATT { background: rgba(248, 113, 113, 0.15); color: #f87171; }

.p-avatar {
  width: 20px; height: 26px; border-radius: 4px;
  object-fit: cover; object-position: top;
  flex-shrink: 0; border: 1px solid var(--bg4);
}
.p-avatar-fallback {
  width: 20px; height: 26px; border-radius: 4px;
  background: var(--bg3); border: 1px solid var(--bg4);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.65rem; font-weight: 700; color: var(--muted);
  flex-shrink: 0;
}
.player-row .p-name {
  flex: 1; font-size: 0.78rem; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  min-width: 0;
}
.player-row .p-tags {
  display: flex; gap: 1px; font-size: 0.65rem;
  flex-shrink: 0;
}
.player-row .p-time-tag {
  font-size: 0.6rem; color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.player-row .p-rating {
  min-width: 34px; padding: 2px 6px;
  border-radius: 4px; font-size: 0.76rem; font-weight: 800;
  text-align: center;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
  transition: transform 0.25s, box-shadow 0.25s;
}
.p-rating.r-stellar { background: linear-gradient(135deg, #fbbf24, #f59e0b); color: #1a0f00; }
.p-rating.r-great   { background: #10b981; color: white; }
.p-rating.r-good    { background: #3b82f6; color: white; }
.p-rating.r-normal  { background: var(--bg4); color: #e8ecf5; }
.p-rating.r-poor    { background: #f59e0b; color: #1a0f00; }
.p-rating.r-bad     { background: #ef4444; color: white; }

.p-rating.pulse-up   { animation: rating-pulse-up 0.7s ease; }
.p-rating.pulse-down { animation: rating-pulse-down 0.7s ease; }
@keyframes rating-pulse-up {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.3); box-shadow: 0 0 14px #4ade80; }
  100% { transform: scale(1); }
}
@keyframes rating-pulse-down {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.3); box-shadow: 0 0 14px #f87171; }
  100% { transform: scale(1); }
}

.player-row.subbed-out {
  opacity: 0.45;
}
.player-row.subbed-out .p-name {
  text-decoration: line-through;
  color: var(--muted);
}
.player-row.sub-in {
  background: rgba(74, 222, 128, 0.06);
  border-left: 2px solid #4ade80;
}
.player-row.sent-off {
  opacity: 0.4;
  background: rgba(239, 68, 68, 0.1);
}
.player-row.bench-row {
  opacity: 0.85;
}
.player-row.bench-row .p-rating {
  background: transparent;
  color: var(--muted);
  font-weight: 500;
}

/* Отдельный блок скамейки запасных под основным составом */
.bench-block {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--bg4);
}
.bench-block-header {
  padding: 4px 10px 6px;
  font-size: 0.64rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
}
.bench-block-header .bench-count {
  color: var(--gold, #ef4044);
  font-weight: 700;
}
.bench-list {
  background: rgba(255, 255, 255, 0.015);
  border-radius: 4px;
  padding: 2px 0;
}
.bench-empty {
  padding: 8px 10px;
  font-size: 0.7rem;
  color: var(--muted);
  font-style: italic;
  text-align: center;
}
.player-list-divider {
  padding: 6px 10px 3px;
  font-size: 0.6rem; color: var(--muted);
  letter-spacing: 2px; text-transform: uppercase;
  border-top: 1px dashed var(--bg4); margin-top: 4px;
}

/* ═══ PLAYER POPUP ═══ */
.player-popup {
  position: fixed; inset: 0; z-index: 2000;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.player-popup-bg {
  position: absolute; inset: 0;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  cursor: pointer;
}
.player-popup-card {
  position: relative;
  background: var(--bg2);
  border: 1px solid var(--bg4);
  border-radius: 14px;
  max-width: 480px; width: 100%;
  max-height: 88vh; overflow-y: auto;
  padding: 24px;
  box-shadow: var(--shadow);
  animation: popup-in 0.25s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
@keyframes popup-in {
  from { opacity: 0; transform: scale(0.88) translateY(10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.pp-close {
  position: absolute; top: 10px; right: 10px;
  background: transparent; border: none;
  color: var(--muted); font-size: 1.5rem;
  cursor: pointer; padding: 2px 10px;
  border-radius: 6px; line-height: 1;
  transition: all 0.15s;
}
.pp-close:hover { background: var(--bg3); color: var(--white); }
.pp-header {
  display: flex; align-items: center; gap: 14px;
  padding-bottom: 14px; border-bottom: 1px solid var(--bg4);
  margin-bottom: 14px;
}
.pp-logo { width: 48px; height: 48px; flex-shrink: 0; }
.pp-logo img { width: 100%; height: 100%; object-fit: contain; }
.pp-name-block { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pp-photo {
  width: 52px; height: 66px; border-radius: 6px;
  object-fit: cover; object-position: top;
  border: 2px solid var(--bg4); flex-shrink: 0;
}
.pp-name-text { min-width: 0; }
.pp-name {
  font-size: 1.15rem; font-weight: 800;
  margin-bottom: 3px; line-height: 1.2;
}
.pp-team {
  font-size: 0.78rem; color: var(--muted);
  display: flex; align-items: center; gap: 6px;
}
.pp-pos-tag {
  font-size: 0.62rem; padding: 2px 6px;
  border-radius: 3px; font-weight: 800;
  letter-spacing: 0.5px;
}
.pp-rating-big {
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 1.5rem; font-weight: 900;
  font-variant-numeric: tabular-nums;
  min-width: 62px; text-align: center;
}
.pp-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 8px; margin-bottom: 14px;
}
.pp-stat {
  background: var(--bg3); padding: 9px 12px;
  border-radius: 8px;
}
.pp-stat-lbl {
  font-size: 0.64rem; color: var(--muted);
  letter-spacing: 1px; text-transform: uppercase;
  margin-bottom: 3px;
}
.pp-stat-val {
  font-size: 0.92rem; font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.pp-stat-nat {
  display: flex; align-items: center; gap: 6px;
}
.pp-flag {
  border-radius: 2px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.4);
}
.pp-section-title {
  font-size: 0.7rem; font-weight: 700;
  color: var(--gold); letter-spacing: 2px;
  text-transform: uppercase; margin: 14px 0 8px;
}
.pp-avg-rating-row {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--bg3); padding: 10px 14px;
  border-radius: 8px; margin-bottom: 10px;
}
.pp-avg-lbl { font-size: 0.8rem; color: var(--muted); }
.pp-avg-val {
  font-size: 1.2rem; font-weight: 900;
  font-variant-numeric: tabular-nums;
}
.pp-matches-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(64px, 1fr));
  gap: 6px;
}
.pp-match-pill {
  background: var(--bg3); padding: 7px 5px;
  border-radius: 6px; text-align: center;
  font-size: 0.7rem;
}
.pp-match-pill .mp-rating {
  font-size: 0.95rem; font-weight: 800;
  margin-bottom: 1px;
  font-variant-numeric: tabular-nums;
}
.pp-match-pill .mp-opp {
  color: var(--muted); font-size: 0.6rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pp-empty {
  padding: 12px; text-align: center;
  color: var(--muted); font-size: 0.8rem;
  background: var(--bg3); border-radius: 8px;
}
.pp-events-list {
  max-height: 180px; overflow-y: auto;
  background: var(--bg3); border-radius: 8px;
  padding: 6px;
}
.pp-event {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 8px; font-size: 0.78rem;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.pp-event:last-child { border-bottom: none; }
.pp-ev-min {
  color: var(--gold); font-weight: 700;
  min-width: 30px; font-variant-numeric: tabular-nums;
}
.pp-ev-note { flex: 1; color: var(--text); }
.pp-ev-delta {
  font-weight: 700; font-variant-numeric: tabular-nums;
  min-width: 40px; text-align: right;
}
.pp-ev-delta.pos { color: #4ade80; }
.pp-ev-delta.neg { color: #f87171; }

.pp-fantasy-change {
  margin-top: 10px; padding: 10px 14px;
  background: rgba(36, 132, 198, 0.1);
  border: 1px solid rgba(36, 132, 198, 0.3);
  border-radius: 8px;
  display: flex; justify-content: space-between; align-items: center;
}
.pp-fc-lbl { font-size: 0.74rem; color: var(--muted); }
.pp-fc-val { font-size: 0.9rem; font-weight: 800; }
.pp-fc-val.up   { color: #4ade80; }
.pp-fc-val.down { color: #f87171; }

/* Streak badges */
.pp-streak {
  display: inline-block; font-size: 0.72rem; font-weight: 800;
  padding: 2px 8px; border-radius: 4px; margin-left: 6px;
  letter-spacing: 0.5px;
}
.pp-streak-fire { background: rgba(251,146,60,0.2); color: #fb923c; }
.pp-streak-cold { background: rgba(96,165,250,0.2); color: #60a5fa; }
.pp-streak-breakthrough { background: rgba(250,204,21,0.2); color: #facc15; }
.pp-streak-stumble { background: rgba(248,113,113,0.15); color: #f87171; }

/* ═══ HISTORY DETAIL LINEUPS ═══ */
.detail-lineups {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  max-width: 900px; margin: 0 auto 20px;
}
.detail-lineups .lineup-col {
  background: var(--bg2);
  border: 1px solid var(--bg4);
  border-radius: 10px;
  overflow: hidden;
}
.detail-lineups .col-header {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
}
.detail-lineups .col-header-logo {
  width: 22px; height: 22px; display: inline-flex;
}
.detail-lineups .col-header-logo img { width: 100%; height: 100%; object-fit: contain; }

/* ════════════════════════════════════════════════
   RESPONSIVE — мобильная адаптация
   Desktop layout (>1100px) остаётся неизменным.
   ════════════════════════════════════════════════ */

/* TABLET ≤ 1100px — сжимаем боковые колонки live-dashboard */
@media (max-width: 1100px) {
  .live-dashboard {
    grid-template-columns: 200px 1fr 200px;
    gap: 8px;
    padding: 8px 8px 16px;
  }
  .dash-lineup .player-list { max-height: 460px; }
  .team-logo-lg { width: 90px; height: 90px; }
  .score-numbers { font-size: 3rem; }
  .live-scoreboard { padding: 16px 16px; }
}

/* MOBILE ≤ 900px — стек составов под центром, статистика 6→3+3 */
@media (max-width: 900px) {
  /* Live dashboard: одна колонка, центр впереди, потом составы вместе */
  .live-dashboard {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 8px;
  }
  /* Порядок: центр (со счётом и событиями) → хозяева → гости вместе */
  .live-dashboard > .dash-center { order: 1; }
  .live-dashboard > .dash-panel.dash-lineup { order: 2; }
  .dash-lineup .player-list { max-height: 320px; }

  /* Scoreboard поджимаем */
  .live-scoreboard { padding: 14px 12px; }
  .sb-center { flex: 0 0 auto; min-width: 0; }
  .team-logo-lg { width: 64px; height: 64px; }
  .team-name-lg { font-size: 0.82rem; max-width: 110px; }
  .score-numbers { font-size: 2.6rem; }
  .match-minute { font-size: 0.78rem; }
  .odds-row { gap: 8px; font-size: 0.68rem; }

  /* Speed bar — позволяем перенос */
  .live-speed-bar {
    flex-wrap: wrap;
    padding: 8px 10px;
    gap: 6px;
  }
  .spd-btn { padding: 5px 10px; font-size: 0.7rem; }
  .btn-skip { margin-left: 0; padding: 6px 14px; font-size: 0.72rem; }

  /* Match overview team strip — компактнее */
  .team-strip { padding: 8px 10px; gap: 8px; }
  .team-strip-logo { width: 32px; height: 32px; }
  .team-strip-name {
    font-size: 0.72rem;
    min-width: 0; max-width: 80px;
  }
  .team-strip-stats {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 3px;
  }
  .tstat-val { font-size: 0.78rem; }
  .tstat-cards .tstat-val { font-size: 0.66rem; }
  .tstat-lbl { font-size: 0.5rem; letter-spacing: 0.2px; }

  /* События + таблица — стек */
  .dash-bottom-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .dash-events .event-feed { max-height: 360px; overflow-y: auto; }

  /* App header — компактнее */
  .app-header { padding: 8px 12px; gap: 8px; flex-wrap: wrap; }
  .header-title { font-size: 0.85rem; letter-spacing: 0.5px; }
  .header-meta { gap: 6px; margin-left: 4px; }
  .hdr-chip { font-size: 0.65rem; padding: 2px 8px; }
  .btn-ghost { padding: 5px 12px; font-size: 0.72rem; }

  /* Tab bar — горизонтальный скролл при необходимости */
  .tab-bar { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .tab-btn {
    padding: 10px 16px;
    font-size: 0.78rem;
    letter-spacing: 0.5px;
    white-space: nowrap;
    flex-shrink: 0;
  }

  /* Match states padding */
  .match-state { padding: 10px; }

  /* Pre-match */
  .prematch-card { padding: 18px 16px; }
  .prematch-fixture { gap: 12px; flex-wrap: wrap; }
  .prematch-team-name { font-size: 0.88rem; }
  .prematch-vs { font-size: 1.1rem; }
  .prematch-odds { gap: 14px; flex-wrap: wrap; }
  .odds-val { font-size: 1.15rem; }
  .prematch-lineups { flex-wrap: wrap; gap: 18px; }
  .lineup-col { min-width: 140px; flex: 1; }

  /* Кнопка БОЛЬШАЯ */
  .btn-big {
    padding: 14px 32px;
    font-size: 0.95rem;
    letter-spacing: 2px;
  }
  .btn-secondary { padding: 12px 20px; font-size: 0.85rem; }

  /* Squads toolbar */
  .squads-toolbar { gap: 10px; padding: 10px 12px; }
  .squads-search { min-width: 0; flex: 1 1 100%; }
  .squads-filters { flex-wrap: wrap; }
  .sq-filter-btn { padding: 6px 10px; font-size: 0.72rem; }

  /* Sub-tabs истории */
  .history-subtabs { flex-wrap: wrap; gap: 4px; }
  .htab-btn { padding: 5px 12px; font-size: 0.72rem; }
  .hist-conf-filter { gap: 4px; }
  .hcf-btn { padding: 3px 9px; font-size: 0.65rem; }

  /* Goal banner shrink */
  .goal-banner { padding: 18px 22px; gap: 12px; }
  .goal-banner-photo { width: 60px; height: 76px; }
  .goal-banner-team-logo { width: 64px; height: 64px; }
  .goal-banner-right { gap: 6px; }
  .goal-ball { font-size: 2.2rem; }
  .goal-word { font-size: 1.7rem; letter-spacing: 2px; }
  .goal-scorer { font-size: 0.82rem; }

  /* Season select */
  #screen-season { padding: 16px 12px; }
  .rpl-title { font-size: 1.4rem; letter-spacing: 2px; }
  .select-block { margin: 18px 0; }
  .mode-row { flex-direction: column; gap: 10px; }
  .mode-btn { width: 100%; min-width: 0; padding: 16px 20px; }
  .mode-icon { font-size: 1.6rem; }
  .btn-primary { padding: 12px 32px; font-size: 0.9rem; }

  /* Player popup — почти на весь экран */
  .player-popup { padding: 10px; }
  .player-popup-card { padding: 18px; max-height: 92vh; }

  /* History detail — составы в одну колонку */
  .detail-lineups { grid-template-columns: 1fr; }
}

/* SMALL MOBILE ≤ 600px — статистика 3 колонки, ещё компактнее */
@media (max-width: 600px) {
  .team-strip-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 3px;
  }
  .team-strip-name { display: none; }
  .team-strip-logo { width: 28px; height: 28px; }
  .team-strip { gap: 8px; }

  /* Scoreboard compact */
  .live-scoreboard { padding: 10px 8px; }
  .sb-team { gap: 4px; }
  .team-logo-lg { width: 52px; height: 52px; }
  .team-name-lg { font-size: 0.7rem; max-width: 90px; }
  .score-numbers { font-size: 2.1rem; }
  .live-badge { font-size: 0.55rem; padding: 1px 6px; }

  /* Header — скрываем длинный текст */
  .header-title { display: none; }
  .header-meta { flex: 1; justify-content: flex-start; }

  /* Tabs ещё уже */
  .tab-btn { padding: 9px 12px; font-size: 0.72rem; letter-spacing: 0.3px; }

  /* Prematch */
  .prematch-card { padding: 14px 10px; }
  .prematch-fixture { flex-direction: column; gap: 8px; }
  .prematch-vs { display: none; }
  .prematch-team { flex-direction: row; gap: 12px; }
  .prematch-odds { gap: 12px; }
  .odds-val { font-size: 1rem; }

  /* Squads team header */
  .sq-team-header { padding: 10px 12px; font-size: 0.82rem; gap: 8px; }
  .sq-team-logo { width: 26px; height: 26px; }
  .sq-team-rank { font-size: 0.65rem; padding: 1px 6px; }
  .sq-team-size, .sq-team-injured,
  .sq-team-fire, .sq-team-cold {
    font-size: 0.65rem; padding: 1px 6px;
  }
  .sq-team-chips { gap: 4px; flex-wrap: wrap; }
  .sq-player-row { padding: 6px 8px; gap: 8px; }
  .sq-player-avatar { width: 30px; height: 30px; }
  .sq-player-name { font-size: 0.8rem; }
  .sq-player-rating { font-size: 0.78rem; padding: 3px 8px; min-width: 32px; }

  /* Loading / Season title */
  .rpl-title { font-size: 1.2rem; letter-spacing: 1.5px; }

  /* Player popup */
  .player-popup-card { padding: 14px; border-radius: 10px; }
  .pp-rating-big { font-size: 1.2rem; padding: 6px 10px; }

  /* Buttons */
  .btn-big { padding: 12px 24px; font-size: 0.85rem; letter-spacing: 1.5px; }

  /* Hist next */
  .hist-next-wrap { padding: 12px; }
  .hist-next-actions { width: 100%; justify-content: stretch; }
  .hist-next-actions .btn-big,
  .hist-next-actions .btn-secondary { flex: 1; min-width: 0; }
}

/* TINY MOBILE ≤ 400px — крайние сжатия */
@media (max-width: 400px) {
  .team-logo-lg { width: 44px; height: 44px; }
  .score-numbers { font-size: 1.8rem; }
  .team-name-lg { font-size: 0.62rem; max-width: 70px; }
  .tstat-val { font-size: 0.72rem; }
  .tstat-lbl { font-size: 0.46rem; }
  .tab-btn { padding: 8px 10px; font-size: 0.66rem; }
  .header-meta { gap: 4px; }
  .hdr-chip { font-size: 0.6rem; padding: 2px 6px; }
  .btn-big { padding: 11px 18px; font-size: 0.78rem; }
  .lineup-col { min-width: 120px; }
}

/* ════════════════════════════════════════════════
   PHONE LANDSCAPE — телефон в ландшафтной ориентации.
   Стратегия: zoom на live-dashboard даёт десктопный 3-колоночный
   вид в уменьшенном масштабе — все блоки видны без обрезки.
   max-height: 500px ловит только альбомные телефоны
   (на десктопе/планшете height всегда выше).
   ════════════════════════════════════════════════ */
@media (orientation: landscape) and (max-height: 500px) {
  /* Главное: zoom-масштабирование живого матча.
     При viewport ~720-900px по ширине, zoom 0.72 даёт логические
     ~1000-1250px — десктопная сетка 240+1fr+240 идеально умещается. */
  .live-dashboard {
    zoom: 0.72;
    grid-template-columns: 240px 1fr 240px;
    gap: 12px;
    padding: 10px;
    max-width: none;
  }
  /* СБРОС order, поставленного в @media (max-width: 900px) — иначе
     dash-center уезжает в первую (узкую) колонку, а lineup занимает 1fr. */
  .live-dashboard > .dash-center,
  .live-dashboard > .dash-panel.dash-lineup {
    order: initial;
  }
  /* События + таблица — десктопные 2 колонки */
  .dash-bottom-row {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  /* Составы и лента — десктопные размеры (zoom их и так уменьшит) */
  .dash-lineup .player-list { max-height: 540px; }
  .dash-events .event-feed  { max-height: 380px; }
  /* Speed bar — не переносить кнопки */
  .live-speed-bar { flex-wrap: nowrap; }

  /* === Элементы вне .live-dashboard — поджимаем отдельно === */

  /* Header — экономим вертикаль */
  .app-header { padding: 5px 10px; gap: 8px; }
  .header-title { display: inline; font-size: 0.78rem; }
  .header-meta { gap: 5px; }
  .hdr-chip { font-size: 0.62rem; padding: 1px 6px; }
  .btn-ghost { padding: 4px 10px; font-size: 0.68rem; }

  /* Tabs — узкие */
  .tab-btn { padding: 6px 14px; font-size: 0.72rem; }

  /* Match-state — компактнее */
  .match-state { padding: 4px; }

  /* Pre-match — это другой match-state, тоже подгоняем */
  .prematch-card { padding: 12px 14px; }
  .prematch-fixture { flex-direction: row; gap: 14px; flex-wrap: wrap; }
  .prematch-vs { display: inline; font-size: 1rem; }
  .prematch-team { flex-direction: column; gap: 4px; }
  .prematch-lineups { flex-direction: row; gap: 18px; }
}

/* ═══════════════════════════════════════
   TOURNAMENT SCREENS
   ═══════════════════════════════════════ */

/* Entry button on league select */
.tournament-entry {
  margin-top: 32px;
  display: grid;
  grid-template-columns: repeat(2, minmax(240px, 1fr));
  gap: 16px;
  align-items: stretch;
}
.btn-tournament {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center;
  padding: 18px 48px; gap: 4px;
  border-radius: 12px;
  border: 2px solid rgba(251,191,36,0.5);
  background: linear-gradient(145deg, rgba(251,191,36,0.12), rgba(251,191,36,0.04));
  color: var(--text); cursor: pointer;
  transition: all 0.3s cubic-bezier(0.2,0.8,0.2,1);
  box-shadow: 0 2px 12px rgba(251,191,36,0.15);
  width: 100%;
  min-height: 118px;
}
.btn-tournament:hover {
  border-color: #fbbf24;
  background: linear-gradient(145deg, rgba(251,191,36,0.25), rgba(251,191,36,0.10));
  box-shadow: 0 4px 28px rgba(251,191,36,0.4);
  transform: translateY(-2px);
}
.btn-tournament-icon { font-size: 2rem; }
.btn-tournament-text { font-size: 1rem; font-weight: 900; letter-spacing: 3px; color: #fbbf24; }
.btn-tournament-sub { font-size: 0.7rem; color: var(--muted); letter-spacing: 1px; }

/* Shared tournament wrap */
.tournament-wrap {
  width: 100%; max-width: 860px; margin: 0 auto;
  text-align: center; padding: 40px 24px; position: relative;
}
.tournament-wrap--wide { max-width: 1100px; }
.tournament-subtitle {
  font-size: 0.82rem; color: var(--muted); margin-bottom: 24px;
}

/* Tournament screens layout */
#screen-tournament-format,
#screen-tournament-season,
#screen-tournament-leagues,
#screen-tournament-setup {
  align-items: center; justify-content: center; padding: 24px; overflow-y: auto;
}

/* ── Format cards ── */
.tournament-format-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px; margin: 0 auto 24px;
}
.tformat-card {
  display: flex; flex-direction: column; align-items: center;
  padding: 24px 16px; gap: 8px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  background: linear-gradient(145deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
  backdrop-filter: blur(8px);
  cursor: pointer; transition: all 0.3s cubic-bezier(0.2,0.8,0.2,1);
  color: var(--text);
}
.tformat-card:hover {
  border-color: var(--gold);
  background: linear-gradient(145deg, rgba(239,64,68,0.15), rgba(239,64,68,0.05));
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(239,64,68,0.3);
}
.tformat-card.selected {
  border-color: var(--gold);
  background: linear-gradient(145deg, rgba(239,64,68,0.18), rgba(239,64,68,0.06));
  box-shadow: 0 8px 32px rgba(239,64,68,0.35);
  transform: translateY(-2px);
}
.tformat-icon { font-size: 2.5rem; margin-bottom: 4px; }
.tformat-name { font-size: 0.95rem; font-weight: 800; letter-spacing: 0.5px; }
.tformat-desc { font-size: 0.72rem; color: var(--muted); }
.count-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }

/* Format badge on subsequent screens */
.tformat-chosen {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 16px; border-radius: 20px;
  background: rgba(239,64,68,0.1); border: 1px solid rgba(239,64,68,0.3);
  font-size: 0.8rem; font-weight: 700; color: var(--gold);
  margin-bottom: 16px;
}

/* ── League checkboxes ── */
.tleague-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px; margin: 0 auto 20px; max-width: 700px;
}
.tleague-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: var(--radius);
  border: 1px solid var(--bg4); background: var(--bg2);
  cursor: pointer; transition: all 0.2s;
  font-size: 0.82rem; font-weight: 600; color: var(--text);
}
.tleague-item:hover { border-color: var(--purple2); }
.tleague-item.selected {
  border-color: var(--gold); background: rgba(239,64,68,0.08);
  box-shadow: 0 0 12px rgba(239,64,68,0.2);
}
.tleague-item img { width: 28px; height: 28px; object-fit: contain; }
.tleague-check {
  width: 18px; height: 18px; border-radius: 4px;
  border: 2px solid var(--bg4); background: transparent;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem; color: var(--gold); transition: all 0.15s;
  flex-shrink: 0;
}
.tleague-item.selected .tleague-check {
  border-color: var(--gold); background: rgba(239,64,68,0.3);
}
.tleague-actions { display: flex; gap: 12px; justify-content: center; margin-bottom: 16px; }

/* ── Team Picker ── */
.tsetup-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px; flex-wrap: wrap; gap: 12px;
}
.tsetup-counter {
  font-size: 0.9rem; font-weight: 700; color: var(--text);
}
.tsetup-counter span { color: var(--gold); font-weight: 900; }
.tsetup-body {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 16px; margin-bottom: 20px;
}
.tsetup-col {
  border-radius: 10px; border: 1px solid var(--bg4);
  background: var(--bg2); display: flex; flex-direction: column;
  overflow: hidden;
}
.tsetup-col-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; background: var(--bg3);
  font-size: 0.75rem; font-weight: 700; letter-spacing: 1px;
  color: var(--gold); border-bottom: 1px solid var(--bg4);
  gap: 8px;
}
.tsetup-search {
  padding: 5px 10px; border-radius: 6px;
  border: 1px solid var(--bg4); background: var(--bg);
  color: var(--text); font-size: 0.78rem; width: 140px;
}
.tsetup-col-filter {
  display: flex; flex-wrap: wrap; gap: 4px;
  padding: 6px 10px; border-bottom: 1px solid var(--bg4);
}
.tsetup-filter-btn {
  padding: 3px 8px; border-radius: 10px;
  border: 1px solid var(--bg4); background: transparent;
  color: var(--muted); font-size: 0.65rem; cursor: pointer;
  transition: all 0.15s; font-weight: 600;
}
.tsetup-filter-btn:hover { color: var(--text); }
.tsetup-filter-btn.active {
  background: var(--purple); border-color: var(--purple);
  color: var(--white);
}
.tsetup-list {
  flex: 1; overflow-y: auto; max-height: 400px;
  padding: 4px;
}
.tsetup-team {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 10px; border-radius: 6px;
  cursor: pointer; transition: background 0.15s;
  font-size: 0.8rem;
}
.tsetup-team:hover { background: rgba(255,255,255,0.05); }
.tsetup-team img {
  width: 24px; height: 24px; object-fit: contain; flex-shrink: 0;
}
.tsetup-team-name { flex: 1; font-weight: 600; }
.tsetup-team-rating {
  font-size: 0.7rem; color: var(--muted); font-weight: 700;
  min-width: 28px; text-align: right;
}
.tsetup-team-league {
  font-size: 0.6rem; color: var(--muted); min-width: 30px;
}
.tsetup-team-btn {
  width: 24px; height: 24px; border-radius: 50%;
  border: 1px solid var(--bg4); background: transparent;
  color: var(--muted); font-size: 0.85rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s; flex-shrink: 0;
}
.tsetup-team-btn:hover {
  border-color: var(--gold); color: var(--gold);
  background: rgba(239,64,68,0.1);
}
.tsetup-col-actions {
  display: flex; gap: 8px; padding: 8px 10px;
  border-top: 1px solid var(--bg4);
}

/* Hosts (max 3 home teams) */
.tsetup-hosts-hint {
  font-size: 0.72rem; color: var(--muted);
  padding: 6px 10px; margin: 4px 6px 6px;
  background: rgba(255,215,0,0.06);
  border: 1px solid rgba(255,215,0,0.18);
  border-radius: 6px; line-height: 1.35;
}
.tsetup-hosts-hint b { color: #ffcf3e; }
.tsetup-team-host {
  width: 24px; height: 24px; border-radius: 50%;
  border: 1px solid var(--bg4); background: transparent;
  font-size: 0.85rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s; flex-shrink: 0;
  filter: grayscale(1) opacity(0.45);
}
.tsetup-team-host:hover {
  filter: grayscale(0) opacity(1);
  border-color: #ffcf3e;
}
.tsetup-team-host.active {
  filter: none;
  border-color: #ffcf3e;
  background: rgba(255,207,62,0.15);
  box-shadow: 0 0 6px rgba(255,207,62,0.4);
}
.tsetup-team-host.disabled {
  opacity: 0.25; cursor: not-allowed;
}
.tsetup-team.is-host { background: rgba(255,207,62,0.08); }

/* Neutral-venue badge in prematch / cup pair / fixture rows */
.neutral-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 0.62rem; font-weight: 700;
  color: #c9c9c9; background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  padding: 1px 6px; border-radius: 10px;
  letter-spacing: 0.04em;
}

@media (max-width: 700px) {
  .tournament-entry { grid-template-columns: 1fr; }
  .tournament-format-grid { grid-template-columns: repeat(2, 1fr); }
  .tsetup-body { grid-template-columns: 1fr; }
  .tleague-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ═══════════════════════ WC 2026 ═══════════════════════ */
.btn-wc2026 {
  background:
    linear-gradient(135deg, rgba(4,23,45,0.82), rgba(36,132,198,0.52)),
    url("../newrosters/NATIONAL%20TEAM/WORLDCUP.png") center/cover no-repeat;
  border-color: #4cc4ff;
  position: relative;
  overflow: hidden;
  text-shadow: 0 2px 8px rgba(0,0,0,0.75);
}
.btn-wc2026:hover {
  background:
    linear-gradient(135deg, rgba(4,23,45,0.68), rgba(44,149,216,0.42)),
    url("../newrosters/NATIONAL%20TEAM/WORLDCUP.png") center/cover no-repeat;
  box-shadow: 0 0 24px rgba(76,196,255,0.45);
}
.btn-wc2026 .btn-tournament-text,
.btn-wc2026 .btn-tournament-sub,
.btn-wc2026 .btn-tournament-icon {
  position: relative;
  z-index: 1;
}
.btn-wc2026 .btn-tournament-sub { color: rgba(232,236,245,0.86); }
.wc-phase-label {
  font-size: 0.95rem; font-weight: 800; letter-spacing: 0.08em;
  color: #4cc4ff; text-align: center; margin: 8px 0 18px;
}
.wc-confeds {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px; margin: 12px 0;
}
.wc-confed-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(76,196,255,0.25);
  border-radius: 8px; padding: 10px 12px;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: all 0.18s ease;
}
.wc-confed-card:hover,
.wc-confed-card.active {
  border-color: var(--gold);
  background: rgba(239,64,68,0.1);
  box-shadow: 0 0 14px rgba(239,64,68,0.18);
}
.wc-confed-card.active .wc-confed-name { color: var(--gold); }
.wc-confed-name { font-size: 0.95rem; font-weight: 800; color: #4cc4ff; }
.wc-confed-progress { font-size: 0.75rem; color: #aaa; margin: 4px 0; }
.wc-confed-teams { font-size: 0.7rem; color: #ccc; line-height: 1.35; }
.wc-qual-zone {
  margin-top: 18px;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 10px;
}
.wc-qual-zone-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 6px;
}
.wc-groups-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 12px; margin: 12px 0;
}
.wc-group {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(76,196,255,0.2);
  border-radius: 8px; padding: 10px 12px;
}
.wc-group-name {
  font-weight: 800; color: #4cc4ff; margin-bottom: 6px;
  letter-spacing: 0.05em; font-size: 0.85rem;
}
.wc-group-table {
  width: 100%; border-collapse: collapse; font-size: 0.72rem;
}
.wc-group-table th { color: #888; font-weight: 600; padding: 3px 4px; text-align: left; vertical-align: middle; }
.wc-group-table td { padding: 3px 4px; border-top: 1px solid rgba(255,255,255,0.05); vertical-align: middle; }
.wc-group-table td:first-child { width: 20px; text-align: center; }
.wc-group-table td:not(:nth-child(2)) { white-space: nowrap; text-align: center; }
.wc-group-table th:not(:nth-child(2)) { text-align: center; }
.wc-group-table td:nth-child(2) { width: 100%; max-width: 0; overflow: hidden; text-align: left; }
.wc-group-table tr.wc-qual td { color: #4cc4ff; }
.wc-group-table tr.wc-3rd  td { color: #fbbf24; }
.wc-group-table tr.wc-direct td {
  background: rgba(74,222,128,0.13);
  color: #d9ffe7;
}
.wc-group-table tr.wc-playoff td {
  background: rgba(251,191,36,0.14);
  color: #fff2c0;
}
.wc-group-table tr.wc-current td {
  background: rgba(239,64,68,0.12);
  color: var(--text);
}
.wc-group-table tr.wc-direct.wc-current td,
.wc-group-table tr.wc-playoff.wc-current td {
  box-shadow: inset 3px 0 0 var(--gold);
}
.wc-team-cell {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
  white-space: nowrap;
}
.wc-team-cell > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
}
.wc-team-flag {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.wc-team-flag img,
.wc-team-flag svg {
  width: 18px;
  height: 18px;
  object-fit: contain;
}
.wc-zone-legend {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}
.wc-zone-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.wc-zone-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.wc-zone-dot.direct { background: #4ade80; }
.wc-zone-dot.playoff { background: #fbbf24; }
.wc-ko-team.wc-ko-direct { color: #d9ffe7; }
.wc-ko-team.wc-ko-playoff { color: #fff2c0; }
.wc-ko-block { margin-top: 20px; }
.wc-ko-title {
  font-size: 1rem; font-weight: 800; color: #fbbf24;
  letter-spacing: 0.08em; text-align: center; margin: 10px 0 12px;
}
.wc-ko-rounds {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}
.wc-ko-round {
  background: rgba(255,255,255,0.04);
  border-radius: 8px; padding: 8px 10px;
}
.wc-ko-round-title {
  font-size: 0.78rem; font-weight: 800; color: #4cc4ff;
  margin-bottom: 6px; letter-spacing: 0.05em;
}
.wc-ko-match {
  display: grid; grid-template-columns: 1fr auto 1fr;
  gap: 6px; padding: 4px 0; font-size: 0.72rem;
  border-top: 1px solid rgba(255,255,255,0.05);
}
.wc-ko-match.current {
  background: rgba(239,64,68,0.12);
  border-radius: 6px;
}
.wc-ko-team { color: #ddd; }
.wc-ko-score { color: #fbbf24; font-weight: 700; min-width: 32px; text-align: center; }
.wc-champion-banner {
  margin-top: 24px; padding: 24px;
  background: linear-gradient(135deg, #fbbf24, #fb923c);
  border-radius: 12px; text-align: center;
  font-size: 1.6rem; font-weight: 900; color: #2a1a00;
  box-shadow: 0 0 40px rgba(251,191,36,0.5);
}
.wc-actions {
  display: flex; gap: 10px; justify-content: center;
  margin: 10px 0 18px; flex-wrap: wrap;
}
.wc-actions button { padding: 10px 18px; font-size: 0.85rem; }
.wc-next-match {
  background: linear-gradient(135deg, rgba(76,196,255,0.08), rgba(36,132,198,0.05));
  border: 1px solid rgba(76,196,255,0.35);
  border-radius: 10px;
  padding: 14px 16px;
  margin: 12px 0;
}
.wc-nm-tag {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em;
  color: #fbbf24; text-transform: uppercase; margin-bottom: 8px;
}
.wc-nm-teams {
  display: grid; grid-template-columns: 1fr auto 1fr;
  gap: 14px; align-items: center;
  margin-bottom: 8px;
}
.wc-nm-team { font-size: 1rem; font-weight: 800; color: #f5f5f5; }
.wc-nm-home { text-align: right; }
.wc-nm-away { text-align: left; }
.wc-nm-score {
  font-size: 1.4rem; font-weight: 900; color: #fbbf24;
  background: rgba(0,0,0,0.3); padding: 4px 14px; border-radius: 6px;
}
.wc-nm-meta {
  text-align: center; font-size: 0.78rem; color: #aaa;
}
