/* Estilos para la página de estadísticas de liga */

.content-wrapper {
  max-width: 1200px;
  margin: 0;
  padding: 0 20px;
}

/* Header de estadísticas */
.stats-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid #e0e0e0;
}

.stats-title-section h1 {
  font-size: 2.2em;
  color: #1a1a1a;
  margin: 0;
  font-weight: 700;
}

.stats-subtitle {
  color: #666;
  font-size: 1.1em;
  margin: 5px 0 0 0;
}

.back-link {
  display: inline-flex;
  align-items: center;
  padding: 10px 20px;
  background: #f8f9fa;
  border: 2px solid #dee2e6;
  border-radius: 8px;
  text-decoration: none;
  color: #495057;
  font-weight: 600;
  transition: all 0.2s ease;
}

.back-link:hover {
  background: #e9ecef;
  border-color: #adb5bd;
  text-decoration: none;
  color: #495057;
}

.back-link i {
  margin-right: 8px;
}

/* Selector de categorías */
.category-selector {
  margin-bottom: 30px;
}

.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  background: #f8f9fa;
  padding: 15px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.category-tab {
  padding: 12px 20px;
  border: none;
  border-radius: 8px;
  background: white;
  color: #495057;
  font-weight: 600;
  font-size: 0.95em;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  text-align: center;
}

.category-tab:hover {
  background: #e9ecef;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0,0,0,0.15);
}

.category-tab.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

/* Contenedor de estadísticas */
.stats-container {
  min-height: 400px;
}

.loading-message {
  text-align: left;
  padding: 60px 20px;
  font-size: 1.2em;
  color: #666;
}

.loading-message i {
  font-size: 2em;
  margin-bottom: 15px;
  display: block;
  color: #667eea;
}

/* Grid de jugadores */
.players-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

/* Card de jugador */
.player-card {
  background: white;
  border-radius: 15px;
  padding: 20px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
}

.player-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.15);
  border-color: #667eea;
}

.player-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Ranking badge */
.ranking-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1em;
  box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

.ranking-badge.top3 {
  background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
  color: #333;
}

/* Información del jugador */
.player-info {
  margin-bottom: 15px;
}

.player-name {
  font-size: 1.3em;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 5px;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.2s ease;
}

.player-name:hover {
  color: #667eea;
  text-decoration: none;
}

.player-team {
  color: #666;
  font-size: 1em;
  font-weight: 500;
}

/* Estadística principal */
.main-stat {
  text-align: left;
  margin: 20px 0;
}

.stat-value {
  font-size: 2.5em;
  font-weight: 700;
  color: #667eea;
  line-height: 1;
  margin-bottom: 5px;
}

.stat-label {
  color: #666;
  font-size: 0.9em;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

/* Estadísticas secundarias */
.secondary-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid #e0e0e0;
}

.secondary-stat {
  text-align: left;
}

.secondary-stat-value {
  font-size: 1.2em;
  font-weight: 600;
  color: #333;
  margin-bottom: 2px;
}

.secondary-stat-label {
  font-size: 0.8em;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Mensaje de no datos */
.no-data-message {
  text-align: left;
  padding: 60px 20px;
  color: #666;
}

.no-data-message i {
  font-size: 3em;
  margin-bottom: 20px;
  display: block;
  color: #ccc;
}

/* Responsive */
@media (max-width: 768px) {
  .stats-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }
  
  .category-tabs {
    flex-direction: column;
  }
  
  .category-tab {
    text-align: center;
  }
  
  .players-grid {
    grid-template-columns: 1fr;
  }
  
  .secondary-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .content-wrapper {
    padding: 0 15px;
  }
  
  .stats-title-section h1 {
    font-size: 1.8em;
  }
  
  .player-card {
    padding: 15px;
  }
  
  .stat-value {
    font-size: 2em;
  }
}
