/* ============================================================
   DESIGN TOKENS (consistente com o site principal)
   ============================================================ */
:root {
  /* Verde - Seleção Brasileira */
  --navy-900: #04210f;
  --navy-800: #07371c;
  --navy-700: #0c4d27;
  --navy-600: #146633;
  --navy-400: #4caf7a;
  --navy-100: #d2f0dc;
  --navy-50:  #eafaf0;

  /* Amarelo - Seleção Brasileira */
  --gold-700: #8a6d00;
  --gold-600: #b38600;
  --gold-500: #d4af00;
  --gold-400: #ffdf00;
  --gold-200: #fff3b0;
  --gold-50:  #fffced;

  --gray-900: #111827;
  --gray-700: #374151;
  --gray-500: #6b7280;
  --gray-300: #d1d5db;
  --gray-100: #f3f4f6;
  --gray-50:  #f9fafb;
  --white:    #ffffff;

  --green-500: #16a34a;
  --red-500: #dc2626;

  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,.10);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.12);
  --transition: .2s ease;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font);
  color: var(--gray-700);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================================
   HEADER
   ============================================================ */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-300);
  transition: box-shadow var(--transition);
}

.header.scrolled { box-shadow: var(--shadow-md); }

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  flex-shrink: 0;
  font-weight: 700;
  color: var(--navy-800);
}

.logo__img,
.logo__svg {
  height: 40px;
  width: auto;
  display: block;
}

.logo__title {
  font-size: 1rem;
  line-height: 1.2;
}

.logo__title small {
  display: block;
  font-size: .7rem;
  font-weight: 500;
  color: var(--gold-600);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.nav { display: flex; gap: 8px; }

.nav__link {
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-weight: 500;
  color: var(--navy-800);
  transition: background var(--transition), color var(--transition);
}

.nav__link:hover,
.nav__link.active {
  background: var(--gold-50);
  color: var(--gold-600);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-sm);
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--navy-800);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  padding: 64px 0 48px;
  background: linear-gradient(140deg, var(--navy-900) 0%, var(--navy-800) 55%, var(--navy-700) 100%);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 60%, rgba(184,149,58,.08) 100%);
  pointer-events: none;
}

.hero__inner { position: relative; text-align: center; }

.hero__eyebrow {
  font-size: .82rem;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold-400);
  margin-bottom: 14px;
}

.hero__title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700;
  color: var(--white);
  line-height: 1.15;
  margin-bottom: 16px;
}

.hero__title span { color: var(--gold-400); }

.hero__subtitle {
  font-size: 1.05rem;
  font-weight: 300;
  color: rgba(255,255,255,.72);
  max-width: 640px;
  margin: 0 auto 24px;
  line-height: 1.75;
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.hero__meta-item {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  font-size: .85rem;
  color: var(--white);
}

.hero__meta-item strong { color: var(--gold-400); }

.hero__meta-item .fi,
.format-card__desc .fi {
  width: 16px;
  height: 12px;
  vertical-align: middle;
  border-radius: 1px;
}

.live-banner {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
}

.live-banner__item {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  background: rgba(220,38,38,.12);
  border: 1px solid rgba(220,38,38,.35);
  border-radius: var(--radius-sm);
  padding: 10px 18px;
  font-size: .9rem;
  color: var(--white);
}

.live-banner__label {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--red-500);
}

.live-banner__teams strong {
  color: var(--gold-400);
  margin: 0 4px;
}

.live-banner__meta {
  font-size: .78rem;
  color: rgba(255,255,255,.65);
}

.live-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--red-500);
  animation: live-pulse 1.4s ease-in-out infinite;
}

@keyframes live-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .4; transform: scale(.75); }
}

/* ============================================================
   PRÉ-JOGO
   ============================================================ */
.pre-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--yellow-500, #eab308);
  animation: live-pulse 1.4s ease-in-out infinite;
}

.live-banner__item--pre .live-banner__label {
  color: var(--yellow-500, #eab308);
}

/* ============================================================
   BOTÃO FLUTUANTE "ATUALIZAR AO VIVO"
   ============================================================ */
.live-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border: none;
  border-radius: 28px;
  background: #16a34a;
  color: #fff;
  font-weight: 700;
  font-size: .95rem;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,0,0,.35);
  transition: background .2s, transform .15s;
}
.live-fab:hover { background: #15803d; transform: translateY(-2px); }
.live-fab:active { transform: translateY(0); }
.live-fab:disabled { opacity: .6; cursor: wait; }

/* ============================================================
   DIA ATUAL DESTACADO
   ============================================================ */
.match-day--today {
  color: var(--green-400);
  border-left: 3px solid var(--green-500);
  padding-left: 12px;
}

/* ============================================================
   FLAG BAR (seletor de tema por seleção)
   ============================================================ */
.flag-bar {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,.12);
}

.flag-bar__header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 14px;
}

.flag-bar__label {
  font-size: .8rem;
  font-weight: 500;
  color: rgba(255,255,255,.65);
}

.flag-bar__reset {
  font-size: .76rem;
  font-weight: 600;
  color: var(--navy-900);
  background: var(--gold-400);
  border: none;
  border-radius: 999px;
  padding: 6px 14px;
  cursor: pointer;
  transition: filter .15s ease;
}

.flag-bar__reset:hover { filter: brightness(1.08); }

.flag-bar__grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  max-width: 720px;
  margin: 0 auto;
}

.flag-bar__flag {
  font-size: 1.3rem;
  line-height: 1;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius-sm);
  padding: 6px 8px;
  cursor: pointer;
  transition: transform .12s ease, border-color .12s ease, background .12s ease;
}

.flag-bar__flag .fi {
  width: 24px;
  height: 18px;
  vertical-align: middle;
  border-radius: 2px;
}

.flag-bar__flag:hover {
  border-color: var(--gold-400);
  transform: translateY(-2px);
}

.flag-bar__flag--active {
  border-color: var(--gold-400);
  background: rgba(255, 223, 0, .14);
}

/* ============================================================
   SECTIONS (shared)
   ============================================================ */
.section { padding: 64px 0; }
.section--alt { background: var(--gray-50); }

.section__header {
  text-align: center;
  margin-bottom: 48px;
}

.section__tag {
  display: inline-block;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold-500);
  margin-bottom: 10px;
}

.section__title {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 700;
  color: var(--navy-800);
  line-height: 1.2;
}

.section__desc {
  max-width: 720px;
  margin: 16px auto 0;
  text-align: center;
  color: var(--gray-500);
  font-size: .98rem;
}

/* ============================================================
   FORMATO / REGRAS
   ============================================================ */
.format__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}

.format-card {
  background: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.format-card__icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--navy-900);
  color: var(--gold-400);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.format-card__icon svg { width: 22px; height: 22px; }

.format-card__title {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--navy-800);
  margin-bottom: 8px;
}

.format-card__desc {
  font-size: .92rem;
  color: var(--gray-500);
  line-height: 1.7;
}

.format-card__desc ul {
  margin: 8px 0 0 18px;
  padding: 0;
}

.format-card__desc li { margin-bottom: 4px; }

.mini-matches {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mini-match {
  border-top: 1px solid var(--gray-100);
  padding-top: 10px;
}

.mini-match:first-child {
  border-top: none;
  padding-top: 0;
}

.mini-match__teams {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: .88rem;
  font-weight: 600;
  color: var(--navy-800);
}

.mini-match__team {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-match__team:last-child { text-align: right; }

.mini-match__score {
  flex: none;
  font-weight: 700;
  color: var(--navy-900);
  background: var(--gray-50);
  border-radius: var(--radius-sm);
  padding: 2px 8px;
  font-size: .82rem;
}

.mini-match__meta {
  margin-top: 4px;
  font-size: .72rem;
  color: var(--gray-300);
}

/* ============================================================
   FILTROS / TABS
   ============================================================ */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 36px;
}

.tab-btn {
  padding: 8px 18px;
  border-radius: 999px;
  font-size: .85rem;
  font-weight: 600;
  border: 1px solid var(--gray-300);
  background: var(--white);
  color: var(--navy-800);
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.tab-btn:hover { border-color: var(--gold-400); }

.tab-btn.active {
  background: var(--navy-800);
  border-color: var(--navy-800);
  color: var(--white);
}

/* ============================================================
   GRUPOS / CLASSIFICAÇÃO
   ============================================================ */
.groups__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.group-card {
  background: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.group-card__header {
  background: var(--navy-900);
  color: var(--white);
  padding: 12px 18px;
  font-size: .9rem;
  font-weight: 700;
  letter-spacing: .04em;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.group-card__header span {
  color: var(--gold-400);
  font-size: .75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .1em;
}

.group-card--live .group-card__header {
  background: var(--red-500);
}

.group-card--live .group-card__header span {
  color: var(--white);
}

.group-card__note {
  padding: 8px 18px 12px;
  font-size: .74rem;
  font-style: italic;
  color: var(--gray-500);
}

.team-cell .live-dot {
  margin-left: 6px;
  vertical-align: middle;
}

.standings-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .82rem;
}

.standings-table th,
.standings-table td {
  padding: 8px 6px;
  text-align: center;
  border-bottom: 1px solid var(--gray-100);
}

.standings-table th {
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--gray-500);
  background: var(--gray-50);
}

.standings-table td.team-cell,
.standings-table th.team-cell {
  text-align: left;
  font-weight: 600;
  color: var(--navy-800);
  white-space: nowrap;
}

.standings-table-wrap {
  overflow-x: auto;
}

.team-name__short { display: none; }

.standings-table tbody tr:last-child td { border-bottom: none; }

.standings-table tbody tr.qualified .team-cell {
  border-left: 3px solid var(--green-500);
  padding-left: 7px;
}

.standings-table tbody tr.qualified-3rd .team-cell {
  border-left: 3px solid var(--gold-500);
  padding-left: 7px;
}

.team-flag {
  display: inline-block;
  width: 20px;
  text-align: center;
  margin-right: 6px;
}

.team-flag .fi {
  width: 20px;
  height: 15px;
  vertical-align: middle;
  border-radius: 2px;
}

.standings-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  margin-top: 24px;
  font-size: .82rem;
  color: var(--gray-500);
}

.standings-legend__item { display: flex; align-items: center; gap: 8px; }

.standings-legend__swatch {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  display: inline-block;
}

.standings-legend__swatch--qualified { background: var(--green-500); }
.standings-legend__swatch--qualified-3rd { background: var(--gold-500); }

/* ============================================================
   MELHORES TERCEIROS
   ============================================================ */
.third-placed {
  background: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.third-placed .standings-table td.group-cell,
.third-placed .standings-table th.group-cell {
  font-weight: 600;
  color: var(--gray-500);
}

.third-placed .standings-table tbody tr.not-qualified {
  opacity: .6;
}

/* ============================================================
   JOGOS / CALENDÁRIO
   ============================================================ */
.matches__list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.match-day {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--gold-600);
  margin: 28px 0 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--gray-300);
}

.match-day:first-child { margin-top: 0; }

.match-card {
  display: grid;
  grid-template-columns: 90px 1fr auto 1fr 140px;
  align-items: center;
  gap: 12px;
  background: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  font-size: .9rem;
  box-shadow: var(--shadow-sm);
}

.match-card__meta {
  font-size: .75rem;
  color: var(--gray-500);
  font-weight: 600;
}

.match-card__team {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: var(--navy-800);
}

.match-card__team--home { justify-content: flex-end; text-align: right; }
.match-card__team--away { justify-content: flex-start; text-align: left; }

.match-card__score {
  font-weight: 700;
  color: var(--navy-900);
  background: var(--gray-50);
  border-radius: var(--radius-sm);
  padding: 6px 14px;
  min-width: 64px;
  text-align: center;
  font-size: .95rem;
  line-height: 1.3;
}

.match-card__score--link {
  border: none;
  cursor: pointer;
  font-family: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--gray-400);
  transition: background .15s, text-decoration-color .15s;
}

.match-card__score--link:hover {
  background: var(--gold-100, #fef3c7);
  text-decoration-color: var(--navy-900);
}

.match-card__score--pending {
  color: var(--gray-500);
  font-weight: 500;
  font-size: .8rem;
}

.match-score__pk {
  display: block;
  margin-top: 3px;
  font-size: .68rem;
  font-weight: 500;
  color: var(--gray-500);
  text-decoration: none;
}

.match-card__info {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  font-size: .75rem;
  color: var(--gray-500);
  text-align: right;
}

.match-card__status {
  display: inline-block;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--gray-100);
  color: var(--gray-500);
}

.match-card__status--live {
  background: rgba(220,38,38,.1);
  color: var(--red-500);
}

.match-card__status--live .live-dot {
  margin-right: 4px;
  vertical-align: middle;
}

.match-card__status--pre {
  background: rgba(234,179,8,.1);
  color: #eab308;
}

.match-card__status--pre .pre-dot {
  margin-right: 4px;
  vertical-align: middle;
}

.match-card__status--finished {
  background: rgba(22,163,74,.1);
  color: var(--green-500);
}

.match-card__times {
  display: flex;
  gap: 10px;
}

.match-card__time {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: .82rem;
  font-weight: 700;
  color: var(--navy-800);
  line-height: 1.3;
}

.match-card__time small {
  font-size: .62rem;
  font-weight: 500;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--gray-300);
}

.match-card__venue {
  font-size: .72rem;
  font-weight: 600;
  color: var(--gold-600);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-align: right;
}

.match-card__venue:hover { color: var(--gold-700); }

.match-card__venue--plain {
  font-size: .72rem;
  color: var(--gray-300);
}

/* ============================================================
   CHAVEAMENTO / MATA-MATA
   ============================================================ */
.bracket {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 220px;
  gap: 20px;
  overflow-x: auto;
  padding-bottom: 16px;
}

.bracket__round {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  gap: 0;
  position: relative;
  padding-top: 22px;
}

.bracket__round-title {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--gold-600);
  text-align: center;
}

/* Coluna central: final + disputa de 3º lugar, onde as duas metades do
   chaveamento (esquerda → direita e direita → esquerda) se encontram. */
.bracket__round--center {
  justify-content: center;
  gap: 28px;
  padding-top: 22px;
}

.bracket__final-image {
  width: 100%;
  border-radius: var(--radius-md, 10px);
  box-shadow: var(--shadow-md);
  object-fit: cover;
}

.bracket__round--center .bracket-match:first-of-type {
  border-color: var(--gold-600);
  border-width: 2px;
  box-shadow: var(--shadow-md);
}

.bracket__round-title--third {
  position: static;
  margin-top: 4px;
  color: var(--gray-500);
}

/* --- Pares de jogos (conectores do chaveamento) --- */
.bracket-pair {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  flex: 1;
  position: relative;
}

/* Lado esquerdo: linhas indo para a direita */
.bracket-pair--left > .bracket-match::after {
  content: '';
  position: absolute;
  top: 50%;
  right: -10px;
  width: 10px;
  border-top: 2px solid var(--gray-300);
}

.bracket-pair--left::after {
  content: '';
  position: absolute;
  right: -10px;
  top: 25%;
  bottom: 25%;
  border-right: 2px solid var(--gray-300);
}

.bracket-pair--left::before {
  content: '';
  position: absolute;
  right: -20px;
  top: 50%;
  width: 10px;
  border-top: 2px solid var(--gray-300);
}

/* Lado direito: linhas indo para a esquerda (espelhado) */
.bracket-pair--right > .bracket-match::after {
  content: '';
  position: absolute;
  top: 50%;
  left: -10px;
  width: 10px;
  border-top: 2px solid var(--gray-300);
}

.bracket-pair--right::after {
  content: '';
  position: absolute;
  left: -10px;
  top: 25%;
  bottom: 25%;
  border-left: 2px solid var(--gray-300);
}

.bracket-pair--right::before {
  content: '';
  position: absolute;
  left: -20px;
  top: 50%;
  width: 10px;
  border-top: 2px solid var(--gray-300);
}

/* Semifinal (jogo único): linha horizontal até a final */
.bracket__round--left > .bracket-match::after {
  content: '';
  position: absolute;
  top: 50%;
  right: -20px;
  width: 20px;
  border-top: 2px solid var(--gray-300);
}

.bracket__round--right > .bracket-match::after {
  content: '';
  position: absolute;
  top: 50%;
  left: -20px;
  width: 20px;
  border-top: 2px solid var(--gray-300);
}

.bracket-match {
  background: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: .8rem;
  box-shadow: var(--shadow-sm);
  position: relative;
}

.bracket-match__id {
  position: absolute;
  top: 4px;
  right: 6px;
  font-size: .6rem;
  font-weight: 700;
  color: var(--gray-400);
  line-height: 1;
}

.bracket-match__team {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-weight: 600;
  color: var(--navy-800);
}

.bracket-match__team:first-child {
  border-bottom: 1px solid var(--gray-100);
}

.bracket-match__team--tbd { color: var(--gray-500); font-weight: 500; }

.slot-tag {
  font-size: .72em;
  font-weight: 500;
  color: var(--gray-500);
}

.bracket-match__date {
  font-size: .68rem;
  color: var(--gray-500);
  text-align: center;
  margin-top: 6px;
}

.bracket-match__date .match-card__venue,
.bracket-match__date .match-card__venue--plain {
  font-size: inherit;
}

.bracket-note {
  margin-top: 28px;
  padding: 16px 20px;
  background: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  font-size: .82rem;
  color: var(--gray-500);
  line-height: 1.6;
}

.bracket-note p { margin: 0 0 8px; }
.bracket-note p:last-child { margin-bottom: 0; }
.bracket-note strong { color: var(--navy-800); }

/* ============================================================
   SEDES / ESTÁDIOS
   ============================================================ */
.stadium-map {
  max-width: 960px;
  height: 420px;
  margin: 0 auto 40px;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-300);
  background: var(--gray-50);
}

.stadium-tooltip {
  background: var(--navy-900);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  font-size: .72rem;
  font-weight: 600;
  padding: 3px 8px;
  box-shadow: var(--shadow-sm);
}

.stadium-tooltip::before { display: none; }

.stadium-popup .leaflet-popup-content-wrapper {
  border-radius: var(--radius-md);
  padding: 0;
  overflow: hidden;
}

.stadium-popup .leaflet-popup-content {
  margin: 0;
  width: 220px !important;
}

.stadium-popup .stadium-card {
  border: none;
  border-radius: 0;
  box-shadow: none;
  cursor: default;
}

.stadium-popup .stadium-card:hover { transform: none; }

.stadium-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.stadium-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: border-color .15s ease, transform .15s ease;
}

.stadium-card:hover { transform: translateY(-2px); }

.stadium-card--highlight {
  border-color: var(--gold-400);
  box-shadow: 0 0 0 2px var(--gold-200);
}

.stadium-card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--navy-900);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.stadium-card__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.stadium-card__icon {
  width: 40%;
  max-width: 64px;
  color: var(--gold-400);
  opacity: .8;
}

.stadium-card__body {
  padding: 14px 16px;
}

.stadium-card__name {
  font-weight: 700;
  color: var(--navy-800);
  margin-bottom: 4px;
  font-size: .95rem;
}

.stadium-card__city {
  font-size: .82rem;
  color: var(--gray-700);
  margin-bottom: 2px;
}

.stadium-card__city .fi {
  width: 16px;
  height: 12px;
  vertical-align: middle;
  margin-right: 4px;
  border-radius: 1px;
}

.stadium-card__capacity {
  font-size: .78rem;
  color: var(--gray-500);
}

.stadium-card__credit {
  display: inline-block;
  margin-top: 8px;
  font-size: .7rem;
  color: var(--gray-300);
}

.stadium-card__credit:hover { color: var(--gray-500); }

/* ============================================================
   ARTILHARIA
   ============================================================ */
.scorers-table {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  border-collapse: collapse;
  background: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.scorers-table th,
.scorers-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--gray-100);
  font-size: .9rem;
}

.scorers-table th {
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--gray-500);
  background: var(--gray-50);
  text-align: left;
}

.scorers-table td.num { text-align: center; font-weight: 700; color: var(--navy-800); }
.scorers-table tbody tr:last-child td { border-bottom: none; }

.scorers-table .fi {
  width: 18px;
  height: 13px;
  vertical-align: middle;
  margin-right: 4px;
  border-radius: 1px;
}

.empty-state {
  text-align: center;
  color: var(--gray-500);
  font-size: .92rem;
  padding: 32px 0;
}

/* ============================================================
   SIMULAÇÃO (placeholder)
   ============================================================ */
.sim-card {
  max-width: 640px;
  margin: 0 auto;
  background: var(--white);
  border: 1px dashed var(--gray-300);
  border-radius: var(--radius-md);
  padding: 32px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.sim-card__title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy-800);
  margin-bottom: 8px;
}

.sim-card__desc {
  font-size: .9rem;
  color: var(--gray-500);
}

.sim-card__cta {
  display: inline-block;
  margin-top: 18px;
  font-size: .85rem;
  font-weight: 700;
  color: var(--navy-900);
  background: var(--gold-400);
  border-radius: 999px;
  padding: 10px 24px;
  text-decoration: none;
  transition: filter .15s ease;
}

.sim-card__cta:hover { filter: brightness(1.08); }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--navy-900);
  color: rgba(255,255,255,.6);
  padding: 40px 0;
  text-align: center;
}

.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.footer__copy { font-size: .8rem; }

.footer__back {
  font-size: .82rem;
  color: var(--gold-400);
  font-weight: 600;
}

.footer__back:hover { text-decoration: underline; }

.footer__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
}

.footer__changelog-btn {
  font-size: .82rem;
  font-weight: 600;
  color: var(--gold-400);
  background: none;
  border: 1px solid var(--gold-400);
  border-radius: 999px;
  padding: 4px 14px;
  cursor: pointer;
  transition: background .15s, color .15s;
}

.footer__changelog-btn:hover {
  background: var(--gold-400);
  color: var(--navy-900);
}

/* ============================================================
   UPDATED BADGE
   ============================================================ */
.updated-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 32px;
}

.updated-badge__inner {
  background: var(--gold-50);
  border: 1px solid var(--gold-200);
  color: var(--gold-700);
  font-size: .8rem;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 999px;
}

.updated-badge__refresh {
  background: none;
  border: none;
  color: var(--navy-700);
  font-size: .8rem;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
  padding: 2px 4px;
}

.updated-badge__refresh:hover { color: var(--gold-600); }

.updated-badge__refresh:disabled {
  color: var(--gray-300);
  cursor: wait;
  text-decoration: none;
}

/* ============================================================
   MODAL (CARD DA SEDE)
   ============================================================ */
body.modal-open { overflow: hidden; }

.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal[hidden] { display: none; }

.modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(4, 33, 15, .6);
}

.modal__dialog {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 320px;
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.modal__close {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: rgba(4, 33, 15, .6);
  color: var(--white);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}

.modal__close:hover { background: var(--navy-900); }

.modal__body .stadium-card {
  border: none;
  border-radius: 0;
  box-shadow: none;
  cursor: default;
}

.modal__body .stadium-card:hover { transform: none; }

.modal__dialog--match {
  max-width: 500px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}

.modal__dialog--match .modal__body {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

/* --- Match modal header --- */
.match-modal__header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 20px 16px 12px;
  background: var(--navy-900);
  color: var(--white);
}

.match-modal__team {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .95rem;
  font-weight: 600;
}

.match-modal__score {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: .04em;
  padding: 0 8px;
}

/* --- Match modal timeline --- */
.match-modal__timeline {
  position: relative;
  padding: 16px 0 8px;
  margin: 0 16px;
}

.match-modal__timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--gray-200, #e2e8f0);
  transform: translateX(-50%);
}

.match-modal__period {
  position: relative;
  z-index: 1;
  text-align: center;
  margin: 12px 0 8px;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--navy-700, #334155);
}

.match-modal__period span {
  background: var(--white);
  padding: 2px 10px;
  border: 1px solid var(--gray-200, #e2e8f0);
  border-radius: 10px;
}

.match-modal__event {
  position: relative;
  display: flex;
  align-items: center;
  padding: 3px 0;
  font-size: .8rem;
}

.match-modal__event--home {
  flex-direction: row;
}

.match-modal__event--away {
  flex-direction: row-reverse;
}

.match-modal__detail {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
  overflow: visible;
}

.match-modal__event--home .match-modal__detail {
  justify-content: flex-end;
  text-align: right;
}

.match-modal__event--away .match-modal__detail {
  justify-content: flex-start;
  text-align: left;
}

.match-modal__minute {
  flex: 0 0 auto;
  min-width: 36px;
  text-align: center;
  font-size: .75rem;
  font-weight: 700;
  color: var(--navy-700, #334155);
}

.match-modal__spacer {
  flex: 1;
}

.match-modal__card {
  display: inline-block;
  width: 10px;
  height: 14px;
  border-radius: 2px;
  vertical-align: middle;
}

.match-modal__card--yellow { background: #facc15; }
.match-modal__card--red { background: #dc2626; }

.match-modal__pk-miss {
  color: #dc2626;
  font-weight: 700;
}

.match-modal__pk-row .match-modal__detail--home {
  justify-content: flex-end;
  text-align: right;
}

.match-modal__pk-row .match-modal__detail--away {
  justify-content: flex-start;
  text-align: left;
}

.match-modal__event-detail {
  color: var(--gray-500, #6b7280);
  font-size: .78rem;
  margin-left: 2px;
}

.match-modal__goal-icon {
  position: relative;
  display: inline-block;
}

.match-modal__goal-count {
  position: absolute;
  top: -5px;
  right: -8px;
  font-size: .55rem;
  font-weight: 800;
  color: var(--white);
  background: var(--navy-900);
  border-radius: 50%;
  width: 13px;
  height: 13px;
  line-height: 13px;
  text-align: center;
}

/* --- Simplified view (no events, only scorers) --- */
.match-modal__simple {
  display: flex;
  gap: 16px;
  padding: 16px;
}

.match-modal__simple-side {
  flex: 1;
}

.match-modal__simple-side h4 {
  font-size: .85rem;
  font-weight: 700;
  color: var(--navy-900);
  margin: 0 0 6px;
}

.match-modal__simple-side p {
  margin: 2px 0;
  font-size: .85rem;
  color: var(--gray-700, #374151);
}

.match-modal__empty {
  padding: 24px 16px;
  text-align: center;
  color: var(--gray-500, #6b7280);
  font-size: .9rem;
}

/* Substituições na timeline */
.match-modal__sub-icon { font-size: .75rem; }

.match-modal__sub-in {
  color: #15803d;
  font-size: .75rem;
}

.match-modal__sub-out {
  color: #dc2626;
  font-size: .72rem;
  margin-left: 2px;
}

/* Abas do modal */
.match-modal__tabs {
  display: flex;
  border-bottom: 2px solid var(--gray-200, #e5e7eb);
}

.match-modal__tab {
  flex: 1;
  padding: 10px 8px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  color: var(--gray-400, #9ca3af);
  font-size: .8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  cursor: pointer;
  transition: color .2s, border-color .2s;
}

.match-modal__tab:hover { color: var(--navy-900, #0c1a0e); }

.match-modal__tab--active {
  color: var(--navy-900, #0c1a0e);
  border-bottom-color: var(--gold, #d4a843);
}

.match-modal__tab-content { display: none; }
.match-modal__tab-content--active { display: block; }

/* Escalações */
.match-modal__lineup { padding: 16px; }

.match-modal__lineup-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.match-modal__lineup-side h4 {
  font-size: .9rem;
  font-weight: 700;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--navy-900, #0c1a0e);
}

.match-modal__lineup-section-label {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--green-700, #15803d);
  margin: 10px 0 6px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--gray-200, #e5e7eb);
}

.match-modal__lineup-player {
  font-size: .8rem;
  padding: 4px 0;
  color: var(--navy-900, #0c1a0e);
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}

.match-modal__lineup-player--entered {
  color: #15803d;
  font-weight: 600;
}

.match-modal__lineup-player--bench {
  color: var(--gray-400, #9ca3af);
  font-size: .75rem;
}

.match-modal__lineup-jersey {
  display: inline-block;
  width: 22px;
  text-align: center;
  font-size: .75rem;
  font-weight: 700;
  color: var(--green-700, #15803d);
  flex-shrink: 0;
}

.match-modal__lineup-sub-detail {
  font-size: .7rem;
  color: var(--gray-500, #6b7280);
}

.match-modal__lineup-sub-in { color: #15803d; }
.match-modal__lineup-sub-out { color: #dc2626; }

@media (max-width: 480px) {
  .match-modal__lineup-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
  .stadium-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .nav { display: none; }
  .nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--gray-300);
    padding: 12px 24px;
    box-shadow: var(--shadow-md);
  }
  .nav-toggle { display: flex; }

  .format__grid { grid-template-columns: 1fr; }
  .groups__grid { grid-template-columns: 1fr; }
  .stadium-grid { grid-template-columns: 1fr; }

  .flag-bar__grid { max-width: 100%; }

  .match-card {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 8px;
  }
  .match-card__team--home,
  .match-card__team--away {
    justify-content: center;
    text-align: center;
  }
  .match-card__info {
    align-items: center;
    text-align: center;
  }
  .match-card__times { justify-content: center; }
  .match-card__venue { text-align: center; }

  .stadium-map { height: 320px; }

  .third-placed {
    overflow-x: auto;
  }
  .third-placed .standings-table {
    min-width: 560px;
  }
}

@media (max-width: 480px) {
  .standings-table th,
  .standings-table td {
    padding: 8px 3px;
  }
  .team-name__full { display: none; }
  .team-name__short { display: inline; }
}

/* ============================================================
   SELEÇÕES / ELENCOS
   ============================================================ */
.squads-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}

.squad-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
  font: inherit;
  text-align: left;
}

.squad-card:hover {
  border-color: var(--gold-400);
  box-shadow: var(--shadow-sm);
}

.squad-card--disabled {
  opacity: .4;
  cursor: default;
}

.squad-card__flag .fi { font-size: 1.4rem; }
.squad-card__name { font-size: .85rem; font-weight: 600; color: var(--navy-900); }

/* Squad links (nomes/bandeiras clicáveis em tabelas e jogos) */
[data-squad-team] {
  cursor: pointer;
}
.team-cell [data-squad-team]:hover,
.match-card__team [data-squad-team]:hover {
  text-decoration: underline;
  text-decoration-color: var(--gold-500);
  text-underline-offset: 2px;
}

/* Modal */
.modal__dialog--squad {
  max-width: 620px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}

.modal__dialog--squad .modal__body {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  padding: 24px;
}

.squad-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.squad-header__flag .fi { font-size: 2.4rem; }

.squad-header__name {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--navy-900);
}

.squad-header__group {
  font-size: .75rem;
  font-weight: 700;
  color: var(--gold-700);
  background: var(--gold-50);
  border: 1px solid var(--gold-200);
  border-radius: 999px;
  padding: 3px 10px;
}

.squad-coach {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--gray-50);
  border-radius: var(--radius-md);
  margin-bottom: 20px;
}

.squad-coach__label {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--gray-500);
}

.squad-coach__name {
  font-size: .95rem;
  font-weight: 700;
  color: var(--navy-900);
}

.squad-coach__nat {
  font-size: .8rem;
  color: var(--gray-500);
}

.squad-position {
  margin-bottom: 16px;
}

.squad-position__label {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--gold-700);
  margin-bottom: 6px;
}

.squad-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .82rem;
}

.squad-table th {
  text-align: left;
  font-weight: 600;
  color: var(--gray-500);
  font-size: .72rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-bottom: 1px solid var(--gray-200);
}

.squad-table td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--gray-100);
  color: var(--navy-900);
}

.squad-table__num {
  width: 30px;
  text-align: center;
  font-weight: 700;
  color: var(--gray-500);
}

.squad-table__name { font-weight: 600; }

.squad-table__club {
  color: var(--gray-500);
  font-size: .78rem;
}

.squad-table__age {
  width: 40px;
  text-align: center;
  color: var(--gray-500);
}

@media (max-width: 600px) {
  .squads-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
  .squad-table__club { display: none; }
}

/* ============================================================
   CHANGELOG MODAL
   ============================================================ */
.modal__dialog--changelog {
  max-width: 560px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
}

.modal__dialog--changelog .modal__body {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.changelog {
  padding: 24px;
}

.changelog__title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--navy-900);
  margin-bottom: 4px;
}

.changelog__subtitle {
  font-size: .85rem;
  color: var(--gray-500);
  margin-bottom: 24px;
}

.changelog__date {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--gold-700);
  background: var(--gold-50);
  border: 1px solid var(--gold-200);
  border-radius: 999px;
  display: inline-block;
  padding: 3px 12px;
  margin-bottom: 12px;
}

.changelog__list {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
}

.changelog__list li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 10px;
  font-size: .85rem;
  line-height: 1.5;
  color: var(--gray-700);
}

.changelog__list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 7px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold-400);
}

.changelog__list li strong {
  color: var(--navy-900);
}

/* Goal celebration */
.goal-celebration {
  position: fixed;
  inset: 0;
  z-index: 99999;
  pointer-events: none;
}
