/* Fondo general y tipografía */
html, body {
  height: auto;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  overflow-y: auto;
}

body {
  font-family: Arial, sans-serif;
  background: linear-gradient(to bottom, black, #B30410);
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  padding-bottom: 60px;
}

/* Logo más grande y centrado */
.logo-academia {
  max-width: 200px;
  margin: 20px auto 10px auto;
  display: block;
}

/* Encabezado */
.header {
  text-align: center;
  margin-bottom: 0.5rem;
}

/* Título */
h1 {
  font-size: 2rem;
  margin: 5px 0 10px 0;
}

/* Selectores */
select {
  padding: 8px;
  font-size: 14px;
  margin: 8px;
  border-radius: 5px;
  background-color: white;
  color: black;
  border: 1px solid #ccc;
}

/* Filtro centrado */
.filter-container {
  text-align: center;
  margin-bottom: 1rem;
  font-weight: bold;
}

/* Botón de carga CSV */
.csv-uploader {
  text-align: center;
  margin-bottom: 1rem;
}

/* Tabla contenedor */
.tabla-wrapper {
  width: 100%;
  max-width: 96%;
  margin: 0 auto 2rem auto;
  border-radius: 10px;
  background: white;
  padding: 1rem;
  box-sizing: border-box;
  overflow: hidden;
}

/* Tabla completa */
#combate-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: white;
  color: black;
  border-radius: 8px;
  table-layout: auto;
}

/* Encabezados */
#combate-table thead {
  background: #eee;
  font-weight: bold;
  color: black;
}

#combate-table thead th {
  padding: 8px 10px;
  white-space: nowrap;
}

#combate-table tbody td {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 6px 10px;
}

/* Celdas */
th, td {
  border: 1px solid #bbb;
  text-align: center;
  color: black;
}

/* Zebra stripes */
tbody tr:nth-child(even) {
  background-color: #f9f9f9;
}

/* Hover para filas */
tbody tr:hover {
  background-color: #ffe9c4;
  cursor: pointer;
}

/* Top 3 resaltados */
.fila-alumno.top1,
tr.top1 {
  background-color: #ffe082 !important;
  font-weight: bold;
}

.fila-alumno.top2,
tr.top2 {
  background-color: #cfd8dc !important;
  font-weight: bold;
}

.fila-alumno.top3,
tr.top3 {
  background-color: #ffccbc !important;
  font-weight: bold;
}

/* Tooltip para notaciones */
.tooltip {
  position: relative;
  cursor: help;
  text-decoration: underline dotted;
}

.tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: 120%;
  transform: translateX(-50%);
  background: #fdfdfd;
  color: black;
  padding: 6px 10px;
  border-radius: 6px;
  white-space: nowrap;
  font-size: 0.85rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  z-index: 10;
}

.tooltip:hover::after {
  opacity: 1;
}
