/* ===== ESTILOS BASE EXISTENTES ===== */
.liga-billar-estadisticas {
    margin: 20px 0;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 10px;
    border: 1px solid #e1e1e1;
}

.liga-billar-estadisticas h2 {
    color: #1a472a;
    border-bottom: 2px solid #1a472a;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.liga-billar-estadisticas h3 {
    color: #2c5530;
    margin: 25px 0 15px 0;
    padding-left: 10px;
    border-left: 4px solid #2c5530;
}

.estadisticas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.estadistica-item {
    text-align: center;
    padding: 15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}

.estadistica-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.estadistica-icono {
    font-size: 2em;
    margin-bottom: 10px;
}

.estadistica-valor {
    font-size: 1.8em;
    font-weight: bold;
    color: #1a472a;
}

.estadistica-label {
    font-size: 0.9em;
    color: #666;
}

.jugador-destacado-section,
.top-jugadores-section,
.estadisticas-avanzadas {
    margin-top: 30px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.jugador-destacado {
    border-left: 4px solid #ffd700;
    padding-left: 15px;
}

.jugador-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.jugador-avatar img,
.jugador-avatar div {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #ffd700;
}

.jugador-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.jugador-stats .stat {
    padding: 5px 10px;
    background: #fff9e6;
    border-radius: 15px;
    font-size: 0.9em;
    border: 1px solid #ffe066;
}

.top-jugadores-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.top-jugador-card {
    display: flex;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #4a6572;
    gap: 15px;
}

.top-jugador-posicion {
    background: #4a6572;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9em;
}

.top-jugador-avatar img,
.top-jugador-avatar div {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.top-jugador-stats {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-top: 5px;
}

.stat-mini {
    font-size: 0.8em;
    color: #666;
}

.avanzadas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.avanzada-card {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.avanzada-card h4 {
    margin-bottom: 15px;
    color: #2c5530;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 5px;
}

.distribucion-item,
.total-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
}

.distribucion-item:last-child,
.total-item:last-child {
    border-bottom: none;
}

.notice {
    padding: 15px;
    background: #fff;
    border-left: 4px solid #ffb900;
    margin: 20px 0;
}

.notice-info {
    border-left-color: #00a0d2;
}

.notice-warning {
    border-left-color: #ffb900;
}

/* ===== NUEVOS ESTILOS PARA LAS ESTADÍSTICAS AVANZADAS ===== */

/* Contenedor principal mejorado */
.liga-billar-estadisticas-container {
    max-width: 1200px;
    margin: 0 auto;
}

.estadisticas-header {
    background: linear-gradient(135deg, #1a472a 0%, #2a623d 100%);
    color: white;
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.estadisticas-header h2 {
    color: white;
    border-bottom: 2px solid #ffd700;
    text-align: center;
    margin-bottom: 25px;
}

.estadisticas-resumen {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.resumen-item {
    background: rgba(255,255,255,0.1);
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
}

.resumen-valor {
    display: block;
    font-size: 2em;
    font-weight: bold;
    margin-bottom: 5px;
}

.resumen-label {
    font-size: 0.9em;
    opacity: 0.9;
}

/* Secciones mejoradas */
.estadisticas-section {
    background: white;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    border: 1px solid #e0e0e0;
}

.estadisticas-section h3 {
    color: #1a472a;
    margin: 0 0 20px 0;
    font-size: 1.5em;
    border-bottom: 2px solid #ffd700;
    padding-bottom: 10px;
}

/* Tarjetas de estadísticas generales */
.estadistica-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 20px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-left: 4px solid #ffd700;
}

.estadistica-icon {
    font-size: 2em;
    opacity: 0.8;
}

.estadistica-content {
    flex: 1;
}

.estadistica-valor {
    font-size: 1.8em;
    font-weight: bold;
    color: #1a472a;
    margin-bottom: 5px;
}

.estadistica-label {
    color: #666;
    font-size: 0.9em;
}

/* Jugador destacado mejorado */
.jugador-destacado {
    display: flex;
    align-items: center;
    gap: 25px;
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    padding: 25px;
    border-radius: 12px;
    border: 2px solid #ffd700;
}

.jugador-info h4 {
    margin: 0 0 15px 0;
    font-size: 1.6em;
    color: #1a472a;
}

.jugador-stats {
    display: flex;
    gap: 30px;
}

.stat {
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 1.8em;
    font-weight: bold;
    color: #1a472a;
}

.stat-label {
    font-size: 0.9em;
    color: #666;
    margin-top: 5px;
}

/* Top jugadores mejorado */
.top-jugador-card {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.top-jugador-card:hover {
    border-color: #ffd700;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.top-jugador-card:nth-child(1) {
    border-color: #ffd700;
    background: linear-gradient(135deg, #fff9e6 0%, #fff3cd 100%);
}

.jugador-posicion {
    background: #1a472a;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9em;
}

.top-jugador-card:nth-child(1) .jugador-posicion {
    background: #ffd700;
    color: #1a472a;
}

.jugador-info h5 {
    margin: 0 0 8px 0;
    font-size: 1.1em;
    color: #1a472a;
}

.jugador-stats-mini {
    display: flex;
    gap: 15px;
    font-size: 0.9em;
}

.puntos {
    color: #1a472a;
    font-weight: bold;
}

.record {
    color: #666;
}

/* Estadísticas avanzadas */
.estadisticas-avanzadas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.estadistica-avanzada {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 20px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-left: 4px solid #1a472a;
    transition: transform 0.2s;
}

.estadistica-avanzada:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.avanzada-icon {
    font-size: 2em;
    opacity: 0.8;
}

.avanzada-titulo {
    font-weight: bold;
    color: #1a472a;
    margin-bottom: 5px;
    font-size: 1.1em;
}

.avanzada-jugador {
    color: #333;
    margin-bottom: 5px;
    font-size: 1em;
}

.avanzada-valor {
    color: #666;
    font-size: 0.9em;
}

/* Listas de partidos */
.partidos-lista {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.partido-item {
    background: #f8f9fa;
    padding: 15px 20px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 4px solid #6c757d;
}

.partido-suspendido {
    border-left-color: #dc3545;
    background: #fff5f5;
}

.partido-equipos {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}

.equipo-local, .equipo-visitante {
    color: #1a472a;
}

.vs {
    color: #666;
    font-size: 0.9em;
}

.partido-info {
    display: flex;
    gap: 15px;
    font-size: 0.9em;
    color: #666;
}

.partido-motivo, .partido-subestado {
    font-style: italic;
}

.partido-num-aplazamientos {
    color: #dc3545;
    font-weight: bold;
}

/* ===== ESTILOS PARA EL ACORDEÓN ===== */
.estado-partidos-info {
    margin: 30px 0;
}

.acordeon-partidos {
    margin-bottom: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
}

.acordeon-item.aplazado {
    border-left: 5px solid #f39c12;
}

.acordeon-item.suspendido {
    border-left: 5px solid #e74c3c;
}

.acordeon-header {
    width: 100%;
    background: #f8f9fa;
    border: none;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.acordeon-header:hover {
    background: #e9ecef;
}

.acordeon-titulo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.acordeon-icono {
    font-size: 1.8em;
}

.acordeon-info {
    text-align: left;
}

.acordeon-titulo-principal {
    font-weight: bold;
    font-size: 1.2em;
    color: #2c3e50;
}

.acordeon-subtitulo {
    color: #7f8c8d;
    font-size: 0.9em;
    margin-top: 5px;
}

.acordeon-indicador {
    font-size: 1.2em;
    transition: transform 0.3s ease;
    color: #7f8c8d;
}

.acordeon-header.active .acordeon-indicador {
    transform: rotate(180deg);
}

.acordeon-contenido {
    display: none;
    background: white;
    padding: 0;
}

.acordeon-contenido.active {
    display: block;
}

.lista-partidos {
    max-height: 400px;
    overflow-y: auto;
}

.partido-item {
    padding: 15px 20px;
    border-bottom: 1px solid #ecf0f1;
    transition: background-color 0.2s ease;
}

.partido-item:hover {
    background: #f8f9fa;
}

.partido-item:last-child {
    border-bottom: none;
}

.partido-titulo {
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 8px;
}

.partido-detalles {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 0.9em;
    color: #7f8c8d;
}

.partido-fecha, .partido-jugadores, .partido-motivo {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Estilos adicionales para partidos suspendidos */
.partido-item.suspendido {
    border-left: 4px solid #d63638;
    background-color: #fff6f6;
}

.partido-subestado.incomparecencia {
    color: #d63638;
    font-weight: bold;
}

.partido-subestado.empate {
    color: #ffb900;
    font-weight: bold;
}

.partido-subestado.max-aplazamientos {
    color: #8c8c8c;
    font-weight: bold;
}

.partido-resultado.incomparecencia {
    color: #d63638;
    font-weight: bold;
}

.partido-resultado.empate {
    color: #ffb900;
    font-weight: bold;
}

.partido-resultado.max-aplazamientos {
    color: #8c8c8c;
    font-weight: bold;
}

.acordeon-item.suspendido .acordeon-header {
    background-color: #fff6f6;
    border-left: 4px solid #d63638;
}

/* Estados de aplazamiento */
.partido-aplazamientos {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    margin-left: 10px;
}

.partido-aplazamientos.estado-info {
    background-color: #e7f3ff;
    color: #2271b1;
    border: 1px solid #2271b1;
}

.partido-aplazamientos.estado-warning {
    background-color: #fff6e6;
    color: #d63626;
    border: 1px solid #d63626;
}

.partido-aplazamientos.estado-danger {
    background-color: #ffe6e6;
    color: #d63638;
    border: 1px solid #d63638;
}

/* Mejorar la visualización de los detalles del partido */
.partido-detalles {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-top: 5px;
}

.partido-detalles span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .estadisticas-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .jugador-info {
        flex-direction: column;
        text-align: center;
    }
    
    .jugador-stats {
        justify-content: center;
    }
    
    .top-jugadores-grid {
        grid-template-columns: 1fr;
    }
    
    .avanzadas-grid {
        grid-template-columns: 1fr;
    }
    
    .estadisticas-resumen {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .resumen-valor {
        font-size: 1.5em;
    }
    
    .jugador-destacado {
        flex-direction: column;
        text-align: center;
    }
    
    .jugador-stats {
        justify-content: center;
    }
    
    .partido-item {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .partido-info {
        flex-direction: column;
        gap: 5px;
    }
    
    .estadisticas-grid,
    .top-jugadores-grid,
    .estadisticas-avanzadas-grid {
        grid-template-columns: 1fr;
    }
    
    .acordeon-titulo {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .acordeon-header {
        flex-direction: column;
        gap: 10px;
    }
}

/* Avatar mejorado */
.avatar-iniciales {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    border: 3px solid #ffd700;
}

.jugador-avatar-img {
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #ffd700;
}

/* Distribución de victorias mejorada */
.distribucion-bars {
    margin-top: 15px;
}

.distribucion-bar {
    margin-bottom: 12px;
}

.bar-label {
    font-size: 0.9em;
    color: #555;
    margin-bottom: 5px;
}

.bar-container {
    background: #e9ecef;
    border-radius: 10px;
    height: 12px;
    overflow: hidden;
    margin-bottom: 5px;
}

.bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #1a472a 0%, #2a623d 100%);
    border-radius: 10px;
    transition: width 0.8s ease;
}

.bar-value {
    font-size: 0.8em;
    color: #666;
    text-align: right;
}