/* ranking.css */

/* Mescla básica com style.css, apenas complementos aqui */

.ranking-section {
  max-width: 900px;
  margin: 2rem auto 4rem;
  padding: 0 1rem;
}

.ranking-section h1 {
  color: #264653;
  font-weight: 700;
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.ranking-section p {
  color: #555;
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
}

/* Estilo da tabela */
table {
  width: 100%;
  border-collapse: collapse;
  box-shadow: 0 0 15px rgba(0,0,0,0.1);
  background: white;
  border-radius: 8px;
  overflow: hidden;
}

thead tr {
  background-color: #2a9d8f;
  color: white;
  text-align: left;
  font-weight: 600;
}

thead th, tbody td {
  padding: 12px 15px;
  border-bottom: 1px solid #ddd;
}

tbody tr:hover {
  background-color: #f1f6f5;
  cursor: default;
}

/* Destaque para 3 primeiros colocados */
tbody tr:nth-child(1) {
  background-color: #ffe599;
  font-weight: 700;
}

tbody tr:nth-child(2) {
  background-color: #d9ead3;
  font-weight: 700;
}

tbody tr:nth-child(3) {
  background-color: #cfe2f3;
  font-weight: 700;
}

/* Responsividade */
@media (max-width: 600px) {
  table, thead, tbody, th, td, tr {
    display: block;
  }

  thead tr {
    display: none;
  }

  tbody tr {
    margin-bottom: 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 1rem;
  }

  tbody td {
    padding: 8px 0;
    border: none;
    position: relative;
    padding-left: 50%;
    text-align: left;
  }

  tbody td::before {
    position: absolute;
    top: 8px;
    left: 15px;
    width: 45%;
    white-space: nowrap;
    font-weight: 600;
    color: #264653;
  }

  tbody td:nth-of-type(1)::before { content: "Posição"; }
  tbody td:nth-of-type(2)::before { content: "Nome"; }
  tbody td:nth-of-type(3)::before { content: "Pontuação"; }
  tbody td:nth-of-type(4)::before { content: "Nível"; }
}
