/* css/components.css — Reusable UI components: hero, cards, tables, panels */
@import url('variables.css');

/* ── HERO ── */
.hero {
  position: relative; height: calc(100vh - var(--nav-height));
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.hero-target {
  position: absolute; width: 700px; height: 700px;
  opacity: 0.2; right: 0; top: 50%; transform: translateY(-50%);
  object-fit: contain;
}
.hero-content { position: relative; z-index: 2; max-width: 900px; padding: 0 2rem; }
.hero-eyebrow {
  font-family: var(--font-condensed); font-size: 0.75rem; font-weight: 600;
  letter-spacing: 0.3em; color: var(--red); text-transform: uppercase;
  margin-bottom: 1.2rem; display: flex; align-items: center; gap: 12px;
}
.hero-eyebrow::before { content: ''; display: block; width: 32px; height: 1px; background: var(--red); }
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(4rem, 9vw, 8rem); line-height: 0.92; letter-spacing: 0.02em; color: var(--white);
}
.hero h1 span { color: var(--red-hot); display: block; }
.hero-sub { font-size: 1rem; color: var(--muted); max-width: 480px; line-height: 1.7; margin: 1.5rem 0 2.5rem; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-bottom: 2.5rem; }
.hero-stats { display: flex; gap: 2.5rem; padding-top: 2rem; border-top: 1px solid var(--border); flex-wrap: wrap; }
.hero-stat .num { font-family: var(--font-display); font-size: 2.8rem; color: var(--gold); line-height: 1; }
.hero-stat .label { font-family: var(--font-condensed); font-size: 0.7rem; letter-spacing: 0.2em; color: var(--muted); text-transform: uppercase; margin-top: 2px; }

/* ── STANDINGS TABLE ── */
.standings-wrap { max-width: var(--max-width); margin: 0 auto; padding: 0 2rem 4rem; }
.standings-table { width: 100%; border-collapse: collapse; font-family: var(--font-condensed); }
.standings-table thead tr { background: var(--panel); border-bottom: 2px solid var(--red); }
.standings-table th {
  padding: 0.9rem 1rem; text-align: left;
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--muted); white-space: nowrap;
}
.standings-table th:nth-child(n+3) { text-align: center; }
.standings-table tbody tr { border-bottom: 1px solid var(--border); transition: background 0.15s; }
.standings-table tbody tr:nth-child(even) { background: rgba(255,255,255,0.03); }
.standings-table tbody tr:hover { background: rgba(255,255,255,0.07); transition: background 0.15s ease; }
.standings-table tbody tr.sep-playoff td { border-bottom: 2px solid rgba(22,163,74,0.5); }
.standings-table tbody tr.sep-playin td { border-bottom: 2px solid rgba(59,130,246,0.5); }
.standings-position { width: 34px; text-align: center; font-weight: 700; border-radius: 4px; }
.standings-pos-top { background: rgba(22,163,74,0.2); color: var(--accent-primary); }
.standings-pos-playin { background: rgba(59,130,246,0.2); color: #60a5fa; }
.standings-team { display: flex; align-items: center; gap: 8px; }
.standings-team-logo { width: 22px; height: 22px; object-fit: contain; flex-shrink: 0; }
.standings-team-name { font-weight: 600; }
.standings-legend { margin-top: 12px; display: flex; gap: 18px; font-size: 0.9rem; align-items: center; color: var(--muted); }
.legend-top, .legend-playin { width: 14px; height: 14px; border-radius: 3px; display: inline-block; }
.legend-top { background: rgba(22,163,74,0.4); }
.legend-playin { background: rgba(59,130,246,0.4); }
.standings-table td { padding: 0.85rem 1rem; font-size: 0.95rem; color: var(--white); }
.standings-table td:nth-child(n+3) { text-align: center; }
.pos-badge { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; font-size: 0.85rem; font-weight: 700; }
.pos-1 { background: var(--gold); color: #000; }
.pos-2 { background: #9ca3af; color: #000; }
.pos-3 { background: #92400e; color: #fff; }
.pts-cell { font-family: var(--font-display); font-size: 1.4rem; color: var(--gold-light); }
.form-pip { display: inline-block; width: 18px; height: 18px; line-height: 18px; text-align: center; font-size: 0.68rem; font-weight: 700; margin: 0 1px; border-radius: 2px; }
.form-w { background: var(--green); color: white; }
.form-l { background: #7f1d1d; color: white; }
.form-d { background: #374151; color: #ccc; }

/* ── FIXTURES / RESULTS ── */
.fixtures-wrap { max-width: 900px; margin: 0 auto; padding: 0 2rem 4rem; }
.round-block { margin-bottom: 2rem; }
.round-header {
  font-family: var(--font-display); font-size: 1.1rem; letter-spacing: 0.12em; color: var(--muted);
  padding: 1.5rem 0 0.8rem; border-bottom: 1px solid var(--border);
  margin-bottom: 0.8rem; display: flex; align-items: center; justify-content: space-between;
}
.round-date { font-size: 0.75rem; font-family: var(--font-condensed); font-weight: 400; letter-spacing: 0.1em; }
.fixture-card {
  background: var(--panel); border: 1px solid var(--border);
  padding: 1rem 1.5rem; margin-bottom: 0.5rem;
  display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: center; gap: 1rem; transition: border-color 0.2s;
}
.fixture-card:hover { border-color: rgba(255,51,0,0.3); }
.fixture-card.played { border-left: 2px solid var(--border); }
.fixture-team { font-family: var(--font-condensed); font-size: 1rem; font-weight: 600; color: var(--white); }
.fixture-team.home { text-align: left; }
.fixture-team.away { text-align: right; }
.fixture-score { font-family: var(--font-display); font-size: 2rem; color: var(--gold); text-align: center; min-width: 80px; letter-spacing: 0.06em; }
.fixture-vs { font-family: var(--font-condensed); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.2em; color: var(--muted); text-align: center; min-width: 80px; }
.fixture-meta { font-size: 0.7rem; color: var(--muted); margin-top: 0.25rem; font-family: var(--font-condensed); letter-spacing: 0.06em; }
.fixture-actions { font-size: 0.7rem; text-align: center; margin-top: 0.3rem; }

/* ── TEAM CARDS GRID ── */
.teams-wrap { max-width: var(--max-width); margin: 0 auto 4rem; padding: 0 2rem; }
.teams-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1px; background: var(--border); }
.team-card {
  background: var(--dark); padding: 2rem; position: relative; overflow: hidden;
  cursor: pointer; transition: background 0.2s;
}
.team-card::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 2px; background: var(--red-hot); transition: width 0.3s ease; }
.team-card:hover { background: var(--panel); }
.team-card:hover::after { width: 100%; }
.team-initials { font-family: var(--font-display); font-size: 3.5rem; color: var(--red); opacity: 0.25; position: absolute; top: 1.5rem; right: 1.5rem; letter-spacing: 0.05em; line-height: 1; }
.team-name { font-family: var(--font-display); font-size: 1.6rem; letter-spacing: 0.04em; line-height: 1.1; max-width: 200px; margin-bottom: 0.4rem; }
.team-city { font-family: var(--font-condensed); font-size: 0.72rem; letter-spacing: 0.2em; color: var(--muted); text-transform: uppercase; margin-bottom: 1.5rem; display: flex; align-items: center; gap: 6px; }
.team-city::before { content: '◆'; font-size: 0.45rem; color: var(--red); }
.team-stats-row { display: flex; gap: 1.5rem; padding-top: 1.2rem; border-top: 1px solid var(--border); }
.ts-num { font-family: var(--font-display); font-size: 1.6rem; color: var(--gold); line-height: 1; }
.ts-label { font-family: var(--font-condensed); font-size: 0.62rem; letter-spacing: 0.16em; color: var(--muted); text-transform: uppercase; }
.team-hint { font-family: var(--font-condensed); font-size: 0.7rem; letter-spacing: 0.14em; color: var(--red); text-transform: uppercase; margin-top: 1rem; opacity: 0; transition: opacity 0.2s; }
.team-card:hover .team-hint { opacity: 1; }

/* ── TEAM PROFILE PANEL (slide-in) ── */
.panel-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.75); z-index: 200; opacity: 0; pointer-events: none; transition: opacity 0.3s; }
.panel-overlay.open { opacity: 1; pointer-events: all; }
.side-panel {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: min(600px, 100vw); background: var(--dark);
  z-index: 201; transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
  overflow-y: auto; display: flex; flex-direction: column;
}
.side-panel.open { transform: translateX(0); }
.panel-top {
  position: sticky; top: 0; background: var(--dark);
  border-bottom: 1px solid var(--border); padding: 1.1rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between; z-index: 10;
}
.panel-top-label { font-family: var(--font-condensed); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.22em; color: var(--muted); text-transform: uppercase; }
.panel-close {
  background: none; border: 1px solid var(--border); color: var(--muted);
  width: 34px; height: 34px; cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all 0.2s; font-size: 1rem; line-height: 1;
}
.panel-close:hover { border-color: var(--white); color: var(--white); }

.team-banner {
  background: var(--panel); border-bottom: 2px solid var(--red);
  padding: 2rem 1.5rem; position: relative; overflow: hidden;
}
.team-banner-name { font-family: var(--font-display); font-size: 2.4rem; letter-spacing: 0.04em; line-height: 1; }
.team-banner-city { font-family: var(--font-condensed); font-size: 0.72rem; letter-spacing: 0.22em; color: var(--muted); text-transform: uppercase; margin-top: 0.5rem; display: flex; align-items: center; gap: 6px; }
.team-banner-city::before { content: '◆'; font-size: 0.45rem; color: var(--red); }
.team-banner-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.team-logo-small { width: 76px; height: 76px; object-fit: contain; flex-shrink: 0; }
.team-photo-container {
  width: 100%;
  max-width: 600px;
  aspect-ratio: 16 / 9;
  margin: 1.25rem auto 0;
  overflow: hidden;
  border-radius: 10px;
}

.team-photo {
  width: 100%;
  max-width: 600px;
  height: auto;
  border-radius: 10px;
  object-fit: cover;
}.team-banner-stats { display: flex; gap: 2rem; margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border); flex-wrap: wrap; }
.tbs-num { font-family: var(--font-display); font-size: 2rem; color: var(--gold); line-height: 1; }
.tbs-lbl { font-family: var(--font-condensed); font-size: 0.62rem; letter-spacing: 0.18em; color: var(--muted); text-transform: uppercase; }

.panel-section { padding: 1.5rem; border-bottom: 1px solid var(--border); }
.panel-section:last-child { border-bottom: none; }
.panel-section-title { font-family: var(--font-display); font-size: 1rem; letter-spacing: 0.1em; color: var(--muted); margin-bottom: 1.2rem; display: flex; align-items: center; gap: 10px; }
.panel-section-title::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ── Player cards grid (shown inside team profile panel) ── */
.player-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 1rem;
}

.player-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.5rem;
  padding: 0.9rem 0.5rem;
  background: var(--panel);
  border: 1px solid var(--border);
  transition: border-color 0.2s;
}
.player-card:hover { border-color: rgba(212,160,23,0.4); }

/* Circular photo container — always 80×80 */
.player-photo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--border);
  background: var(--dark);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s;
}
.player-card:hover .player-photo { border-color: var(--red); }

/* Actual photo — fills circle, crops from top (faces) */
.player-photo img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

/* Initials fallback — shown when no photo or photo fails to load */
.player-initials {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: rgba(204,34,0,0.6);
  line-height: 1;
  user-select: none;
}

.player-name {
  font-family: var(--font-condensed);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--white);
  line-height: 1.2;
  word-break: break-word;
}
.player-nickname {
  font-family: var(--font-condensed);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  color: var(--gold);
  text-transform: uppercase;
}

/* Keep .player-row for any legacy row usage */
.player-row { display: flex; align-items: center; gap: 1rem; padding: 0.85rem 0; border-bottom: 1px solid var(--border); }
.player-row:last-child { border-bottom: none; }
.player-stat-mini { display: flex; gap: 1rem; margin-top: 0.4rem; }
.player-stat-mini span { font-family: var(--font-condensed); font-size: 0.72rem; color: var(--muted); letter-spacing: 0.06em; }
.player-stat-mini strong { color: var(--gold); font-weight: 600; }

/* Recent results in panel */
.panel-result-row { display: flex; align-items: center; gap: 0.8rem; padding: 0.6rem 0; border-bottom: 1px solid rgba(42,42,42,0.6); font-family: var(--font-condensed); font-size: 0.9rem; color: var(--muted); }
.panel-result-row:last-child { border-bottom: none; }
.prs { font-family: var(--font-display); font-size: 1.1rem; min-width: 52px; text-align: center; flex-shrink: 0; }
.prs.w { color: var(--gold); } .prs.l { color: var(--red); } .prs.d { color: #555; }
.prt { flex: 1; }
.prr { font-size: 0.7rem; color: var(--muted); letter-spacing: 0.1em; }

/* ── ABOUT ── */
.about-full {
  background: var(--panel); border: 1px solid var(--border);
  margin: 2rem auto; max-width: var(--max-width); padding: 3rem;
  display: grid; grid-template-columns: 1fr 2fr; gap: 3rem; align-items: center;
}
.about-full-big { font-family: var(--font-display); font-size: 5rem; line-height: 0.9; color: var(--red-hot); }
.about-full p { font-size: 1rem; line-height: 1.9; color: var(--muted); }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--border); margin: 2rem auto; max-width: var(--max-width); }
.about-card { background: var(--dark); padding: 2.5rem; position: relative; overflow: hidden; }
.about-card::before { content: attr(data-num); position: absolute; top: -10px; right: 20px; font-family: var(--font-display); font-size: 7rem; color: rgba(255,255,255,0.02); line-height: 1; }
.about-card h3 { font-family: var(--font-display); font-size: 1.5rem; letter-spacing: 0.05em; color: var(--gold); margin-bottom: 1rem; }
.about-card p { font-size: 0.95rem; line-height: 1.8; color: var(--muted); }

/* ── RULES ── */
.rules-wrap { max-width: 860px; margin: 0 auto; padding: 0 2rem 4rem; }
.rule-block { margin-bottom: 3rem; }
.rule-title { font-family: var(--font-display); font-size: 1.8rem; letter-spacing: 0.05em; color: var(--gold); padding-bottom: 0.8rem; border-bottom: 1px solid var(--border); margin-bottom: 1.5rem; display: flex; align-items: center; gap: 1rem; }
.rule-num { font-size: 1rem; background: var(--red); color: white; width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; font-family: var(--font-condensed); font-weight: 700; flex-shrink: 0; }
.rule-item { display: flex; gap: 1rem; padding: 0.9rem 0; border-bottom: 1px solid rgba(42,42,42,0.5); }
.rule-item:last-child { border-bottom: none; }
.rule-dot { width: 6px; height: 6px; background: var(--red); border-radius: 50%; flex-shrink: 0; margin-top: 9px; }
.rule-item p { font-size: 0.95rem; line-height: 1.75; color: #aaa; }
.rule-item strong { color: var(--white); font-weight: 500; }

/* ── PLAYER STATS TABLE ── */
.player-stats-wrap { max-width: var(--max-width); margin: 0 auto; padding: 0 2rem 4rem; overflow-x: auto; }
.player-stats-table { width: 100%; border-collapse: collapse; font-family: var(--font-condensed); white-space: nowrap; }
.player-stats-table thead tr { background: var(--panel); border-bottom: 2px solid var(--gold); }
.player-stats-table th { padding: 0.8rem 0.9rem; text-align: left; font-size: 0.68rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.player-stats-table th:nth-child(n+3) { text-align: center; }
.player-stats-table td { padding: 0.75rem 0.9rem; font-size: 0.9rem; color: var(--white); border-bottom: 1px solid var(--border); }
.player-stats-table td:nth-child(n+3) { text-align: center; }
.player-stats-table tbody tr:hover { background: rgba(255,255,255,0.02); }

/* ── SORTABLE COLUMNS (player stats table) ── */

/* Sortable header cells — pointer cursor signals interactivity */
.sortable-col {
  cursor: pointer;
  user-select: none;          /* prevent text selection on rapid clicks */
  white-space: nowrap;
  transition: color 0.15s;
}
.sortable-col:hover { color: var(--white); }

/* Active sort column header */
.sort-active { color: var(--gold-light) !important; }

/* The sort direction indicator (▼ / ▲) and the idle hint (⇅) */
.sort-indicator {
  display: inline-block;
  margin-left: 5px;
  font-size: 0.6rem;
  vertical-align: middle;
  line-height: 1;
}

/* Idle indicator — visible but dimmed when column is not active */
.sort-indicator--idle {
  opacity: 0.25;
  font-size: 0.65rem;
}

/* Highlight the active column cells faintly so the eye tracks the sort */
.player-stats-table td.sort-col-highlight {
  color: var(--gold-light);
}


/* ── RESULTS PAGE — clickable score cards ── */

/* Subtle hover on played result cards to hint they are clickable */
.result-card:hover {
  border-color: rgba(212,160,23,0.5) !important;
  background: var(--panel);
}
.result-card:hover .fixture-score {
  color: var(--gold-light);
}

/* Wrapper that stacks the score + photo hint vertically in the center cell */
.result-score-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 100px;
}

/* Small label below the score */
.result-photo-hint {
  font-family: var(--font-condensed);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  color: var(--gold);
  text-transform: uppercase;
  opacity: 0;                    /* hidden until card is hovered */
  transition: opacity 0.2s;
}
.result-card:hover .result-photo-hint { opacity: 1; }

/* Dim hint when there is no photo */
.result-photo-hint--none {
  color: var(--muted);
}

/* ── RESULT PHOTO LIGHTBOX ── */

/* Full-screen dark backdrop */
.result-lightbox {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(0, 0, 0, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.result-lightbox.open {
  opacity: 1;
  pointer-events: all;
}

/* The white/dark content box */
.lb-box {
  position: relative;
  background: var(--dark);
  border: 1px solid var(--border);
  border-top: 3px solid var(--red);
  max-width: 720px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  /* Animate in from slightly below */
  transform: translateY(16px);
  transition: transform 0.25s ease;
}
.result-lightbox.open .lb-box {
  transform: translateY(0);
}

/* Close button — top-right corner */
.lb-close {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  width: 32px;
  height: 32px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  transition: all 0.2s;
  z-index: 1;
}
.lb-close:hover { border-color: var(--white); color: var(--white); }

/* Match title / subtitle header */
.lb-header {
  padding: 1.4rem 1.5rem 1rem;
  border-bottom: 1px solid var(--border);
}
.lb-title {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  letter-spacing: 0.04em;
  line-height: 1.1;
  padding-right: 2.5rem;       /* avoid overlap with close btn */
}
.lb-subtitle {
  font-family: var(--font-condensed);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  color: var(--muted);
  text-transform: uppercase;
  margin-top: 0.4rem;
}

/* Photo area */
.lb-img-wrap {
  padding: 1.2rem 1.5rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lb-img {
  max-width: 100%;
  max-height: 60vh;
  object-fit: contain;
  display: block;
  border: 1px solid var(--border);
}

/* No-photo fallback */
.lb-no-photo {
  padding: 3rem 2rem;
  text-align: center;
  color: var(--muted);
}
.lb-no-photo-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.4;
}
.lb-no-photo p {
  font-family: var(--font-condensed);
  font-size: 0.9rem;
  letter-spacing: 0.08em;
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .about-grid  { grid-template-columns: 1fr; }
  .about-full  { grid-template-columns: 1fr; gap: 1.5rem; }
  .about-full-big { font-size: 3rem; }
  .hero-stats  { gap: 1.5rem; }
  .fixture-card { grid-template-columns: 1fr; text-align: center; gap: 0.5rem; }
  .fixture-team.home, .fixture-team.away { text-align: center; }
  .hide-mobile { display: none; }
}

/* ══════════════════════════════════════════════════════════════
   PLAYER PROFILE PANEL
   ══════════════════════════════════════════════════════════════ */

/* Back button in panel-top */
.panel-back {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0 0.5rem;
  line-height: 1;
  transition: color 0.2s;
}
.panel-back:hover { color: var(--gold); }

/* ── Header: big photo + name block ── */
.pp-header {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  padding: 1.8rem 1.5rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(212,160,23,0.06) 0%, transparent 100%);
}

.pp-photo {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--panel);
}
.pp-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.pp-initials {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--gold);
  font-weight: 700;
  letter-spacing: 0.05em;
}

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

.pp-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.04em;
  line-height: 1.2;
}
.pp-nickname {
  font-family: var(--font-condensed);
  font-size: 0.95rem;
  color: var(--gold);
  margin-top: 0.25rem;
  font-style: italic;
  letter-spacing: 0.06em;
}
.pp-team {
  font-family: var(--font-condensed);
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-top: 0.5rem;
}

/* ── Stats grid: 180s / highest checkout / 100+ ── */
.pp-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-top: 0.25rem;
}
.pp-stat-box {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 0.5rem 0.8rem;
  text-align: center;
}
.pp-stat-num {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
}
.pp-stat-lbl {
  font-family: var(--font-condensed);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin-top: 0.4rem;
}

/* ── Win rate rows ── */
.pp-winrate-list {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  margin-top: 0.25rem;
}
.pp-wr-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.pp-wr-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--font-condensed);
  font-size: 0.82rem;
  color: var(--white);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.pp-wr-record {
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: none;
  letter-spacing: 0.03em;
}
.pp-wr-right {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}
.pp-bar-track {
  flex: 1;
  height: 6px;
  background: var(--panel);
  border-radius: 3px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.pp-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--red), var(--gold));
  border-radius: 3px;
  transition: width 0.5s ease;
  min-width: 2px;
}
.pp-wr-pct {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--gold);
  min-width: 38px;
  text-align: right;
}

/* ── Hint text below player grid ── */
.pp-hint-text {
  font-family: var(--font-condensed);
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.08em;
  margin: 0.6rem 0 0;
  text-align: center;
}

/* Player card clickable hover enhancement */
.player-card[data-player-id] {
  cursor: pointer;
  transition: border-color 0.2s, transform 0.15s;
}
.player-card[data-player-id]:hover {
  transform: translateY(-2px);
}

/* ── Live match indicator ───────────────── */

.match-live{
  color: var(--live-red);
  font-size: 0.8125rem;
  font-weight:600;
  animation:matchBlink 1.4s infinite;
}

@keyframes matchBlink{
 0%{opacity:1}
 50%{opacity:0.35}
 100%{opacity:1}
}

.live-card{
  border-left: 4px solid var(--live-red);
  background: rgba(239,68,68,0.05);
}

.live-bar{
  width:100%;
  background:#111;
  color:#fff;
  padding:10px 0;
  border-bottom: 2px solid var(--live-red);
}

.live-bar.hidden{
  display:none;
}

.live-bar-inner{
  max-width: var(--max-width);
  margin:auto;
  display:flex;
  gap:20px;
  align-items:center;
}

.live-label{
  color: var(--live-red);
  font-weight:700;
  animation:matchBlink 1.4s infinite;
}

.live-match-item{
  cursor:pointer;
}

.live-match-header{
  text-align:center;
  margin-bottom:20px;
}

.live-row{
  display:flex;
  justify-content:space-between;
  padding:10px 14px;
  border-bottom:1px solid rgba(255,255,255,0.08);
}

.live-player{
  width:40%;
}

.live-score{
  font-weight:bold;
}

.live-section{
  margin-top:40px;
}

.live-section h3{
  text-transform:uppercase;
  color: var(--live-red);
  margin-bottom:10px;
}

.ekipno-header{
  display:flex;
  justify-content:center;
  align-items:center;
  gap:20px;

  font-weight:700;
  margin:25px 0 10px 0;

  border-bottom:2px solid #444;
  padding-bottom:6px;
}

.ek-title{
  font-size: 1.125rem;
  letter-spacing:2px;
}

.ek-score{
  font-size: 1.25rem;
  color:#fff;
}
.live-scoreboard{
  text-align:center;
  margin-bottom:25px;
}

.main-score{
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: 0.04em;
}

.main-score .score{
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 5rem);
  color: var(--gold);
  margin: 0 20px;
  letter-spacing: 0.06em;
}

.stage-score{
  margin-top:6px;
  font-size: 0.875rem;
  color:#bbb;
}

.live-points{
  text-align:center;
  margin-top:20px;
  font-weight:700;
}

.live-divider{
  margin:12px 0 6px;
  font-size: 0.8125rem;
  font-weight:600;
  color:#aaa;
  border-bottom:1px solid #333;
  padding-bottom:4px;
}

/* ── Live page additions ─────────────────────────────────────────────
   Paste these rules at the END of public/css/components.css
   ─────────────────────────────────────────────────────────────────── */

/* Live badge pill */
.live-badge-pill {
  display: inline-block;
  font-family: var(--font-condensed);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--red-hot);
  animation: matchBlink 1.4s infinite;
  margin-bottom: 4px;
}

.live-match-subtitle {
  font-size: 0.8125rem;
  color: var(--muted);
  margin-bottom: 4px;
}

/* Team name in scoreboard */
.live-team-name {
  font-family: var(--font-condensed);
  font-size: 1.125rem;
  letter-spacing: 0.06em;
}

/* Ekipno big score */
.ek-big-score {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0 14px;
  color: var(--white);
}

/* ── Global stats bar ─────────────────────────────────────────────── */

.live-stats-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 16px;
  margin: 0 0 28px;
  gap: 12px;
}

.live-stats-side {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.live-stats-right {
  justify-content: flex-end;
}

.live-stats-label {
  font-family: var(--font-condensed);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  color: var(--muted);
  white-space: nowrap;
  text-transform: uppercase;
}

/* Stat pills (global bar) */
.stat-pill {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 4px;
  font-family: var(--font-condensed);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.stat-180 {
  background: rgba(212, 160, 23, 0.15);
  border: 1px solid var(--gold);
  color: var(--gold-light);
}

.stat-checkout-hot {
  background: rgba(229, 57, 53, 0.15);
  border: 1px solid var(--red);
  color: #ff6b6b;
}

.stat-checkout-lo {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  color: var(--muted);
}

/* ── Per-row stat tags ────────────────────────────────────────────── */

/* Redesign live-player to be a flex cell with stats */
.live-player-cell {
  width: 40%;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.live-player-cell-right {
  align-items: flex-end;
  text-align: right;
}

.live-player-name {
  font-size: 0.875rem;
}

.live-row-stats {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.live-row-stats-right {
  justify-content: flex-end;
}

.stat-tag-180 {
  font-family: var(--font-condensed);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 1px 6px;
  border-radius: 3px;
  background: rgba(212, 160, 23, 0.12);
  border: 1px solid rgba(212, 160, 23, 0.35);
  color: var(--gold);
}

.stat-tag-out {
  font-family: var(--font-condensed);
  font-size: 0.625rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 3px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  color: var(--muted);
}

.stat-tag-out-hot {
  background: rgba(229, 57, 53, 0.12);
  border-color: rgba(229, 57, 53, 0.4);
  color: #ff6b6b;
}

/* ── Finished / winner styles ─────────────────────────────────────── */

.live-winner {
  font-weight: 700;
  color: var(--white);
}

.live-row-done {
  opacity: 0.6;
}

/* ── Score flash animation ────────────────────────────────────────── */

@keyframes scoreFlash {
  0%   { background: rgba(204, 34, 0, 0.2); }
  60%  { background: rgba(204, 34, 0, 0.06); }
  100% { background: transparent; }
}

.score-flash {
  animation: scoreFlash 0.9s ease-out forwards;
  border-radius: 6px;
}

/* ── Ekipno leg grid ──────────────────────────────────────────────── */

.ekipno-legs-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin: 14px 0 12px;
}

.ekipno-leg {
  width: 38px;
  height: 38px;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 0.6875rem;
  font-weight: 600;
  border: 1px solid var(--border);
}

.ekipno-leg-empty {
  background: var(--panel);
  color: #333;
}

.ekipno-leg-home {
  background: rgba(33, 150, 243, 0.15);
  border-color: rgba(33, 150, 243, 0.5);
  color: #64b5f6;
}

.ekipno-leg-away {
  background: rgba(204, 34, 0, 0.15);
  border-color: rgba(204, 34, 0, 0.4);
  color: #ff6b6b;
}

.ekipno-leg-num {
  font-size: 0.5625rem;
  opacity: 0.55;
  line-height: 1;
}

.ekipno-leg-result {
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1;
}

/* Ekipno section stats row */
.live-ek-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-top: 10px;
  gap: 10px;
}

.live-ek-stats-side {
  display: flex;
  gap: 6px;
  flex: 1;
}

.live-ek-stats-right {
  justify-content: flex-end;
}

.live-ek-stats-label {
  font-family: var(--font-condensed);
  font-size: 0.5625rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

/* ── Match finished banner ────────────────────────────────────────── */

.live-finished-banner {
  text-align: center;
  background: rgba(26, 107, 58, 0.15);
  border: 1px solid var(--green);
  color: #4caf50;
  padding: 12px;
  border-radius: 6px;
  font-family: var(--font-condensed);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.08em;
  margin-bottom: 20px;
}

/* ── Tiebreak divider & notice ────────────────────────────────────── */

.live-tiebreak-divider {
  color: #f5a623;
}

.live-tiebreak-divider::before,
.live-tiebreak-divider::after {
  background: rgba(245, 166, 35, 0.3);
}

.live-tiebreak-notice {
  text-align: center;
  font-family: var(--font-condensed);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #f5a623;
  padding: 6px 0 2px;
}

.live-tiebreak-done {
  color: var(--gold-light);
}

.lb-body {
  padding: 1.2rem 1.5rem 0.5rem;
  border-bottom: 1px solid var(--border);
}

/* Override live-scoreboard margin inside lightbox so it sits flush */
.lb-body .live-scoreboard {
  margin-bottom: 16px;
}
/* Scale down the large scoreboard inside the lightbox */
.lb-body .main-score { font-size: clamp(1.2rem, 3vw, 1.8rem); }
.lb-body .main-score .score { font-size: clamp(1.8rem, 4vw, 2.4rem); margin: 0 12px; }

/* Override live-section top margin so first section isn't too far down */
.lb-body .live-section:first-of-type {
  margin-top: 16px;
}

/* Badge not needed in lightbox (match is over) */
.lb-body .live-match-header {
  display: none;
}
/* Finished match pill — no animation */
.live-finished-pill {
  display: inline-block;
  font-family: var(--font-condensed);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--muted);
  margin-bottom: 4px;
}

/* ── Round navigator ─────────────────────────────────────────────── */

.round-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.2rem 0 1.4rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1rem;
  user-select: none;
}

.round-nav-btn {
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--white);
  width: 40px;
  height: 40px;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s, color 0.15s;
  flex-shrink: 0;
}

.round-nav-btn:hover:not(:disabled) {
  border-color: var(--red-hot);
  color: var(--red-hot);
}

.round-nav-btn:disabled {
  opacity: 0.25;
  cursor: default;
}

.round-nav-label {
  text-align: center;
  flex: 1;
}

.round-nav-title {
  display: block;
  font-family: var(--font-display);
  font-size: 1.4rem;
  letter-spacing: 0.1em;
  color: var(--white);
}

.round-nav-date {
  display: block;
  font-family: var(--font-condensed);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--muted);
  text-transform: uppercase;
  margin-top: 2px;
}
/* ══ Rules accordion ═══════════════════════════════════════════════ */
.rules-wrap { max-width: 860px; margin: 0 auto; padding: 0 1.5rem 4rem; }

.rules-accordion {
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-bottom: 10px;
  overflow: hidden;
}

.rules-acc-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1rem 1.25rem;
  background: var(--panel);
  color: var(--white);
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-condensed);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: background 0.15s;
}
.rules-acc-btn:hover { background: var(--dark); }
.rules-acc-btn--open { background: var(--panel); border-bottom: 1px solid var(--border); }
.rules-acc-btn--open .rules-acc-label { color: var(--gold); }

.rules-acc-icon { font-size: 1rem; flex-shrink: 0; }
.rules-acc-label { flex: 1; }
.rules-acc-arrow {
  font-size: 0.85rem;
  color: var(--muted);
  transition: transform 0.2s;
  flex-shrink: 0;
}

.rules-acc-body {
  padding: 0.4rem 1.25rem 0.8rem;
  background: #161616;
}
.rules-acc-body[hidden] { display: none; }

.rule-item--highlight {
  background: rgba(204,34,0,0.06);
  border-radius: 4px;
  padding: 0.9rem 0.75rem !important;
  margin-top: 0.5rem;
}
.rule-item--highlight p { color: #ccc !important; line-height: 2 !important; }

/* ══════════════════════════════════════════════════════════════
   CONFIRMATION MODAL (ecm = elzs confirm modal)
   ══════════════════════════════════════════════════════════════ */
#elzs-confirm-modal {
  position: fixed; inset: 0; z-index: 9000;
  display: flex; align-items: center; justify-content: center;
}
.ecm-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.75); backdrop-filter: blur(3px);
}
.ecm-box {
  position: relative; z-index: 1;
  background: var(--panel); border: 1px solid var(--border);
  border-top: 3px solid var(--red);
  padding: 2rem; max-width: 420px; width: 90%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}
.ecm-title {
  font-family: var(--font-display); font-size: 1.4rem;
  letter-spacing: 0.05em; color: var(--white); margin-bottom: 1rem;
}
.ecm-body {
  font-size: 0.92rem; line-height: 1.7; color: #aaa;
  margin-bottom: 1.5rem;
}
.ecm-body strong { color: var(--white); font-size: 1.1rem; }
.ecm-actions { display: flex; gap: 0.75rem; justify-content: flex-end; }

/* ══════════════════════════════════════════════════════════════
   HOME QUICK STATS — mini standings + recent results
   ══════════════════════════════════════════════════════════════ */
.home-quickstats {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 1.5rem; max-width: var(--max-width);
  margin: 0 auto; padding: 2rem 2rem 3rem;
}
.home-qs-block {
  background: var(--panel); border: 1px solid var(--border);
  padding: 1.25rem 1.5rem;
}
.home-qs-title {
  font-family: var(--font-condensed); font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--red);
  margin-bottom: 1rem; padding-bottom: 0.6rem; border-bottom: 1px solid var(--border);
}
.home-mini-row {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.5rem 0; border-bottom: 1px solid rgba(42,42,42,0.6);
}
.home-mini-row:last-child { border-bottom: none; }
.home-mini-pos {
  font-family: var(--font-condensed); font-size: 0.75rem; font-weight: 700;
  color: var(--muted); width: 18px; flex-shrink: 0;
}
.home-mini-name { flex: 1; font-size: 0.88rem; color: var(--white); }
.home-mini-pts {
  font-family: var(--font-display); font-size: 1rem; color: var(--gold);
}
.home-mini-pts small { font-family: var(--font-condensed); font-size: 0.65rem; color: var(--muted); }

.home-result-row {
  display: grid; grid-template-columns: 1fr auto 1fr;
  gap: 0.5rem; align-items: center;
  padding: 0.5rem 0; border-bottom: 1px solid rgba(42,42,42,0.6);
}
.home-result-row:last-child { border-bottom: none; }
.home-result-team { font-size: 0.82rem; color: var(--white); }
.home-result-team.away { text-align: right; }
.home-result-score {
  font-family: var(--font-display); font-size: 1rem; color: var(--gold);
  white-space: nowrap; padding: 0 0.4rem; text-align: center;
}

@media (max-width: 640px) {
  .home-quickstats { grid-template-columns: 1fr; padding: 1rem 1rem 2rem; }
}

/* ══════════════════════════════════════════════════════════════
   180s LEADERBOARD (above player stats table)
   ══════════════════════════════════════════════════════════════ */
.stats-leaderboard {
  max-width: var(--max-width); margin: 0 auto 1.5rem;
  padding: 0 2rem;
}
.stats-lb-title {
  font-family: var(--font-condensed); font-size: 1.0 rem; font-weight: 700;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold);
  margin-bottom: 0.75rem; padding-bottom: 0.5rem; border-bottom: 1px solid var(--border);
}
.stats-lb-list { display: flex; flex-direction: column; gap: 4px; }
.stats-lb-row {
  display: flex; align-items: center; gap: 0.75rem;
  background: var(--panel); border: 1px solid var(--border);
  padding: 0.6rem 1rem;
}
.stats-lb-rank { font-size: 1.1rem; width: 2rem; flex-shrink: 0; }
.stats-lb-name { flex: 1; font-family: var(--font-condensed); font-size: 1.1 rem; font-weight: 600; color: var(--white); }
.stats-lb-team { font-size: 0.78rem; color: var(--muted); }
.stats-lb-val {
  font-family: var(--font-display); font-size: 1.1rem; color: var(--gold);
  margin-left: auto;
}
.stats-lb-val small { font-family: var(--font-condensed); font-size: 0.65rem; color: var(--muted); }

/* Few-matches context in player table */
.player-row-dim { opacity: 0.55; }
.few-matches-tag {
  font-size: 0.65rem; color: var(--muted); vertical-align: super;
  margin-left: 2px; cursor: help;
}
.few-matches-note {
  font-family: var(--font-condensed); font-size: 0.75rem; color: var(--muted);
  padding: 0.75rem 0; letter-spacing: 0.05em;
}

/* ══════════════════════════════════════════════════════════════
   TEAM LOGO in card
   ══════════════════════════════════════════════════════════════ */
/* .team-logo-wrap unused — logo renders inside .team-initials */
.team-logo-img {
  width: 56px; height: 56px; object-fit: contain; display: block; opacity: 0.85;
}

/* ══════════════════════════════════════════════════════════════
   LIVE PAGE — back button + container
   ══════════════════════════════════════════════════════════════ */
.live-page-container { padding-top: var(--nav-height); min-height: 100vh; }
.live-back-btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: none; border: 1px solid var(--border); color: var(--muted);
  font-family: var(--font-condensed); font-size: 0.75rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 0.4rem 0.9rem; cursor: pointer; margin-bottom: 0.75rem;
  transition: color 0.2s, border-color 0.2s;
}
.live-back-btn:hover { color: var(--white); border-color: var(--white); }

/* ══════════════════════════════════════════════════════════════
   MOBILE — touch targets + table scroll + matchsheet
   ══════════════════════════════════════════════════════════════ */

/* Ensure stats table is horizontally scrollable on mobile */
.player-stats-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.standings-wrap    { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* Bigger touch targets for nav and round nav buttons */
@media (max-width: 768px) {
  .round-nav-btn {
    min-width: 48px; min-height: 48px;
    font-size: 1.6rem; padding: 0.5rem;
  }
  .mobile-nav a {
    min-height: 52px; display: flex; align-items: center;
  }
  /* Matchsheet: bigger score inputs and arrow buttons */
  .ek-arrow-btn { width: 44px; height: 44px; font-size: 18px; }
  .ms-score { min-height: 44px; font-size: 1.2rem; }
  /* Wider tap area for matchsheet tabs */
  .ms-tab { min-height: 44px; padding: 0.6rem 1rem; }
  /* Admin tab buttons */
  .admin-tab { min-height: 44px; }
}

/* Extra small screens — matchsheet select label truncation */
@media (max-width: 400px) {
  .ms-select { font-size: 0.7rem; }
  .ek-player-name { font-size: 0.78rem; }
}

/* ── PLAYOFF BRACKET ─────────────────────────────────────────────────── */
.bracket-wrap { max-width: var(--max-width); margin: 0 auto; padding: 0 2rem 4rem; }
.bracket { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; align-items: start; }

.bracket-round-label {
  font-family: var(--font-condensed);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--red);
}
.bracket-round-matches { display: flex; flex-direction: column; gap: 16px; }

/* Connector lines: horizontal bridges from cols 1 & 2 into the gap */
.bracket > *:not(:last-child) .bracket-match {
  position: relative;
}
.bracket > *:not(:last-child) .bracket-match::after {
  content: '';
  position: absolute;
  right: -21px;
  top: 50%;
  width: 21px;
  height: 1px;
  background: var(--border);
  pointer-events: none;
}

.bracket-match {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.bracket-match--playable { cursor: pointer; }
.bracket-match--playable:hover { border-color: var(--red); background: rgba(204,34,0,0.06); }
.bracket-match--finished { border-color: rgba(22,163,74,0.3); }
.bracket-match--live { border-color: var(--live-red); }
.bracket-score { text-align: center; font-family: var(--font-display); font-size: 1.1rem; color: var(--gold-light); letter-spacing: 0.05em; }
.bracket-score--live { color: var(--live-red); font-size: 0.8rem; font-family: var(--font-condensed); font-weight: 700; letter-spacing: 0.1em; }
.admin-info-box { background: rgba(22,163,74,0.1); border: 1px solid rgba(22,163,74,0.3); border-radius: 6px; padding: 1rem 1.2rem; color: var(--white); font-size: 0.9rem; }

.bracket-match-home,
.bracket-match-away { display: flex; align-items: center; }

.bracket-team { display: flex; align-items: center; gap: 8px; width: 100%; }
.bracket-team--tbd { opacity: 0.45; }
.bracket-team--winner .bracket-team-name { color: var(--gold-light); font-weight: 700; }

.bracket-team-logo { width: 20px; height: 20px; object-fit: contain; flex-shrink: 0; }
.bracket-team-logo-placeholder { width: 20px; height: 20px; flex-shrink: 0; }

.bracket-seed {
  font-family: var(--font-condensed);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--muted);
  background: var(--dark);
  border-radius: 3px;
  padding: 1px 5px;
  flex-shrink: 0;
}
.bracket-team-name { font-weight: 600; font-size: 0.9rem; }
.bracket-team-name.tbd { font-style: italic; font-size: 0.82rem; }

.bracket-vs {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-align: center;
}
.bracket-match-link {
  font-size: 0.72rem;
  color: var(--red);
  letter-spacing: 0.05em;
  margin-top: 2px;
}
.bracket-match-waiting {
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  margin-top: 2px;
}

.bracket-projected-banner {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 16px;
  margin-bottom: 20px;
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 6px;
  font-size: 0.85rem;
  color: var(--gold);
}
.bracket-projected-banner strong {
  font-family: var(--font-condensed);
  font-size: 0.95rem;
  letter-spacing: 0.03em;
}
.bracket-projected-banner span {
  color: var(--muted);
  font-size: 0.78rem;
}

.bracket-legend {
  margin-top: 24px;
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: var(--muted);
  align-items: center;
  font-family: var(--font-condensed);
  letter-spacing: 0.05em;
}
.bracket-seed-demo {
  display: inline-block;
  font-family: var(--font-condensed);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--muted);
  background: var(--dark);
  border-radius: 3px;
  padding: 1px 5px;
  margin-right: 4px;
}

.playoffs-pending {
  text-align: center;
  padding: 6rem 2rem;
  color: var(--muted);
}
.playoffs-pending-icon { font-size: 3rem; margin-bottom: 1rem; }
.playoffs-pending h3 { font-family: var(--font-display); font-size: 1.8rem; color: var(--white); margin-bottom: 0.5rem; }
.playoffs-pending p { font-size: 0.95rem; }

@media (max-width: 700px) {
  .bracket-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 1rem; }
  .bracket { grid-template-columns: repeat(3, minmax(220px, 1fr)); gap: 20px; min-width: 680px; }
}
.pp-overall-wr { font-family: var(--font-condensed); font-size: 0.8rem; color: var(--muted); margin-top: 0.4rem; letter-spacing: 0.04em; }

.round-top-players {
  margin-top: 25px;
  padding: 15px;
  border-radius: 10px;
  background: #111;
}

.round-top-title {
  margin-bottom: 10px;
}

.podium-player {
  display: flex;
  gap: 12px;
  margin-bottom: 8px;
}

.podium-rank {
  font-size: 20px;
}

.podium-name {
  font-weight: 600;
}

.podium-team {
  font-size: 12px;
  opacity: 0.8;
}

.podium-stats {
  font-size: 12px;
}
.podium-player {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

.podium-photo {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
}

.podium-rank {
  font-size: 20px;
}