/* Fondo + altura correcta en móviles */
body {
  background: linear-gradient(135deg, #001f3f, #004b8d, #0074d9);
  min-height: 100svh; /* 100svh = corrige el bug de altura en Android */
  padding-top: 40px;
  color: white;
  font-family: "Segoe UI", sans-serif;

  display: flex;
  flex-direction: column;
}

/* Para asegurar tamaño correcto del viewport */
html,
body {
  margin: 0;
  padding: 0;
}

/* Título y subtítulo */
h1,
h3 {
  text-align: center;
  font-weight: 900;
  margin-bottom: 20px;
  letter-spacing: 1px;
}

/* Contenedor de la tabla */
.table-wrapper {
  max-width: 1100px;
  margin: auto;
}

/* Tabla */
table {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  overflow: hidden;
}

th,
td {
  text-align: center !important;
  vertical-align: middle;
  color: white;
}

/* Columnas ordenables */
th.sortable {
  cursor: pointer;
  background: rgba(0, 0, 0, 0.35);
  transition: 0.2s;
}

th.sortable:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* Hover filas */
tbody tr:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* Logos */
.logo {
  width: 38px;
  height: 38px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

/* Resaltado */
.highlight {
  background: rgba(255, 255, 255, 0.07) !important;
}

/* Para empujar el footer abajo */
main {
  flex: 1;
}

/* Footer */
footer {
  text-align: center;
  padding: 15px;
  background-color: #0d1b2a;
  color: white;
}

.dos-tablas {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 5px;
}

.tabla-bloque {
  flex: 1;
}

#chart-ranking {
  width: 100%;
  height: 600px; /* ajusta a lo que quieras */
  max-width: 1100px;
  margin: auto;
  padding: 20px;
  background-color: #2a2a2a; /* fondo negro */
  border-radius: 12px;
}

@media (max-width: 600px) {
  #chart-ranking {
    height: 500px; /* menos alto en celulares */
  }
}

.chart-container {
  width: 100%;
  height: 600px;
}

.historial-buttons {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
}

.historial-buttons button {
  padding: 10px 20px;
  border: none;
  border-radius: 12px;
  background: #2a2a2a;
  color: #e0e0e0;
  font-weight: 600;
  cursor: pointer;
  transition: 0.25s ease;
}

.historial-buttons button.active {
  background: linear-gradient(45deg, #007bff, #00d4ff);
  color: white;
  box-shadow: 0 0 12px #00aaff66;
}

.historial-buttons button:hover:not(.active) {
  background: #3b3b3b;
}
