.bracket-main { max-width: 1400px; margin: 30px auto 80px; padding: 0 20px; position: relative; z-index: 2; }
.bracket-head { text-align: center; margin-bottom: 30px; }
.bracket-tag {
  display: inline-block; padding: 5px 16px;
  border: 1px solid rgba(139,92,246,.35); border-radius: 999px;
  font-family: "Oswald", sans-serif; letter-spacing: 3px; font-size: 11px;
  color: var(--neon); margin-bottom: 14px;
  box-shadow: 0 0 24px rgba(139,92,246,.12) inset;
}
.bracket-head h1 {
  font-family: "Oswald", sans-serif; text-transform: uppercase; letter-spacing: 2px;
  font-size: clamp(34px, 6vw, 58px); line-height: 1;
  background: linear-gradient(135deg, var(--neon) 0%, var(--gta-yellow) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 30px rgba(176,107,255,.25));
}
.bracket-sub { color: var(--muted); font-size: 15px; margin-top: 8px; }

.bracket-empty {
  text-align: center; padding: 70px 20px;
  border: 1px dashed var(--border); border-radius: 18px;
  background: linear-gradient(180deg, var(--bg-2), rgba(20,13,31,.3)); color: var(--muted);
}
.bracket-empty .lc { color: var(--neon); margin-bottom: 16px; animation: spin 3s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.bracket-empty h2 { font-family: "Oswald", sans-serif; text-transform: uppercase; letter-spacing: 1.2px; font-size: 24px; margin-bottom: 8px; color: var(--text); }
.bracket-empty p { line-height: 1.6; }

.section-h {
  display: flex; align-items: center; gap: 10px;
  font-family: "Oswald", sans-serif; text-transform: uppercase; letter-spacing: 1.6px;
  font-size: 24px; margin: 40px 0 20px; color: var(--text);
}
.section-h .lc { color: var(--neon); }
.section-h::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--border), transparent); }

/* ===== Grupos ===== */
.groups-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 18px;
}
.group-card {
  background: linear-gradient(180deg, var(--bg-2), rgba(20,13,31,.45));
  border: 1px solid var(--border); border-radius: 16px; padding: 18px;
  animation: cardIn .5s ease backwards;
}
@keyframes cardIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
.group-title {
  font-family: "Oswald", sans-serif; text-transform: uppercase; letter-spacing: 1.5px;
  font-size: 18px; margin-bottom: 14px; color: var(--gta-yellow);
  display: flex; align-items: center; gap: 8px;
}
.group-title::before {
  content: ""; width: 4px; height: 18px; border-radius: 2px;
  background: linear-gradient(180deg, var(--gta-yellow), var(--neon));
}
.group-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.group-table th, .group-table td { text-align: center; padding: 8px 5px; border-bottom: 1px solid var(--border); }
.group-table th { color: var(--muted); font-weight: 600; font-size: 10px; text-transform: uppercase; letter-spacing: .5px; }
.group-table tbody tr { transition: background .15s; }
.group-table tbody tr:hover { background: rgba(176,107,255,.05); }
.group-table tr.advance { background: rgba(245,197,66,.06); }
.group-table tr.advance td:first-child { color: var(--gta-yellow); font-weight: 700; position: relative; }
.group-table tr.advance td:first-child::before {
  content: ""; position: absolute; left: 0; top: 15%; height: 70%; width: 3px;
  background: var(--gta-yellow); border-radius: 2px;
}
.group-table .gt-team { display: flex; align-items: center; gap: 9px; text-align: left; padding-left: 8px; font-weight: 500; }
.group-table .gt-team img, .group-table .gt-team .gt-ph {
  width: 24px; height: 24px; border-radius: 7px; object-fit: cover;
  display: inline-grid; place-items: center;
  background: var(--bg); border: 1px solid var(--border);
  font-size: 10px; font-weight: 700; color: var(--neon);
}
.group-table .gt-pts { color: var(--neon); font-weight: 700; font-family: "Oswald", sans-serif; font-size: 15px; }

.group-matches-toggle { margin-top: 12px; }
.group-matches-toggle summary {
  cursor: pointer; color: var(--muted); font-size: 12px; padding: 6px 0;
  text-transform: uppercase; letter-spacing: .5px; user-select: none;
}
.group-matches-toggle summary:hover { color: var(--neon); }
.group-matches { display: grid; gap: 9px; margin-top: 10px; }

/* ===== Match card (estilo bracket: 2 linhas + placar) ===== */
.match-card {
  position: relative; z-index: 2;
  background: var(--bg-2); border: 1px solid var(--border); border-radius: 11px;
  overflow: hidden; transition: border-color .15s, transform .15s, box-shadow .15s;
}
.match-card:hover { border-color: rgba(176,107,255,.45); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.4); }
.match-card.is-live { border-color: rgba(255,61,127,.5); box-shadow: 0 0 22px rgba(255,61,127,.15); }
.mc-head {
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
  font-size: 9.5px; color: var(--muted); padding: 7px 11px;
  text-transform: uppercase; letter-spacing: .5px;
  background: rgba(0,0,0,.2); border-bottom: 1px solid var(--border);
}
.mc-time { margin-left: auto; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 9px; font-weight: 700; letter-spacing: .5px; }
.b-pending { background: rgba(255,255,255,.05); color: var(--muted); }
.b-scheduled { background: rgba(245,197,66,.14); color: var(--gta-yellow); }
.b-live { background: rgba(255,61,127,.18); color: #ff8db5; animation: pulse-live 1.4s ease-in-out infinite; }
.b-done { background: rgba(34,197,94,.16); color: #86efac; }
.b-wo { background: rgba(255,77,110,.14); color: #ff8da0; }
@keyframes pulse-live { 0%,100% { opacity: 1; } 50% { opacity: .45; } }

.match-body { display: flex; flex-direction: column; }
.match-team {
  display: flex; align-items: center; gap: 9px; padding: 9px 11px;
  font-size: 13.5px; transition: background .15s;
}
.match-team + .match-team { border-top: 1px solid var(--border); }
.match-team.winner { background: rgba(245,197,66,.07); color: var(--gta-yellow); font-weight: 700; }
.match-team.tbd { color: var(--muted); opacity: .55; }
.mt-logo {
  width: 28px; height: 28px; border-radius: 7px; object-fit: cover; flex-shrink: 0;
  display: inline-grid; place-items: center;
  background: var(--bg); border: 1px solid var(--border);
  font-size: 11px; font-weight: 700; color: var(--neon);
}
.match-team.winner .mt-logo { border-color: rgba(245,197,66,.5); box-shadow: 0 0 10px rgba(245,197,66,.25); }
.mt-name { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mt-score {
  font-family: "Oswald", sans-serif; font-size: 18px; font-weight: 700;
  min-width: 22px; text-align: center; color: var(--text);
}
.match-team.winner .mt-score { color: var(--gta-yellow); }

/* ===== Bracket two-sided ===== */
.ko-section { overflow-x: auto; padding: 8px 0 16px; }
.ko-bracket {
  position: relative; display: flex; justify-content: center; align-items: stretch;
  min-width: min-content; gap: 0;
}
.ko-svg { position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: visible; }
.ko-line { fill: none; stroke: var(--border-strong); stroke-width: 2; }
.ko-line.done { stroke: var(--gta-yellow); stroke-width: 2.5; filter: drop-shadow(0 0 4px rgba(245,197,66,.4)); }

.ko-side { display: flex; }
.ko-round {
  display: flex; flex-direction: column; min-width: 230px; padding: 0 36px;
}
.ko-round-matches {
  flex: 1; display: flex; flex-direction: column; justify-content: space-around; gap: 14px;
}
.ko-round .match-card { animation: cardIn .5s ease backwards; }

.ko-center {
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  min-width: 260px; padding: 0 10px;
}
.ko-center .match-card {
  width: 100%;
  border-color: rgba(245,197,66,.45);
  box-shadow: 0 0 36px rgba(245,197,66,.14);
  animation: finalGlow 2.6s ease-in-out infinite alternate;
}
@keyframes finalGlow {
  from { box-shadow: 0 0 30px rgba(245,197,66,.1); }
  to { box-shadow: 0 0 46px rgba(245,197,66,.24); }
}

.ko-col-title {
  font-family: "Oswald", sans-serif; text-transform: uppercase; letter-spacing: 1.4px;
  font-size: 12.5px; color: var(--muted); text-align: center;
  padding: 8px 0; margin-bottom: 6px;
}
.ko-final-title {
  color: var(--gta-yellow); font-size: 15px; letter-spacing: 2px;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.ko-final-title .lc { color: var(--gta-yellow); }

.ko-third {
  max-width: 320px; margin: 30px auto 0; text-align: center;
}
.ko-third .ko-col-title { display: flex; align-items: center; justify-content: center; gap: 6px; }

@media (max-width: 860px) {
  .groups-grid { grid-template-columns: 1fr; }
  .ko-bracket { flex-direction: column; align-items: stretch; gap: 0; }
  .ko-side { flex-direction: column; }
  .ko-round { min-width: 0; padding: 0; }
  .ko-round-matches { gap: 12px; padding: 8px 0; }
  .ko-svg { display: none; }
  .ko-center { min-width: 0; padding: 8px 0; }
  .ko-col-title { border-top: 1px solid var(--border); padding-top: 14px; }
}

/* Times clicáveis (perfil) */
a.match-team { text-decoration: none; color: inherit; cursor: pointer; }
a.match-team:hover .mt-name { color: var(--neon); text-decoration: underline; }
.gt-link { display: flex; align-items: center; gap: 9px; text-decoration: none; color: inherit; cursor: pointer; }
.gt-link:hover span { color: var(--neon); text-decoration: underline; }
