.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  width: 100%;
}

/* Tabla */
.table {
  border-collapse: collapse;
  width: 100%;
  max-width: 140rem;
  font-size: 1.15rem;
  line-height: 1.4;
}

.table th,
.table td {
  font-size: 1.5rem;
  padding: 0.4rem 0.6rem;
  text-align: left;
  border-bottom: 1px solid #e6e6e6;
}

.table thead th {
  background: #fafafa;
  position: sticky;
  top: 0;
  font-weight: 700;
  font-size: 1.6rem;
}

.table td img {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}
.table td img.table--bandera {
  width: 25px;
  height: 25px;
}
.table td img.table--check {
  width: 25px;
  height: 25px;
}

@media (max-width: 900px) {
  .table td img {
    width: 180px;
    height: 180px;
  }
}
@media (max-width: 480px) {
  .table {
    font-size: 1rem;
    min-width: 900px;
  }
  .table td img {
    width: 140px;
    height: 140px;
  }
}

/* Filtros Ranking */
.filtros-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  align-items: end;
  margin: 2.5rem 0;
}

.filtros-form .campo {
  display: flex;
  flex-direction: column;
}

.filtros-form label {
  font-size: 1.4rem;
  margin-bottom: 4px;
  font-weight: 500;
}

.filtros-form input,
.filtros-form select {
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1.2rem;
  width: 100%;
  box-sizing: border-box;
}

.campo-puntos .puntos-inputs {
  display: flex;
  gap: 0.5rem;
}

.campo-puntos .puntos-inputs input {
  flex: 1;
}

.botones {
  display: flex;
  gap: 0.8rem;
  align-items: center;
  justify-content: flex-end;
  grid-column: 1 / -1; /* ocupa toda la fila */
}

.btn {
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1.4rem;
  transition: background-color 0.2s, color 0.2s;
}

.btn-primario {
  background-color: var(--amarilloTenis);
  color: var(--negro);
  border: none;
}

.btn-primario:hover {
  background-color: var(--amarilloTenisOscuro);
}

.btn-secundario {
  background-color: #fff;
  border: 1px solid #ccc;
  color: #333;
}

.btn-secundario:hover {
  background-color: #f2f2f2;
}

/* --- Ajustes Responsive --- */
@media (max-width: 900px) {
  .filtros-form {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  }
}

@media (max-width: 600px) {
  .filtros-form {
    grid-template-columns: 1fr;
  }

  .botones {
    justify-content: stretch;
  }

  .botones .btn {
    flex: 1;
  }
}

button.btn-filtrado {
  padding: 1.2rem 1.8rem;
}

.div-btnacciones {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 10px;
}

.btnacciones {
  padding: 10px;
  border: none;
  color: var(--blanco);
  font-size: 16px;
  cursor: pointer;
  border-radius: 5px;
}
.btnacciones--bloqueado {
  color: var(--negro);
}
.btnacciones--modificar {
  background-color: #007bff; /* Azul */
}

.btnacciones--eliminar {
  background-color: #dc3545; /* Rojo */
}

.btnacciones:hover {
  opacity: 0.9; /* Efecto al pasar el cursor */
}

/*NO ADMIN*/

.ranking-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2.5rem;
  padding: 2rem;
  justify-items: center;
}

.tenista-card {
  width: 250px;
  background: linear-gradient(
    180deg,
    var(--azulOscuro),
    var(--azulOscuroHover)
  );
  border-radius: 22px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.6);
  text-align: center;
  padding: 2rem 1.2rem;
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 2px solid var(--amarilloTenis);
}

.tenista-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 40px var(--amarilloTenisOscuro);
}

/* === Cabecera con número y bandera === */
.rank-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.8rem;
}

.rank-number {
  background: #d4af37;
  color: #000;
  font-weight: 800;
  font-size: 1.3rem;
  padding: 5px 12px;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.bandera {
  width: 40px;
  height: 26px;
  border-radius: 5px;
  object-fit: cover;
}

/* === Imagen del jugador === */
.foto-wrapper {
  background: radial-gradient(circle at 50% 30%, var(--azul), #111);
  border-radius: 50%;
  padding: 5px;
  margin: 0 auto 15px;
  width: 140px;
  height: 140px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.foto-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

/* === Nombre === */
.nombre {
  color: var(--blanco);
  font-size: 1.7rem;
  font-weight: 700;
  margin: 0.8rem 0 1.2rem;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
}
.tenista-nombre span.nombre {
  color: var(--negro);
}
/* === Estadísticas === */
.stats {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  font-size: 1.05rem;
}

.stats div {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 4px 0;
}

.stats span {
  display: block;
  color: #aaa;
  font-size: 1.05rem;
}

.stats strong {
  color: #fff;
  font-weight: 700;
  font-size: 1.3rem;
}

/* === Responsividad === */
@media (max-width: 1200px) {
  .ranking-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767px) {
  .ranking-grid {
    grid-template-columns: repeat(1, 1fr);
  }

  .tenista-card {
    width: 220px;
    padding: 1.8rem 1rem;
  }

  .foto-wrapper {
    width: 120px;
    height: 120px;
  }

  .nombre {
    font-size: 1.3rem;
  }

  .stats {
    font-size: 1rem;
  }
}
