/* =========================================================
   ARENA MATCH — estilos baseados no brandkit (img/brandkit)
   Cores: Electric Green #39FF14 · Deep Black #0B0F0D
          White #FFFFFF · Complementary Gray #6B7280
   Fontes: Montserrat ExtraBold (títulos) · Inter (texto)
   ========================================================= */

:root {
  /* Paleta oficial */
  --green: #39FF14;
  --green-600: #2FD811;
  --green-deep: #1E7A2E;
  --black: #0B0F0D;
  --white: #FFFFFF;
  --gray: #6B7280;

  /* Superfícies (derivadas do Deep Black) */
  --surface-1: #111613;
  --surface-2: #161C18;
  --surface-3: #1D2420;
  --line: rgba(255, 255, 255, .08);
  --line-green: rgba(57, 255, 20, .35);

  /* Texto */
  --text: var(--white);
  --text-2: #B8BEC6;
  --text-3: var(--gray);

  /* Fontes */
  --font-title: "Montserrat", "Arial Black", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Medidas */
  --container: 1200px;
  --radius: 12px;
  --radius-lg: 20px;
  --header-h: 0px;   /* no computador não há barra no topo; no celular vira 64px */
  --side-w: 248px;  /* computador: vira a faixa de ícones (76px); celular: 0 */
  --ease: cubic-bezier(.2, .7, .2, 1);
  --glow: 0 0 24px rgba(57, 255, 20, .45);
}

/* ---------- Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

body {
  font-family: var(--font-body);
  background: var(--black);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
svg { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

::selection { background: var(--green); color: var(--black); }

:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }

.container { width: min(100% - 40px, var(--container)); margin-inline: auto; }

/* ---------- Tipografia ---------- */
.display,
.title,
h3 {
  font-family: var(--font-title);
  font-weight: 800;
  text-transform: uppercase;
  line-height: 1.02;
  letter-spacing: -.01em;
}

.display { font-size: clamp(2.4rem, 5.6vw, 4.6rem); }
.title { font-size: clamp(1.8rem, 3.6vw, 2.8rem); }
.accent { color: var(--green); }
.display .accent { display: block; }

.lead { color: var(--text-2); font-size: clamp(1rem, 1.3vw, 1.15rem); max-width: 52ch; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: .75rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--green);
}
.eyebrow svg { width: 14px; height: 14px; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 26px;
  border-radius: 8px;
  font-family: var(--font-title);
  font-weight: 800;
  font-size: .85rem;
  letter-spacing: .08em;
  white-space: nowrap;
  text-transform: uppercase;
  border: 2px solid transparent;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s, color .2s, border-color .2s;
}
.btn svg { width: 18px; height: 18px; transition: transform .2s var(--ease); }
.btn:hover svg { transform: translateX(4px); }

.btn-primary { background: var(--green); color: var(--black); }
.btn-primary:hover { background: var(--green-600); box-shadow: var(--glow); transform: translateY(-2px); }

.btn-outline { border-color: rgba(255, 255, 255, .25); color: var(--white); }
.btn-outline:hover { border-color: var(--green); color: var(--green); }

.btn-ghost { color: var(--text-2); }
.btn-ghost:hover { color: var(--white); }

.btn-sm { min-height: 40px; padding: 0 18px; font-size: .75rem; }
.btn-block { width: 100%; }

/* ---------- Logo em vetor (símbolos #am-mono e #am-word no index.html) ---------- */
.brand { display: flex; align-items: center; gap: 10px; }

.brand svg,
.footer-logo { stroke: none; }

.brand-mark { width: 74px; height: auto; aspect-ratio: 1432 / 615; }
.brand-word { width: 112px; height: auto; aspect-ratio: 1320 / 262; }

/* ---------- Menu lateral ----------
   Telas grandes: menu completo à esquerda.
   1024–1279px: só os ícones (o nome aparece ao passar o mouse).
   Celular/tablet: barra fina no topo e o menu abre por cima da página. */
body { padding-left: var(--side-w); }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 70;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: var(--side-w);
  padding: 24px 14px 16px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  background:
    radial-gradient(120% 40% at 0% 0%, rgba(57, 255, 20, .1), transparent 70%),
    rgba(11, 15, 13, .97);
  border-right: 1px solid var(--line);
}
.sidebar::-webkit-scrollbar { display: none; }

.side-brand { padding: 0 10px 12px; }
.side-brand .brand-mark { width: 62px; }
.side-brand .brand-word { width: 100px; }

.side-nav { display: grid; gap: 2px; }
.side-label {
  padding: 18px 12px 8px;
  font-size: .64rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text-3);
}
.side-nav a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 10px;
  font-size: .92rem;
  font-weight: 500;
  color: var(--text-2);
  transition: background .2s, color .2s;
}
.side-nav a svg { width: 20px; height: 20px; color: var(--text-3); transition: color .2s; }
.side-nav a:hover { background: var(--surface-2); color: var(--white); }
.side-nav a:hover svg { color: var(--green); }
.side-nav a.is-active {
  background: linear-gradient(90deg, rgba(57, 255, 20, .16), rgba(57, 255, 20, .02));
  color: var(--white);
}
.side-nav a.is-active svg { color: var(--green); }
.side-nav a.is-active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  bottom: 9px;
  width: 3px;
  border-radius: 2px;
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
}
.side-tag {
  margin-left: auto;
  padding: 2px 7px;
  font-style: normal;
  font-size: .58rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--black);
  background: var(--green);
  border-radius: 4px;
}

.side-foot { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); }

.topbar { display: none; }
.side-backdrop { display: none; }

.nav-toggle { display: none; width: 40px; height: 40px; flex-direction: column; justify-content: center; align-items: center; gap: 5px; }
.nav-toggle span { width: 22px; height: 2px; background: var(--white); transition: transform .25s, opacity .25s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Perfil do usuário (rodapé do menu lateral) ---------- */
[hidden] { display: none !important; }

.guest-actions { display: grid; gap: 8px; }
.guest-actions .btn { width: 100%; }
.guest-actions .btn svg { width: 16px; height: 16px; }

.profile { position: relative; }

.profile-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 12px 8px 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, .03);
  transition: border-color .2s, background .2s;
}
.profile-btn:hover,
.profile-btn[aria-expanded="true"] { border-color: var(--line-green); background: rgba(57, 255, 20, .06); }

.avatar {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--green) center / cover no-repeat;
  color: var(--black);
  font-family: var(--font-title);
  font-weight: 800;
  font-size: .8rem;
  box-shadow: 0 0 0 2px var(--black), 0 0 0 3px var(--green);
  flex-shrink: 0;
}
.avatar-lg { width: 44px; height: 44px; font-size: .95rem; }

.profile-name { flex: 1; min-width: 0; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .88rem; font-weight: 600; }

.profile-chevron { width: 16px; height: 16px; color: var(--text-3); transition: transform .2s; }
.profile-chevron { transform: rotate(180deg); }
.profile-btn[aria-expanded="true"] .profile-chevron { transform: none; }

.profile-menu {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 0;
  right: 0;
  z-index: 60;
  display: grid;
  padding: 8px;
  background: rgba(17, 22, 19, .97);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 24px 48px rgba(0, 0, 0, .5);
  animation: menu-in .18s var(--ease);
}
@keyframes menu-in { from { opacity: 0; transform: translateY(6px); } }

.profile-menu-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 10px 14px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--line);
}
.profile-menu-head div { display: grid; min-width: 0; line-height: 1.3; }
.profile-menu-head strong { font-size: .92rem; }
.profile-menu-head span { font-size: .78rem; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.profile-menu a,
.profile-menu button {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  font-size: .9rem;
  color: var(--text-2);
  text-align: left;
  transition: background .15s, color .15s;
}
.profile-menu a:hover,
.profile-menu a:focus-visible,
.profile-menu button:hover,
.profile-menu button:focus-visible { background: var(--surface-3); color: var(--white); outline: none; }
.profile-menu svg { width: 18px; height: 18px; color: var(--green); }

.profile-logout { margin-top: 6px; border-top: 1px solid var(--line) !important; border-radius: 0 0 8px 8px !important; }
.profile-logout svg { color: #ff6b6b !important; }

/* Item "Painel admin" no menu do perfil */
.profile-menu a.menu-admin { color: #ffd166; }
.profile-menu a.menu-admin svg { color: #ffd166; }

/* Desafios X1 esperando resposta: contador no menu e ponto no avatar */
.menu-count {
  margin-left: auto;
  min-width: 20px;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--green);
  color: var(--black);
  font-size: .7rem;
  font-weight: 700;
  text-align: center;
}
.profile.has-x1 .profile-btn,
.topbar.has-x1 .nav-toggle { position: relative; }
.profile.has-x1 .profile-btn .avatar { position: relative; }
.topbar.has-x1 .nav-toggle::after,
.profile.has-x1 .profile-btn .avatar::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 2px var(--black), 0 0 10px var(--green);
}

/* ---------- Faixas diagonais de luz (elemento gráfico do kit) ---------- */
.hero-streaks i,
.cta-streaks i {
  position: absolute;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--green), transparent);
  box-shadow: 0 0 18px var(--green);
  transform: rotate(-28deg);
  opacity: .55;
  pointer-events: none;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: calc(var(--header-h) + 40px) 0 80px;
  overflow: hidden;
  isolation: isolate;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(60% 70% at 78% 45%, rgba(57, 255, 20, .14), transparent 70%),
    linear-gradient(180deg, rgba(11, 15, 13, .3), var(--black) 96%),
    url("../img/background.webp") center / cover no-repeat;
}

.hero-streaks { position: absolute; inset: 0; z-index: -1; }
.hero-streaks i:nth-child(1) { width: 60vw; top: 22%; right: -12%; animation: streak 7s var(--ease) infinite; }
.hero-streaks i:nth-child(2) { width: 40vw; top: 70%; right: 20%; opacity: .3; animation: streak 9s var(--ease) 1.5s infinite; }
.hero-streaks i:nth-child(3) { width: 30vw; top: 40%; left: -8%; opacity: .25; animation: streak 8s var(--ease) 3s infinite; }

@keyframes streak {
  0%, 100% { translate: -40px 0; opacity: 0; }
  30%, 70% { opacity: .55; }
  50% { translate: 40px 0; }
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  align-items: center;
  gap: 48px;
}

.hero-copy { display: flex; flex-direction: column; gap: 24px; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.hero-stats { list-style: none; display: flex; gap: 40px; margin-top: 12px; padding-top: 24px; border-top: 1px solid var(--line); }
.hero-stats strong { display: block; font-family: var(--font-title); font-weight: 800; font-size: 1.9rem; line-height: 1; }
.hero-stats span { font-size: .8rem; color: var(--text-3); text-transform: uppercase; letter-spacing: .12em; }

.hero-visual { position: relative; }

.hero-photo {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-lg);
  overflow: hidden;
  clip-path: polygon(14% 0, 100% 0, 100% 86%, 86% 100%, 0 100%, 0 14%);
  background: #bfbfbf;
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50.5% 50%; transform: scale(1.35); transform-origin: 50.5% 0%; }
.hero-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(200deg, transparent 50%, rgba(57, 255, 20, .28) 50.2%, transparent 58%),
    linear-gradient(180deg, transparent 55%, rgba(11, 15, 13, .9));
}

.float-card {
  position: absolute;
  background: rgba(17, 22, 19, .85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--line-green);
  border-radius: var(--radius);
  box-shadow: 0 20px 40px rgba(0, 0, 0, .45);
  animation: float 6s ease-in-out infinite;
}

.float-match { left: -36px; bottom: 56px; padding: 16px 18px; display: grid; gap: 10px; }
.float-label { font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; color: var(--text-3); }
.float-teams { display: flex; align-items: center; gap: 12px; font-family: var(--font-title); }
.float-teams b { color: var(--green); font-size: .9rem; }
.float-meta { display: flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--text-2); }
.float-meta svg { color: var(--green); }

.float-rank {
  right: -20px; top: 40px;
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px;
  font-family: var(--font-title); font-weight: 800; font-size: .72rem; text-transform: uppercase; line-height: 1.15; letter-spacing: .06em;
  animation-delay: -3s;
}
.rank-hash { font-size: 2rem; color: var(--green); text-shadow: var(--glow); }

@keyframes float { 50% { translate: 0 -10px; } }

.crest-mini {
  color: var(--ink, var(--black));
  display: grid; place-items: center;
  width: 36px; height: 40px;
  font-size: .7rem; font-weight: 800; color: var(--black);
  background: var(--c);
  clip-path: polygon(50% 0, 100% 14%, 100% 60%, 50% 100%, 0 60%, 0 14%);
}

/* ---------- Ticker ---------- */
.ticker {
  overflow: hidden;
  background: var(--green);
  color: var(--black);
  padding: 14px 0;
  transform: skewY(-1.5deg);
  margin: -10px 0;
  position: relative;
  z-index: 2;
}
.ticker-track { display: flex; align-items: center; gap: 28px; width: max-content; animation: ticker 30s linear infinite; }
.ticker-track span { font-family: var(--font-title); font-weight: 800; font-size: 1.05rem; text-transform: uppercase; letter-spacing: .08em; white-space: nowrap; }
.ticker-track svg { width: 18px; height: 18px; }

@keyframes ticker { to { transform: translateX(-50%); } }

/* ---------- Seções ---------- */
.section { padding: clamp(80px, 10vw, 128px) 0; position: relative; }
.section-alt { background: var(--surface-1); }

.section-head { display: grid; gap: 12px; margin-bottom: 48px; }
.section-head-row { grid-template-columns: 1fr auto; align-items: end; gap: 24px; }

/* Passos */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.step {
  position: relative;
  padding: 36px 30px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color .25s, transform .25s var(--ease);
}
.step::before {
  content: "";
  position: absolute; inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--green), transparent);
  transform: scaleX(0); transform-origin: left;
  transition: transform .4s var(--ease);
}
.step:hover { border-color: var(--line-green); transform: translateY(-4px); }
.step:hover::before { transform: scaleX(1); }
.step-num { position: absolute; top: 20px; right: 24px; font-family: var(--font-title); font-weight: 900; font-size: 3.4rem; line-height: 1; color: rgba(255, 255, 255, .05); }
.step-icon { width: 40px; height: 40px; color: var(--green); margin-bottom: 24px; stroke-width: 1.6; }
.step h3 { font-size: 1.2rem; margin-bottom: 10px; }
.step p { color: var(--text-2); font-size: .95rem; }

/* Busca */
.search {
  display: flex; align-items: center; gap: 10px;
  min-width: 320px;
  height: 48px;
  padding: 0 16px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  transition: border-color .2s;
}
.search:focus-within { border-color: var(--green); }
.search svg { color: var(--text-3); }
.search input { flex: 1; background: none; border: 0; outline: 0; font-size: .92rem; }
.search input::placeholder { color: var(--text-3); }

/* Cards de time */
.team-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

.team-card {
  position: relative;
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px;
  padding: 32px 20px 22px;
  background: linear-gradient(180deg, var(--surface-3), var(--surface-2));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  transition: border-color .25s, transform .25s var(--ease), box-shadow .25s;
}
.team-card:hover { border-color: var(--green); transform: translateY(-6px); box-shadow: 0 0 0 1px var(--green), 0 18px 40px rgba(57, 255, 20, .12); }

.stretched::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.team-card .btn { pointer-events: none; }
.team-card:hover .btn { border-color: var(--green); color: var(--green); }

.team-crest svg { width: 100%; height: 100%; }
.team-crest { width: 76px; height: 86px; margin-bottom: 12px; filter: drop-shadow(0 8px 18px rgba(0, 0, 0, .5)); }
.team-name { font-family: var(--font-title); font-weight: 800; text-transform: uppercase; font-size: 1rem; }
.team-city { display: flex; align-items: center; gap: 4px; font-size: .82rem; color: var(--text-3); }
.team-city svg { width: 14px; height: 14px; }

.team-record { display: flex; gap: 16px; margin: 14px 0 18px; font-size: .78rem; color: var(--text-2); }
.team-record b { display: block; font-family: var(--font-title); font-size: 1.1rem; color: var(--white); }

.team-level {
  position: absolute; top: 14px; right: 14px;
  padding: 3px 8px;
  font-size: .65rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--green);
  border: 1px solid var(--line-green);
  border-radius: 4px;
}

.team-card .btn { width: 100%; }

.empty { grid-column: 1 / -1; text-align: center; color: var(--text-3); padding: 40px 0; }
.empty.is-loading { animation: pulse 1.2s ease-in-out infinite; }
.empty.is-error { color: #ff8a8a; }
@keyframes pulse { 50% { opacity: .45; } }

/* Abas */
.tabs { display: flex; gap: 4px; padding: 4px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; }
.tab { padding: 10px 16px; border-radius: 7px; font-size: .82rem; font-weight: 600; color: var(--text-2); transition: background .2s, color .2s; }
.tab:hover { color: var(--white); }
.tab.is-active { background: var(--green); color: var(--black); }

/* Agenda */
.match-list { display: grid; gap: 12px; }

.match {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 18px 24px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--gray);
  border-radius: var(--radius);
  transition: border-color .2s, background .2s;
}
.match:hover { background: var(--surface-3); }
.match.is-open { border-left-color: var(--green); }

.match-date { display: grid; line-height: 1.2; }
.match-date b { font-family: var(--font-title); font-weight: 800; font-size: 1.3rem; text-transform: uppercase; }
.match-date span { font-size: .8rem; color: var(--text-3); }

.match-versus { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; }
.match-team { display: flex; align-items: center; gap: 12px; font-family: var(--font-title); font-weight: 800; font-size: .95rem; text-transform: uppercase; }
.match-team:last-child { flex-direction: row-reverse; text-align: right; }
.match-team svg { width: 34px; height: 38px; }
.match-vs { font-family: var(--font-title); font-weight: 900; color: var(--green); font-size: .9rem; white-space: nowrap; }
.match.is-finished .match-vs { color: var(--white); font-size: 1.3rem; }
.match-vs i { font-style: normal; color: var(--text-3); margin: 0 4px; }
a.match-team,
a.match-place { transition: color .2s; }
a.match-team:hover,
a.match-place:hover { color: var(--green); }

.result {
  display: grid; place-items: center;
  width: 36px; height: 36px;
  border-radius: 8px;
  font-family: var(--font-title); font-weight: 900; font-size: .9rem;
}
.result-win { background: var(--green); color: var(--black); }
.result-draw { background: var(--surface-3); color: var(--text-2); border: 1px solid var(--line); }
.result-loss { background: rgba(255, 77, 77, .15); color: #ff6b6b; border: 1px solid rgba(255, 77, 77, .35); }
.match-place { grid-column: 1 / -1; display: flex; justify-content: center; align-items: center; gap: 6px; font-size: .8rem; color: var(--text-3); }
.match-place svg { color: var(--green); width: 14px; height: 14px; }

.badge { font-size: .68rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); }

/* Arenas */
.section-head .lead { margin-top: 4px; }

.arena-tabs { width: max-content; margin: -16px 0 32px; }

.arena-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

.arena-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  transition: border-color .25s, transform .25s var(--ease), box-shadow .25s;
}
.arena-card:hover { border-color: var(--green); transform: translateY(-6px); box-shadow: 0 18px 40px rgba(57, 255, 20, .12); }

.arena-media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  color: rgba(57, 255, 20, .55);
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .025) 0 32px, transparent 32px 64px),
    linear-gradient(160deg, #183A1C, #0E1A10 70%);
}
/* Faixa de luz diagonal sobre a mídia */
.arena-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(115deg, transparent 45%, rgba(57, 255, 20, .22) 50%, transparent 56%),
    linear-gradient(180deg, transparent 55%, rgba(11, 15, 13, .75));
  pointer-events: none;
}
.arena-media img,
.arena-pitch { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.arena-card:hover .arena-media img,
.arena-card:hover .arena-pitch { transform: scale(1.06); }

.arena-type {
  position: absolute; top: 14px; left: 14px; z-index: 1;
  padding: 4px 10px;
  font-family: var(--font-title); font-weight: 800; font-size: .66rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--black);
  background: var(--green);
  border-radius: 4px;
}

.arena-rating {
  position: absolute; right: 14px; bottom: 12px; z-index: 1;
  display: flex; align-items: center; gap: 5px;
  font-weight: 600; font-size: .85rem;
  color: var(--white);
}
.arena-rating svg { width: 15px; height: 15px; color: var(--green); }
.arena-rating small { color: var(--text-2); font-weight: 400; }

.arena-body { flex: 1; display: flex; flex-direction: column; gap: 10px; padding: 20px 22px 22px; }
.arena-name { font-size: 1.1rem; }
.arena-location { display: flex; align-items: center; gap: 6px; font-size: .85rem; color: var(--text-3); }
.arena-location svg { width: 14px; height: 14px; color: var(--green); }

.arena-info { list-style: none; display: flex; gap: 18px; font-size: .84rem; color: var(--text-2); }
.arena-info li { display: flex; align-items: center; gap: 6px; }
.arena-info svg { width: 15px; height: 15px; color: var(--green); }

.arena-tags { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.arena-tags li {
  padding: 3px 9px;
  font-size: .72rem;
  color: var(--text-2);
  background: var(--surface-3);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.arena-footer {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.arena-price { display: flex; align-items: baseline; gap: 4px; flex-wrap: wrap; font-size: .75rem; color: var(--text-3); }
.arena-price span:first-child { flex-basis: 100%; }
.arena-price strong { font-family: var(--font-title); font-weight: 800; font-size: 1.35rem; color: var(--white); line-height: 1.1; }

/* Chamada para donos de arena */
.arena-owner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  margin-top: 40px;
  padding: 28px 32px;
  background:
    linear-gradient(115deg, rgba(57, 255, 20, .12), transparent 55%),
    var(--surface-2);
  border: 1px solid var(--line-green);
  border-radius: var(--radius-lg);
}
.arena-owner-icon { width: 44px; height: 44px; color: var(--green); stroke-width: 1.6; }
.arena-owner h3 { font-size: 1.2rem; margin-bottom: 4px; }
.arena-owner p { color: var(--text-2); font-size: .92rem; max-width: 60ch; }

/* Ranking */
.ranking-grid { display: grid; grid-template-columns: 1.3fr .9fr; gap: 40px; align-items: start; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface-2); }
.rank-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.rank-table th { padding: 14px 18px; text-align: left; font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); font-weight: 600; border-bottom: 1px solid var(--line); }
.rank-table td { padding: 14px 18px; border-bottom: 1px solid var(--line); }
.rank-table tbody tr:last-child td { border-bottom: 0; }
.rank-table tbody tr { transition: background .2s; }
.rank-table tbody tr:hover { background: var(--surface-3); }
.rank-table th:nth-child(n+3),
.rank-table td:nth-child(n+3) { text-align: center; }
.rank-pos { font-family: var(--font-title); font-weight: 800; color: var(--text-3); }
.rank-table tr:first-child .rank-pos { color: var(--green); }
.rank-team { display: flex; align-items: center; gap: 12px; font-weight: 600; transition: color .2s; }
a.rank-team:hover { color: var(--green); }
.rank-team svg { width: 26px; height: 30px; }
.rank-pts { font-family: var(--font-title); font-weight: 800; color: var(--white); }
.rank-table tr:first-child { background: linear-gradient(90deg, rgba(57, 255, 20, .1), transparent 60%); }

/* Jogadores: carrossel com todos os perfis */
.player-carousel { position: relative; }
.player-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 232px;
  gap: 16px;
  padding: 6px 4px 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 4px;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 24px), transparent);
          mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 24px), transparent);
}
.player-track::-webkit-scrollbar { display: none; }
.player-track:focus-visible { outline: 2px solid var(--line-green); outline-offset: 4px; border-radius: var(--radius-lg); }
.player-track > .player-tile { scroll-snap-align: start; }
.player-track > .empty { grid-column: 1 / -1; width: 100%; }
.carousel-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  color: var(--black);
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .5), 0 0 18px rgba(57, 255, 20, .35);
  transform: translateY(-50%);
  transition: transform .2s var(--ease), box-shadow .2s;
}
.carousel-arrow svg { width: 20px; height: 20px; stroke-width: 2.5; }
.carousel-arrow:hover { transform: translateY(-50%) scale(1.08); }
.carousel-arrow.is-prev { left: -18px; }
.carousel-arrow.is-next { right: -18px; }
.player-tile.is-pro { border-color: var(--line-green); background: radial-gradient(90% 55% at 50% 0%, rgba(57, 255, 20, .18), transparent 70%), linear-gradient(180deg, var(--surface-3), var(--surface-2)); }
.player-tile.is-pro .player-tile-avatar { box-shadow: 0 0 0 3px var(--black), 0 0 0 4px #b8ff4d, 0 0 20px rgba(57, 255, 20, .5); }
.player-tile .player-tile-pro { position: absolute; top: 12px; left: 12px; }
.player-tile {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 8px;
  padding: 26px 16px 18px;
  text-align: center;
  background:
    radial-gradient(90% 55% at 50% 0%, rgba(57, 255, 20, .1), transparent 70%),
    linear-gradient(180deg, var(--surface-3), var(--surface-2));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  transition: border-color .25s, transform .25s var(--ease), box-shadow .25s;
}
.player-tile:hover { border-color: var(--green); transform: translateY(-4px); box-shadow: 0 18px 40px rgba(57, 255, 20, .1); }
.avatar.player-tile-avatar { width: 84px; height: 84px; margin-bottom: 6px; font-size: 1.5rem; }
.player-tile-name { font-family: var(--font-title); font-weight: 800; font-size: 1rem; text-transform: uppercase; line-height: 1.15; }
.player-tile-pos {
  padding: 3px 10px;
  font-family: var(--font-title);
  font-weight: 800;
  font-size: .64rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--green);
  border: 1px solid var(--line-green);
  border-radius: 4px;
}
.player-tile-meta { font-size: .8rem; color: var(--text-3); }
.player-tile-x1 {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  padding: 7px 12px;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--green);
  border: 1px solid var(--line-green);
  border-radius: 999px;
  transition: background .2s, color .2s;
}
.player-tile-x1 svg { width: 14px; height: 14px; }
.player-tile-x1:hover { background: var(--green); color: var(--black); }
.player-tile-x1.is-self { color: var(--text-3); border-color: var(--line); }
.player-tile-invite { border-style: dashed; align-content: center; }
.player-tile-plus { display: grid; place-items: center; width: 84px; height: 84px; margin-bottom: 6px; border-radius: 50%; border: 1px dashed var(--line-green); color: var(--green); }
.player-tile-plus svg { width: 32px; height: 32px; }
.player-tile-invite b { font-family: var(--font-title); font-weight: 800; text-transform: uppercase; }
.player-tile-invite .btn { margin-top: 6px; }

/* ---------- CTA ---------- */
.cta {
  position: relative;
  padding: clamp(90px, 12vw, 150px) 0;
  overflow: hidden;
  text-align: center;
  background:
    radial-gradient(50% 80% at 50% 120%, rgba(57, 255, 20, .35), transparent 70%),
    linear-gradient(180deg, var(--black), #0E1A10);
  isolation: isolate;
}
.cta::before {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background: url("../img/background.webp") center / cover;
  opacity: .25;
}
.cta-streaks i:nth-child(1) { width: 70vw; top: 30%; left: -20%; }
.cta-streaks i:nth-child(2) { width: 50vw; bottom: 25%; right: -10%; opacity: .35; }
.cta-inner { display: grid; justify-items: center; gap: 24px; }
.cta .lead { text-align: center; }
.cta .display { max-width: 16ch; }

/* ---------- Footer ---------- */
.footer { background: var(--black); border-top: 1px solid var(--line); padding-top: 64px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; padding-bottom: 48px; }

.footer-logo { display: block; width: 170px; height: auto; aspect-ratio: 1445 / 925; margin-bottom: 16px; }

.footer-brand p { color: var(--text-3); font-size: .9rem; max-width: 34ch; }

.socials { display: flex; gap: 10px; margin-top: 20px; }
.socials a { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 8px; color: var(--text-2); transition: color .2s, border-color .2s; }
.socials a:hover { color: var(--green); border-color: var(--green); }
.socials svg { width: 18px; height: 18px; }

.footer-col { display: grid; align-content: start; gap: 10px; }
.footer-col h4 { font-family: var(--font-title); font-weight: 800; font-size: .8rem; letter-spacing: .16em; text-transform: uppercase; margin-bottom: 6px; }
.footer-col a { color: var(--text-3); font-size: .9rem; transition: color .2s; }
.footer-col a:hover { color: var(--green); }

.footer-bottom { padding: 22px 0; border-top: 1px solid var(--line); font-size: .8rem; color: var(--text-3); }

/* ---------- Animação de entrada ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Responsivo ---------- */
/* ---------- Menu lateral recolhido: só ícones, abre ao passar o mouse ----------
   Fechado ocupa só a faixa dos ícones (--side-w). Aberto (mouse em cima, foco pelo
   teclado ou menu do perfil aberto) cresce por cima da página, sem empurrar nada.
   Os ícones ficam no mesmo lugar nos dois estados, por isso nada "pula". */
@media (min-width: 1024px) {
  :root { --side-w: 76px; --side-open: 252px; }
  .sidebar {
    padding: 20px 14px 14px;
    overflow-x: hidden;
    transition: width .28s var(--ease), box-shadow .28s;
  }
  .sidebar:hover,
  .sidebar:has(:focus-visible),
  .sidebar.is-pinned {
    width: var(--side-open);
    box-shadow: 24px 0 60px rgba(0, 0, 0, .55);
  }

  /* O que só aparece com o menu aberto */
  .side-brand .brand-word,
  .side-nav a span,
  .side-tag,
  .profile-name,
  .profile-chevron,
  .guest-actions .btn span { opacity: 0; white-space: nowrap; transition: opacity .15s; }
  .side-label { white-space: nowrap; color: transparent; transition: color .15s; }
  .sidebar:hover :is(.brand-word, .side-nav a span, .side-tag, .profile-name, .profile-chevron, .guest-actions .btn span),
  .sidebar:has(:focus-visible) :is(.brand-word, .side-nav a span, .side-tag, .profile-name, .profile-chevron, .guest-actions .btn span),
  .sidebar.is-pinned :is(.brand-word, .side-nav a span, .side-tag, .profile-name, .profile-chevron, .guest-actions .btn span) { opacity: 1; transition-delay: .08s; }
  .sidebar:hover .side-label,
  .sidebar:has(:focus-visible) .side-label,
  .sidebar.is-pinned .side-label { color: var(--text-3); }

  /* Ícones alinhados no meio da faixa fechada */
  .side-brand { padding: 0 0 10px; }
  .side-brand .brand-mark { width: 48px; flex-shrink: 0; }
  .side-brand .brand-word { flex-shrink: 0; }
  .side-nav a { padding: 11px 14px; }
  .side-nav a svg { flex-shrink: 0; }
  .side-label { padding: 16px 14px 6px; }
  .guest-actions .btn { justify-content: flex-start; gap: 12px; padding: 0 14px; overflow: hidden; }
  .guest-actions .btn svg { flex-shrink: 0; }
  .profile-btn { padding: 5px; gap: 12px; overflow: hidden; }
  .menu-count { flex-shrink: 0; }
}

/* ---------- Menu lateral vira gaveta (celular e tablet) ---------- */
@media (max-width: 1023px) {
  :root { --side-w: 0px; --header-h: 64px; }
  .topbar {
    position: fixed;
    inset: 0 0 auto;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-h);
    padding: 0 20px;
    background: rgba(11, 15, 13, .88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
  }
  .topbar .brand-mark { width: 62px; }
  .topbar .brand-word { width: 96px; }
  .nav-toggle { display: flex; }

  .sidebar {
    width: min(300px, 86vw);
    transform: translateX(-100%);
    transition: transform .35s var(--ease);
    box-shadow: 24px 0 60px rgba(0, 0, 0, .6);
  }
  .sidebar.is-open { transform: none; }
  .side-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 65;
    background: rgba(0, 0, 0, .6);
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s;
  }
  .side-backdrop.is-open { opacity: 1; pointer-events: auto; }
  .side-locked { overflow: hidden; }
}

@media (max-width: 1080px) {
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .arena-grid { grid-template-columns: repeat(2, 1fr); }
  .ranking-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { max-width: 440px; margin: 20px auto 0; width: 100%; }
  .float-match { left: -8px; }
  .float-rank { right: -8px; }

  .steps { grid-template-columns: 1fr; }
  .section-head-row { grid-template-columns: 1fr; align-items: start; }
  .search { min-width: 0; width: 100%; }

  .arena-owner { grid-template-columns: 1fr; text-align: left; }
  .arena-tabs { width: 100%; }

  .match { grid-template-columns: 1fr; gap: 14px; text-align: center; }
  .match-date { justify-items: center; }
  .match .btn { width: 100%; }
}

@media (max-width: 560px) {
  .team-grid { grid-template-columns: 1fr; }
  .arena-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 24px; }
  .hero-stats strong { font-size: 1.5rem; }
  .hero-actions .btn { flex: 1 1 100%; }
  .match-versus { gap: 10px; }
  .match-team { font-size: .8rem; flex-direction: column; }
  .match-team:last-child { flex-direction: column; text-align: center; }
  .tabs { width: 100%; }
  .tab { flex: 1; padding: 10px 8px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }

  /* Carrossel de perfis: cards menores, desliza com o dedo */
  .player-track { grid-auto-columns: 168px; gap: 12px; }
  .carousel-arrow { display: none; }
  .player-tile { padding: 20px 10px 14px; gap: 6px; }
  .avatar.player-tile-avatar,
  .player-tile-plus { width: 64px; height: 64px; font-size: 1.1rem; }
  .player-tile-name { font-size: .82rem; }
  .player-tile-meta { font-size: .72rem; }
  .player-tile-x1 { padding: 6px 10px; font-size: .62rem; }

  /* Times em 2 colunas, com card mais compacto */
  .team-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .team-card { padding: 34px 10px 14px; gap: 4px; }
  .team-crest { width: 52px; height: 59px; margin-bottom: 6px; }
  .team-name { font-size: .82rem; line-height: 1.2; }
  .team-city { font-size: .72rem; }
  .team-record { gap: 12px; margin: 8px 0 12px; font-size: .68rem; }
  .team-record b { font-size: .95rem; }
  .team-level { top: 10px; right: 10px; font-size: .58rem; }
  .team-card .btn { padding: 10px 8px; font-size: .7rem; }

  /* Ranking cabe na tela sem arrastar para o lado */
  .rank-table { font-size: .85rem; }
  .rank-table th,
  .rank-table td { padding: 12px 8px; }
  .rank-table th:first-child,
  .rank-table td:first-child { padding-left: 14px; }
  .rank-table th:last-child,
  .rank-table td:last-child { padding-right: 14px; }
  .rank-team { gap: 8px; }
  .rank-team svg { width: 20px; height: 23px; }

  /* Preço e botão do card de arena: o botão não quebra a linha */
  .arena-footer .btn { white-space: nowrap; padding-inline: 14px; }
}

/* Celulares pequenos (iPhone SE, iPhone 7/8) */
@media (max-width: 400px) {
  .topbar .brand { gap: 8px; }
  .topbar .brand-mark { width: 56px; }
  .topbar .brand-word { width: 88px; }

  /* Botões com texto longo quebram a linha em vez de vazar da tela */
  .btn { white-space: normal; text-align: center; }
  .arena-owner .btn { width: 100%; }
}
