/* Copa Portal — Design System (espelha tokens de src/lib/constants.js) */
:root {
  --bg: #060c18;
  --bg-card: #0c1628;
  --bg-hover: #111e33;
  --green: #00d488;
  --green-dim: rgba(0,212,136,0.12);
  --green-glow: rgba(0,212,136,0.28);
  --amber: #f59e0b;
  --red: #ef4444;
  --text: #e8edf5;
  --muted: #6b7fa0;
  --dim: #9aaac0;
  --border: rgba(0,212,136,0.14);
  --border-subtle: rgba(255,255,255,0.06);
  --field: #1a7a3f;
  --font: 'DM Sans', sans-serif;
  --mono: 'Space Mono', monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  background-image: repeating-linear-gradient(
    0deg, transparent, transparent 28px,
    rgba(26,122,63,0.04) 28px, rgba(26,122,63,0.04) 56px
  );
}

/* ─── Layout ─── */
.container { max-width: 860px; margin: 0 auto; padding: 0 16px; }

/* ─── Header ─── */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(6,12,24,0.95);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 14px 0;
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(145deg,#0d2818,#091c10);
  border: 1px solid rgba(0,212,136,0.3);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.logo-text { font-size: 15px; font-weight: 700; color: var(--text); }
.logo-text span { color: var(--green); }
.nav-links { display: flex; align-items: center; gap: 20px; }
.nav-links a { font-size: 13px; color: var(--muted); text-decoration: none; }
.nav-links a:hover { color: var(--text); }
.nav-cta {
  background: var(--green); color: #060c18;
  padding: 8px 16px; border-radius: 8px;
  font-weight: 700; font-size: 13px;
  text-decoration: none; white-space: nowrap;
  transition: filter 0.15s;
}
.nav-cta:hover { filter: brightness(1.08); }

/* ─── Breadcrumb ─── */
.breadcrumb {
  padding: 12px 0;
  font-size: 12px; color: var(--muted);
  display: flex; gap: 4px; align-items: center; flex-wrap: wrap;
}
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--green); }
.breadcrumb-sep { margin: 0 4px; }

/* ─── Hero ─── */
.hero { padding: 48px 0 32px; }
.hero-label {
  font-size: 11px; font-weight: 700; letter-spacing: 2px;
  color: var(--green); text-transform: uppercase; margin-bottom: 12px;
}
.hero h1 { font-size: clamp(26px,5vw,44px); font-weight: 700; line-height: 1.2; margin-bottom: 16px; }
.hero-desc { font-size: 17px; color: var(--dim); max-width: 620px; line-height: 1.7; }
.hero-meta { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 20px; font-size: 13px; color: var(--muted); }
.hero-meta strong { color: var(--text); font-weight: 600; }

/* ─── Article ─── */
article { padding: 4px 0 48px; }
article h2 { font-size: 22px; font-weight: 700; margin: 40px 0 14px; color: var(--text); border-top: 1px solid var(--border-subtle); padding-top: 32px; }
article h2:first-child { border-top: none; padding-top: 0; margin-top: 0; }
article h3 { font-size: 17px; font-weight: 700; margin: 24px 0 10px; color: var(--dim); }
article p { margin-bottom: 16px; color: var(--dim); line-height: 1.8; }
article strong { color: var(--text); font-weight: 600; }
article ul, article ol { margin: 0 0 16px 22px; color: var(--dim); line-height: 1.85; }
article li { margin-bottom: 6px; }
article a { color: var(--green); text-decoration: none; }
article a:hover { text-decoration: underline; }

/* ─── Card ─── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 22px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}
.card-highlight { border-color: var(--border); }

/* ─── Group grid (índice) ─── */
.groups-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px,1fr));
  gap: 14px; margin: 24px 0;
}
.group-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 14px; padding: 18px;
  text-decoration: none; color: var(--text);
  transition: border-color 0.18s, transform 0.18s;
  display: block;
}
.group-card:hover { border-color: var(--border); transform: translateY(-2px); }
.group-card-label {
  font-size: 10px; font-weight: 800; letter-spacing: 2px;
  color: var(--green); text-transform: uppercase; margin-bottom: 10px;
}
.group-card-teams { list-style: none; padding: 0; margin: 0; }
.group-card-teams li { font-size: 13px; color: var(--dim); padding: 3px 0; line-height: 1.4; }
.group-card-teams li:first-child { font-size: 14px; color: var(--text); font-weight: 600; }

/* ─── Team table ─── */
.team-table { width: 100%; border-collapse: collapse; margin: 20px 0; }
.team-table th {
  font-size: 10px; font-weight: 700; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--muted);
  padding: 8px 12px; text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}
.team-table td { padding: 13px 12px; border-bottom: 1px solid rgba(255,255,255,0.04); }
.team-table tr:last-child td { border-bottom: none; }
.team-flag { font-size: 22px; margin-right: 10px; line-height: 1; }
.team-name { font-size: 14px; font-weight: 600; color: var(--text); }
.team-conf { font-size: 12px; color: var(--muted); margin-top: 2px; }
.team-seed { font-family: var(--mono); font-size: 13px; color: var(--muted); }

/* ─── Phase flow ─── */
.phase-flow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 20px 0; }
.phase-badge {
  background: var(--bg-card); border: 1px solid var(--border-subtle);
  border-radius: 8px; padding: 8px 14px;
  font-size: 13px; font-weight: 600; color: var(--text);
}
.phase-badge.highlight { border-color: var(--green); color: var(--green); background: var(--green-dim); }
.phase-arrow { color: var(--muted); font-size: 16px; }

/* ─── Prediction box ─── */
.prediction-box {
  background: rgba(245,158,11,0.06);
  border: 1px solid rgba(245,158,11,0.2);
  border-radius: 12px; padding: 18px 20px; margin: 20px 0;
}
.prediction-box-label {
  font-size: 10px; font-weight: 800; letter-spacing: 2px;
  color: var(--amber); text-transform: uppercase; margin-bottom: 10px;
}
.prediction-box p { color: var(--dim); margin: 0; font-size: 14px; line-height: 1.7; }

/* ─── CTA box ─── */
.cta-box {
  background: linear-gradient(135deg,rgba(0,212,136,0.1) 0%,rgba(0,212,136,0.05) 100%);
  border: 1px solid var(--border);
  border-radius: 16px; padding: 32px 24px;
  text-align: center; margin: 40px 0;
}
.cta-box h3 { font-size: 22px; font-weight: 700; margin-bottom: 10px; }
.cta-box p { color: var(--dim); font-size: 15px; margin-bottom: 22px; max-width: 420px; margin-inline: auto; margin-bottom: 22px; }
.btn-cta {
  display: inline-block;
  background: var(--green); color: #060c18;
  font-weight: 700; font-size: 15px;
  padding: 13px 30px; border-radius: 10px;
  text-decoration: none;
  transition: all 0.18s cubic-bezier(0.16,1,0.3,1);
  box-shadow: 0 4px 20px rgba(0,212,136,0.25);
}
.btn-cta:hover { filter: brightness(1.08); transform: translateY(-1px); }

/* ─── Ad slot ─── */
/* A <ins> só fica visível quando o AdSense injeta um <iframe> dentro dela.
   Com slot ID inválido ou ad-blocker, AdSense não injeta iframe e a caixa
   fica 0px — sem buraco visual na página. */
.ad-slot { text-align: center; }
.ad-slot ins.adsbygoogle { display: block; }
.ad-slot ins.adsbygoogle:not(:has(> iframe)) {
  height: 0 !important;
  min-height: 0 !important;
  overflow: hidden;
}
.ad-slot:has(ins.adsbygoogle > iframe) { margin: 28px 0; }
.ad-slot-label { font-size: 10px; color: var(--muted); margin-bottom: 4px; }

/* ─── Groups nav (dentro das páginas de grupo) ─── */
.groups-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 28px 0 20px; }
.groups-nav a {
  padding: 6px 13px; border-radius: 7px;
  font-size: 12px; font-weight: 600; font-family: var(--mono);
  background: var(--bg-card); border: 1px solid var(--border-subtle);
  color: var(--muted); text-decoration: none; transition: all 0.15s;
}
.groups-nav a:hover { color: var(--green); border-color: var(--border); }
.groups-nav a.active { color: var(--green); border-color: var(--border); background: var(--green-dim); }

/* ─── Info grid (sobre/como-funciona) ─── */
.info-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(220px,1fr)); gap: 16px; margin: 24px 0; }
.info-card {
  background: var(--bg-card); border: 1px solid var(--border-subtle);
  border-radius: 12px; padding: 20px;
}
.info-card-num { font-family: var(--mono); font-size: 28px; font-weight: 700; color: var(--green); margin-bottom: 10px; }
.info-card h3 { font-size: 15px; font-weight: 700; margin-bottom: 8px; }
.info-card p { font-size: 13px; color: var(--dim); line-height: 1.6; }

/* ─── Footer ─── */
.site-footer { border-top: 1px solid var(--border-subtle); padding: 36px 0; margin-top: 64px; }
.footer-inner { display: flex; flex-direction: column; gap: 16px; align-items: center; text-align: center; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: center; }
.footer-links a { font-size: 13px; color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--green); }
.footer-copy { font-size: 12px; color: var(--muted); }

/* ─── Consent banner ─── */
#copa-consent {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 9999;
  background: rgba(12,22,40,0.98);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 18px 16px;
}
.consent-inner { max-width: 860px; margin: 0 auto; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.consent-text { flex: 1; font-size: 13px; color: var(--dim); min-width: 200px; line-height: 1.5; }
.consent-text a { color: var(--green); }
.consent-btns { display: flex; gap: 8px; flex-shrink: 0; }
.consent-accept {
  background: var(--green); color: #060c18;
  border: none; padding: 10px 20px; border-radius: 8px;
  font-size: 13px; font-weight: 700; cursor: pointer; font-family: var(--font);
}
.consent-reject {
  background: transparent; color: var(--muted);
  border: 1px solid rgba(255,255,255,0.12);
  padding: 10px 16px; border-radius: 8px;
  font-size: 13px; cursor: pointer; font-family: var(--font);
  transition: color 0.15s;
}
.consent-reject:hover { color: var(--text); }

/* ─── Responsive ─── */
@media (max-width: 640px) {
  .hero { padding: 32px 0 24px; }
  .groups-grid { grid-template-columns: 1fr 1fr; }
  .consent-inner { flex-direction: column; align-items: stretch; }
  .nav-links > a:not(.nav-cta) { display: none; }
  .hero-meta { gap: 12px; }
  article h2 { font-size: 19px; }
}
@media (max-width: 400px) {
  .groups-grid { grid-template-columns: 1fr; }
}
