/* ======================================================
   RESET / SEGURANÇA
====================================================== */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

img {
  max-width: 0.1%;
  height: auto;
  display: block;
}

/* ======================================================
   ÁREA PRINCIPAL CENTRALIZADA
====================================================== */

.app-main {
  width: 100%;
  max-width: 1400px; /* aumenta limite */
  margin: 0 auto;
  padding: 2rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

/* ======================================================
   HEADER
====================================================== */

.section-header {
  text-align: center;
}

.section-header h2 {
  font-size: 1.8rem;
  color: var(--highlight-color);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ======================================================
   LOGO
====================================================== */

.brand {
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-logo {
  width: 110px;
}

/* ======================================================
   WRAPPER DA TABELA
====================================================== */

.table-wrapper {
  width: 100%;
  background: rgba(20, 20, 20, 0.75);
  backdrop-filter: blur(12px);
  border-radius: 14px;
  box-shadow:
    0 20px 40px rgba(0,0,0,0.6),
    inset 0 0 0 1px rgba(255,255,255,0.05);
  overflow: hidden;
}

/* ======================================================
   TABELA BASE
====================================================== */

table {
  width: 100%;
  border-collapse: collapse;
  table-layout: auto; /* IMPORTANTE */
}

thead {
  background: linear-gradient(
    135deg,
    rgba(214,40,40,0.95),
    rgba(140,20,20,0.95)
  );
}

th,
td {
  padding: 0.45rem 0.3rem; /* 🔥 estreita colunas */
  font-size: 0.75rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  text-align: center;
}

th {
  font-size: 0.65rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #fff;
}

/* ======================================================
   COLUNA POSIÇÃO (#)
====================================================== */

th:nth-child(1),
td:nth-child(1) {
  width: 5%;
}

/* ======================================================
   COLUNA NOME (PRIORIDADE TOTAL)
====================================================== */

th:nth-child(2),
td:nth-child(2) {
  text-align: left;
  width: 45%;
  padding-left: 0.6rem;
  white-space: normal;
  word-break: break-word;
}

/* ======================================================
   COLUNAS NUMÉRICAS
====================================================== */

th:nth-child(n+3),
td:nth-child(n+3) {
  width: auto;
  white-space: nowrap;
}

/* ======================================================
   HOVER E LÍDER
====================================================== */

tbody tr {
  transition: background 0.2s ease;
}

tbody tr:hover {
  background: rgba(214, 40, 40, 0.12);
}

tbody tr:first-child {
  background: rgba(214, 40, 40, 0.18);
  font-weight: 700;
}

/* ======================================================
   LINK NOME
====================================================== */

.table-wrapper td a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}

.table-wrapper td a:hover {
  text-decoration: underline;
  opacity: 0.9;
}

/* ======================================================
   CARDS
====================================================== */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.player-card {
  background: linear-gradient(
    145deg,
    rgba(214,40,40,0.95),
    rgba(120,20,20,0.95)
  );
  border-radius: 18px;
  padding: 1.5rem;
  position: relative;
  box-shadow:
    0 10px 30px rgba(0,0,0,0.45),
    inset 0 0 0 1px rgba(255,255,255,0.08);
  transition: transform 0.3s ease;
}

.player-card:hover {
  transform: translateY(-5px);
}

.player-rank {
  position: absolute;
  top: 1rem;
  right: 1.2rem;
  font-size: 1.4rem;
  font-weight: 900;
  opacity: 0.35;
}

.player-name {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 0.4rem;
}

.player-points {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--highlight-color);
}

/* ======================================================
   MOBILE AJUSTES
====================================================== */

@media (max-width: 480px) {

  .app-main {
    padding: 1.2rem 0.6rem;
  }

  th,
  td {
    font-size: 0.68rem;
    padding: 0.3rem 0.2rem;
  }

  /* 🔴 Remove EMPATE (6ª coluna real) */
  th:nth-child(6),
  td:nth-child(6) {
    display: none;
  }

  /* 🔴 Remove INFRAÇÕES (7ª coluna real) */
  th:nth-child(7),
  td:nth-child(7) {
    display: none;
  }

  /* Nome ganha mais espaço */
  th:nth-child(2),
  td:nth-child(2) {
    width: 55%;
  }

  .brand-logo {
    width: 130px;
  }
}
