/**
 * Prima League - Estilos de la aplicacion dinamica
 */

/* ========== SELECTOR DE TEMPORADA ========== */


.temporada-selector {
    width: 90vw;
    display: flex;
    flex-flow: row nowrap;
    align-items: center;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1rem 0;
    align-items: center;
    justify-content: center;
    align-self: center;
    margin: 0 auto;
}

.temporada-selector label {
    color: var(--blanco);
    font-family: "Rajdhani", sans-serif;
    font-size: clamp(0.9rem, 1.2vw, 1.2rem);
    font-weight: 500;
}

.temporada-selector select {
    padding: 0.5rem 1rem;
    font-size: clamp(0.8rem, 1vw, 1rem);
    font-family: "Montserrat", sans-serif;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--blanco);
    border: 2px solid var(--naranja);
    border-radius: 0.4rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.temporada-selector select:hover {
    background-color: rgba(212, 148, 28, 0.2);
}

.temporada-selector select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(212, 148, 28, 0.3);
}

.temporada-selector select option {
    background-color: rgb(37, 46, 62);
    color: var(--blanco);
}

/* ========== ESTADO DE CARGA ========== */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 50vh;
    width: 100%;
    color: var(--naranja);
    font-family: "Rajdhani", sans-serif;
    font-size: 1.5rem;
}

.loading::after {
    content: '';
    width: 1.5rem;
    height: 1.5rem;
    margin-left: 1rem;
    border: 3px solid transparent;
    border-top-color: var(--naranja);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ========== MENSAJE DE NO HAY DATOS ========== */
.no-data {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 50vh;
    width: 100%;
    text-align: center;
    padding: 2rem;
}

.no-data h1 {
    color: var(--naranja);
    font-family: "Rajdhani", sans-serif;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    margin-bottom: 1rem;
}

.no-data p {
    color: var(--blanco);
    font-size: clamp(0.9rem, 1.2vw, 1.2rem);
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

.no-partidos {
    color: var(--blanco);
    font-style: italic;
    text-align: center;
    padding: 2rem;
    opacity: 0.7;
}

/* ========== JUGADORES HORIZONTAL ========== */
.jugadores-container {
    width: 100%;
    margin-top: 1rem;
}

.jugadores-horizontal {
    display: flex;
    flex-flow: row nowrap;
    gap: 1rem;
    overflow-x: auto;
    padding: 1rem 0;
    scroll-snap-type: x mandatory;
}

.jugadores-horizontal::-webkit-scrollbar {
    height: 8px;
}

.jugadores-horizontal::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.jugadores-horizontal::-webkit-scrollbar-thumb {
    background: var(--naranja);
    border-radius: 4px;
}

.jugadores-horizontal::-webkit-scrollbar-thumb:hover {
    background: rgb(236, 189, 102);
}

.jugador-card {
    flex: 0 0 auto;
    width: clamp(120px, 15vw, 160px);
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0.5rem;
    padding: 0.8rem;
    text-align: center;
    transition: all 0.3s ease;
    scroll-snap-align: start;
    border: 1px solid transparent;
}

.jugador-card:hover {
    background: rgba(212, 148, 28, 0.15);
    border-color: var(--naranja);
    transform: translateY(-5px);
}

.jugador-foto {
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 50%;
    margin-bottom: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
}

.jugador-foto img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.jugador-info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.jugador-dorsal {
    color: var(--naranja);
    font-family: "Rajdhani", sans-serif;
    font-size: clamp(1rem, 1.5vw, 1.4rem);
    font-weight: 700;
}

.jugador-nombre {
    color: var(--blanco);
    font-size: clamp(0.7rem, 1vw, 0.9rem);
    font-weight: 600;
}

.jugador-apellidos {
    color: var(--blanco);
    font-size: clamp(0.6rem, 0.8vw, 0.8rem);
    opacity: 0.7;
}

.no-jugadores {
    color: var(--blanco);
    font-style: italic;
    opacity: 0.7;
}

/* ========== INFORMACION PAGE STYLES ========== */
.informacion-contenedor {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    width: 100%;
    margin-top: 1rem;
}

.info-noticia {
    display: flex;
    flex-flow: row nowrap;
    gap: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0.5rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

.info-noticia:hover {
    background: rgba(212, 148, 28, 0.1);
}

.info-noticia img {
    width: clamp(150px, 25vw, 300px);
    height: clamp(120px, 20vw, 200px);
    object-fit: cover;
    flex-shrink: 0;
}

.info-noticia-contenido {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.info-noticia-contenido h3 {
    color: var(--naranja);
    font-family: "Rajdhani", sans-serif;
    font-size: clamp(1rem, 1.5vw, 1.3rem);
    font-weight: 600;
}

.info-noticia-contenido .info-fecha {
    color: var(--blanco);
    opacity: 0.6;
    font-size: clamp(0.7rem, 0.9vw, 0.9rem);
    font-style: italic;
}

.info-noticia-contenido p {
    color: var(--blanco);
    font-size: clamp(0.8rem, 1vw, 1rem);
    line-height: 1.6;
}

/* ========== AJUSTES ADICIONALES PARA EQUIPOS ========== */
.cajaEquipo .equipoInfo h3 {
    color: var(--naranja);
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 780px) {
    .temporada-selector {
        justify-content: center;
        padding: 0.5rem;
    }

    .jugadores-horizontal {
        gap: 0.8rem;
    }

    .jugador-card {
        width: clamp(100px, 30vw, 130px);
        padding: 0.6rem;
    }

    .info-noticia {
        flex-direction: column;
    }

    .info-noticia img {
        width: 100%;
        height: 200px;
    }
}

@media (max-width: 540px) {
    .temporada-selector {
        flex-direction: column;
        gap: 0.5rem;
        align-items: center;
    }

    .temporada-selector select {
        width: 80%;
    }

    .jugador-card {
        width: clamp(90px, 35vw, 120px);
    }
}

/* ========== MAIN CONTENT CONTAINER ========== */
#main-content {
    width: 100%;
    min-height: 50vh;
}

/* ========== AJUSTES DE TABLAS PARA CLASIFICACION ========== */
#main-content table {
    width: 100%;
    margin-bottom: 2rem;
}

#main-content .clasificacion table,
#main-content main table {
    margin-bottom: 2rem;
}
