:root {
  --bg: #0c0f0d;
  --panel: #151a17;
  --panel-2: #1b211d;
  --line: rgba(255,255,255,.09);
  --text: #f5f7f5;
  --muted: #9da79f;
  --accent: #b7ff2a;
  --accent-dark: #7dbb00;
  --quarters: #2dd46f;
  --playin: #f3b61f;
  --out: #ef5350;
  --shadow: 0 24px 70px rgba(0,0,0,.28);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 20% 0%, rgba(183,255,42,.08), transparent 30%),
    var(--bg);
  color: var(--text);
}
button, input { font: inherit; }
button { cursor: pointer; }
.container { width: min(1460px, calc(100% - 32px)); margin-inline: auto; }

.hero {
  border-bottom: 1px solid var(--line);
  background: linear-gradient(120deg, rgba(183,255,42,.11), transparent 38%);
}
.hero__content {
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding-block: 42px;
}
.eyebrow, .kicker {
  color: var(--accent);
  font-weight: 800;
  letter-spacing: .12em;
  font-size: 12px;
}
h1 { margin: 10px 0 12px; font-size: clamp(36px, 5vw, 64px); line-height: .95; letter-spacing: -.045em; }
h2 { margin: 5px 0 0; font-size: clamp(24px, 3vw, 34px); letter-spacing: -.035em; }
.hero p { margin: 0; max-width: 760px; color: #c8cfca; font-size: 17px; line-height: 1.65; }

.btn {
  border: 0;
  border-radius: 12px;
  min-height: 46px;
  padding: 0 18px;
  font-weight: 800;
}
.btn--ghost { color: var(--text); background: rgba(255,255,255,.06); border: 1px solid var(--line); white-space: nowrap; }
.btn--ghost:hover { background: rgba(255,255,255,.1); }

.app-grid {
  display: grid;
  grid-template-columns: minmax(500px, .9fr) minmax(680px, 1.25fr);
  gap: 22px;
  padding-block: 28px 42px;
  align-items: start;
}
.panel {
  background: rgba(21,26,23,.94);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.panel__header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 24px; border-bottom: 1px solid var(--line); }
.counter, .status-pill { font-size: 12px; font-weight: 800; color: var(--muted); background: rgba(255,255,255,.05); border: 1px solid var(--line); padding: 8px 10px; border-radius: 999px; white-space: nowrap; }
.status-pill.is-active { color: #0a1007; background: var(--accent); border-color: var(--accent); }

.round-tabs { padding: 16px 18px; display: flex; gap: 8px; overflow-x: auto; border-bottom: 1px solid var(--line); }
.round-tab { border: 1px solid var(--line); background: transparent; color: #b8c0ba; padding: 9px 13px; border-radius: 999px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.round-tab.is-active { background: var(--accent); color: #0a0d0b; border-color: var(--accent); }

.round-block { padding: 20px 20px 6px; }
.round-block + .round-block { border-top: 1px solid var(--line); }
.round-meta { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.round-meta h3 { margin: 0; font-size: 18px; }
.round-meta p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.bye { color: var(--muted); font-size: 11px; text-align: right; }

.match-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 12px;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  border-radius: 14px;
}
.team { display: flex; align-items: center; gap: 10px; min-width: 0; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .01em; }
.team--away { justify-content: flex-end; text-align: right; }
.team img { width: 32px; height: 32px; object-fit: contain; flex: 0 0 auto; }
.team span { overflow: hidden; text-overflow: ellipsis; }
.score { display: grid; grid-template-columns: 1fr 14px 1fr; align-items: center; gap: 5px; }
.score span { text-align: center; color: var(--muted); font-weight: 700; }
.score input {
  width: 100%; min-width: 0; height: 40px;
  background: #0d110e; color: var(--text);
  border: 1px solid rgba(255,255,255,.14); border-radius: 9px;
  text-align: center; font-size: 17px; font-weight: 800;
  outline: none;
}
.score input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(183,255,42,.1); }
.score input::-webkit-outer-spin-button, .score input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.score input[type=number] { -moz-appearance: textfield; }

.legend { display: flex; flex-wrap: wrap; gap: 16px; padding: 12px 24px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 11px; font-weight: 700; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot--quarters { background: var(--quarters); }
.dot--playin { background: var(--playin); }
.dot--out { background: var(--out); }

.table-wrap { overflow-x: auto; }
.standings-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.standings-table th { position: sticky; top: 0; z-index: 1; color: #879087; background: #111512; font-size: 10px; text-transform: uppercase; letter-spacing: .06em; }
.standings-table th, .standings-table td { padding: 10px 8px; text-align: center; border-bottom: 1px solid rgba(255,255,255,.06); white-space: nowrap; }
.standings-table th:nth-child(2), .standings-table td:nth-child(2) { text-align: left; }
.standings-table tbody tr { transition: background .2s ease, transform .2s ease; }
.standings-table tbody tr:hover { background: rgba(255,255,255,.035); }
.position { font-weight: 900; }
.position--quarters { color: var(--quarters); }
.position--playin { color: var(--playin); }
.position--out { color: var(--out); }
.team-cell { display: flex; align-items: center; gap: 8px; min-width: 145px; font-weight: 800; }
.team-cell img { width: 24px; height: 24px; object-fit: contain; }
.points { color: var(--accent); font-weight: 900; font-size: 14px; }
.sg-positive { color: #66df8f; }
.sg-negative { color: #ff7472; }

.rules-note { margin: 16px; padding: 14px; border: 1px solid var(--line); background: rgba(255,255,255,.025); border-radius: 12px; color: var(--muted); font-size: 11px; line-height: 1.55; }
.rules-note strong { color: #d5dbd7; }
.footer { color: #768078; border-top: 1px solid var(--line); font-size: 11px; }
.footer .container { padding-block: 20px 30px; }

@media (max-width: 1180px) {
  .app-grid { grid-template-columns: 1fr; }
  .standings-panel { order: -1; }
}
@media (max-width: 680px) {
  .container { width: min(100% - 20px, 1460px); }
  .hero__content { min-height: 0; align-items: flex-start; flex-direction: column; padding-block: 30px; }
  .hero p { font-size: 14px; }
  .panel { border-radius: 15px; }
  .panel__header { padding: 18px; align-items: flex-start; }
  .standings-heading { flex-direction: column; }
  .round-block { padding-inline: 12px; }
  .match-card { grid-template-columns: 1fr 88px 1fr; padding: 10px 8px; gap: 6px; }
  .team { flex-direction: column; gap: 5px; font-size: 9px; text-align: center; }
  .team--away { flex-direction: column-reverse; text-align: center; }
  .team img { width: 28px; height: 28px; }
  .score input { height: 38px; font-size: 16px; }
  .round-meta { align-items: flex-start; }
  .bye { max-width: 155px; }
  .standings-table th, .standings-table td { padding: 9px 7px; }
}

/* Fases finais */
.stage-stack { padding-block: 24px 48px; }
.stage-nav { position: sticky; top: 10px; z-index: 20; display:flex; gap:8px; width:max-content; max-width:100%; padding:7px; margin:0 0 20px; border:1px solid var(--line); border-radius:999px; background:rgba(12,15,13,.9); backdrop-filter:blur(14px); overflow:auto; }
.stage-link { border:0; border-radius:999px; padding:9px 14px; background:transparent; color:var(--muted); font-size:12px; font-weight:800; white-space:nowrap; }
.stage-link.is-active, .stage-link:hover { color:#0a0d0b; background:var(--accent); }
.stage-stack > .app-grid { padding-block:0 22px; }
.phase-panel { margin-top:22px; }
.phase-heading p { margin:6px 0 0; color:var(--muted); font-size:12px; }
.phase-explainer { padding:13px 24px; color:#b9c2bb; font-size:12px; line-height:1.6; border-bottom:1px solid var(--line); background:rgba(255,255,255,.02); }
.phase-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; padding:20px; }
.phase-match { padding:15px; border:1px solid var(--line); border-radius:15px; background:var(--panel-2); }
.phase-match__label { display:flex; justify-content:space-between; gap:8px; margin-bottom:12px; color:var(--muted); font-size:10px; font-weight:800; text-transform:uppercase; letter-spacing:.07em; }
.phase-match .match-card { margin:0; background:#111512; }
.advantage { margin-top:10px; color:#aeb7b0; font-size:10px; line-height:1.45; }
.winner-line { margin-top:10px; padding:9px 10px; border-radius:9px; background:rgba(183,255,42,.07); color:#d8e4cf; font-size:11px; }
.winner-line strong { color:var(--accent); }

.bracket { display:grid; grid-template-columns:1.3fr 1fr 1fr; gap:16px; padding:20px; align-items:start; }
.bracket-column { min-width:0; }
.bracket-column h3 { margin:0 0 12px; font-size:13px; text-transform:uppercase; letter-spacing:.08em; color:var(--accent); }
.bracket-match { margin-bottom:12px; padding:13px; border:1px solid var(--line); border-radius:14px; background:var(--panel-2); }
.bracket-match__title { margin-bottom:9px; color:var(--muted); font-size:10px; font-weight:800; }
.ko-team-row { display:grid; grid-template-columns:minmax(0,1fr) 54px; align-items:center; gap:8px; padding:6px 0; }
.ko-team { display:flex; align-items:center; gap:8px; min-width:0; font-size:11px; font-weight:800; text-transform:uppercase; }
.ko-team img { width:27px; height:27px; object-fit:contain; }
.ko-team span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ko-score { width:54px; height:38px; border:1px solid rgba(255,255,255,.14); border-radius:9px; outline:none; text-align:center; background:#0d110e; color:var(--text); font-weight:900; }
.ko-score:focus { border-color:var(--accent); box-shadow:0 0 0 3px rgba(183,255,42,.1); }
.penalty-box { display:flex; align-items:center; gap:8px; margin-top:8px; padding-top:9px; border-top:1px solid var(--line); }
.penalty-box label { color:var(--muted); font-size:10px; }
.penalty-select { flex:1; min-width:0; padding:8px; border:1px solid var(--line); border-radius:8px; background:#0d110e; color:var(--text); font-size:10px; }
.locked-card { padding:22px; border:1px dashed rgba(255,255,255,.14); border-radius:14px; color:var(--muted); text-align:center; font-size:12px; line-height:1.6; }
.final-column .bracket-match { border-color:rgba(183,255,42,.18); }
.champion-card { margin-top:22px; padding:28px; border:1px solid rgba(183,255,42,.35); border-radius:20px; background:linear-gradient(130deg,rgba(183,255,42,.13),rgba(21,26,23,.95) 55%); box-shadow:var(--shadow); }
.champion-team { display:flex; align-items:center; gap:18px; margin-top:12px; }
.champion-team img { width:72px; height:72px; object-fit:contain; filter:drop-shadow(0 10px 20px rgba(0,0,0,.25)); }
.champion-team strong { display:block; font-size:clamp(28px,5vw,48px); line-height:1; letter-spacing:-.04em; }
.champion-team span { display:block; margin-top:6px; color:#b9c2bb; font-size:12px; }

@media (max-width:980px){ .bracket{grid-template-columns:1fr;} .phase-grid{grid-template-columns:1fr;} }
@media (max-width:680px){ .stage-nav{width:100%;} .phase-explainer{padding-inline:18px;} .phase-grid,.bracket{padding:12px;} .phase-match{padding:10px;} .phase-match .match-card{grid-template-columns:1fr 84px 1fr;} }
