:root {
  --bg: #020707;
  --surface: rgba(10, 23, 20, 0.86);
  --surface-soft: rgba(16, 35, 29, 0.72);
  --ink: #f5fff8;
  --muted: #b8c9c1;
  --muted-2: #82978e;
  --line: rgba(42, 255, 122, 0.22);
  --line-soft: rgba(255, 255, 255, 0.08);
  --green: #17e86f;
  --yellow: #f5c542;
  --red: #ff6b63;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.46);
  --radius: 8px;
  --max: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  font-family: Inter, Arial, Helvetica, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 50% 10%, rgba(21, 226, 111, 0.12), transparent 28rem),
    linear-gradient(180deg, #020807 0%, #03110d 42%, #010504 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(rgba(2, 7, 7, 0.34), rgba(2, 7, 7, 0.78)),
    linear-gradient(115deg, transparent 0 31%, rgba(36, 255, 130, 0.08) 32%, transparent 39%),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.012) 0 1px, transparent 1px 80px);
  pointer-events: none;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

.container {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  background: rgba(1, 7, 7, 0.9);
  backdrop-filter: blur(16px);
}

.header-content {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo { display: inline-flex; align-items: center; flex: 0 0 auto; }
.logo img { width: 146px; display: block; }

.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  color: rgba(245, 255, 248, 0.86);
  font-size: 0.88rem;
  font-weight: 800;
}

.main-nav a:hover { color: var(--green); }

.header-actions,
.hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 0.92rem;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.btn-primary {
  color: #021008;
  background: linear-gradient(135deg, #1fff82, #13d966);
  box-shadow: 0 12px 30px rgba(21, 201, 107, 0.22);
}

.btn-outline,
.btn-ghost {
  color: var(--ink);
  border-color: rgba(29, 231, 111, 0.32);
  background: rgba(255, 255, 255, 0.035);
}

.btn-small { min-height: 44px; padding-inline: 18px; }

.hero {
  padding: 36px 0 26px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  background:
    linear-gradient(90deg, rgba(1, 8, 7, 0.98) 0%, rgba(2, 13, 9, 0.76) 35%, rgba(2, 10, 7, 0.28) 70%, rgba(1, 7, 6, 0.92) 100%),
    radial-gradient(circle at 63% 52%, rgba(39, 255, 132, 0.18), transparent 24rem),
    repeating-linear-gradient(8deg, rgba(255,255,255,0.028) 0 1px, transparent 1px 23px);
}

.hero-grid {
  min-height: 340px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: center;
  gap: 34px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 16px;
  color: #f6d56a;
  font-size: 0.84rem;
  font-weight: 900;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 720px;
  margin: 0;
  font-size: clamp(2.35rem, 5vw, 4.8rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.hero p {
  max-width: 640px;
  margin: 20px 0 28px;
  color: rgba(247, 255, 249, 0.84);
  font-size: 1.08rem;
  line-height: 1.7;
}

.hero-panel {
  display: grid;
  gap: 12px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(8, 27, 21, 0.72);
  box-shadow: var(--shadow);
}

.hero-panel strong {
  color: var(--green);
  font-size: 1.2rem;
}

.hero-panel span {
  padding: 13px 14px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: rgba(255,255,255,0.045);
  color: var(--muted);
  font-weight: 800;
}

.wc-stage {
  min-width: 0;
  padding: 28px 0 44px;
}

.phase-nav {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr) 50px;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.phase-nav h2 {
  margin: 0;
  padding: 18px 0;
  text-align: center;
  font-size: 1.35rem;
  text-transform: uppercase;
}

.phase-nav button {
  width: 48px;
  height: 48px;
  border: 0;
  background: transparent;
  color: var(--green);
  font-size: 1.4rem;
  cursor: pointer;
}

.phase-nav button:disabled {
  color: rgba(255,255,255,0.22);
  cursor: not-allowed;
}

.phase-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 22px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.phase-tabs button {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,0.035);
  color: var(--muted);
  font-weight: 900;
  white-space: nowrap;
  cursor: pointer;
}

.phase-tabs button.active {
  background: var(--green);
  color: #021008;
}

.phase-panel { display: none; min-width: 0; }
.phase-panel.active { display: block; }

.group-block {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 370px;
  gap: 18px;
  align-items: start;
  margin-bottom: 28px;
}

.group-table,
.group-matches,
.round-box,
.seo-section {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.group-table h3 {
  margin: 0;
  padding: 18px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 1.28rem;
  text-transform: uppercase;
}

.standings-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

.standings-table {
  width: 100%;
  min-width: 650px;
  border-collapse: collapse;
  table-layout: fixed;
}

.standings-table th,
.standings-table td {
  height: 48px;
  padding: 8px;
  border-bottom: 1px solid var(--line-soft);
  text-align: center;
  font-size: 0.84rem;
}

.standings-table th {
  background: rgba(255,255,255,0.045);
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.standings-table .is-club {
  position: sticky;
  left: 0;
  z-index: 1;
  width: 210px;
  min-width: 210px;
  max-width: 210px;
  background: #0b1a15;
  text-align: left;
  white-space: nowrap;
}

.standings-table th.is-club { background: #10221b; }

.standing-position {
  display: inline-block;
  width: 24px;
  color: var(--muted);
  font-weight: 900;
  vertical-align: middle;
}

.standings-table img {
  width: 26px;
  height: 26px;
  margin-right: 8px;
  object-fit: contain;
  vertical-align: middle;
}

.standings-table .is-club strong {
  display: inline-block;
  max-width: 128px;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
  white-space: nowrap;
}

.points { color: var(--green); font-weight: 900; }

.form-dots { display: inline-flex; gap: 4px; }
.form-dot { width: 9px; height: 9px; border-radius: 50%; background: #c8d2cc; }
.form-w { background: var(--green); }
.form-d { background: var(--yellow); }
.form-l { background: var(--red); }

.group-matches {
  display: grid;
  padding: 14px;
}

.group-round-browser {
  min-width: 0;
  display: grid;
  gap: 14px;
}

.group-round-nav {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--line-soft);
  padding-bottom: 12px;
}

.group-round-nav button {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,0.04);
  color: var(--green);
  cursor: pointer;
}

.group-round-nav button:disabled {
  opacity: 0.34;
  cursor: not-allowed;
}

.group-round-nav strong {
  text-align: center;
  text-transform: uppercase;
}

.round-box {
  display: none;
  padding: 14px;
  box-shadow: none;
}

.round-box.active {
  display: block;
}

.round-box > strong {
  display: block;
  margin-bottom: 12px;
  color: var(--green);
  text-align: center;
  text-transform: uppercase;
}

.wc-match-card {
  position: relative;
  display: grid;
  gap: 10px;
  min-width: 0;
  margin-top: 12px;
  padding: 18px 14px 14px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: rgba(255,255,255,0.04);
}

.wc-match-pill {
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%);
  max-width: calc(100% - 24px);
  padding: 3px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: #0b1a15;
  color: var(--muted);
  font-size: 0.68rem;
  white-space: nowrap;
}

.wc-match-meta {
  display: flex;
  justify-content: center;
  gap: 12px;
  color: var(--muted);
  font-size: 0.72rem;
}

.wc-match-meta strong {
  color: var(--ink);
}

.wc-match-line {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 62px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

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

.wc-team.is-home {
  justify-content: flex-end;
}

.wc-team strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.82rem;
}

.wc-team img {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  object-fit: contain;
}

.wc-score {
  display: inline-flex;
  justify-content: center;
  gap: 6px;
  color: var(--green);
  font-size: 1.25rem;
  font-weight: 900;
}

.wc-score small {
  color: var(--muted);
  font-size: 0.78rem;
}

.knockout-title {
  margin: 0 0 18px;
  font-size: 1.25rem;
  text-transform: uppercase;
}

.knockout-list {
  display: grid;
  gap: 16px;
}

.knockout-list .wc-match-card {
  min-height: 92px;
  margin-top: 0;
}

.empty-state {
  display: grid;
  gap: 6px;
  padding: 18px;
  color: var(--muted);
}

.empty-state strong { color: var(--ink); }

.seo-section {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: 26px;
  margin-bottom: 42px;
  padding: 28px;
}

.seo-copy h2 {
  margin: 0 0 14px;
  font-size: 1.85rem;
  line-height: 1.15;
}

.seo-copy p {
  margin: 0 0 22px;
  color: var(--muted);
  line-height: 1.7;
}

.faq-list { display: grid; gap: 10px; }

.faq-list details {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.faq-list summary {
  padding: 16px;
  cursor: pointer;
  font-weight: 900;
}

.faq-list p {
  margin: 0;
  padding: 0 16px 16px;
  color: var(--muted);
  line-height: 1.6;
}

.site-footer {
  padding: 44px 0 28px;
  border-top: 1px solid var(--line-soft);
  background: rgba(1, 7, 7, 0.72);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.1fr repeat(3, 1fr);
  gap: 46px;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--line-soft);
}

.footer-logo { width: 150px; }

.footer-col h3 {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
}

.footer-col a,
.footer-col span {
  display: block;
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.footer-col a:hover { color: var(--green); }

.social-links {
  display: flex;
  gap: 18px;
  color: var(--green);
  font-size: 1.15rem;
}

.copyright {
  padding-top: 18px;
  color: var(--muted-2);
  text-align: center;
  font-size: 0.86rem;
}

@media (max-width: 1020px) {
  .main-nav { display: none; }

  .hero-grid,
  .group-block,
  .seo-section,
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .container { width: min(100% - 24px, var(--max)); }

  .site-header { position: relative; }

  .header-content {
    min-height: 72px;
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
    padding: 14px 0;
  }

  .logo { justify-content: center; width: 100%; }
  .logo img { width: 132px; }

  .header-actions {
    width: 100%;
    justify-content: center;
    gap: 8px;
  }

  .header-actions .btn { flex: 1; }

  .btn {
    min-height: 42px;
    padding-inline: 13px;
    font-size: 0.82rem;
  }

  .hero { padding: 26px 0 20px; }
  .hero-grid { min-height: 0; gap: 22px; }
  .hero h1 { font-size: 2.35rem; line-height: 1.02; }
  .hero p { font-size: 0.98rem; }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .phase-nav {
    grid-template-columns: 42px minmax(0, 1fr) 42px;
    gap: 8px;
  }

  .phase-nav h2 {
    font-size: 1rem;
  }

  .phase-nav button {
    width: 42px;
    height: 42px;
  }

  .standings-table {
    min-width: 590px;
  }

  .standings-table .is-club {
    width: 172px;
    min-width: 172px;
    max-width: 172px;
  }

  .standings-table .is-club strong {
    max-width: 98px;
  }

  .group-matches,
  .round-box,
  .seo-section {
    padding: 14px;
  }

  .wc-match-line {
    grid-template-columns: 1fr 52px 1fr;
    gap: 8px;
  }

  .wc-team {
    flex-direction: column;
    text-align: center;
  }

  .wc-team.is-home {
    justify-content: center;
  }

  .wc-team strong {
    max-width: 100%;
    font-size: 0.74rem;
  }

  .wc-match-meta {
    align-items: center;
    flex-direction: column;
    gap: 4px;
  }

  .footer-grid {
    gap: 24px;
    text-align: center;
    justify-items: center;
  }

  .footer-col a,
  .footer-col span {
    text-align: center;
  }

  .social-links {
    justify-content: center;
  }
}

/* Responsive containment pass - 2026-05-22 */
html,
body {
  max-width: 100%;
}

body {
  overflow-x: clip;
}

@supports not (overflow-x: clip) {
  body {
    overflow-x: hidden;
  }
}

.container,
.site-header,
.header-content,
.hero,
.hero-grid,
.section,
.section-header,
.groups-grid,
.phase-layout,
.footer-grid {
  min-width: 0;
  max-width: 100%;
}

.group-card,
.round-box,
.group-matches,
.seo-section,
.wc-match-line,
.wc-team,
.phase-nav {
  min-width: 0;
}

.table-scroll,
.standings-table-wrap,
.groups-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

:is(.hero, .section-header, .group-card, .round-box, .group-matches, .seo-section, .wc-team) :is(h1, h2, h3, p, strong) {
  overflow-wrap: anywhere;
}

@media (max-width: 640px) {
  .container {
    width: min(100% - 28px, var(--max));
  }
}
