/* ─────────────────────────────────────────────────────────────────────────
   Football Intelligence — World Cup 2026 hub (#world-cup)
   ───────────────────────────────────────────────────────────────────────── */

.wc-page { display: flex; flex-direction: column; gap: 28px; padding-bottom: 40px; }

/* ── Hero ───────────────────────────────────────────────────────────────── */
.wc-hero {
  position: relative;
  text-align: center;
  padding: 40px 20px 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  /* Owner-supplied hero background (static/img/wc-hero-bg.jpg) under a dark
     gradient overlay so the white title + green countdown stay readable, with
     a green accent glow on top. */
  background:
    radial-gradient(120% 140% at 50% -10%, rgba(0, 229, 160, 0.18) 0%, transparent 55%),
    linear-gradient(180deg, rgba(6, 10, 15, 0.62) 0%, rgba(6, 10, 15, 0.90) 100%),
    url('/static/img/wc-hero-bg.jpg') center 38% / cover no-repeat;
  overflow: hidden;
}
.wc-hero__badge {
  font-size: 1.6rem; color: var(--accent); line-height: 1; margin-bottom: 8px;
}
/* No star fallback — collapse the slot entirely until the API trophy loads. */
.wc-hero__badge:empty { display: none; margin: 0; }
.wc-hero__trophy {
  display: block; height: 96px; width: auto; max-width: 150px;
  object-fit: contain; margin: 0 auto 10px;
  filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.6));
}
.wc-hero__title {
  font-size: clamp(1.6rem, 4vw, 2.4rem); font-weight: 800; letter-spacing: -0.02em;
  color: var(--text-primary); margin: 0;
}
.wc-hero__sub { color: var(--text-secondary); font-size: 0.92rem; margin: 6px 0 0; }
.wc-hero__countdown {
  display: inline-flex; gap: 14px; margin: 18px auto 12px; flex-wrap: wrap; justify-content: center;
}
.wc-cd {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  min-width: 120px; padding: 10px 18px;
  background: rgba(0, 0, 0, 0.28); border: 1px solid rgba(0, 229, 160, 0.22);
  border-radius: var(--radius-sm);
}
.wc-cd__val {
  font-size: 1.5rem; font-weight: 800; color: var(--accent);
  font-variant-numeric: tabular-nums; line-height: 1;
}
.wc-cd__lbl {
  font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-tertiary);
}
.wc-hero__note { margin: 8px auto 0; max-width: 560px; }

/* ── Sections ───────────────────────────────────────────────────────────── */
.wc-section { display: flex; flex-direction: column; gap: 12px; }
.wc-section__title {
  font-size: 1.1rem; font-weight: 700; color: var(--text-primary); margin: 0;
  display: flex; align-items: center; gap: 8px;
}
.wc-section__title::before {
  content: ""; width: 3px; height: 18px; border-radius: 2px; background: var(--accent);
}
.wc-empty { padding: 14px 4px; }

.wc-skel {
  height: 150px; border-radius: var(--radius-sm);
  background: linear-gradient(90deg, var(--surface-1) 25%, var(--surface-2) 50%, var(--surface-1) 75%);
  background-size: 200% 100%; animation: wc-shimmer 1.3s ease-in-out infinite;
}
@keyframes wc-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .wc-skel { animation: none; } }

/* ── Groups grid ────────────────────────────────────────────────────────── */
.wc-groups {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.wc-group {
  background: var(--surface-1); border: 1px solid var(--border);
  border-radius: var(--radius-sm); overflow: hidden;
}
.wc-group__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 12px; background: var(--surface-2); border-bottom: 1px solid var(--border);
}
.wc-group__label { font-weight: 700; font-size: 0.84rem; color: var(--text-primary); letter-spacing: 0.02em; }
.wc-group__cols { display: flex; gap: 14px; font-size: 0.58rem; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.06em; }
.wc-group__cols span { width: 24px; text-align: center; }
.wc-group__list { list-style: none; margin: 0; padding: 4px 0; }

.wc-grow {
  display: grid;
  grid-template-columns: 22px 18px 1fr 24px 24px 24px;
  align-items: center; gap: 8px; padding: 5px 12px; font-size: 0.82rem;
}
.wc-grow--qual { background: rgba(0, 229, 160, 0.06); box-shadow: inset 2px 0 0 var(--accent); }
.wc-grow__pos { color: var(--text-tertiary); font-variant-numeric: tabular-nums; text-align: center; }
.wc-grow__name { color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wc-grow__num { text-align: center; font-variant-numeric: tabular-nums; color: var(--text-secondary); }
.wc-grow__pts { font-weight: 700; color: var(--text-primary); }

.wc-crest { object-fit: contain; flex-shrink: 0; }
.wc-crest--ph {
  display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%;
  background: var(--surface-2); font-size: 0.5rem; font-weight: 700; color: var(--text-tertiary);
}

/* ── Knockout bracket ───────────────────────────────────────────────────── */
.wc-bracket-wrap { overflow-x: auto; }
.wc-bracket__hint { margin: 0 0 10px; }
.wc-bracket { display: flex; gap: 18px; min-width: min-content; align-items: stretch; }
.wc-bracket__round {
  display: flex; flex-direction: column; justify-content: center;
  min-width: 180px; flex: 1;
}
/* Ties block is vertically centred inside the column, and the gap between ties
   grows each round — so a Semi-final tie sits exactly between the two
   Quarter-final ties that feed it, and the Final between the two Semis. The
   round title rides just above the centred block. */
.wc-bracket__ties {
  display: flex; flex-direction: column; justify-content: center; gap: 14px;
}
.wc-bracket__round[data-round="qf"]    .wc-bracket__ties { gap: 80px; }
.wc-bracket__round[data-round="sf"]    .wc-bracket__ties { gap: 212px; }
.wc-bracket__round[data-round="final"] .wc-bracket__ties { gap: 0; }
.wc-bracket__round-title {
  font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-tertiary); margin: 0 0 10px; text-align: center;
}
.wc-tie {
  display: flex; flex-direction: column; gap: 1px;
  background: var(--surface-1); border: 1px solid var(--border); border-radius: 8px;
  padding: 8px 10px;
}
.wc-tie--tbd { opacity: 0.5; }
.wc-tie__team {
  display: flex; align-items: center; gap: 7px; font-size: 0.78rem; color: var(--text-primary);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.wc-bracket__round[data-round="final"] .wc-tie {
  border-color: rgba(0, 229, 160, 0.4); background: rgba(0, 229, 160, 0.05);
}

@media (max-width: 900px) {
  .wc-bracket { flex-direction: column; min-width: 0; }
  .wc-bracket__round { min-width: 0; justify-content: flex-start; }
  /* Collapse the converging-bracket spacing — stacked rounds read as a list. */
  .wc-bracket__round[data-round="qf"]    .wc-bracket__ties,
  .wc-bracket__round[data-round="sf"]    .wc-bracket__ties,
  .wc-bracket__round[data-round="final"] .wc-bracket__ties { gap: 10px; }
}

/* ── Fixtures ───────────────────────────────────────────────────────────── */
.wc-fixtures { display: flex; flex-direction: column; gap: 16px; }
.wc-fxday { display: flex; flex-direction: column; gap: 6px; }
.wc-fxday__date {
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--text-tertiary); padding: 2px 2px;
}
.wc-fx {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px;
  padding: 10px 14px; text-decoration: none;
  background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius-sm);
  transition: border-color 0.12s, background 0.12s;
}
.wc-fx:hover { border-color: rgba(0, 229, 160, 0.4); background: var(--surface-2); }
.wc-fx__team { display: flex; align-items: center; gap: 8px; color: var(--text-primary); font-weight: 600; font-size: 0.86rem; overflow: hidden; }
.wc-fx__team--home { justify-content: flex-end; text-align: right; }
.wc-fx__team--away { justify-content: flex-start; }
.wc-fx__mid {
  font-variant-numeric: tabular-nums; color: var(--text-secondary); font-size: 0.78rem;
  white-space: nowrap; min-width: 78px; text-align: center;
}

/* ── Top scorers ────────────────────────────────────────────────────────── */
.wc-scorers { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column;
  background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.wc-sc {
  display: grid; grid-template-columns: 28px 26px 1fr auto auto; align-items: center; gap: 10px;
  padding: 8px 14px; border-bottom: 1px solid var(--border); font-size: 0.86rem;
}
.wc-sc:last-child { border-bottom: 0; }
.wc-sc__rank { color: var(--text-tertiary); font-variant-numeric: tabular-nums; text-align: center; }
.wc-sc__av { border-radius: 50%; object-fit: cover; }
.wc-sc__av--ph { display: inline-grid; place-items: center; width: 26px; height: 26px; background: var(--surface-2); font-size: 0.6rem; font-weight: 700; color: var(--text-tertiary); }
.wc-sc__name { color: var(--text-primary); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wc-sc__team { font-size: 0.74rem; }
.wc-sc__goals { font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums; }

@media (max-width: 600px) {
  .wc-groups { grid-template-columns: 1fr; }
  .wc-sc__team { display: none; }
}
