:root {
  --forest-dark: #08100c;
  --forest-mid: #0f2619;
  --forest-green: #0ad35e;
  --forest-lime: #3cff90;
  --earth: #1b120e;
  --text: #e6f5e9;
  --muted: #9eb6a7;
  --card: rgba(255, 255, 255, 0.03);
  --border: rgba(255, 255, 255, 0.08);
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  --glow: 0 0 0 1px rgba(10, 211, 94, 0.4), 0 10px 40px rgba(10, 211, 94, 0.25);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Space Grotesk', system-ui, sans-serif;
  background:
    radial-gradient(circle at 18% 24%, rgba(60, 255, 144, 0.08), transparent 30%),
    radial-gradient(circle at 82% 14%, rgba(10, 211, 94, 0.12), transparent 28%),
    linear-gradient(140deg, var(--forest-dark), #03150d 60%, var(--earth));
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

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

.scrollbar {
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  width: 0;
  background: linear-gradient(120deg, var(--forest-green), var(--forest-lime));
  box-shadow: 0 0 20px rgba(60, 255, 144, 0.8);
  z-index: 20;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(12px);
  background: rgba(4, 14, 9, 0.8);
  border-bottom: 1px solid var(--border);
  padding: 14px 28px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand { display: flex; align-items: center; gap: 12px; }
.logo-mark {
  width: 64px;
  height: 64px;
  object-fit: contain;
  filter: drop-shadow(0 10px 25px rgba(10, 211, 94, 0.35));
}

.brand-text { line-height: 1.1; }
.brand-text .eyebrow {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--forest-lime);
}

.brand-text strong {
  font-family: 'Bebas Neue', 'Space Grotesk', sans-serif;
  font-size: 26px;
  letter-spacing: 0.04em;
}

nav { display: flex; gap: 14px; flex: 1; }
nav a {
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: color 180ms, background 180ms, transform 180ms;
}
nav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-2px);
}

.cta-group { display: flex; gap: 10px; align-items: center; }
.btn {
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  padding: 11px 15px;
  border-radius: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 180ms, box-shadow 180ms, background 180ms, border 180ms;
}
.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: linear-gradient(120deg, var(--forest-green), var(--forest-lime));
  color: #041009;
  border: 1px solid rgba(60, 255, 144, 0.8);
  box-shadow: var(--glow);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
}
.btn-ghost:hover {
  border-color: rgba(60, 255, 144, 0.6);
  color: var(--forest-lime);
}

.hero {
  padding: 64px 28px 36px;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 60%, rgba(10, 211, 94, 0.14), transparent 32%),
    radial-gradient(circle at 86% 14%, rgba(60, 255, 144, 0.14), transparent 30%);
}

.hero-inner {
  position: relative;
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 26px;
  align-items: center;
}

.floating-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 13px;
  background: rgba(60, 255, 144, 0.12);
  border: 1px solid rgba(60, 255, 144, 0.3);
  color: var(--forest-lime);
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  animation: glow-pulse 2.6s ease-in-out infinite;
}

h1 {
  margin: 14px 0 10px;
  font-size: clamp(40px, 6vw, 62px);
  line-height: 1.05;
  font-family: 'Bebas Neue', 'Space Grotesk', sans-serif;
  letter-spacing: 0.02em;
}

p.lead {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.6;
}

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 18px 0 10px; }

.chip-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: var(--muted);
  font-weight: 600;
}
.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--forest-lime);
  box-shadow: 0 0 12px rgba(60, 255, 144, 0.9);
}

.hero-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 18px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.metric-label {
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  display: block;
}

.metric {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(60, 255, 144, 0.12);
  border: 1px solid rgba(60, 255, 144, 0.35);
  color: var(--forest-lime);
  font-weight: 700;
  letter-spacing: 0.01em;
}

.badge-soft {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: var(--muted);
  font-weight: 700;
  font-size: 12px;
}

.progress {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  margin-top: 8px;
}
.progress span {
  display: block;
  height: 100%;
  background: linear-gradient(120deg, var(--forest-green), var(--forest-lime));
  width: 50%;
  border-radius: 999px;
}

.logo-shell {
  background: linear-gradient(160deg, rgba(10, 211, 94, 0.08), rgba(4, 12, 8, 0.5));
  border: 1px solid rgba(60, 255, 144, 0.35);
  border-radius: 22px;
  padding: 14px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.logo-shell img { max-height: 200px; }

.section { padding: 44px 28px; }
.section-inner { max-width: 1180px; margin: 0 auto; }

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.section-header h2,
.section-header h3 {
  margin: 0;
  letter-spacing: 0.01em;
}
.section-header p { margin: 4px 0 0; color: var(--muted); }

.tabs {
  display: flex;
  gap: 10px;
  background: rgba(255, 255, 255, 0.04);
  padding: 8px;
  border-radius: 14px;
  border: 1px solid var(--border);
}

.tab-btn {
  border: none;
  background: transparent;
  color: var(--muted);
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background 180ms, color 180ms, transform 180ms;
}
.tab-btn:hover { color: var(--text); transform: translateY(-2px); }
.tab-btn.is-active {
  background: linear-gradient(120deg, rgba(10, 211, 94, 0.12), rgba(60, 255, 144, 0.18));
  color: var(--forest-lime);
  box-shadow: var(--glow);
}

.tab-panel { display: none; animation: fade-up 320ms ease forwards; }
.tab-panel.is-active { display: block; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.timeline { display: grid; gap: 12px; }
.timeline-item {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  gap: 14px;
}
.timeline-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--forest-green);
  box-shadow: var(--glow);
}

.board {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px;
  min-height: 200px;
}

.team-row {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  margin-bottom: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.team-name {
  display: flex;
  align-items: center;
  gap: 10px;
}

.team-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  padding: 4px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(60, 255, 144, 0.12);
  color: var(--forest-lime);
  border: 1px solid rgba(60, 255, 144, 0.3);
  font-weight: 700;
  font-size: 13px;
}

.form-shell {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.field { display: flex; flex-direction: column; gap: 6px; }
.field label {
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.01em;
}

.field input,
.field select,
.field textarea {
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
}

.field textarea { min-height: 120px; resize: vertical; }

.split {
  display: grid;
  grid-template-columns: 1fr 0.95fr;
  gap: 14px;
}

.member-input {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.member-input input {
  flex: 1;
}

.member-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.member-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: var(--muted);
  font-weight: 700;
  font-size: 13px;
}

.member-pill button {
  border: none;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-weight: 700;
}

.matchup {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
}
.matchup h4 { margin: 0 0 6px; }
.matchup ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}
.matchup li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.35);
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.faq { display: grid; gap: 10px; }
.faq-item {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  overflow: hidden;
}
.faq-question {
  padding: 14px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text);
}
.faq-answer {
  padding: 0 14px 14px;
  color: var(--muted);
  display: none;
}
.faq-item.is-open .faq-answer { display: block; }

.footer {
  padding: 24px 28px 32px;
  color: var(--muted);
  border-top: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.35);
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 340ms ease, transform 340ms ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.auth-overlay,
.register-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 50;
}

.auth-card {
  background: rgba(12, 26, 20, 0.9);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px;
  width: min(420px, 92vw);
  box-shadow: var(--shadow);
}

.auth-header h2 {
  margin: 0 0 6px;
  letter-spacing: 0.02em;
}

.auth-muted {
  margin: 0 0 16px;
  color: var(--muted);
}

.auth-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(60, 255, 144, 0.35); }
  50% { box-shadow: 0 0 0 12px rgba(60, 255, 144, 0); }
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1024px) {
  .hero-inner { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; }
  nav { display: none; }
  .topbar { justify-content: space-between; }
}

@media (max-width: 640px) {
  .hero,
  .section { padding: 32px 18px; }
  .card { padding: 14px; }
  .team-row { grid-template-columns: 1fr 1fr; }
}

.d-none { display: none !important; }

.bracket-visual {
  background: #0a0f0c;
  border: 1px solid #163222;
  border-radius: 16px;
  padding: 12px;
  margin-top: 16px;
  display: none;
  position: relative;
  overflow: visible;
}
.bracket-tree {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  align-items: center;
  position: relative;
  z-index: 1;
  overflow: visible;
}
.bracket-col {
  display: grid;
  gap: 10px;
}
.bracket-col:nth-child(3),
.bracket-col:nth-child(5) {
  padding-top: 16px; /* desce um pouco as semifinais */
}
.bracket-col:nth-child(4) {
  padding-top: 300px; /* desce a final para mais perto do centro */
}
.bracket-slot {
  background: linear-gradient(120deg, rgba(60,255,144,0.08), rgba(6,16,12,0.8));
  border: 1px solid rgba(60,255,144,0.25);
  color: #e9f8ef;
  padding: 12px 14px;
  border-radius: 999px;
  font-weight: 700;
  font-size: clamp(11px, 0.95vw, 12px);
  letter-spacing: 0.5px;
  min-height: 38px;
  width: 100%;
  max-width: 240px;
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 6px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.25);
  line-height: 1.25;
  white-space: normal;
  word-break: break-word;
}
.bracket-slot.empty {
  opacity: 0.6;
  border-style: dashed;
  color: #7c8e82;
}
.bracket-slot.placeholder {
  opacity: 0.35;
  background: rgba(6,16,12,0.7);
}
.bracket-slot.champion {
  border-color: rgba(255,215,110,0.6);
  background: linear-gradient(120deg, rgba(255,215,110,0.12), rgba(6,16,12,0.9));
}
.bracket-slot.champion::before,
.bracket-slot.champion::after {
  content: "🏆";
  font-size: 16px;
  margin: 0 6px;
  filter: drop-shadow(0 1px 4px rgba(0,0,0,0.35));
}
.bracket-slot.champion::before { margin-right: 8px; }
.bracket-slot.champion::after { margin-left: 8px; }
.bracket-slot img {
  height: 22px;
  width: 22px;
  object-fit: cover;
  border-radius: 50%;
  margin-right: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.35);
}
.bracket-slot[data-stage="SF"] {
  background: linear-gradient(120deg, rgba(184,115,51,0.22), rgba(120,72,26,0.55));
  border-color: rgba(184,115,51,0.7);
  color: #fdf4e7;
  box-shadow: 0 8px 18px rgba(0,0,0,0.32);
}
.bracket-slot[data-stage="Final"] {
  background: linear-gradient(120deg, rgba(215,215,215,0.28), rgba(110,110,110,0.55));
  border-color: rgba(210,210,210,0.7);
  color: #f7f7f7;
  box-shadow: 0 10px 20px rgba(0,0,0,0.34);
}
.bracket-slot.has-members {
  position: relative;
}

.bracket-slot.clickable {
  cursor: pointer;
  border-color: rgba(60,255,144,0.5);
}
.bracket-slot.clickable:hover {
  box-shadow: 0 8px 18px rgba(60,255,144,0.2);
  transform: translateY(-1px);
}
.bracket-slot.win-path {
  border-color: rgba(120, 255, 180, 0.9);
  box-shadow: 0 0 0 1px rgba(120,255,180,0.45), 0 10px 22px rgba(0,0,0,0.35);
  background: linear-gradient(120deg, rgba(120,255,180,0.16), rgba(12,32,20,0.9));
  position: relative;
}
.bracket-slot.win-path.win-R16,
.bracket-slot.win-path.win-QF {
  border-color: rgba(120, 255, 180, 0.9);
  background: linear-gradient(120deg, rgba(120,255,180,0.18), rgba(12,32,20,0.92));
}
.bracket-slot.win-path.win-SF {
  border-color: rgba(184,115,51,0.85);
  background: linear-gradient(120deg, rgba(184,115,51,0.24), rgba(90,54,18,0.9));
  box-shadow: 0 0 0 1px rgba(184,115,51,0.4), 0 10px 22px rgba(0,0,0,0.34);
  color: #fff3e3;
}
.bracket-slot.win-path.win-Final {
  border-color: rgba(210,210,210,0.9);
  background: linear-gradient(120deg, rgba(215,215,215,0.26), rgba(95,95,95,0.92));
  box-shadow: 0 0 0 1px rgba(215,215,215,0.35), 0 10px 22px rgba(0,0,0,0.36);
  color: #f7f7f7;
}
.bracket-slot.champion.win-path,
.bracket-slot.win-path.win-Champion {
  border-color: rgba(255,215,110,0.95);
  box-shadow: 0 0 0 1px rgba(255,215,110,0.5), 0 12px 26px rgba(0,0,0,0.42);
  background: linear-gradient(120deg, rgba(255,215,110,0.24), rgba(50,32,8,0.9));
  color: #fff7df;
}
.bracket-slot.win-path::after {
  content: "🏆";
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 15px;
  filter: drop-shadow(0 1px 4px rgba(0,0,0,0.35));
}
#adminMatches {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}
.admin-match.card {
  background: #0d1b14;
  border: 1px solid #1f3a29;
  padding: 14px;
}
.admin-match h4 {
  margin: 0 0 8px;
}
.admin-match .field {
  margin: 8px 0 0;
}
.admin-match select {
  width: 100%;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(60,255,144,0.3);
  background: rgba(6,16,12,0.8);
  color: #e9f8ef;
}

.member-tooltip {
  position: absolute;
  background: rgba(6,16,12,0.95);
  border: 1px solid rgba(60,255,144,0.3);
  color: #e9f8ef;
  padding: 14px 16px;
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(0,0,0,0.4);
  font-size: 13px;
  line-height: 1.35;
  white-space: pre-line;
  min-width: 220px;
  max-width: 320px;
  z-index: 30;
  pointer-events: none;
  display: none;
}
.bracket-slot.connect-right::after,
.bracket-slot.connect-left::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 24px;
  height: 1px;
  background: rgba(60,255,144,0.35);
}
.bracket-slot.connect-right::after { left: 100%; transform: translateY(-50%); }
.bracket-slot.connect-left::after { right: 100%; transform: translateY(-50%); }
.bracket-logo {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 0;
  opacity: 0.12;
  gap: 18px;
}
.bracket-logo img {
  max-width: 180px;
  filter: drop-shadow(0 8px 18px rgba(0,0,0,0.35));
}
.bracket-tree::before {
  content: "";
  position: absolute;
  inset: 12px;
  background-image:
    linear-gradient(to right, rgba(60,255,144,0.15), rgba(60,255,144,0.02)),
    repeating-linear-gradient(to right,
      transparent 0, transparent 12.5%, rgba(60,255,144,0.08) 12.5%, rgba(60,255,144,0.08) 13%, transparent 13%, transparent 25%);
  opacity: 0.35;
  z-index: 0;
}
