:root {
  --bg: #07110d;
  --surface: #0d1b15;
  --surface2: #13241c;
  --line: #24372e;
  --text: #f4f7f5;
  --muted: #9cafa3;
  --lime: #b9f33d;
  --cyan: #36dcc0;
  --danger: #ff5c6c;
  --radius: 20px;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, sans-serif;
  line-height: 1.5;
}
body:before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 85% 5%, #1b4b3744, transparent 35%),
    linear-gradient(135deg, #07110d 50%, #0b1812);
  z-index: -1;
}
.topbar {
  height: 72px;
  display: flex;
  align-items: center;
  padding: 0 max(20px, calc((100% - 1200px) / 2));
  position: sticky;
  top: 0;
  z-index: 20;
  background: #07110ded;
  backdrop-filter: blur(14px);
  border-bottom: 1px solid #ffffff12;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  font: 800 20px "Barlow Condensed";
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: #07110d;
  background: var(--lime);
  clip-path: polygon(50% 0, 94% 25%, 84% 80%, 50% 100%, 16% 80%, 6% 25%);
}
nav {
  display: flex;
  gap: 20px;
  margin-left: auto;
}
nav a {
  color: #b8c8c0;
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
nav a:hover {
  color: var(--lime);
}
nav a.active {
  color: var(--lime);
}
.menu-button {
  display: none;
  margin-left: auto;
  background: none;
  border: 0;
  color: white;
  font-size: 24px;
}
main {
  max-width: 1200px;
  margin: auto;
  padding: 0 20px 80px;
}
section {
  scroll-margin-top: 85px;
  margin: 64px 0;
}
.hero {
  min-height: 480px;
  display: grid;
  align-content: center;
  position: relative;
  padding: 80px 0;
}
.home-hero {
  min-height: 300px;
  display: grid;
  align-content: center;
  margin: 24px 0 34px;
}
.home-hero h1 {
  font: 800 clamp(48px, 8vw, 88px) / 0.88 "Barlow Condensed";
  text-transform: uppercase;
  margin: 10px 0;
}
.home-hero p {
  color: #b7c5be;
  margin: 0;
}
.home-dashboard,
.home-highlights,
.home-last,
.home-rules {
  margin: 28px 0;
}
.home-title {
  font: 800 32px "Barlow Condensed";
  text-transform: uppercase;
  margin: 6px 0 12px;
}
.page-heading {
  padding: 64px 0 24px;
}
.page-heading .section-title {
  margin-bottom: 0;
}
.page-content {
  margin-top: 14px;
}
.text-link {
  display: inline-block;
  margin-top: 12px;
  color: var(--lime);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}
.page-actions {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 18px;
}
.btn-public {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 12px;
  background: var(--lime);
  color: #07110d;
  font-weight: 800;
  text-decoration: none;
}
.compact-table table {
  min-width: 0;
}
.compact-table th:nth-child(n + 5),
.compact-table td:nth-child(n + 5) {
  display: none;
}
.home-rules summary {
  cursor: pointer;
  font: 700 22px "Barlow Condensed";
  text-transform: uppercase;
  color: var(--lime);
}
.home-rules details[open] summary {
  margin-bottom: 18px;
}
.eyebrow {
  color: var(--lime);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 12px;
}
.hero h1,
.section-title {
  font: 800 clamp(46px, 9vw, 104px)/0.86 "Barlow Condensed";
  text-transform: uppercase;
  margin: 12px 0;
}
.section-title {
  font-size: clamp(38px, 6vw, 62px);
}
.hero p {
  color: #b7c5be;
  max-width: 600px;
  font-size: 18px;
}
.hero-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 25px;
}
.pill {
  border: 1px solid var(--line);
  background: #ffffff08;
  padding: 10px 15px;
  border-radius: 99px;
}
.champion-hero {
  margin-top: 28px;
  border: 1px solid #b9f33d55;
  background: linear-gradient(110deg, #b9f33d18, transparent);
  padding: 22px;
  border-radius: var(--radius);
}
.champion-hero strong {
  display: block;
  font: 800 32px "Barlow Condensed";
  color: var(--lime);
}
.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
}
.card {
  background: linear-gradient(145deg, #13241ce8, #0d1b15);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: 0 14px 40px #0003;
}
.span-4 {
  grid-column: span 4;
}
.span-6 {
  grid-column: span 6;
}
.span-12 {
  grid-column: span 12;
}
.label {
  color: #91a39a;
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.12em;
}
.metric {
  display: block;
  font: 800 34px "Barlow Condensed";
  margin-top: 5px;
}
.team-card {
  position: relative;
  overflow: hidden;
}
.team-card:after {
  content: "";
  position: absolute;
  right: -30px;
  top: -30px;
  width: 130px;
  height: 130px;
  background: var(--team);
  filter: blur(55px);
  opacity: 0.35;
}
.crest {
  display: grid;
  place-items: center;
  width: 55px;
  height: 62px;
  background: var(--team);
  color: white;
  font: 800 21px "Barlow Condensed";
  clip-path: polygon(50% 0, 95% 20%, 87% 80%, 50% 100%, 13% 80%, 5% 20%);
  text-shadow: 0 1px 3px #0008;
}
.team-head,
.match-teams,
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.roster {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  color: #b6c5bd;
}
.roster li {
  padding: 7px 0;
  border-top: 1px solid #ffffff0c;
}
.match-card {
  padding: 0;
  overflow: hidden;
}
.match-clickable {
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.match-clickable:hover,
.match-clickable:focus-visible {
  transform: translateY(-2px);
  border-color: #b9f33d66;
  outline: none;
}
.open-hint {
  display: block;
  margin-top: 7px;
  color: var(--lime);
  font-size: 11px;
  font-weight: 700;
}
.game-sheet {
  width: min(760px, calc(100% - 24px));
  max-height: min(90vh, 820px);
  padding: 0;
  overflow: hidden;
  border: 1px solid #355044;
  border-radius: 18px;
  background: #f7faf8;
  color: #0b1712;
  box-shadow: 0 30px 90px #000b;
}
.game-sheet::backdrop {
  background: #020806cc;
  backdrop-filter: blur(5px);
}
.sheet-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  background: #21c5cf;
  color: #fff;
  text-transform: uppercase;
}
.sheet-title span {
  display: block;
  font: 800 20px "Barlow Condensed";
}
.sheet-title small {
  display: block;
  font-size: 10px;
  letter-spacing: 0.05em;
}
.sheet-title button {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: #ffffff22;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
}
.sheet-score {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  min-height: 58px;
  padding: 10px;
  border-bottom: 1px solid #d7dfda;
}
.sheet-score strong {
  font: 800 28px "Barlow Condensed";
}
.sheet-score span {
  color: #58665f;
  font-size: 11px;
}
.sheet-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  max-height: calc(90vh - 140px);
  overflow: auto;
}
.sheet-team + .sheet-team {
  border-left: 1px solid #d7dfda;
}
.sheet-team > header {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 70px;
  padding: 10px 16px;
  border-bottom: 1px solid #d7dfda;
}
.sheet-team .crest {
  width: 40px;
  height: 46px;
  flex: 0 0 auto;
  font-size: 14px;
}
.sheet-team > header strong {
  font: 800 17px "Barlow Condensed";
}
.sheet-roster {
  padding: 6px 16px 18px;
}
.sheet-player {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  min-height: 54px;
  padding: 8px 0;
  border-bottom: 1px solid #e0e6e2;
}
.sheet-player b,
.sheet-player small {
  display: block;
}
.sheet-player b {
  font-size: 12px;
  line-height: 1.15;
  text-transform: uppercase;
}
.sheet-player small {
  margin-top: 3px;
  color: #69776f;
  font-size: 9px;
  font-weight: 700;
}
.sheet-player.keeper {
  margin-top: 7px;
  color: #08747a;
}
.goal-badge {
  flex: 0 0 auto;
  color: #07110d;
  font-size: 13px;
  font-weight: 800;
}
.sheet-empty {
  padding: 28px 8px;
  color: #77857d;
  font-size: 12px;
  text-align: center;
}
.match-meta {
  padding: 12px 20px;
  background: #ffffff08;
  display: flex;
  justify-content: space-between;
  color: #9cada4;
  font-size: 12px;
}
.match-teams {
  padding: 24px 18px;
}
.match-side {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}
.match-side.right {
  justify-content: flex-end;
  text-align: right;
}
.match-side .crest {
  width: 42px;
  height: 48px;
  font-size: 15px;
}
.score {
  font: 800 34px "Barlow Condensed";
  white-space: nowrap;
}
.match-detail {
  padding: 0 18px 18px;
  text-align: center;
  color: #9fb0a7;
  font-size: 13px;
}
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}
th,
td {
  padding: 14px 12px;
  text-align: center;
  border-bottom: 1px solid #ffffff0c;
}
th {
  color: #8fa198;
  font-size: 11px;
  text-transform: uppercase;
}
td:nth-child(2),
th:nth-child(2) {
  text-align: left;
}
tbody tr:last-child td {
  border: 0;
}
.pos {
  font-weight: 800;
  color: var(--lime);
}
.tabs {
  display: flex;
  gap: 8px;
  overflow: auto;
  margin-bottom: 16px;
}
.tab {
  border: 1px solid var(--line);
  background: var(--surface);
  color: #b5c5bd;
  padding: 11px 16px;
  border-radius: 99px;
  cursor: pointer;
  white-space: nowrap;
}
.tab.active {
  background: var(--lime);
  color: #0a130f;
  border-color: var(--lime);
  font-weight: 700;
}
.tab-panel {
  display: none;
}
.tab-panel.active {
  display: block;
}
.award {
  text-align: center;
  min-height: 170px;
  display: grid;
  place-content: center;
}
.award .icon {
  font-size: 36px;
}
.award strong {
  font: 800 27px "Barlow Condensed";
}
.award.pending strong {
  color: #84948c;
}
.rules {
  columns: 2;
  column-gap: 40px;
}
.rules li {
  break-inside: avoid;
  margin-bottom: 13px;
  color: #bdc9c3;
}
.empty {
  padding: 45px;
  text-align: center;
  color: #8fa098;
}
.loading {
  min-height: 70vh;
  display: grid;
  place-content: center;
  text-align: center;
  color: #9eb0a7;
}
.spinner {
  width: 38px;
  height: 38px;
  border: 3px solid #ffffff22;
  border-top-color: var(--lime);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: auto;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  padding: 14px 18px;
  border-radius: 12px;
  background: #24372e;
  transform: translateY(100px);
  opacity: 0;
  transition: 0.25s;
  z-index: 50;
}
.toast.show {
  transform: none;
  opacity: 1;
}
.toast.error {
  background: #7d2430;
}
footer {
  border-top: 1px solid var(--line);
  padding: 30px max(20px, calc((100% - 1200px) / 2));
  display: flex;
  justify-content: space-between;
  color: #83968c;
  font-size: 13px;
}
footer a {
  color: #9dafa6;
}
@media (max-width: 800px) {
  .menu-button {
    display: block;
  }
  nav {
    display: none;
    position: absolute;
    top: 71px;
    left: 0;
    right: 0;
    padding: 20px;
    background: #0b1712;
    flex-direction: column;
    border-bottom: 1px solid var(--line);
  }
  nav.open {
    display: flex;
  }
  .hero {
    min-height: 400px;
    padding: 45px 0;
  }
  .home-hero {
    min-height: 230px;
    margin-bottom: 24px;
  }
  .home-dashboard,
  .home-highlights,
  .home-last,
  .home-rules {
    margin: 22px 0;
  }
  .page-heading {
    padding: 42px 0 12px;
  }
  .span-4,
  .span-6 {
    grid-column: span 12;
  }
  .rules {
    columns: 1;
  }
  .match-side {
    flex-direction: column;
  }
  .match-side.right {
    flex-direction: column-reverse;
  }
  .match-side strong {
    font-size: 13px;
  }
  .score {
    font-size: 28px;
  }
  .game-sheet {
    width: calc(100% - 12px);
    max-height: 94vh;
    border-radius: 12px;
  }
  .sheet-columns {
    max-height: calc(94vh - 140px);
  }
  .sheet-team > header {
    min-height: 62px;
    padding: 8px 9px;
  }
  .sheet-team > header strong {
    font-size: 14px;
  }
  .sheet-team .crest {
    width: 32px;
    height: 38px;
    font-size: 11px;
  }
  .sheet-roster {
    padding: 4px 10px 14px;
  }
  .sheet-player {
    min-height: 52px;
  }
  .sheet-player b {
    font-size: 10px;
  }
  section {
    margin: 48px 0;
  }
  .mobile-table table {
    min-width: 0;
  }
  .mobile-table th:nth-child(n + 6),
  .mobile-table td:nth-child(n + 6) {
    display: none;
  }
  .mobile-table th,
  .mobile-table td {
    padding: 12px 6px;
  }

  /* Rankings viram cards no celular: sem tabela larga ou rolagem lateral. */
  body[data-page="estatisticas"] .page-heading {
    padding-bottom: 4px;
  }
  body[data-page="estatisticas"] .page-content {
    margin-top: 8px;
  }
  body[data-page="estatisticas"] .tabs {
    position: sticky;
    top: 72px;
    z-index: 8;
    margin: 0 -20px 16px;
    padding: 10px 20px;
    background: #07110ded;
    backdrop-filter: blur(12px);
  }
  body[data-page="estatisticas"] .tab {
    flex: 1;
    min-height: 44px;
    padding: 10px 12px;
  }
  body[data-page="estatisticas"] .table-wrap {
    overflow: visible;
    border: 0;
    background: transparent;
  }
  body[data-page="estatisticas"] table,
  body[data-page="estatisticas"] tbody {
    display: block;
    min-width: 0;
  }
  body[data-page="estatisticas"] thead {
    display: none;
  }
  body[data-page="estatisticas"] tbody {
    display: grid;
    gap: 10px;
  }
  body[data-page="estatisticas"] tbody tr {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    gap: 4px 12px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: linear-gradient(145deg, #13241ce8, #0d1b15);
  }
  body[data-page="estatisticas"] tbody td {
    display: block;
    padding: 0;
    border: 0;
    text-align: left;
    min-width: 0;
  }
  body[data-page="estatisticas"] tbody td::before {
    display: block;
    color: #81958b;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }
  body[data-page="estatisticas"] tbody td:nth-child(1) {
    grid-row: 1 / span 2;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #b9f33d16;
    color: var(--lime);
    font-weight: 800;
    text-align: center;
  }
  body[data-page="estatisticas"] tbody td:nth-child(2) {
    grid-column: 2;
    font-weight: 800;
    font-size: 15px;
  }
  body[data-page="estatisticas"] tbody td:nth-child(3) {
    grid-column: 2;
    color: #91a39a;
    font-size: 12px;
  }
  body[data-page="estatisticas"] tbody td:nth-child(4) {
    grid-column: 3;
    grid-row: 1;
    color: var(--lime);
    font: 800 22px "Barlow Condensed";
    text-align: right;
  }
  body[data-page="estatisticas"] tbody td:nth-child(5),
  body[data-page="estatisticas"] tbody td:nth-child(6) {
    grid-column: 3;
    color: #a9b9b1;
    font-size: 11px;
    text-align: right;
  }
  body[data-page="estatisticas"] tbody td:only-child {
    grid-column: 1 / -1;
    grid-row: 1;
    display: block;
    width: auto;
    height: auto;
    padding: 12px;
    border-radius: 0;
    background: none;
    color: #91a39a;
    font: 500 13px Inter, sans-serif;
    text-align: center;
  }
  #gols tbody td:nth-child(4)::before { content: "Gols"; }
  #gols tbody td:nth-child(5)::before { content: "Jogos"; }
  #gols tbody td:nth-child(6)::before { content: "Média"; }
  #mvps tbody td:nth-child(4)::before { content: "MVPs"; }

  /* Goleiros não possuem posição; o primeiro campo é o nome. */
  #keepers tbody tr {
    grid-template-columns: minmax(0, 1fr) repeat(3, auto);
    gap: 8px 14px;
  }
  #keepers tbody td:nth-child(1) {
    grid-column: 1;
    grid-row: 1;
    display: block;
    width: auto;
    height: auto;
    border-radius: 0;
    background: none;
    color: var(--text);
    font-size: 15px;
    text-align: left;
  }
  #keepers tbody td:nth-child(2),
  #keepers tbody td:nth-child(3),
  #keepers tbody td:nth-child(4) {
    grid-row: 1;
    grid-column: auto;
    color: var(--text);
    font-size: 13px;
    text-align: right;
  }
  #keepers tbody td:nth-child(2)::before { content: "Jogos"; }
  #keepers tbody td:nth-child(3)::before { content: "Sofridos"; }
  #keepers tbody td:nth-child(4)::before { content: "Média"; }
}
