:root {
  --bg-0: #05070b;
  --bg-1: #0b1118;
  --bg-2: #111a26;
  --line: rgba(255,255,255,0.08);
  --line-2: rgba(255,255,255,0.14);
  --text: #eef2f7;
  --muted: #8a96a8;
  --red: #ff2e4c;
  --red-2: #ff4f69;
  --amber: #ffb020;
  --green: #1edb8a;
  --blue: #3ea0ff;

  --team-a: #00d2ff;
  --team-a-2: #007cc3;
  --team-b: #ff5a3c;
  --team-b-2: #c0270e;
}

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

html, body {
  height: 100%;
  background: radial-gradient(1200px 800px at 50% -10%, #14202d 0%, #05070b 60%, #000 100%);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  overflow: hidden;
  user-select: none;
  -webkit-font-smoothing: antialiased;
}

.live-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--red);
  box-shadow: 0 0 10px var(--red);
  animation: pulse 1.4s ease-in-out infinite;
  display: inline-block;
}
@keyframes pulse { 0%,100% { opacity: 1; transform: scale(1) } 50% { opacity: .35; transform: scale(1.3) } }

/* ================= TEAM SELECT ================= */
.team-select {
  position: fixed; inset: 0; z-index: 200;
  background: radial-gradient(1200px 700px at 50% 30%, #101a28 0%, #05070b 70%, #000 100%);
  display: flex; flex-direction: column;
  padding: 28px 40px 20px;
  overflow-y: auto;
}
.team-select.hide { animation: tsOut 0.7s ease both; pointer-events: none; }
@keyframes tsOut { to { opacity: 0; transform: scale(1.04) } }

.ts-header { text-align: center; margin-bottom: 24px; }
.ts-badge {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 14px; border-radius: 999px;
  background: rgba(255,46,76,0.12); border: 1px solid rgba(255,46,76,0.4);
  color: #ffb6c1; font-family: 'JetBrains Mono', monospace; font-size: 10.5px;
  letter-spacing: 0.22em; margin-bottom: 14px;
}
.ts-title {
  font-family: 'Oswald', sans-serif; font-weight: 700;
  font-size: clamp(32px, 5vw, 58px);
  letter-spacing: 0.04em; line-height: 1;
  color: #fff;
}
.ts-title span { color: var(--amber); text-shadow: 0 0 30px rgba(255,176,32,0.4); }
.ts-sub {
  margin-top: 8px; color: var(--muted);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; letter-spacing: 0.22em;
}

.ts-body {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 30px;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto 28px;
}

.ts-side {
  display: flex; flex-direction: column; align-items: center;
  padding: 24px;
  background: linear-gradient(180deg, rgba(20,30,45,0.6), rgba(10,14,20,0.8));
  border: 1px solid var(--line-2);
  border-radius: 18px;
  min-height: 240px;
}
.ts-side-label {
  font-family: 'Oswald', sans-serif; font-size: 14px;
  letter-spacing: 0.3em; color: var(--muted);
  margin-bottom: 14px;
}
.ts-home .ts-side-label { color: #00d2ff; }
.ts-away .ts-side-label { color: #ff5a3c; }

.ts-preview {
  display: flex; flex-direction: column; align-items: center;
  gap: 12px;
  animation: previewIn 0.4s ease;
}
@keyframes previewIn { from { opacity: 0; transform: scale(0.9) } to { opacity: 1; transform: scale(1) } }
.ts-crest-big {
  width: 110px; height: 110px; border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Oswald', sans-serif; font-weight: 700; font-size: 40px;
  color: #fff;
  background: linear-gradient(135deg, #2a3848, #151d28);
  box-shadow: 0 16px 40px rgba(0,0,0,0.6), inset 0 2px 0 rgba(255,255,255,0.15);
}
.ts-name-big {
  font-family: 'Oswald', sans-serif; font-weight: 600;
  font-size: 22px; letter-spacing: 0.12em;
  color: #fff;
}
.ts-kit {
  width: 90px; height: 80px;
  border-radius: 6px;
  background: #1a2230;
  border: 1px dashed rgba(255,255,255,0.1);
}

/* Kit mock shape (shirt) */
.kit-mock {
  position: relative;
  width: 90px; height: 80px;
}
.kit-mock::before {
  content: '';
  position: absolute; inset: 12px 8px 8px;
  background: var(--kit-shirt, #fff);
  clip-path: polygon(18% 0, 35% 8%, 65% 8%, 82% 0, 100% 18%, 90% 28%, 90% 100%, 10% 100%, 10% 28%, 0 18%);
  box-shadow: inset 0 -6px 12px rgba(0,0,0,0.25);
}
.kit-mock::after {
  content: '';
  position: absolute; left: 50%; top: 18px; bottom: 8px;
  width: 4px; transform: translateX(-50%);
  background: var(--kit-trim, rgba(0,0,0,0.2));
  opacity: 0.6;
}

.ts-vs {
  display: flex; flex-direction: column; align-items: center; gap: 18px;
}
.ts-vs-text {
  font-family: 'Oswald', sans-serif; font-size: 48px;
  color: #3a4a5e; letter-spacing: 0.1em;
}
.ts-start {
  background: linear-gradient(180deg, var(--red-2), var(--red));
  color: #fff; border: 0; padding: 16px 36px; border-radius: 12px;
  font-family: 'Oswald', sans-serif; font-size: 18px; letter-spacing: 0.18em;
  cursor: pointer; font-weight: 600;
  box-shadow: 0 14px 36px rgba(255,46,76,0.45), inset 0 2px 0 rgba(255,255,255,0.3);
  transition: all .15s ease;
}
.ts-start:disabled {
  background: linear-gradient(180deg, #2a3848, #151d28);
  color: #4a5a6e; cursor: not-allowed; box-shadow: none;
}
.ts-start:not(:disabled):hover { transform: translateY(-2px); }
.ts-tip { color: #566578; font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: 0.18em; }

/* Team grid */
.ts-grid-wrap {
  max-width: 1200px; width: 100%; margin: 0 auto;
}
.ts-grid-label {
  font-family: 'JetBrains Mono', monospace; font-size: 10.5px;
  color: var(--muted); letter-spacing: 0.25em;
  margin-bottom: 14px;
  padding-left: 4px;
}
.ts-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}
.ts-card {
  background: rgba(15,22,32,0.85);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 10px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  cursor: pointer;
  transition: all .15s ease;
}
.ts-card:hover { transform: translateY(-2px); border-color: var(--blue); background: rgba(30,45,65,0.9); }
.ts-card.selected-home { border-color: #00d2ff; box-shadow: 0 0 0 2px rgba(0,210,255,0.4), 0 8px 24px rgba(0,210,255,0.25); }
.ts-card.selected-away { border-color: #ff5a3c; box-shadow: 0 0 0 2px rgba(255,90,60,0.4), 0 8px 24px rgba(255,90,60,0.25); }
.ts-card-crest {
  width: 52px; height: 52px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Oswald', sans-serif; font-weight: 700; font-size: 16px;
  color: #fff;
  box-shadow: inset 0 2px 0 rgba(255,255,255,0.18), 0 4px 12px rgba(0,0,0,0.4);
}
.ts-card-name {
  font-family: 'Oswald', sans-serif; font-size: 13px;
  letter-spacing: 0.1em; color: #fff; text-align: center;
}

.ts-footer {
  margin-top: auto; padding-top: 18px; text-align: center;
  font-family: 'JetBrains Mono', monospace; font-size: 10px;
  color: #4a5a6e; letter-spacing: 0.25em;
}

/* ================== BROADCAST SHELL ================== */
body.match-active {
  background: #05080c;
}
body.match-active::before {
  content: "";
  position: fixed; inset: 0;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(255,46,76,0.05), transparent 55%),
    radial-gradient(ellipse at 80% 80%, rgba(0,163,255,0.04), transparent 55%),
    #05080c;
  z-index: -1;
}
.broadcast {
  position: relative;
  display: grid;
  grid-template-rows: auto auto 1fr auto auto;
  height: 100vh;
  max-height: 100vh;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  overflow: hidden;
  border-left: 1px solid rgba(255,255,255,0.04);
  border-right: 1px solid rgba(255,255,255,0.04);
  box-shadow: 0 0 60px rgba(0,0,0,0.6);
}
@media (min-width: 1280px) {
  .broadcast {
    max-height: calc(100vh - 24px);
    margin: 12px auto;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.06);
  }
}

.scorebar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 12px 24px;
  background:
    linear-gradient(180deg, rgba(14,20,32,0.96), rgba(6,10,18,0.92)),
    radial-gradient(1200px 120px at 50% -20%, rgba(255,61,87,0.18), transparent 70%);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(255,255,255,0.04) inset, 0 6px 24px rgba(0,0,0,0.35);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 5;
}

.network { display: flex; align-items: center; gap: 14px; }
.net-logo-svg {
  width: 46px; height: 46px; border-radius: 12px;
  box-shadow: 0 10px 28px rgba(138,0,255,0.35), 0 4px 14px rgba(255,61,87,0.35), inset 0 2px 0 rgba(255,255,255,0.25);
  transition: transform .4s cubic-bezier(.2,.8,.2,1);
}
.net-logo-svg:hover { transform: rotate(-4deg) scale(1.04); }
.net-meta { display: flex; flex-direction: column; line-height: 1; gap: 5px; }
.net-title {
  font-family: 'Oswald', sans-serif; font-size: 20px; color: #fff; letter-spacing: 0.08em;
  display: flex; align-items: baseline; gap: 6px;
}
.net-title .net-sport {
  font-size: 11px; letter-spacing: 0.32em; color: #ff3d57;
  padding: 2px 6px; border: 1px solid rgba(255,61,87,0.45); border-radius: 3px;
  background: rgba(255,61,87,0.08);
}
.net-sub {
  font-family: 'JetBrains Mono', monospace; font-size: 10px; color: #9fb6cd;
  letter-spacing: 0.22em;
  display: inline-flex; align-items: center; gap: 7px;
}
.net-live-dot {
  width: 7px; height: 7px; border-radius: 50%; background: #ff3d57;
  box-shadow: 0 0 10px rgba(255,61,87,0.95);
  animation: liveBlink 1.4s ease-in-out infinite;
}
@keyframes liveBlink { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.45;transform:scale(.85)} }

.sb-center {
  display: flex; align-items: center; gap: 28px;
}
.team-block { display: flex; align-items: center; gap: 12px; }
.team-away { flex-direction: row; }
.team-crest {
  width: 42px; height: 42px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Oswald', sans-serif; font-weight: 700; color: #fff; font-size: 14px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.5), inset 0 2px 0 rgba(255,255,255,0.18);
}
.team-name {
  font-family: 'Oswald', sans-serif; font-size: 22px; letter-spacing: 0.08em; color: #fff;
}

.score-block {
  display: flex; align-items: center; gap: 14px;
  padding: 6px 22px; border-radius: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line);
  min-width: 150px; justify-content: center;
}
.score {
  font-family: 'Oswald', sans-serif; font-weight: 700;
  font-size: 40px; color: #fff;
  min-width: 32px; text-align: center;
  transition: transform .35s cubic-bezier(.2,.8,.2,1), color .3s;
}
.score.bump { transform: scale(1.35); color: var(--amber); }
.score-sep { font-size: 28px; color: var(--muted); font-family: 'Oswald', sans-serif; }

.sb-right { display: flex; justify-content: flex-end; }
.clock { text-align: right; }
.clock-time {
  font-family: 'JetBrains Mono', monospace; font-weight: 700;
  font-size: 26px; color: #fff; letter-spacing: 0.05em;
}
.clock-half {
  font-family: 'JetBrains Mono', monospace; font-size: 10px;
  color: var(--muted); letter-spacing: 0.22em; margin-top: 2px;
}

.subbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 24px;
  background:
    linear-gradient(180deg, rgba(10,14,22,0.92), rgba(6,10,18,0.96));
  border-bottom: 1px solid var(--line);
  font-family: 'JetBrains Mono', monospace; font-size: 11px;
  color: #c7d2e0; letter-spacing: 0.18em;
  position: relative;
}
.subbar::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,61,87,0.55) 20%, rgba(138,0,255,0.55) 80%, transparent);
}
.sub-left, .sub-right { display: flex; gap: 18px; align-items: center; }
.stadium {
  color: #e6edf5; font-weight: 500;
  padding: 2px 10px; border-left: 2px solid rgba(255,61,87,0.6);
}
.weather, .referee { color: #9fb6cd; }
.live-pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 4px 10px; border-radius: 4px;
  background: linear-gradient(135deg, #ff3d57, #c8102e); color: #fff; font-weight: 700;
  font-family: 'Oswald', sans-serif; font-size: 12px; letter-spacing: 0.14em;
  box-shadow: 0 4px 14px rgba(255,61,87,0.45);
}
.live-pill .live-dot { background: #fff; box-shadow: 0 0 8px #fff; }
.wc26-mark {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 8px; border-radius: 4px;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08);
  color: #fcd116; font-weight: 700; letter-spacing: 0.24em;
  font-family: 'Oswald', sans-serif; font-size: 11px;
}

/* PITCH */
.pitch-wrap {
  position: relative;
  overflow: hidden;
  background: #000;
}
#pitch {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: block;
}

.momentum {
  position: absolute; top: 14px; left: 50%;
  transform: translateX(-50%);
  display: flex; align-items: center; gap: 10px;
  background: rgba(5,7,11,0.7);
  border: 1px solid var(--line);
  backdrop-filter: blur(8px);
  padding: 6px 12px; border-radius: 999px;
  z-index: 3;
}
.mom-label {
  font-family: 'Oswald', sans-serif; font-size: 13px; letter-spacing: 0.1em;
  color: #fff; min-width: 36px; text-align: center;
}
.mom-bar {
  position: relative; width: 240px; height: 8px;
  background: rgba(255,255,255,0.08); border-radius: 999px; overflow: hidden;
  display: flex;
}
.mom-fill { height: 100%; transition: width .8s cubic-bezier(.2,.8,.2,1); }
.mom-a { background: linear-gradient(90deg, var(--team-a), var(--team-a-2)); width: 50%; }
.mom-b { background: linear-gradient(90deg, var(--team-b-2), var(--team-b)); width: 50%; }

.event-burst {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  font-family: 'Oswald', sans-serif; font-weight: 700;
  font-size: clamp(36px, 6vw, 72px); letter-spacing: 0.08em;
  color: #fff; text-shadow: 0 8px 40px rgba(0,0,0,0.8);
  opacity: 0; pointer-events: none;
  z-index: 6;
  text-align: center;
}
.event-burst.show { animation: burstIn 1.4s cubic-bezier(.2,.8,.2,1); }

.corner-overlay {
  position: absolute;
  top: 34px;
  left: 50%;
  transform: translateX(-50%) translateY(-12px);
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  font-size: clamp(18px, 2.2vw, 28px);
  letter-spacing: 0.22em;
  color: #fff;
  background: linear-gradient(90deg, rgba(255,196,0,0.95), rgba(255,140,0,0.95));
  padding: 8px 22px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.35);
  box-shadow: 0 8px 28px rgba(0,0,0,0.55), 0 0 0 3px rgba(0,0,0,0.25);
  text-shadow: 0 2px 6px rgba(0,0,0,0.4);
  opacity: 0;
  pointer-events: none;
  z-index: 7;
}
.corner-overlay.show { animation: cornerIn 2.2s cubic-bezier(.2,.8,.2,1); }
@keyframes cornerIn {
  0%   { opacity: 0; transform: translateX(-50%) translateY(-30px) scale(0.9); }
  15%  { opacity: 1; transform: translateX(-50%) translateY(0) scale(1.05); }
  25%  { transform: translateX(-50%) translateY(0) scale(1); }
  80%  { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
  100% { opacity: 0; transform: translateX(-50%) translateY(-6px) scale(1); }
}
@keyframes burstIn {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.5); }
  15% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
  25% { transform: translate(-50%, -50%) scale(1); }
  80% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.1); }
}

.replay {
  position: absolute; top: 20px; right: 20px;
  display: none;
  align-items: center; gap: 10px;
  background: rgba(255,46,76,0.92);
  color: #fff;
  padding: 8px 14px; border-radius: 6px;
  font-family: 'Oswald', sans-serif;
  letter-spacing: 0.15em;
  z-index: 7;
  box-shadow: 0 10px 30px rgba(255,46,76,0.5);
  animation: replayBlink 1.2s ease-in-out infinite;
}
.replay.show { display: flex; }
.replay-dot { width: 8px; height: 8px; border-radius: 50%; background: #fff; box-shadow: 0 0 10px #fff; }
@keyframes replayBlink { 0%,100% { opacity: 1 } 50% { opacity: 0.6 } }

.goal-overlay {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: radial-gradient(circle at center, rgba(255,46,76,0.35), rgba(0,0,0,0.85));
  pointer-events: none;
  opacity: 0;
  z-index: 8;
}
.goal-overlay.show { animation: goalShow 3.2s ease forwards; }
@keyframes goalShow { 0% { opacity: 0; } 8% { opacity: 1; } 85% { opacity: 1; } 100% { opacity: 0; } }
.goal-scanlines {
  position: absolute; inset: 0;
  background: repeating-linear-gradient(180deg, rgba(255,255,255,0.06) 0 2px, transparent 2px 4px);
  mix-blend-mode: overlay;
}
.goal-flash { position: absolute; inset: 0; background: #fff; opacity: 0; }
.goal-overlay.show .goal-flash { animation: goalFlash 0.4s ease-out; }
@keyframes goalFlash { 0% { opacity: 0.95 } 100% { opacity: 0 } }

.goal-big {
  font-family: 'Oswald', sans-serif; font-weight: 700;
  font-size: clamp(80px, 18vw, 240px); letter-spacing: 0.08em;
  color: #fff;
  text-shadow: 0 0 40px rgba(255,255,255,0.5), 0 20px 80px rgba(255,46,76,0.8);
  transform: scale(0.6);
}
.goal-big span { color: var(--amber); }
.goal-overlay.show .goal-big { animation: goalBig 3.2s cubic-bezier(.2,.8,.2,1) forwards; }
@keyframes goalBig {
  0% { transform: scale(0.2) rotate(-8deg); opacity: 0; }
  20% { transform: scale(1.2) rotate(2deg); opacity: 1; }
  30% { transform: scale(1) rotate(0); }
  85% { transform: scale(1); opacity: 1; }
  100% { transform: scale(1.4); opacity: 0; }
}
.goal-scorer {
  margin-top: 20px; font-family: 'Oswald', sans-serif; font-size: 28px;
  letter-spacing: 0.15em; color: #fff; text-shadow: 0 4px 20px rgba(0,0,0,0.8); opacity: 0;
}
.goal-overlay.show .goal-scorer { animation: goalFade 3.2s ease forwards; animation-delay: 0.3s; }
.goal-score {
  margin-top: 12px; font-family: 'Oswald', sans-serif; font-weight: 700;
  font-size: 56px; letter-spacing: 0.1em; color: var(--amber);
  text-shadow: 0 4px 20px rgba(0,0,0,0.8); opacity: 0;
}
.goal-overlay.show .goal-score { animation: goalFade 3.2s ease forwards; animation-delay: 0.5s; }
@keyframes goalFade {
  0% { opacity: 0; transform: translateY(20px); }
  15% { opacity: 1; transform: translateY(0); }
  85% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-10px); }
}

.scorer-feed {
  position: absolute; bottom: 16px; left: 16px;
  display: flex; flex-direction: column; gap: 8px;
  z-index: 4;
}
.scorer-item {
  display: flex; align-items: center; gap: 10px;
  background: rgba(5,7,11,0.85);
  border: 1px solid var(--line);
  border-left: 3px solid var(--team-a);
  padding: 8px 14px;
  font-family: 'JetBrains Mono', monospace; font-size: 12px;
  color: #fff; letter-spacing: 0.05em;
  animation: scorerIn 0.4s cubic-bezier(.2,.8,.2,1);
  backdrop-filter: blur(8px);
}
.scorer-item.team-b { border-left-color: var(--team-b); }
.scorer-time { color: var(--amber); font-weight: 700; }
.scorer-icon { font-size: 14px; }
@keyframes scorerIn { from { transform: translateX(-20px); opacity: 0 } to { transform: translateX(0); opacity: 1 } }

.shake { animation: shake 0.5s cubic-bezier(.36,.07,.19,.97); }
@keyframes shake {
  10%, 90% { transform: translate(-1px, 0); }
  20%, 80% { transform: translate(2px, -1px); }
  30%, 50%, 70% { transform: translate(-4px, 2px); }
  40%, 60% { transform: translate(4px, -2px); }
}
.shake-hard { animation: shakeHard 0.75s cubic-bezier(.36,.07,.19,.97); }
@keyframes shakeHard {
  10%, 90% { transform: translate(-2px, 1px); }
  20%, 80% { transform: translate(5px, -2px); }
  30%, 50%, 70% { transform: translate(-9px, 4px); }
  40%, 60% { transform: translate(9px, -4px); }
}

/* STATS */
.stats {
  display: grid;
  grid-template-columns: 2fr repeat(5, 1fr);
  gap: 1px;
  background: var(--line);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stat {
  background: rgba(8,12,18,0.95);
  padding: 10px 16px;
  display: flex; flex-direction: column; gap: 4px;
}
.stat-label {
  font-family: 'JetBrains Mono', monospace; font-size: 9.5px;
  color: var(--muted); letter-spacing: 0.22em;
}
.stat-row { display: flex; align-items: center; gap: 10px; justify-content: space-between; }
.stat-row-nums { justify-content: center; gap: 14px; }
.stat-home { color: var(--team-a); font-family: 'Oswald', sans-serif; font-size: 16px; font-weight: 600; min-width: 32px; text-align: right; }
.stat-away { color: var(--team-b); font-family: 'Oswald', sans-serif; font-size: 16px; font-weight: 600; min-width: 32px; }
.stat-home.big, .stat-away.big { font-size: 22px; min-width: 28px; text-align: center; }
.stat-divider { color: #2a3848; font-size: 18px; }

.stat-bar {
  flex: 1; height: 6px;
  background: rgba(255,255,255,0.06);
  border-radius: 3px; overflow: hidden;
}
.stat-bar-fill {
  height: 100%; width: 50%;
  background: linear-gradient(90deg, var(--team-a), var(--team-a-2));
  transition: width .8s cubic-bezier(.2,.8,.2,1);
}

/* TICKER */
.ticker {
  display: flex; align-items: center;
  background: #000;
  border-top: 1px solid var(--line);
  height: 36px;
  overflow: hidden;
}
.ticker-label {
  background: var(--red); color: #fff;
  font-family: 'Oswald', sans-serif; letter-spacing: 0.15em;
  padding: 0 16px; height: 100%;
  display: flex; align-items: center; font-size: 13px;
  flex-shrink: 0;
}
.ticker-track { flex: 1; overflow: hidden; white-space: nowrap; position: relative; }
.ticker-content {
  display: inline-block; white-space: nowrap; padding-left: 100%;
  animation: tickerScroll 80s linear infinite;
  font-family: 'JetBrains Mono', monospace; font-size: 12px;
  color: #cfd8e3; letter-spacing: 0.1em; line-height: 36px;
}
.ticker-content span.up { color: var(--green); }
.ticker-content span.down { color: var(--red-2); }
.ticker-content span.hot { color: var(--amber); }
.ticker-content span.sep { color: #2a3848; padding: 0 18px; }
@keyframes tickerScroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* DOCK */
.dock {
  position: fixed; bottom: 52px; right: 18px;
  display: flex; gap: 8px; z-index: 50;
}
.dock-btn {
  min-width: 40px; height: 40px;
  padding: 0 10px;
  background: rgba(10,14,20,0.95);
  border: 1px solid var(--line-2);
  color: #fff; border-radius: 10px;
  cursor: pointer; font-family: 'Oswald', sans-serif; font-size: 14px; font-weight: 700;
  letter-spacing: 0.5px;
  transition: all .15s ease; backdrop-filter: blur(10px);
}
.dock-btn:hover { background: rgba(20,30,45,1); border-color: var(--blue); transform: translateY(-1px); }
.dock-btn.turbo {
  background: linear-gradient(135deg, #ff2d2d, #ff7a00);
  border-color: #ffb347;
  color: #fff;
  box-shadow: 0 0 16px rgba(255,80,0,0.6), inset 0 0 8px rgba(255,255,255,0.2);
  animation: turboPulse 0.8s ease-in-out infinite alternate;
}
.dock-btn.turbo:hover { transform: translateY(-1px) scale(1.02); }
@keyframes turboPulse {
  from { box-shadow: 0 0 10px rgba(255,80,0,0.5), inset 0 0 6px rgba(255,255,255,0.15); }
  to   { box-shadow: 0 0 22px rgba(255,120,0,0.9), inset 0 0 10px rgba(255,255,255,0.3); }
}
.dock-btn.off {
  opacity: 0.45;
  color: #7a8b9c;
  filter: grayscale(0.6);
}
.dock-btn.active {
  background: rgba(20,70,120,0.9);
  border-color: var(--blue);
  box-shadow: 0 0 10px rgba(40,140,220,0.45);
}

/* Responsive */
@media (max-width: 900px) {
  .ts-grid { grid-template-columns: repeat(4, 1fr); }
  .ts-body { grid-template-columns: 1fr; }
  .ts-vs { flex-direction: row; }
  .ts-vs-text { font-size: 28px; }
}
@media (max-width: 768px) {
  .scorebar { grid-template-columns: auto 1fr auto; padding: 8px 12px; }
  .network .net-meta { display: none; }
  .wc26-mark { display: none; }
  .sb-center { gap: 12px; }
  .team-crest { width: 32px; height: 32px; font-size: 11px; }
  .team-name { font-size: 16px; }
  .score { font-size: 28px; }
  .score-block { padding: 4px 12px; min-width: 100px; }
  .clock-time { font-size: 18px; }
  .subbar { padding: 6px 12px; font-size: 9px; gap: 8px; }
  .sub-left, .sub-right { gap: 10px; }
  .stadium, .referee { display: none; }
  .stats { grid-template-columns: 1fr 1fr 1fr; }
  .stat { padding: 8px 10px; }
  .mom-bar { width: 160px; }
  .ts-grid { grid-template-columns: repeat(3, 1fr); }
  .team-select { padding: 16px 12px; }
}

/* ============================================================
   v4 ADDITIONS — FLAGS · HUD · PiP · STAT SHEET · REPLAY
   ============================================================ */

/* Flag crests in the team grid */
.ts-card-crest.flag-crest {
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.1),
              0 4px 14px rgba(0,0,0,0.4);
}
.ts-card-crest.flag-crest .flag-code {
  position: absolute;
  bottom: 4px; right: 6px;
  font-family: 'Oswald', sans-serif;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.9);
  background: rgba(0,0,0,0.55);
  padding: 2px 4px;
  border-radius: 2px;
}

/* Big flag preview in team select */
.ts-crest-big.flag-big {
  box-shadow: inset 0 0 0 3px rgba(255,255,255,0.12),
              0 8px 28px rgba(0,0,0,0.55);
  overflow: hidden;
}

/* Scorebar flag crests */
.team-crest.flag-scorebar {
  background-size: cover !important;
  background-position: center !important;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.12),
              0 2px 8px rgba(0,0,0,0.5);
  overflow: hidden;
}

/* Close-up PiP canvas (photorealistic goal celebration cam) */
.closeup-pip {
  position: absolute;
  top: 14px; right: 14px;
  width: 380px;
  height: 248px;
  border-radius: 10px;
  box-shadow: 0 14px 40px rgba(0,0,0,0.7),
              0 0 0 1px rgba(255,255,255,0.1);
  opacity: 0;
  transform: scale(0.82) translateY(-20px);
  transition: transform 460ms cubic-bezier(0.2, 1.4, 0.4, 1), opacity 320ms ease;
  pointer-events: none;
  z-index: 30;
  image-rendering: auto;
}
.closeup-pip.show {
  opacity: 1;
  transform: scale(1) translateY(0);
}
@media (max-width: 900px) {
  .closeup-pip { width: 260px; height: 170px; top: 8px; right: 8px; }
}

/* Rotating broadcast HUD card */
.hud-card {
  position: absolute;
  bottom: 80px; right: 14px;
  width: 260px;
  min-height: 120px;
  background: linear-gradient(135deg, rgba(15, 24, 38, 0.95), rgba(8, 14, 22, 0.95));
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 12px 14px;
  color: #e8eef5;
  font-family: 'Inter', sans-serif;
  z-index: 15;
  box-shadow: 0 10px 28px rgba(0,0,0,0.55);
}
.hud-card.flip {
  animation: hudFlip 560ms ease;
}
@keyframes hudFlip {
  0%   { transform: rotateX(-90deg); opacity: 0; }
  100% { transform: rotateX(0); opacity: 1; }
}
.hud-head {
  font-family: 'Oswald', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.6px;
  color: #ffc857;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(255,200,87,0.15);
  padding-bottom: 6px;
}
.hud-body { font-size: 12px; }
.hud-name { font-family: 'Oswald', sans-serif; font-size: 20px; font-weight: 700; }
.hud-sub  { font-size: 10px; letter-spacing: 1px; color: #8a96a8; margin-bottom: 6px; }
.hud-rating {
  font-family: 'Oswald', sans-serif;
  font-size: 34px;
  font-weight: 700;
  color: #ffc857;
  line-height: 1;
  margin: 4px 0;
}
.hud-line { font-size: 10px; color: #8a96a8; letter-spacing: 0.6px; margin-top: 4px; }
.hud-wp {
  display: flex;
  height: 22px;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 6px;
}
.wp-seg {
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; color: #fff;
  transition: width 400ms ease;
}
.wp-d { background: rgba(255,255,255,0.12); color: #ccc; }
.hud-shots-row {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 4px 0; border-bottom: 1px dashed rgba(255,255,255,0.08);
}
.hud-shots-row .big { font-family: 'Oswald', sans-serif; font-size: 24px; font-weight: 700; }
.hud-shots-row small { color: #8a96a8; font-size: 10px; }
.hud-pass-row { padding: 4px 0; font-size: 12px; }
.hud-pass-row small { color: #8a96a8; }
@media (max-width: 900px) {
  .hud-card { width: 190px; bottom: 64px; right: 8px; min-height: 90px; padding: 8px 10px; }
  .hud-rating { font-size: 26px; }
  .hud-name { font-size: 16px; }
}

/* Full-time stat sheet overlay */
.stat-sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.82);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  backdrop-filter: blur(8px);
  padding: 24px;
  animation: sheetFade 400ms ease;
}
.stat-sheet-overlay.show { display: flex; }
@keyframes sheetFade { from { opacity: 0; } to { opacity: 1; } }
.sheet-card {
  background: linear-gradient(180deg, #0d1624 0%, #05090f 100%);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  max-width: 880px;
  width: 100%;
  max-height: 92vh;
  overflow-y: auto;
  padding: 28px 32px;
  color: #fff;
  position: relative;
  box-shadow: 0 30px 80px rgba(0,0,0,0.7);
}
.sheet-close {
  position: absolute;
  top: 14px; right: 14px;
  width: 36px; height: 36px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(0,0,0,0.3);
  color: #fff;
  border-radius: 50%;
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
}
.sheet-close:hover { background: rgba(255,255,255,0.1); }
.sheet-head {
  text-align: center;
  font-family: 'Oswald', sans-serif;
  font-size: 14px;
  letter-spacing: 4px;
  color: #ffc857;
  padding-bottom: 6px;
}
.sheet-score {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  padding: 10px 0 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sheet-team {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.sheet-flag {
  width: 72px; height: 48px;
  background-size: cover;
  background-position: center;
  border-radius: 4px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}
.sheet-name {
  font-family: 'Oswald', sans-serif;
  font-size: 24px;
  letter-spacing: 2px;
}
.sheet-line {
  font-family: 'Oswald', sans-serif;
  font-size: 56px;
  font-weight: 700;
}
.sheet-pom {
  display: flex; align-items: center; gap: 16px;
  margin: 20px 0;
  padding: 14px 18px;
  background: linear-gradient(135deg, rgba(255,200,87,0.12), rgba(255,200,87,0.02));
  border: 1px solid rgba(255,200,87,0.25);
  border-radius: 10px;
}
.sheet-pom-flag {
  width: 48px; height: 48px;
  background-size: cover;
  background-position: center;
  border-radius: 50%;
  box-shadow: 0 0 0 2px #ffc857;
}
.sheet-pom-body { flex: 1; }
.sheet-pom-label { font-size: 10px; letter-spacing: 2px; color: #ffc857; }
.sheet-pom-name { font-family: 'Oswald', sans-serif; font-size: 22px; }
.sheet-pom-meta { font-size: 11px; color: #8a96a8; }
.sheet-pom-rating {
  font-family: 'Oswald', sans-serif;
  font-size: 42px;
  font-weight: 700;
  color: #ffc857;
}
.sheet-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 16px;
}
.sheet-col-wide { grid-column: 1 / -1; }
.sheet-col-head {
  font-size: 10px;
  letter-spacing: 2px;
  color: #8a96a8;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sheet-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.sheet-table td { padding: 6px 4px; border-bottom: 1px dashed rgba(255,255,255,0.06); }
.sheet-table td:last-child { text-align: right; color: #ffc857; font-weight: 700; }
.sheet-stat {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 14px;
  padding: 8px 0;
  align-items: center;
  font-family: 'Oswald', sans-serif;
  font-size: 18px;
}
.sheet-stat span:first-child { text-align: right; }
.sheet-stat .sl {
  font-size: 10px;
  letter-spacing: 2px;
  color: #8a96a8;
  font-family: 'Inter', sans-serif;
}
@media (max-width: 700px) {
  .sheet-card { padding: 18px; }
  .sheet-line { font-size: 40px; }
  .sheet-name { font-size: 16px; }
  .sheet-grid { grid-template-columns: 1fr; }
}
