/* ============================================================================
   sports-worldcup.css — premium, Apple-inspired World Cup experience.
   Layered on top of sports.css / sports-cards.css design tokens.
   Focus: clarity, depth, generous whitespace, fluid motion.
   ============================================================================ */

.wc {
  --wc-ink: #0a1f3a;
  --wc-deep: #06160f;
  --wc-accent: var(--s-emerald, #18d08f);
  --wc-accent-2: #34c8ff;
  --wc-gold: #f5b942;
  --wc-glass: rgba(255, 255, 255, 0.72);
  --wc-stroke: rgba(13, 30, 22, 0.08);
  --wc-radius: 22px;
  --wc-font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "Helvetica Neue", "Inter", system-ui, sans-serif;
  font-family: var(--wc-font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- 1. Cinematic hero ---------- */
.wc-hero2 {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  padding: clamp(30px, 5vw, 60px);
  color: #eafff6;
  background:
    radial-gradient(130% 120% at 88% -10%, rgba(52, 200, 255, 0.28), transparent 45%),
    radial-gradient(120% 130% at 8% 110%, rgba(24, 208, 143, 0.30), transparent 48%),
    linear-gradient(135deg, #0a1f3a 0%, #0c3a27 52%, #06160f 100%);
  box-shadow: 0 30px 80px rgba(6, 22, 15, 0.30);
  isolation: isolate;
}
.wc-hero2::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: radial-gradient(120% 90% at 70% 0%, #000, transparent 70%);
  z-index: -1;
}
.wc-hero2 .wc-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #9af5d2;
}
.wc-hero2 .wc-eyebrow i {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--wc-accent);
  box-shadow: 0 0 0 5px rgba(24, 208, 143, 0.22);
  animation: wc-pulse 1.8s infinite;
}
.wc-hero2 h1 {
  margin: 16px 0 10px;
  font-size: clamp(30px, 5vw, 52px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.02;
}
.wc-hero2 .wc-sub {
  max-width: 56ch;
  margin: 0;
  font-size: clamp(14px, 1.6vw, 17px);
  line-height: 1.55;
  color: rgba(234, 255, 246, 0.78);
}
.wc-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}
.wc-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  color: #d8fff0;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
}
.wc-chip.is-accent { color: #062018; background: var(--wc-accent); border-color: transparent; }

/* Countdown to next match */
.wc-countdown {
  display: flex;
  gap: 10px;
  margin-top: 26px;
}
.wc-cd-cell {
  min-width: 64px;
  text-align: center;
  padding: 12px 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}
.wc-cd-cell b {
  display: block;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.wc-cd-cell span {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(234, 255, 246, 0.6);
}
.wc-next-label { margin-top: 14px; font-size: 13.5px; color: rgba(234, 255, 246, 0.82); }
.wc-next-label b { color: #fff; }

/* ---------- 2. Stat ribbon ---------- */
.wc-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: -34px 6px 0;
  position: relative;
  z-index: 2;
}
.wc-stat {
  background: var(--s-card, #fff);
  border: 1px solid var(--wc-stroke);
  border-radius: 18px;
  padding: 18px 18px 16px;
  box-shadow: 0 14px 34px rgba(13, 30, 22, 0.08);
}
.wc-stat b {
  display: block;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--wc-ink);
  font-variant-numeric: tabular-nums;
}
.wc-stat span {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--s-muted, #6b7480);
}

/* ---------- 3. Segmented control (Apple style) ---------- */
.wc-segmented {
  display: inline-flex;
  gap: 2px;
  padding: 4px;
  border-radius: 14px;
  background: #e9edf0;
  border: 1px solid var(--wc-stroke);
}
.wc-seg-btn {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 8px 16px;
  border-radius: 10px;
  font: inherit;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--s-muted, #6b7480);
  cursor: pointer;
  transition: color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
  white-space: nowrap;
}
.wc-seg-btn:hover { color: var(--wc-ink); }
.wc-seg-btn.is-active {
  background: #fff;
  color: var(--wc-ink);
  box-shadow: 0 2px 6px rgba(13, 30, 22, 0.10);
}
.wc-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 20px;
}

/* ---------- 4. Schedule / fixtures (the new "future matches" board) ---------- */
.wc-sched-day { margin-bottom: 26px; }
.wc-sched-daylabel {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  padding: 6px 2px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--wc-ink);
  background: linear-gradient(var(--s-bg, #eef1f3), rgba(238, 241, 243, 0));
  z-index: 1;
}
.wc-sched-daylabel span { font-weight: 600; color: var(--s-muted, #6b7480); }

.wc-fixture {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  margin-bottom: 10px;
  background: var(--s-card, #fff);
  border: 1px solid var(--wc-stroke);
  border-radius: 16px;
  box-shadow: 0 6px 18px rgba(13, 30, 22, 0.05);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}
.wc-fixture:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(13, 30, 22, 0.10); }
.wc-fx-team { display: flex; align-items: center; gap: 10px; min-width: 0; font-weight: 700; font-size: 15px; color: var(--wc-ink); }
.wc-fx-team.away { justify-content: flex-end; text-align: right; }
.wc-fx-flag { font-size: 21px; line-height: 1; }
.wc-fx-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wc-fx-mid { text-align: center; min-width: 86px; }
.wc-fx-time {
  font-size: 15px;
  font-weight: 800;
  color: var(--wc-ink);
  font-variant-numeric: tabular-nums;
}
.wc-fx-score {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 9px;
  background: #eef1f3;
  font-size: 16px;
  font-weight: 800;
  color: var(--wc-ink);
  font-variant-numeric: tabular-nums;
}
.wc-fx-when { display: block; margin-top: 3px; font-size: 11px; font-weight: 600; color: var(--s-muted, #6b7480); }
.wc-fx-venue { display: block; margin-top: 3px; font-size: 11px; color: var(--s-muted, #6b7480); }
.wc-fx-tag {
  display: inline-block; margin-top: 4px;
  font-size: 10px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--s-green, #0aa06e);
}
.wc-fx-live {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--s-red, #e5484d); font-weight: 800; font-size: 12px;
}
.wc-fx-live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--s-red, #e5484d); animation: wc-pulse 1.4s infinite; }
.wc-empty { padding: 40px; text-align: center; color: var(--s-muted, #6b7480); font-size: 14px; }

/* ---------- 5. Prediction card refresh ---------- */
.wc-card { gap: 6px; border-radius: var(--wc-radius); }
.wc-card .wc-teams { font-size: 15.5px; }
.wc-conf-dot {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  margin-right: 5px; vertical-align: middle;
}
.conf-UEFA { background: #2f6df6; } .conf-CONMEBOL { background: #f5b942; }
.conf-CONCACAF { background: #18d08f; } .conf-CAF { background: #e5484d; }
.conf-AFC { background: #9b6cf2; } .conf-OFC { background: #34c8ff; }
.conf-INTERNATIONAL { background: #9aa6b0; }

/* ---------- 6. Knockout bracket ---------- */
.wc-bracket {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(190px, 1fr);
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 8px;
  scroll-snap-type: x proximity;
}
.wc-bracket-col { display: flex; flex-direction: column; gap: 12px; scroll-snap-align: start; }
.wc-bracket-col h4 {
  margin: 0 0 4px; font-size: 11.5px; font-weight: 800; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--s-muted, #6b7480);
}
.wc-bracket-tie {
  background: var(--s-card, #fff);
  border: 1px solid var(--wc-stroke);
  border-radius: 13px;
  padding: 10px 12px;
  box-shadow: 0 6px 16px rgba(13, 30, 22, 0.05);
}
.wc-bt-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; font-weight: 700; padding: 3px 0; }
.wc-bt-row.win { color: var(--s-green, #0aa06e); }
.wc-bt-row span { display: flex; align-items: center; gap: 7px; min-width: 0; }
.wc-bt-row .wc-fx-name { font-weight: 700; }
.wc-bt-prob { font-variant-numeric: tabular-nums; font-weight: 800; }

/* ---------- 7. Standings polish ---------- */
.wc-standings-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.wc-standings-grid .wc-table { margin: 0; }
.wc-standings-grid .snap-card { padding: 16px 18px; }
.wc-table tbody tr.qualifies td { color: var(--wc-ink); font-weight: 700; }
.wc-table tbody tr.qualifies td:first-child {
  box-shadow: inset 3px 0 0 var(--wc-accent);
  color: var(--s-green, #0aa06e); font-weight: 800;
}

@keyframes wc-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(0.82); }
}

/* ---------- 8. Responsive ---------- */
@media (max-width: 760px) {
  .wc-stats { grid-template-columns: repeat(2, 1fr); margin-top: -24px; }
  .wc-fixture { grid-template-columns: 1fr auto 1fr; gap: 8px; padding: 14px; }
  .wc-fx-team { font-size: 13.5px; gap: 7px; }
  .wc-fx-flag { font-size: 18px; }
  .wc-segmented { width: 100%; overflow-x: auto; }
  .wc-cd-cell { min-width: 54px; }
}
@media (prefers-reduced-motion: reduce) {
  .wc-hero2 .wc-eyebrow i, .wc-fx-live::before { animation: none; }
  .wc-fixture { transition: none; }
}
