@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap');
/* RESET Y BÁSICOS */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  background: linear-gradient(to right, #2F4170, #111C4E);
  color: #ffffff;
  font-family: 'Montserrat', Arial, sans-serif;
  overflow-x: hidden;
}
a {
  text-decoration: none;
  color: #FF9E1B;
}

/* HEADER */
header {
  padding: 0;
  background: linear-gradient(to right, #2F4170, #111C4E);
  border-bottom: 1px solid #53565A;
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
}
.header-left {
  display: flex;
  align-items: center;
  gap: 20px;
  flex: 1;
}
.header-left nav {
  flex: 1;
  display: flex;
  justify-content: center;
}
.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}
.logo {
  height: 100px;
}
.main-nav {
  width: 100%;
}
.main-nav ul {
  display: flex;
  gap: 30px;
  align-items: center;
  justify-content: center;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}
.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: normal;
  font-size: 0.9em;
  cursor: pointer;
}
.nav-item a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: #ffffff;
}
/* Iconos no seleccionados a blanco */
.nav-item img {
  width: 36px;
  height: 36px;
  filter: brightness(0) invert(1);
  transition: filter 0.2s ease-in-out;
}
.nav-item:hover img {
  filter: brightness(1.2) invert(1);
}
/* Icono activo en naranja #FF9E1B */
.nav-item.active img {
  filter: brightness(0) saturate(20%) invert(49%) sepia(100%) saturate(1200%) hue-rotate(358deg) brightness(102%) contrast(101%);
}
.nav-item.active span {
  color: #FF9E1B;
}
.icon {
  width: 36px;
  height: 36px;
  filter: brightness(0) invert(1);
}
.icon:hover {
  filter: brightness(1.2) invert(1);
}

/* CONTENEDOR PRINCIPAL */
.container {
  width: 100%;
  margin-top: 10px;
  padding: 0 20px;
}
.section-title {
  font-size: 1.8em;
  text-align: center;
  margin-bottom: 20px;
  color: #fff;
}

/* FILTROS */
.stats-filters {
  display: flex;
  align-items: center;
  gap: 15px;
  justify-content: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

/* Ocultar filtros por defecto */
#statsFilters {
  display: none;
}
#statsFilters.active {
  display: flex;
}

/* Breadcrumb de filtros aplicados */
#filtersBreadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1em;
  color: #FF9E1B;
  flex-wrap: wrap;
}
#filtersBreadcrumb .breadcrumb-item {
  background: #fff3e0;
  color: #FF9E1B;
  border-radius: 4px;
  padding: 2px 8px;
  margin-right: 4px;
  font-weight: 500;
  border: 1px solid #FF9E1B;
}

.stats-filters select,
.stats-filters input {
  padding: 8px 12px;
  font-size: 1em;
  border: 1px solid #D7DAE3;
  border-radius: 4px;
  background-color: #3D4B76;
  color: #D7DAE3;
}
.toggle-container {
  display: flex;
  align-items: center;
  gap: 5px;
}
.switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 20px;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 34px;
}
.slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}
input:checked + .slider {
  background-color: #FF9E1B;
}
input:focus + .slider {
  box-shadow: 0 0 1px #FF9E1B;
}
input:checked + .slider:before {
  transform: translateX(20px);
}
.stats-filters button {
  padding: 8px 16px;
  background-color: #FF9E1B;
  color: #1D296F;
  font-weight: bold;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s ease-in-out;
}
.stats-filters button:hover {
  background-color: #FF7D07;
  color: #fff;
}

/* Estilos para los grupos en los selects */
.stats-filters select optgroup {
  font-weight: bold;
  color: #111C4E;
  background-color: #f5f5f5;
}

.stats-filters select option {
  font-weight: normal;
  color: #111C4E;
  background-color: #fff;
  padding: 5px;
}

/* Custom Select Styles */
.custom-select {
  position: relative;
  min-width: 200px;
  margin: 0 5px;
}

.select-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background-color: #3D4B76;
  border: 1px solid #D7DAE3;
  border-radius: 4px;
  cursor: pointer;
  color: #D7DAE3;
  font-size: 1em;
}

.select-header:hover {
  border-color: #FF9E1B;
}

.arrow {
  font-size: 0.8em;
  transition: transform 0.3s ease;
}

.select-options {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: #fff;
  border: 1px solid #ccc;
  border-radius: 8px;
  margin-top: 5px;
  max-height: 300px;
  overflow-y: auto;
  z-index: 5000;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.select-options.active {
  display: block;
}

.select-search {
  padding: 8px;
  border-bottom: 1px solid #eee;
}

.select-search input {
  width: 100%;
  padding: 6px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.9em;
}

.options-list {
  padding: 5px 0;
}

.option {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.option:hover {
  background-color: #f5f5f5;
}

.option input[type="checkbox"] {
  margin-right: 8px;
  width: 16px !important;
  height: 16px !important;
  min-width: 16px !important;
  min-height: 16px !important;
  cursor: pointer;
  appearance: none !important;
  -webkit-appearance: none !important;
  border: 1px solid #111C4E !important;
  border-radius: 2px;
  position: relative;
  vertical-align: middle;
  padding: 0 !important;
  box-sizing: border-box !important;
  flex-shrink: 0 !important;
}

.option input[type="checkbox"]:checked {
  background-color: #FF9E1B !important;
  border-color: #FF9E1B !important;
}

.option input[type="checkbox"]:checked::after {
  content: '✓';
  position: absolute;
  color: white;
  font-size: 8px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.option input[type="checkbox"]:hover {
  border-color: #FF9E1B;
}

.option span {
  color: #111C4E;
  font-size: 0.9em;
}

/* Selected state */
.option input[type="checkbox"]:checked + span {
  color: #FF9E1B;
  font-weight: 500;
}

/* Scrollbar styles */
.select-options::-webkit-scrollbar {
  width: 8px;
}

.select-options::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.select-options::-webkit-scrollbar-thumb {
  background: #FF9E1B;
  border-radius: 4px;
}

.select-options::-webkit-scrollbar-thumb:hover {
  background: #C8102E;
}

/* Select All Options */
.select-all-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px;
  border-bottom: 1px solid #eee;
  background-color: #f8f8f8;
}

.select-all-btn,
.deselect-all-btn {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background-color: #fff;
  color: #111C4E;
  font-size: 0.85em;
  cursor: pointer;
  transition: all 0.2s ease;
}

.select-all-btn:hover {
  background-color: #FF9E1B;
  color: #fff;
  border-color: #FF9E1B;
}

.deselect-all-btn:hover {
  background-color: #C8102E;
  color: #fff;
  border-color: #C8102E;
}

.option-category {
  padding: 8px 12px;
  font-weight: bold;
  color: #111C4E;
  background-color: #f5f5f5;
  border-bottom: 1px solid #ddd;
  font-size: 0.9em;
  cursor: default;
}

.option-category:first-child {
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
}

.option-category:last-child {
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
}

/* TABLA */
.stats-table-container {
  position: relative;
  margin-bottom: 30px;
  border-radius: 8px;
  max-width: 100%;
  max-height: 80vh;
  overflow: auto;
  background-color: #fff;
}

.stats-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  color: #111C4E;
  background-color: #fff;
}

/* Encabezado - siempre por encima */
.stats-table thead {
  position: sticky;
  top: 0;
  z-index: 200;
  background-color: #f2f2f2;
}

.stats-table thead th {
  background: #fff !important;
  box-shadow: 0 2px 4px -2px #0001;
  padding: 12px 4px;
  padding-left: 12px;
  font-weight: bold;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  border-bottom: 2px solid #ddd;
  position: relative;
  padding-right: 20px !important;
}

.stats-table thead th::after {
  content: attr(title);
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  padding: 5px 10px;
  background-color: #111C4E;
  color: white;
  font-size: 0.8em;
  border-radius: 4px;
  white-space: nowrap;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.2s, visibility 0.2s;
  z-index: 20;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  pointer-events: none;
  min-width: 100px;
  text-align: center;
}

/* Flecha del tooltip */
.stats-table thead th::before {
  content: '↕';
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  color: #999;
  font-size: 12px;
}

.stats-table thead th.sorted-asc::before {
  content: '↑';
  color: #FF9E1B;
}

.stats-table thead th.sorted-desc::before {
  content: '↓';
  color: #FF9E1B;
}

/* Ajuste para tooltips que se salen de la pantalla */
.stats-table thead th:first-child::after,
.stats-table thead th:nth-child(2)::after,
.stats-table thead th:nth-child(3)::after {
  left: 0;
  transform: none;
}

.stats-table thead th:last-child::after,
.stats-table thead th:nth-last-child(2)::after,
.stats-table thead th:nth-last-child(3)::after {
  left: auto;
  right: 0;
  transform: none;
}

/* Celdas del cuerpo */
.stats-table tbody td {
  padding: 8px 4px;
  text-align: center;
  border-bottom: 1px solid #ddd;
  background-color: #fff;
}

/* Alineación de nombres de jugadores */
.stats-table td[data-col="playerName"] {
  text-align: left !important;
  padding-left: 10px !important;
}

/* Estilos para las fotos de los jugadores */
.player-photo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #FF9E1B;
  display: block;
  margin: 0 auto;
}

/* Efecto hover en las filas */
.stats-table tbody tr:hover td {
  background-color: rgba(17, 28, 78, 0.05) !important;
}

/* Efecto hover en las celdas */
.stats-table tbody td:hover {
  background-color: rgba(255, 158, 27, 0.1) !important;
}

/* Mantener el efecto hover en la tabla de detalles */
.match-details-table tbody tr:hover td {
  background-color: rgba(255, 158, 27, 0.05);
}

/* Estilos para nombres de equipos */
.team-name {
  position: relative;
  cursor: pointer;
  text-align: center;
  font-weight: bold;
}

.team-name::after {
  content: attr(data-fullname);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background-color: #111C4E;
  color: white;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 0.8em;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
  z-index: 2;
}

.team-name:hover::after {
  opacity: 1;
  visibility: visible;
}

/* Estilo para la celda de partidos (games-cell) */
.games-cell {
  font-weight: bold;
  cursor: pointer;
  color: #FF9E1B;
}
.games-cell:hover {
  text-decoration: underline;
}

/* Player name cell styling */
.stats-table td.player-name {
  text-align: left !important;
  padding-left: 10px !important;
  vertical-align: middle !important;
  height: 100% !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  text-transform: capitalize !important;
  position: relative !important;
  cursor: pointer !important;
  max-width: 120px !important;
  min-width: 80px !important;
  width: 120px !important;
}

.stats-table td.player-name:hover::after {
  opacity: 1;
  visibility: visible;
}

.player-name {
  font-weight: 600;
  color: #2F4170;
  transition: color 0.2s ease;
  position: relative;
}

.player-name:hover {
  color: #FF9E1B;
  text-decoration: underline;
}

.player-name::after {
  content: '📊';
  font-size: 12px;
  margin-left: 4px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.player-name:hover::after {
  opacity: 1;
}

/* Scroll arrows */
.table-scroll-arrows {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  position: relative;
  z-index: 10;
}
.scroll-arrow {
  background: #FF9E1B;
  color: #1D296F;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 1.7em;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  transition: background 0.2s, color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  outline: none;
}
.scroll-arrow:hover:not(:disabled) {
  background: #FF7D07;
  color: #1D296F;
}
.scroll-arrow:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  box-shadow: none;
}

/* PAGINACIÓN */
.pagination-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin-bottom: 30px;
  margin-top: 30px;
}
.pagination-controls button {
  padding: 8px 16px;
  background-color: #FF9E1B;
  color: #1D296F;
  font-weight: bold;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}
.pagination-controls button:hover {
  background-color: #FF7D07;
  color: #fff;
}
#pageInfo {
  color: #fff;
  font-weight: bold;
}

/* SUBTABLA DE DETALLES */
.details-row td {
  background-color: #f9f9f9;
  color: #111C4E;
  padding: 10px;
}
.match-details-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 5px;
}
.match-details-table th,
.match-details-table td {
  border: 1px solid #ccc;
  padding: 4px 8px;
  font-size: 0.85em;
  text-align: center;
}

/* Estilos para ordenación en la tabla de detalles */
.match-details-table th {
  position: relative;
  cursor: pointer;
  padding-right: 20px !important;
  background-color: #f2f2f2;
}

.match-details-table th::before {
  content: '↕';
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  color: #999;
  font-size: 12px;
}

.match-details-table th.sorted-asc::before {
  content: '↑';
  color: #FF9E1B;
}

.match-details-table th.sorted-desc::before {
  content: '↓';
  color: #FF9E1B;
}

/* Estilos para valores máximos */
.match-details-table td.max-value {
  font-weight: bold;
  color: #FF9E1B;
}

/* FOOTER */
.feb-footer {
  background: linear-gradient(to right, #2F4170, #111C4E);
  color: #fff;
  padding: 40px 0 0 0;
  font-size: 1em;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap;
}
.footer-container {
  width: 100%;
}
.footer-left {
  flex: 1 1 300px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
}
.footer-logo {
  height: 52px;
}
.footer-text {
  line-height: 1.5;
  font-size: 1.1em;
}
.footer-link {
  color: #FF9E1B;
  text-decoration: none;
  font-weight: bold;
}
.footer-link:hover {
  text-decoration: underline;
}
.footer-right {
  flex: 2 1 500px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}
.footer-right h3 {
  color: white;
  margin-bottom: 12px;
  font-size: 1.1em;
  font-weight: bold;
}
.partner-logos {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
  justify-content: center;
}
.partner-logo {
  height: 64px;
  max-width: 140px;
  object-fit: contain;
  background: transparent;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  transition: none;
  filter: brightness(0) invert(1);
}
.footer-bottom {
  background-color: #0D173A;
  text-align: center;
  padding: 14px 20px 10px 20px;
  margin-top: 32px;
  font-size: 0.95em;
}
.footer-bottom a {
  color: #FF9E1B;
  text-decoration: none;
  margin: 0 6px;
}
.footer-bottom a:hover {
  text-decoration: underline;
}

/* LOADER */
.loader-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-color: rgba(17, 28, 78, 0.95);
  z-index: 9999;
}

.loader {
  width: 60px;
  height: 60px;
  border: 5px solid #2F4170;
  border-top: 5px solid #FF9E1B;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 30px;
}

.loader-text {
  color: #fff;
  font-size: 18px;
  font-weight: 500;
  text-align: center;
  margin-bottom: 15px;
}

.progress-bar {
  width: 200px;
  height: 6px;
  background-color: #2F4170;
  border-radius: 3px;
  overflow: hidden;
}

.progress-bar-fill {
  width: 0%;
  height: 100%;
  background-color: #FF9E1B;
  transition: width 0.3s ease;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loader-hidden {
  display: none;
}

/* NAVEGACIÓN INFERIOR MÓVIL */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to right, #2F4170, #111C4E);
  border-top: 1px solid #53565A;
  padding: 0 0 calc(12px + env(safe-area-inset-bottom));
  z-index: 9999 !important;
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  text-decoration: none;
  color: #ffffff;
  padding: 12px 2px;
  min-height: 60px;
  transition: all 0.2s ease;
}

.bottom-nav-item img,
.bottom-nav-item svg {
  width: 32px;
  height: 32px;
  filter: brightness(0) invert(1);
  transition: filter 0.2s ease;
}

.bottom-nav-item span {
  display: none;
}

/* Estado activo */
.bottom-nav-item.active {
  color: #FF9E1B;
  border-top: 3px solid #FF9E1B;
}

.bottom-nav-item.active img,
.bottom-nav-item.active svg {
  filter: brightness(0) saturate(20%) invert(49%) sepia(100%) saturate(1200%) hue-rotate(358deg) brightness(102%) contrast(101%);
}

/* Hover en móviles (para tablets) */
.bottom-nav-item:hover {
  color: #FF9E1B;
  background-color: rgba(255, 158, 27, 0.1);
}

.bottom-nav-item:hover img,
.bottom-nav-item:hover svg {
  filter: brightness(0) saturate(20%) invert(49%) sepia(100%) saturate(1200%) hue-rotate(358deg) brightness(102%) contrast(101%);
}

/* Efecto de tap/click para feedback táctil */
.bottom-nav-item:active {
  transform: scale(0.95);
  background-color: rgba(255, 158, 27, 0.2);
}

/* Animación de entrada desde abajo */
@keyframes slideUpNav {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Clase para mostrar/ocultar columnas en móviles */
.mobile-visible {
  display: none !important;
}

/* Botón para mostrar más columnas en móviles */
.mobile-columns-toggle {
  display: none !important;
}

/* Menú Hamburguesa */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 1000;
}

.menu-toggle span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: #fff;
  margin: 5px 0;
  transition: 0.3s;
}

/* MEDIA QUERIES */
@media screen and (max-width: 1200px) {
  .container {
    padding: 0 15px;
  }
  
  .stats-filters {
    flex-direction: column;
    align-items: stretch;
  }
  
  .stats-filters select,
  .stats-filters input {
    width: 100%;
  }
  
  .toggle-container {
    justify-content: center;
    margin: 10px 0;
  }
}

@media screen and (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  /* Ocultar las flechas de scroll en móviles */
  .table-scroll-arrows {
    display: none;
  }

  .main-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    height: 100vh;
    background-color: #111C4E;
    padding: 80px 20px 20px;
    transition: 0.3s;
    z-index: 999;
    box-shadow: -2px 0 5px rgba(0, 0, 0, 0.2);
  }

  .main-nav.active {
    right: 0;
  }

  .main-nav ul {
    flex-direction: column;
    gap: 20px;
  }

  .nav-item {
    width: 100%;
  }

  .nav-item a {
    flex-direction: row;
    justify-content: flex-start;
    gap: 15px;
    padding: 10px;
  }

  .nav-item img {
    width: 24px;
    height: 24px;
  }

  .nav-item span {
    font-size: 1em;
  }

  /* Animación del menú hamburguesa */
  .menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .menu-toggle.active span:nth-child(2) {
    opacity: 0;
  }

  .menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
  }

  /* Overlay cuando el menú está abierto */
  .overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 998;
  }

  .overlay.active {
    display: block;
  }

  /* Mantener el encabezado fijo en móvil */
  .stats-table thead {
    position: sticky;
    top: 0;
    z-index: 200;
    background-color: #f2f2f2;
  }

  .stats-table thead th {
    position: sticky;
    top: 0;
    z-index: 200;
    background-color: #f2f2f2;
    border-bottom: 2px solid #ddd;
    padding-left: 10px !important;
  }

  /* Eliminar todos los z-index de las celdas del cuerpo */

  /* Asegurar que los tooltips de equipo estén por debajo del header */
  .team-name::after {
    z-index: 99;
  }

  /* Ajustes para móvil */
  .stats-table th,
  .stats-table td {
    padding: 6px 8px;
    font-size: 0.85em;
    white-space: nowrap;
  }

  .player-photo {
    width: 35px;
    height: 35px;
    border: 2px solid #FF9E1B;
  }

  .stats-table-container {
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }

  .stats-table {
    min-width: 1200px;
  }

  /* Eliminar reglas duplicadas */

  /* Mobile adjustments for custom select */
  .custom-select {
    width: 100%;
    margin: 5px 0;
  }
  
  .select-options {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-height: 80vh;
  }

  /* Columnas sticky para foto y nombre de jugador */


}

@media screen and (max-width: 480px) {
  .nav-item {
    font-size: 0.7em;
  }
  
  .nav-item img,
  .icon {
    width: 20px;
    height: 20px;
  }
  
  .section-title {
    font-size: 1.5em;
  }
  
  .stats-table th,
  .stats-table td {
    padding: 6px 8px;
    font-size: 0.8em;
  }
  
  .pagination-controls {
    flex-direction: column;
    gap: 10px;
  }
  
  .pagination-controls button {
    width: 100%;
  }
}

/* Mostrar solo en dispositivos móviles */
@media (max-width: 900px) {
  .mobile-bottom-nav {
    display: flex;
  }
  
  /* Añadir padding inferior al body para evitar solapamiento */
  body {
    padding-bottom: 65px;
  }
  
  /* Ocultar el menú hamburguesa cuando hay barra inferior */
  .menu-toggle {
    display: none;
  }
  
  /* Hacer el main-nav invisible en móviles */
  .main-nav {
    display: none;
  }
}

/* Ajustar para pantallas muy pequeñas */
@media (max-width: 480px) {
  .bottom-nav-item img,
  .bottom-nav-item svg {
    width: 28px;
    height: 28px;
  }
  
  .bottom-nav-item {
    min-height: 55px;
    padding: 10px 1px;
  }
}

/* Ajustar anchos de columnas para PC */
@media screen and (min-width: 769px) {
  .stats-table th,
  .stats-table td {
    padding: 8px 4px;
    font-size: 0.9em;
  }

  /* Columnas con números */
  .stats-table td[data-col^="t"],
  .stats-table td[data-col="pts"],
  .stats-table td[data-col="ro"],
  .stats-table td[data-col="rd"],
  .stats-table td[data-col="rt"],
  .stats-table td[data-col="as"],
  .stats-table td[data-col="br"],
  .stats-table td[data-col="bp"],
  .stats-table td[data-col="tp"],
  .stats-table td[data-col="fc"],
  .stats-table td[data-col="va"],
  .stats-table td[data-col="pm"] {
    min-width: 35px;
    max-width: 45px;
  }

  /* Columnas de porcentajes */
  .stats-table td[data-col^="pct"] {
    min-width: 45px;
    max-width: 55px;
  }

  /* Columnas de identificación */
  .stats-table td:first-child,
  .stats-table td:nth-child(2) {
    min-width: 30px;
    max-width: 40px;
  }

  /* Columna de foto */
  .stats-table td:nth-child(3) {
    min-width: 50px;
    max-width: 60px;
  }

  /* Columna de nombre */
  .stats-table td[data-col="playerName"] {
    min-width: 120px;
    max-width: 150px;
  }

  /* Columna de equipo */
  .team-name {
    min-width: 45px;
    max-width: 55px;
  }

  /* Columna de partidos */
  .games-cell {
    min-width: 35px;
    max-width: 45px;
  }
}

/* Clase para mostrar todas las columnas en móvil */
.mobile-all-columns .stats-table th,
.mobile-all-columns .stats-table td {
  display: table-cell;
}

/* Sombra para el encabezado */
.stats-table thead::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background: rgba(0,0,0,0.1);
  pointer-events: none;
}

/* Borde naranja cuando la tabla está activa */
#statsTableContainer.table-active {
  border: 3px solid #FF9E1B;
  box-shadow: 0 0 0 2px #FF9E1B44;
}

.table-nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2px;
  gap: 10px;
}

.table-note {
  color: #D7DAE3;
  font-size: 0.92em;
  font-weight: 400;
  opacity: 0.8;
  text-align: left;
  margin-bottom: 10px;
}

/* Columnas sticky para foto y nombre de jugador */
.stats-table td:nth-child(3) .player-photo {
  width: 48px !important;
  height: 48px !important;
  max-width: 100% !important;
  max-height: 100% !important;
  display: block;
  margin: 0 auto;
}

.stats-table td[data-col="playerName"],
.stats-table td.player-name {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  max-width: 130px !important;
  min-width: 100px !important;
  width: 130px !important;
}

.page-header{
  width: 100vw;
  height: 100px;
  background-color: #4859AA;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-bottom: 2px solid #FF9E1B;
  display: flex;
}

.page-header h1{
  margin: 0 auto;
}

a.login-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 1.5rem;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.8rem;
  padding: 0.5em 1em;
  border-radius: 30px;
  background: #181D37;
  transition: background 0.2s;
  color: #fff;
  border: 1px solid #D7DAE3;
  margin-left: auto;
}

@media (max-width: 900px) {
  a.login-btn span {
    display: none;
  }
  a.login-btn img {
    margin: 0;
  }
  a.login-btn {
    padding: 0.5em;
    min-width: 0;
    justify-content: flex-end;
  }
}

/* Estilos del dropdown de usuario */
.login-container {
  position: relative;
  margin-left: auto;
}

.login-btn:hover {
  background: #1e2245;
}

/* Estilos del dropdown */
.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #181D37;
  border: 1px solid #D7DAE3;
  border-radius: 12px;
  min-width: 200px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  animation: fadeInDown 0.2s ease-out;
}

.dropdown-header {
  padding: 12px 16px;
  border-bottom: 1px solid #2a3049;
  color: #FF9E1B;
  font-weight: 600;
  font-size: 0.85rem;
}

.dropdown-content {
  padding: 8px 0;
}

.dropdown-item {
  width: 100%;
  padding: 12px 16px;
  background: none;
  border: none;
  color: #fff;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background-color 0.2s;
  text-decoration: none;
}

.dropdown-item:hover {
  background-color: #1e2245;
}

.dropdown-item svg {
  width: 16px;
  height: 16px;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Estilo para el nombre del usuario en naranja */
.user-name {
  color: #FF9E1B !important;
  font-weight: 600;
}

/* Estilos responsive para el dropdown */
@media (max-width: 900px) {
  .user-dropdown {
    min-width: 160px;
    right: -5px;
  }
}

@media (max-width: 480px) {
  .user-dropdown {
    min-width: 180px;
    right: -10px;
  }
  
  .dropdown-header,
  .dropdown-item {
    padding: 10px 14px;
    font-size: 0.8rem;
  }
}
