/* ======================================================
   CS 2 TRIO TOURNAMENT - STYLES
   Ciemny motyw, animowane tło, glowingi, Swiss bracket
   ====================================================== */

:root {
  --bg-primary: #07090d;
  --bg-secondary: #0f1420;
  --bg-tertiary: #161d2e;
  --bg-card: #121826;
  --border: #222c40;
  --border-light: #374357;
  --text-primary: #e6edf3;
  --text-secondary: #9aa4b2;
  --text-muted: #5b6577;
  --accent: #f59e0b;
  --accent-glow: rgba(245, 158, 11, 0.5);
  --win: #22c55e;
  --win-dark: #166534;
  --win-bg: rgba(34, 197, 94, 0.12);
  --win-glow: rgba(34, 197, 94, 0.45);
  --lose: #ef4444;
  --lose-dark: #7f1d1d;
  --lose-bg: rgba(239, 68, 68, 0.1);
  --lose-glow: rgba(239, 68, 68, 0.4);
  --info: #3b82f6;
  --radius: 8px;
  --radius-sm: 4px;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

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

html, body { overflow-x: hidden; }

body {
  font-family: 'Rajdhani', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
  position: relative;
}

.container {
  max-width: 1500px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 2;
}

/* ============= ANIMOWANE TŁO ============= */
.bg-animation {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.bg-grid {
  position: absolute;
  inset: -2px;
  background-image:
    linear-gradient(rgba(245, 158, 11, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(245, 158, 11, 0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  animation: gridMove 25s linear infinite;
  mask-image: radial-gradient(ellipse at center, rgba(0,0,0,0.9) 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at center, rgba(0,0,0,0.9) 30%, transparent 80%);
}

@keyframes gridMove {
  from { transform: translate(0, 0); }
  to   { transform: translate(60px, 60px); }
}

.bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  animation: orbFloat 20s ease-in-out infinite;
}

.bg-orb-1 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.35), transparent 70%);
  top: -100px; left: -100px;
}

.bg-orb-2 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(34, 197, 94, 0.18), transparent 70%);
  bottom: -150px; right: -150px;
  animation-delay: -7s;
}

.bg-orb-3 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.22), transparent 70%);
  top: 40%; left: 50%;
  animation-delay: -14s;
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(60px, -40px) scale(1.1); }
  66%      { transform: translate(-50px, 50px) scale(0.95); }
}

.bg-scanline {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    180deg,
    transparent 0px,
    transparent 3px,
    rgba(255, 255, 255, 0.012) 3px,
    rgba(255, 255, 255, 0.012) 4px
  );
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence baseFrequency='0.9' numOctaves='2'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.4'/></svg>");
  opacity: 0.04;
  mix-blend-mode: overlay;
}

/* ============= HEADER ============= */
.site-header {
  padding: 60px 0 40px;
  position: relative;
  z-index: 2;
}

.logo-block {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}

.logo-icon {
  font-size: 36px;
  color: var(--accent);
  filter: drop-shadow(0 0 15px var(--accent-glow));
  animation: iconPulse 3s ease-in-out infinite;
}

@keyframes iconPulse {
  0%, 100% { filter: drop-shadow(0 0 15px var(--accent-glow)); }
  50%      { filter: drop-shadow(0 0 25px var(--accent-glow)); }
}

.tournament-title {
  font-family: 'Orbitron', sans-serif;
  font-weight: 900;
  font-size: clamp(28px, 5vw, 52px);
  letter-spacing: 3px;
  text-align: center;
  background: linear-gradient(180deg, #ffffff 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  text-shadow: 0 0 40px rgba(245, 158, 11, 0.35);
}

.tournament-title::after {
  content: "";
  display: block;
  width: 80%;
  height: 2px;
  margin: 16px auto 0;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  box-shadow: 0 0 10px var(--accent-glow);
}

/* ============= NEXT MATCH (countdown) ============= */
.next-match-section {
  margin-bottom: 48px;
}

.next-match-card {
  position: relative;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(15, 20, 32, 0.95) 60%);
  border: 1px solid var(--accent);
  border-radius: 12px;
  padding: 28px 32px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(245, 158, 11, 0.2),
    0 0 40px rgba(245, 158, 11, 0.15),
    var(--shadow);
  animation: nextMatchPulse 4s ease-in-out infinite;
}

@keyframes nextMatchPulse {
  0%, 100% { box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.2), 0 0 40px rgba(245, 158, 11, 0.15), var(--shadow); }
  50%      { box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.4), 0 0 60px rgba(245, 158, 11, 0.3), var(--shadow); }
}

.next-match-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  box-shadow: 0 0 15px var(--accent-glow);
}

/* Animowany "LIVE" / pulsujący wskaźnik */
.next-match-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
  text-shadow: 0 0 8px var(--accent-glow);
}

.pulse-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow);
  animation: pulse 1.5s ease-in-out infinite;
}

.pulse-dot.live { background: var(--lose); box-shadow: 0 0 14px var(--lose-glow); }

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(1.4); opacity: 0.6; }
}

/* Grid z meczem i countdown */
.next-match-body {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto;
  gap: 28px;
  align-items: center;
}

.next-match-teams {
  display: contents; /* team1, vs, team2 jako 3 komórki grida */
}

.nm-team {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.nm-team.right {
  flex-direction: row-reverse;
  text-align: right;
}

.nm-team-logo {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 24px;
  background: var(--bg-tertiary);
  border: 2px solid var(--border-light);
  font-family: 'JetBrains Mono', monospace;
  flex-shrink: 0;
  transition: all 0.3s;
}

.nm-team:hover .nm-team-logo {
  transform: scale(1.05);
  box-shadow: 0 0 20px currentColor;
}

.nm-team-info { min-width: 0; }

.nm-team-name {
  font-family: 'Orbitron', sans-serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nm-team-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 1px;
  margin-top: 2px;
}

.nm-vs {
  font-family: 'Orbitron', sans-serif;
  font-size: 20px;
  font-weight: 900;
  color: var(--accent);
  letter-spacing: 2px;
  text-shadow: 0 0 12px var(--accent-glow);
  padding: 0 8px;
}

/* Countdown */
.nm-countdown {
  display: flex;
  gap: 8px;
  align-items: center;
}

.cd-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 58px;
  padding: 10px 10px 8px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--accent);
  border-radius: 6px;
  box-shadow: inset 0 0 15px rgba(245, 158, 11, 0.08);
}

.cd-value {
  font-family: 'Orbitron', sans-serif;
  font-size: 28px;
  font-weight: 900;
  color: var(--accent);
  line-height: 1;
  text-shadow: 0 0 12px var(--accent-glow);
  font-variant-numeric: tabular-nums;
}

.cd-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-top: 4px;
}

.cd-sep {
  font-family: 'Orbitron', sans-serif;
  font-size: 28px;
  font-weight: 900;
  color: var(--accent);
  opacity: 0.5;
  animation: blink 1s steps(2) infinite;
}

@keyframes blink { 50% { opacity: 0; } }

/* Dolna belka z info o meczu (grupa, runda, BO3, data) */
.next-match-meta {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--text-secondary);
}

.nm-meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nm-meta-item i {
  color: var(--accent);
  font-size: 13px;
}

.nm-meta-item strong {
  color: var(--text-primary);
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* Wariant: LIVE (mecz trwa) */
.next-match-card.is-live {
  border-color: var(--lose);
  box-shadow:
    0 0 0 1px rgba(239, 68, 68, 0.3),
    0 0 50px rgba(239, 68, 68, 0.25),
    var(--shadow);
  animation: liveMatchPulse 2s ease-in-out infinite;
}

@keyframes liveMatchPulse {
  0%, 100% { box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.3), 0 0 50px rgba(239, 68, 68, 0.25), var(--shadow); }
  50%      { box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.5), 0 0 70px rgba(239, 68, 68, 0.4), var(--shadow); }
}

.next-match-card.is-live .next-match-label { color: var(--lose); text-shadow: 0 0 8px var(--lose-glow); }
.next-match-card.is-live .cd-box { border-color: var(--lose); box-shadow: inset 0 0 15px rgba(239, 68, 68, 0.1); }
.next-match-card.is-live .cd-value,
.next-match-card.is-live .cd-sep { color: var(--lose); text-shadow: 0 0 12px var(--lose-glow); }

/* Wariant: brak zaplanowanego meczu */
.next-match-card.is-empty {
  text-align: center;
  padding: 32px;
  border-color: var(--border);
  box-shadow: var(--shadow);
  animation: none;
}

.next-match-card.is-empty .next-match-label {
  color: var(--text-muted);
  justify-content: center;
}

.next-match-card.is-empty .pulse-dot {
  background: var(--text-muted);
  box-shadow: none;
  animation: none;
}

.empty-message {
  color: var(--text-secondary);
  font-size: 16px;
  font-weight: 500;
}

@media (max-width: 900px) {
  .next-match-body {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .next-match-teams { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
  .nm-team { flex: 1; }
  .nm-team-name { font-size: 16px; }
  .nm-team-logo { width: 44px; height: 44px; font-size: 18px; }
  .nm-countdown { justify-content: center; }
  .cd-box { min-width: 50px; padding: 8px; }
  .cd-value, .cd-sep { font-size: 22px; }
  .next-match-card { padding: 20px; }
}

/* ============= UPCOMING MATCHES (widżety pod najbliższym) ============= */
.upcoming-matches {
  margin-top: 20px;
}

.upcoming-header {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
  padding-left: 4px;
}

.upcoming-header::before,
.upcoming-header::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}

.upcoming-header i {
  color: var(--accent);
  font-size: 10px;
}

.upcoming-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.upcoming-widget {
  background: linear-gradient(180deg, rgba(18, 24, 38, 0.8), rgba(15, 20, 32, 0.6));
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(4px);
}

.upcoming-widget::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 3px; height: 100%;
  background: linear-gradient(180deg, var(--accent), transparent);
  opacity: 0.6;
}

.upcoming-widget:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4), 0 0 15px rgba(245, 158, 11, 0.1);
}

.uw-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  gap: 8px;
}

.uw-phase {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.uw-bestof {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg-tertiary);
  padding: 2px 6px;
  border-radius: 3px;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.uw-teams {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
}

.uw-team {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.uw-team-logo {
  width: 24px;
  height: 24px;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 11px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-light);
  flex-shrink: 0;
  font-family: 'JetBrains Mono', monospace;
  overflow: hidden;
}

.uw-team-logo img {
  width: 100%; height: 100%;
  object-fit: contain;
  display: block;
}

.uw-team-name {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}

.uw-team.tbd .uw-team-name {
  color: var(--text-muted);
  font-style: italic;
  font-weight: 500;
}
.uw-team.tbd .uw-team-logo { opacity: 0.5; }

.uw-vs {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  color: var(--text-muted);
  text-align: center;
  padding: 0 0 0 32px;
  margin: -4px 0;
  letter-spacing: 1px;
}

.uw-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--text-secondary);
  gap: 6px;
}

.uw-date {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.uw-date i {
  color: var(--accent);
  font-size: 10px;
  flex-shrink: 0;
}

.uw-in {
  color: var(--text-muted);
  font-size: 10px;
  white-space: nowrap;
  flex-shrink: 0;
}

.uw-in strong {
  color: var(--accent);
  font-weight: 700;
}

/* ============= STAGE SECTION ============= */
.stage-section {
  padding: 20px 0 40px;
  position: relative;
}

.stage-header {
  margin-bottom: 36px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
  position: relative;
}

.stage-header::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 120px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
  box-shadow: 0 0 12px var(--accent-glow);
}

.stage-header h2 {
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 16px;
}

.stage-number {
  font-family: 'JetBrains Mono', monospace;
  color: var(--accent);
  font-size: 18px;
  font-weight: 600;
  opacity: 0.85;
  text-shadow: 0 0 10px var(--accent-glow);
}

.stage-desc {
  color: var(--text-secondary);
  margin-top: 8px;
  font-size: 15px;
  letter-spacing: 0.5px;
}

.stage-divider {
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 28px;
  color: var(--accent);
  opacity: 0.4;
  margin: 20px 0 10px;
  animation: dividerPulse 2.5s ease-in-out infinite;
}

@keyframes dividerPulse {
  0%, 100% { opacity: 0.3; transform: translateY(0); }
  50%      { opacity: 0.7; transform: translateY(4px); }
}

/* ============= MATCH CARD ============= */
.match-card {
  background: linear-gradient(180deg, var(--bg-card), var(--bg-secondary));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.25s ease;
  position: relative;
}

.match-card:hover {
  border-color: var(--border-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 20px rgba(245, 158, 11, 0.1);
}

.match-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 14px;
  background: rgba(0, 0, 0, 0.3);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
  border-bottom: 1px solid var(--border);
  gap: 8px;
}

.match-label {
  color: var(--accent);
  text-shadow: 0 0 8px var(--accent-glow);
}

.match-date {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.match-date i { font-size: 10px; }

/* Team row */
.team-row {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  gap: 12px;
  border-bottom: 1px solid var(--border);
  transition: all 0.2s;
  position: relative;
}
.team-row:last-child { border-bottom: none; }

.team-row.winner {
  background: linear-gradient(90deg, var(--win-bg), transparent);
  border-left: 3px solid var(--win);
  padding-left: 11px;
  box-shadow: inset 0 0 30px rgba(34, 197, 94, 0.08);
}

.team-row.loser { opacity: 0.5; }
.team-row.tbd { opacity: 0.65; }

.team-logo {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-light);
  flex-shrink: 0;
  font-family: 'JetBrains Mono', monospace;
  transition: all 0.2s;
  overflow: hidden;
}

/* Obrazek wewnątrz kafelka loga (skalowany by wypełnić) */
.team-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.team-row.winner .team-logo {
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.3);
}

.team-info { flex: 1; min-width: 0; }

.team-name {
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.3px;
}

.team-tag {
  font-size: 11px;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.5px;
}

.team-score {
  font-family: 'JetBrains Mono', monospace;
  font-size: 20px;
  font-weight: 700;
  min-width: 28px;
  text-align: center;
  color: var(--text-secondary);
}

.team-row.winner .team-score {
  color: var(--win);
  text-shadow: 0 0 12px var(--win-glow);
}

.team-row.tbd .team-name {
  font-style: italic;
  color: var(--text-muted);
  font-weight: 500;
}

/* ============= PLAY IN ============= */
.playin-container {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 32px;
  align-items: center;
}

.playin-matches {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.playin-arrows {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  gap: 20px;
  min-height: 200px;
}

.arrow-line {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--win);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  white-space: nowrap;
  text-shadow: 0 0 10px var(--win-glow);
}

.arrow-line i {
  font-size: 20px;
  animation: arrowSlide 2s ease-in-out infinite;
}

@keyframes arrowSlide {
  0%, 100% { transform: translateX(0); }
  50%      { transform: translateX(6px); }
}

.playin-advancers {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.advancer-card {
  background: linear-gradient(180deg, var(--bg-card), var(--bg-secondary));
  border: 1px solid var(--win);
  border-radius: var(--radius);
  padding: 18px 16px 16px;
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.2), 0 0 24px rgba(34, 197, 94, 0.15), var(--shadow);
  position: relative;
}

.advancer-badge {
  position: absolute;
  top: -10px;
  left: 14px;
  background: var(--win);
  color: #fff;
  padding: 2px 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-radius: 3px;
  box-shadow: 0 0 12px var(--win-glow);
}

.advancer-label {
  color: var(--text-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
  font-weight: 600;
}

.advancer-team {
  display: flex;
  align-items: center;
  gap: 12px;
}

.advancer-team.pending { color: var(--text-muted); font-style: italic; }
.advancer-team.pending .team-logo { opacity: 0.4; }

/* ============= GSL GROUPS - SWISS-STYLE BRACKET ============= */
.gsl-groups {
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.gsl-group {
  background: linear-gradient(180deg, rgba(15, 20, 32, 0.7), rgba(7, 9, 13, 0.5));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  backdrop-filter: blur(6px);
  position: relative;
  overflow: hidden;
}

.gsl-group::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  box-shadow: 0 0 15px var(--accent-glow);
}

.group-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.group-title .group-letter {
  color: var(--accent);
  font-family: 'JetBrains Mono', monospace;
  text-shadow: 0 0 15px var(--accent-glow);
  font-size: 28px;
}

/* SWISS BRACKET LAYOUT */
.swiss-bracket {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  position: relative;
  align-items: start;
}

.swiss-round {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.swiss-round-header {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
  text-align: center;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  margin-bottom: 4px;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

/* Kolumna z meczami tego samego bilansu (np. "1:0", "0:1") */
.swiss-record-block {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.swiss-record-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  text-align: center;
  padding: 4px 8px;
  text-transform: uppercase;
}

/* STREFY końcowe: AWANS (zielona) i ODPAD (czerwona) */
.swiss-outcome {
  border-radius: var(--radius);
  padding: 14px 12px 12px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.swiss-outcome.advance {
  background: linear-gradient(180deg, rgba(34, 197, 94, 0.18), rgba(34, 197, 94, 0.05));
  border: 1px solid var(--win);
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.15), 0 0 24px rgba(34, 197, 94, 0.2);
}

.swiss-outcome.eliminate {
  background: linear-gradient(180deg, rgba(239, 68, 68, 0.15), rgba(239, 68, 68, 0.04));
  border: 1px solid var(--lose);
  box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.12), 0 0 24px rgba(239, 68, 68, 0.15);
}

.swiss-outcome-header {
  font-family: 'Orbitron', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-align: center;
  padding: 4px 8px;
  border-radius: 3px;
  margin-bottom: 4px;
}

.swiss-outcome.advance .swiss-outcome-header {
  background: var(--win);
  color: #fff;
  box-shadow: 0 0 12px var(--win-glow);
}

.swiss-outcome.eliminate .swiss-outcome-header {
  background: var(--lose);
  color: #fff;
  box-shadow: 0 0 12px var(--lose-glow);
}

.swiss-outcome-header i {
  margin-right: 6px;
  font-size: 10px;
}

/* Mała lista drużyn w stref awansu/odpadu */
.outcome-team {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.2s;
}

.outcome-team.pending {
  opacity: 0.45;
  font-style: italic;
}

.outcome-team .team-logo {
  width: 28px;
  height: 28px;
  font-size: 13px;
}

.outcome-team .team-name {
  font-size: 14px;
  font-weight: 600;
}

.outcome-team .team-tag {
  font-size: 10px;
}

/* ============= PLAYOFFS ============= */
.playoffs-container {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 40px;
  align-items: center;
  padding: 20px 0;
}

.playoffs-column {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.playoffs-column.final-column { align-items: center; }

.playoffs-column.final-column .match-card {
  border-color: var(--accent);
  box-shadow:
    0 0 0 1px rgba(245, 158, 11, 0.3),
    0 0 30px rgba(245, 158, 11, 0.2),
    var(--shadow);
  min-width: 340px;
}

.final-trophy {
  text-align: center;
  font-size: 52px;
  color: var(--accent);
  margin-bottom: 8px;
  filter: drop-shadow(0 0 20px var(--accent-glow));
  animation: trophyFloat 3s ease-in-out infinite;
}

@keyframes trophyFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}

.playoffs-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 28px;
  filter: drop-shadow(0 0 10px var(--accent-glow));
  animation: arrowSlide 2s ease-in-out infinite;
}

.champion-display {
  text-align: center;
  margin-top: 24px;
  padding: 22px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(245, 158, 11, 0.02));
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  min-width: 340px;
  box-shadow: 0 0 30px rgba(245, 158, 11, 0.15);
}

.champion-label {
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 10px;
  text-shadow: 0 0 8px var(--accent-glow);
}

.champion-name {
  font-family: 'Orbitron', sans-serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.champion-name.pending {
  color: var(--text-muted);
  font-style: italic;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: none;
  font-family: 'Rajdhani', sans-serif;
}

/* ============= FOOTER ============= */
.site-footer {
  margin-top: 80px;
  padding: 28px 0;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  position: relative;
  z-index: 2;
}

.site-footer code {
  background: var(--bg-tertiary);
  padding: 2px 8px;
  border-radius: 3px;
  font-family: 'JetBrains Mono', monospace;
  color: var(--accent);
  font-size: 13px;
  border: 1px solid var(--border);
}

/* ============= RESPONSIVE ============= */
@media (max-width: 1200px) {
  .swiss-bracket {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

@media (max-width: 768px) {
  .logo-block { gap: 12px; }
  .logo-icon { font-size: 24px; }

  .playin-container {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .playin-arrows { flex-direction: row; min-height: auto; padding: 8px 0; justify-content: space-around; }
  .arrow-line i { transform: rotate(90deg); }

  .swiss-bracket {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .playoffs-container {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .playoffs-arrow { transform: rotate(90deg); }
  .playoffs-column.final-column .match-card,
  .champion-display { min-width: auto; width: 100%; }

  .container { padding: 0 16px; }
  .gsl-group { padding: 16px 12px; }
  .bg-orb { opacity: 0.3; }
}
