/* Estilos generales del body */
body {
    margin: 0;
    padding: 0;
    font-family: 'Montserrat', sans-serif;
    color: white;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    text-align: center;
    min-height: 100vh;
    overflow-y: auto;
    background-color: #1e1e1e;
}

/* Estilos para la pantalla de logueo */
#loginScreen {
    text-align: center;
    position: absolute;
    top: 65%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    color: white;
    padding: 20px;
    border-radius: 10px;
    background-color: transparent;
    max-width: 400px;
    width: 100%;
}

/* Contenedor de imágenes de fondo para el login */
.background-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

/* Estilos para las imágenes de fondo del login */
.background-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    opacity: 0; /* Inicialmente invisibles */
    transition: opacity 2s ease; /* Transición suave */
}

/* Animación para alternar las imágenes del login */
@keyframes cambiarFondo {
    0% {
        opacity: 0; /* Inicia con la primera imagen invisible */
    }
    25% {
        opacity: 1; /* Muestra la primera imagen */
    }
    75% {
        opacity: 1; /* Mantiene la primera imagen visible */
    }
    100% {
        opacity: 0; /* Oculta la primera imagen */
    }
}

/* Aplica la animación a las imágenes */
.background-image:nth-child(1) {
    animation: cambiarFondo 14s infinite; /* Duración total: 14s (7s por imagen) */
}

.background-image:nth-child(2) {
    animation: cambiarFondo 14s infinite 7s; /* Retraso de 7s para la segunda imagen */
}

/* Contenedor de imágenes de fondo para el menú principal */
.menu-background-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    display: none; /* Inicialmente oculto */
}

/* Estilos para la imagen de fondo del menú principal */
.menu-fondo {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 1; /* Siempre visible */
}

/* Mostrar el fondo del menú principal cuando se ingresa */
#mainMenu ~ .menu-background-container {
    display: block;
}

/* Ocultar el fondo del login cuando se ingresa */
#mainMenu ~ .background-container {
    display: none;
}

/* Estilos para las pantallas secundarias (INFO DE EQUIPOS, FIXTURE, etc.) */
#infoEquipos, #fixture, #estadisticas, #resultados, #clima, #reglamento {
    position: relative;
    z-index: 1; /* Asegura que el contenido esté por encima del fondo */
}

/* Resto del CSS (sin cambios) */
/* ... (código existente) ... */

/* Estilos para el subtítulo */
#subTitle {
    font-size: 1em;
    margin-bottom: 20px;
    color: white;
    font-weight: bold;
}

/* Estilos para el botón "Ingresar" */
#loginScreen button {
    width: auto;
    padding: 8px 20px;
    border: none;
    border-radius: 5px;
    background-color: #b8860b;
    color: black;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    margin-top: 10px;
}

/* Efecto hover para el botón "Ingresar" */
#loginScreen button:hover {
    background-color: #daa520;
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.3);
}

/* Estilos para el input de la contraseña */
#passwordInput {
    width: calc(100% - 20px);
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 5px;
    font-size: 1em;
    box-sizing: border-box;
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    color: white;
    outline: none;
}

/* Estilo cuando el input está enfocado */
#passwordInput:focus {
    border-color: rgba(255, 255, 255, 0.7);
    background-color: rgba(255, 255, 255, 0.2);
}

/* Estilo para el placeholder */
#passwordInput::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

button {
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 5px;
    background-color: #4CAF50;
    color: black;
    font-size: 1em;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #45a049;
}

/* Estilos para los botones del menú principal */
.menu-buttons button {
    width: 200px;
    margin: 10px 0;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    background-color: #2c3e50;
    border: 2px solid #34495e;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Estilos para el título del menú principal */
#mainTitle {
    font-family: 'Iceberg', serif;
    font-weight: 700;
    font-size: 4.5rem;
    color: yellow;
    text-align: center;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

/* Difuminado detrás del título */
#mainTitle::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 110%;
    height: 120%;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(3px);
    transform: translate(-50%, -50%);
    z-index: -1;
    border-radius: 10px;
}

/* Estilos para las imágenes de fondo en el menú principal */
.menu-fondo {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 1;
}

/* Efecto hover más llamativo */
.menu-buttons button:hover {
    background-color: #34495e;
    border-color: #2c3e50;
    transform: scale(1.05);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.2);
    color: #f1c40f;
}

/* Estilos para el botón SALIR (destacado) */
.menu-buttons button:last-child {
    background-color: #e74c3c;
    border-color: #c0392b;
}

.menu-buttons button:last-child:hover {
    background-color: #c0392b;
    border-color: #e74c3c;
    transform: scale(1.05);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.2);
    color: #f1c40f;
}

/* Estilos para la tabla de INFO DE EQUIPOS */
#infoEquipos table:not(.tabla-relevos) {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 10px;
    overflow: hidden;
}

#infoEquipos th, #infoEquipos td {
    padding: 12px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

#infoEquipos th {
    background-color: #4CAF50;
    color: white;
    font-weight: bold;
}

#infoEquipos td {
    color: white;
    background-color: rgba(0, 0, 0, 0.5);
}

/* Estilos para el contenedor de emblemas */
.emblemas-container {
    display: flex;
    justify-content: space-between; /* Distribuye el espacio entre los emblemas */
    margin-top: 20px;
    padding: 0 10px; /* Añade un poco de padding para evitar que los emblemas toquen los bordes */
}

/* Estilos para cada emblema */
.emblema {
    width: 80px; /* Tamaño del contenedor */
    height: 80px; /* Tamaño del contenedor */
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.1); /* Fondo semitransparente */
    border-radius: 10px; /* Bordes redondeados */
    overflow: hidden; /* Asegura que la imagen no se salga del contenedor */
    margin: 0 auto; /* Centra cada emblema dentro de su columna */
}

/* Estilos para las imágenes de los emblemas */
.emblema img {
    width: 100%; /* La imagen ocupa todo el contenedor */
    height: 100%; /* La imagen ocupa todo el contenedor */
    object-fit: contain; /* Ajusta la imagen sin deformarla */
}


/* Asegura que las columnas de la tabla tengan el mismo ancho */
#infoEquipos th, #infoEquipos td {
    width: 20%; /* Divide el ancho de la tabla en 5 columnas iguales */
    text-align: center;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}



/* Estilos para la pantalla de FIXTURE */
#fixture .fixture-container {
    font-size: 0.9em;
    color: white;
    text-align: left;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 15px;
    border-radius: 8px;
}

#fixture .fecha {
    margin-bottom: 20px;
}

#fixture .fecha h2 {
    font-size: 1.1em;
    margin-bottom: 10px;
}

#fixture .fecha ul {
    list-style-type: none;
    padding-left: 0;
}

#fixture .fecha ul li {
    margin-bottom: 5px;
}

#fixture .por-jugar {
    font-size: 0.8em;
    background-color: #4CAF50;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    margin-left: 10px;
    animation: parpadeo 1.5s infinite;
}

@keyframes parpadeo {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

#fixture .fecha em {
    font-style: italic;
    color: #ccc;
}

/* Estilo para el texto "Finalizado" */
.finalizado {
    color: red;
    font-weight: bold;
    animation: titilar 1s infinite;
}

/* Animación de titilado */
@keyframes titilar {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Estilos para la pantalla de ESTADISTICAS */
#estadisticas .tabs {
    margin-bottom: 20px;
}

#estadisticas .tabs button {
    padding: 10px 20px;
    margin-right: 10px;
    border: none;
    border-radius: 5px;
    background-color: #4CAF50;
    color: white;
    font-size: 1em;
    cursor: pointer;
}

#estadisticas .tabs button:hover {
    background-color: #45a049;
}

#estadisticas .tab-content {
    display: none;
}

#estadisticas .tab-content.active {
    display: block;
}

/* Estilos para el botón "VOLVER MENU" en la pestaña ESTADÍSTICAS */
button.volver-menu {
    background-color: #f44336;
    color: white;
    border: none;
    padding: 10px 20px;
    margin-top: 20px;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s ease;
    text-transform: uppercase;
}

button.volver-menu:hover {
    background-color: #e53935;
}

/* Estilos para la tabla de POSICIONES */
.tabla-posiciones {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    background-color: rgba(0, 0, 0, 0.6);
    border-radius: 10px;
    overflow: hidden;
}

.tabla-posiciones th, .tabla-posiciones td {
    padding: 12px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.tabla-posiciones th {
    background-color: rgba(76, 175, 80, 0.8);
    color: white;
    font-weight: bold;
}

.tabla-posiciones td {
    color: white;
    background-color: rgba(0, 0, 0, 0.7);
}

/* Puntos en dorado y negrita en la tabla de posiciones */
.tabla-posiciones td:last-child {
    color: gold;
    font-weight: bold;
}


/* Estilos para la tabla de GOLEADORES */
.tabla-goleadores {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.tabla-goleadores th, .tabla-goleadores td {
    padding: 12px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.tabla-goleadores th {
    background-color: #4CAF50;
    color: white;
    font-weight: bold;
}

.tabla-goleadores td {
    color: white;
    background-color: rgba(0, 0, 0, 0.7); /* Fondo oscuro para las celdas */
}

.tabla-goleadores .jugador {
    font-size: 0.9em;
    color: #ddd;
}

.tabla-goleadores .goles {
    font-size: 1em;
    color: white;
}

/* Estilos para el fondo de la pestaña GOLEADORES */
.goleadores-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.goleadores-background-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.7;
}

/* Contenido de la pestaña GOLEADORES */
.goleadores-content {
    position: relative;
    z-index: 1;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 20px;
    border-radius: 10px;
    margin: 20px auto;
    max-width: 800px;
    color: white;
}

/* Estilos para la pantalla de RESULTADOS */
#resultados {
    background-color: rgba(0, 0, 0, 0.7);
    padding: 20px;
    border-radius: 10px;
    margin: 20px auto;
    max-width: 800px;
    width: fit-content;
    box-sizing: border-box;
}

/* Estilo para el recuadro oscuro de cada fecha */
.resultados-content {
    background-color: rgba(0, 0, 0, 0.7); /* Fondo oscuro difuminado */
    padding: 20px;
    border-radius: 10px; /* Bordes redondeados */
    margin-bottom: 20px; /* Espacio entre fechas */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Sombra suave */
}

/* Estilos para el título de la fecha */
.fecha-titulo {
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 15px;
    color: #FFD700;
}

/* Contenedor de encuentros */
.encuentros-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
}

/* Estilos para cada encuentro */
.encuentro {
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
}

/* Estilos para el contenedor de equipo y goles */
.equipo-goles {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

/* Estilos para el nombre del equipo (izquierda) */
.equipo-izquierda {
    font-size: 1em;
    margin: 0;
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

/* Estilos para el nombre del equipo (derecha) */
.equipo-derecha {
    font-size: 1em;
    margin: 0;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

/* Estilos para los goles */
.goles {
    font-size: 1.5em;
    font-weight: bold;
    margin: 0 15px;
    flex: 0;
}

/* Estilos para el separador */
.separador {
    font-size: 1.5em;
    font-weight: bold;
    margin: 0 10px;
    flex: 0;
}

/* Estilos para la pantalla de CLIMA */
#clima {
    background-color: rgba(0, 0, 0, 0.7);
    padding: 20px;
    border-radius: 10px;
    margin: 20px auto;
    max-width: 800px;
    text-align: center;
}

#clima .clima-content {
    font-size: 0.9em;
    color: white;
    text-align: left;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 15px;
    border-radius: 8px;
}

/* Estilos para el botón de APUESTAS */
.apuestas-button {
    opacity: 0.7;
    pointer-events: none;
    cursor: not-allowed;
}

/* Estilos para la pantalla de REGLAMENTO */
#reglamento {
    background-color: rgba(0, 0, 0, 0.7);
    padding: 20px;
    border-radius: 10px;
    margin: 20px auto;
    max-width: 800px;
    text-align: center;
}

#reglamento .reglamento-content {
    font-size: 0.9em;
    color: white;
    text-align: left;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 15px;
    border-radius: 8px;
}

/* Estilos para los botones "Volver" */
#infoEquipos button, #fixture button, #estadisticas button, #noticias button, #clima button, #reglamento button, #resultados button {
    width: auto;
    padding: 6px 12px;
    margin-top: 10px;
    border: none;
    border-radius: 5px;
    background-color: #4CAF50;
    color: black;
    font-size: 0.9em;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#infoEquipos button:hover, #fixture button:hover, #estadisticas button:hover, #noticias button:hover, #clima button:hover {
    background-color: #45a049;
}

/* Contenedor del banner y la imagen */
.contenedor-imagen-banner {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

/* Estilos para el contenedor de la imagen */
.contenedor-imagen {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 10px;    
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    height: 400px;
    position: relative;
    
}

/* Estilos para el título "Próximos partidos..." */
.titulo-imagen {
    font-family: 'Urbanist', sans-serif;
    font-size: 0.9em;
    font-weight: bold;
    color: white;
    text-align: left;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    margin: 0;
    padding: 8px;
    background-color: rgba(0, 0, 0, 0.5);
    border-bottom-right-radius: 8px;
}

/* Fondo semitransparente con desenfoque detrás del título */
.titulo-imagen::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: -1;
    border-radius: 5px;
}

.contenedor-imagen img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 8px;
}

/* Estilos para el contenedor del banner */
.marquesina-container {
    flex: 2;
    height: 150px;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(8px);
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Estilos para el contenido de la marquesina */
.marquesina-content {
    width: 100%;
    height: calc(100% - 40px);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Estilos para cada noticia */
.marquesina-content .noticia {
    position: absolute;
    width: 100%;
    height: 100%;
    padding: 5px 10px;
    font-family: 'Urbanist', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    line-height: 1.2;
}

/* Clase para mostrar la noticia activa */
.marquesina-content .noticia.active {
    opacity: 1;
}

/* Estilos para la marquesina de resultados */
.marquesina-resultados {
    display: flex;
    align-items: center;
    background-color: black;
    color: white;
    font-size: 0.9em;
    padding: 8px 12px;
    white-space: nowrap;
    overflow: hidden;
    position: relative;
    border-radius: 8px;
}

/* Parte izquierda fija de la marquesina */
#envivoPartido {
  display: flex;
  align-items: center;
  background-color: #444; /* fondo gris */
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.9em;
  gap: 8px;
}

/* Estado cuando NO hay partido en juego */
#envivoPartido.envivo-opaco {
  opacity: 0.4;
  font-weight: normal;
  animation: none;
}

/* Estado cuando HAY partido en juego */
#envivoPartido.envivo-activo {
  opacity: 1;
}

/* "EN VIVO" animado */
.envivo-label {
  color: white;
  font-weight: bold;
  font-size: 1.05em;
  padding: 6px 16px;
  border-radius: 8px;
  background-color: #e50914; /* Rojo Netflix */
  position: relative;
  overflow: hidden;
  animation: pulseSoft 2.2s ease-in-out infinite;
  box-shadow: 0 0 12px rgba(229, 9, 20, 0.6);
  letter-spacing: 1px;
  text-transform: uppercase;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}



/* ANIMACION PARA EN VIVO */
@keyframes zoomText {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.08);
  }
}


.envivo-label::before {
  content: '';
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,0.3), transparent);
  transform: skewX(-25deg);
  animation: shine 3s infinite;
}

@keyframes shine {
  0% { left: -75%; }
  100% { left: 125%; }
}









/* Resultado parcial (naranja sin animación) */
.envivo-resultado {
  color: #FFA500;
  font-weight: normal;
  animation: none;
}

/* Cronómetro (blanco sin animación) */
#cronometro {
  color: white;
  font-weight: normal;
}

/* Animación de parpadeo */
@keyframes parpadeo {
  0% { opacity: 1; }
  50% { opacity: 0.3; }
  100% { opacity: 1; }
}


/* Contenedor con texto deslizable */
#ultimosResultados {
    flex-grow: 1;
    overflow: hidden;
    mask-image: linear-gradient(to left, transparent, black 10%);
    -webkit-mask-image: linear-gradient(to left, transparent, black 10%);
}

/* Texto deslizable */
#ultimosResultados span {
    display: inline-block;
    padding-left: 100%;
    animation: deslizar 30s linear infinite;
    white-space: nowrap;
}

/* Animación */
@keyframes deslizar {
    0% {
        transform: translateX(0%);
    }
    100% {
        transform: translateX(-100%);
    }
}

/* Colorea de blanco a los equipos en juego */
.partido-en-vivo .equipo {
    color: white !important;
    font-weight: bold;
}




/* Estilos para el título del banner de noticias */
.titulo-noticias {
    font-size: 0.9em;
    font-weight: bold;
    color: yellow;
    margin: 0;
    padding: 8px;
    background-color: rgba(0, 0, 0, 0.7);
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    border-bottom-right-radius: 8px;
    animation: parpadeo 2s infinite;
}

/* Animación de parpadeo */
@keyframes parpadeo {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

/* Estilos para la tabla de relevos */
/* 🔧 TABLA DE RELEVOS - ESTILO CLARO, DIFUMINADO Y SEPARADA DE EMBLEMAS */
.tabla-relevos {
    margin: 70px auto 20px auto !important; /* forzamos separación superior */
    border-collapse: collapse;
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    display: table;
}


.tabla-relevos th {
    background-color: rgba(255, 255, 255, 0.15); /* fondo claro */
    color: #dcdcdc; /* gris claro */
    text-transform: lowercase; /* texto en minúsculas */
    font-weight: normal;
    padding: 10px 25px;
    font-size: 1rem;
}

.tabla-relevos td {
    background-color: rgba(255, 255, 255, 0.05);
    color: white;
    padding: 10px 25px;
    font-size: 1rem;
    text-align: center;
    white-space: nowrap;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.partido-en-vivo {
    border: 2px solid red;
    animation: glow 1.5s infinite alternate;
}

@keyframes glow {
    from { box-shadow: 0 0 10px red; }
    to { box-shadow: 0 0 20px orange; }
}

.badge-en-juego {
  position: absolute;
  top: -10px;
  right: -10px;
  background-color: red;
  color: white;
  font-size: 0.6em;
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 4px;
  animation: parpadeo 1.5s infinite;
  z-index: 2;
}

.badge-estado {
  position: absolute;
  top: -10px;
  right: -10px;
  font-size: 0.6em;
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 4px;
  z-index: 2;
}

.badge-en-juego {
  background-color: red;
  color: white;
  animation: parpadeo 1.5s infinite;
}

.badge-finalizado {
  background-color: #28a745; /* Verde */
  color: white;
}

.badge-proximo {
  background-color: #ffc107; /* Amarillo */
  color: black;
}

async function obtenerRankingMVP() {
    const url = "https://sheets.googleapis.com/v4/spreadsheets/1jXvAdmw9ubG3H9AQppu76wxaJci_2TJu9BvLs0Xglyk/values/Resultados!A1:G100?key=AIzaSyDke45_zXwO6Kq0NulmGS1M3eaTGtjbMyA";

    try {
        const respuesta = await fetch(url);
        const data = await respuesta.json();
        const filas = data.values;

        const [encabezado, ...resultados] = filas;

        const conteoMVP = {};

        resultados.forEach(fila => {
            const mvp = fila[6];
            if (mvp && mvp.trim() !== "") {
                const jugador = mvp.trim();
                conteoMVP[jugador] = (conteoMVP[jugador] || 0) + 1;
            }
        });

        const ranking = Object.entries(conteoMVP).sort((a, b) => b[1] - a[1]);

        const cuerpoTabla = document.getElementById('tablaMVPs');
        cuerpoTabla.innerHTML = "";

        ranking.forEach(([jugador, cantidad]) => {
            const fila = document.createElement('tr');
            fila.innerHTML = `
                <td>${jugador}</td>
                <td><strong>${cantidad}</strong></td>
            `;
            cuerpoTabla.appendChild(fila);
        });

    } catch (error) {
        console.error("Error al cargar ranking MVPs:", error);
    }
}


.mvp-lider {
    background-color: rgba(255, 215, 0, 0.1); /* fondo dorado leve */
    animation: brillar 2s ease-in-out infinite alternate;
    font-weight: bold;
    position: relative;
}

@keyframes brillar {
    from {
        box-shadow: 0 0 8px rgba(255, 215, 0, 0.2);
    }
    to {
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.6);
    }
}

/* Colorear en blanco y negrita los equipos en juego */
.equipos-en-juego .equipo {
    color: white !important;
    font-weight: bold;
}

/* Estilos para etiquetas de estado en FIXTURE */
.finalizado,
.finalizada {
    color: red;
    font-weight: bold;
    animation: titilar 1s infinite;
}

.por-jugar {
    font-size: 0.8em;
    background-color: #4CAF50;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    margin-left: 10px;
    animation: parpadeo 1.5s infinite;
}

.reprogramado {
    background-color: #6c757d; /* gris oscuro */
    color: white;
    font-size: 0.8em;
    padding: 2px 6px;
    border-radius: 3px;
    margin-left: 10px;
    font-style: italic;
}



/* ------------------------------SOLO para móviles------------------------------------ */
/* Aca comienza todo lo relativo a responsives */


/* RESPONSIVE LOGIN - SOLO para móviles */
@media (max-width: 480px) {
  #loginScreen {
    top: 55%; /* más arriba para pantallas pequeñas */
    width: 90%; /* más adaptable a móviles */
    padding: 15px;
  }

  #passwordInput {
    font-size: 1em;
    padding: 8px;
  }

  #loginScreen button {
    font-size: 1em;
    padding: 10px 20px;
  }

  #subTitle {
    font-size: 1em;
    margin-bottom: 15px;
  }
}



/* RESPONSIVE MENÚ PRINCIPAL */
@media (max-width: 480px) {
  /* Título principal */
  #mainTitle {
    font-size: 2.2rem;
    padding: 0 10px;
  }

  /* Botones del menú */
  .menu-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
  }

  .menu-buttons button {
    width: 90%;
    max-width: 300px;
    font-size: 1rem;
    padding: 10px;
  }

  /* Marquesina de resultados */
  .marquesina-resultados {
    display: flex;
  flex-direction: row;
  align-items: center;
  background-color: black;
  color: white;
  font-size: 0.9em;
  padding: 8px 12px;
  white-space: nowrap;
  overflow: hidden;
  position: relative;
  border-radius: 8px;
  width: 100%;
  box-sizing: border-box;
  }

  #envivoPartido {
    margin-bottom: 6px;
    flex-wrap: wrap;
    font-size: 0.8em;
  }
  
   #envivoPartido .envivo-resultado {
    font-size: 0.9em;
  }
  

 #ultimosResultados span {
    animation: none;
    padding-left: 0;
    display: block;
    white-space: normal;
    font-size: 0.75em;
  }

  /* Imagen y banner de noticias */
  .contenedor-imagen-banner {
    flex-direction: column;
    gap: 15px;
    padding: 0 10px;
  }

  .contenedor-imagen {
    height: 250px;
  }

  .titulo-imagen {
    font-size: 0.8rem;
  }

  /* Banner de noticias en móvil */
.marquesina-container {
  flex-direction: column;
  height: auto;
  min-height: 100px;
  padding: 10px;
  background-color: rgba(0, 0, 0, 0.5);
  border-radius: 8px;
  overflow: hidden;
  margin-top: 10px;
}

  /* Contenedor de noticias con altura limitada */
.marquesina-content {
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}
  
/* Noticias individuales: sin desborde */
.marquesina-content .noticia {
  font-size: 0.85rem;
  padding: 0 5px;
  line-height: 1.2;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
}

/* Título "NOTICIAS AL INSTANTE" más chico */
.titulo-noticias {
  font-size: 0.7rem;
  text-align: center;
  padding: 5px 8px;
  border-bottom-right-radius: 6px;
  background-color: rgba(0, 0, 0, 0.7);
}



  /* ocultar imagen de proximos partidos del menu en moviles */
  @media screen and (max-width: 480px) {
  #imagenProximosPartidos {
    display: none;
  }
}

  
  
  
/* RESPONSIVE INFO DE EQUIPOS */ 
/* ✅ POR DEFECTO: OCULTAR BLOQUES MÓVILES EN ESCRITORIO */
.equipos-mobile {
  display: none !important;
  visibility: hidden;
  height: 0 !important;
  overflow: hidden !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* ✅ MOSTRAR BLOQUES MÓVILES SOLO EN CELULAR */
@media (max-width: 480px) {
  /* Ocultar solo la tabla de equipos y emblemas */
  #infoEquipos table:not(.tabla-relevos),
  #infoEquipos .emblemas-container {
    display: none !important;
  }

  /* Mostrar tabla de relevos en móvil */
  .tabla-relevos {
    width: 90%;
    margin: 20px auto;
    font-size: 0.85rem;
    border-radius: 8px;
  }

  .tabla-relevos th {
    background-color: rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    padding: 8px;
  }

  .tabla-relevos td {
    background-color: rgba(0, 0, 0, 0.3);
    padding: 6px 10px;
    font-size: 0.85rem;
  }
}


  /* Mostrar bloques móviles */
  .equipos-mobile {
    display: flex !important;
    visibility: visible;
    height: auto !important;
    overflow: visible !important;
    flex-direction: column;
    gap: 16px;
    padding: 0 10px;
    margin-top: 10px;
  }

  .equipo-bloque {
  background-color: rgba(255, 255, 255, 0.35); /* Leve tonalidad gris */
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 12px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

  

  .equipo-bloque img {
    width: 100px;
    height: auto;
    margin: 0 auto 10px auto;
    border-radius: 8px;
  }

  .equipo-bloque h3 {
    font-size: 1.1em;
    color: gold;
    margin-bottom: 6px;
  }

  .equipo-bloque ul {
  font-family: 'Urbanist', sans-serif;
  font-size: 1em;
  color: black;
  padding-left: 0;
  margin-top: 6px;
  font-weight: bold;
}

.equipo-bloque li {
  margin: 2px 0;
  line-height: 1.4;
}


  
  
 
  
  /* ✅ RESPONSIVE FIXTURE  */
@media (max-width: 480px) {
  #fixture {
    padding: 10px;
  }

  #fixture .fixture-container {
    font-size: 0.85em;
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.6);
    border-radius: 10px;
  }

  #fixture .fecha h2 {
    font-size: 1em;
    margin-bottom: 8px;
    line-height: 1.3;
  }

  #fixture .fecha ul li {
    font-size: 0.9em;
    line-height: 1.3;
    margin-bottom: 6px;
  }

  #fixture .por-jugar,
  #fixture .finalizado,
  #fixture .reprogramado {
    font-size: 0.7em;
    padding: 2px 5px;
    margin-left: 6px;
  }

  #fixture button {
    font-size: 0.9em;
    padding: 6px 14px;
    margin-top: 15px;
  }
}

  
  
  
  /* ✅ RESPONSIVE ESTADISTICAS */
@media (max-width: 480px) {
  #estadisticas {
    padding: 10px;
  }

  #estadisticas .screen-title {
    font-size: 1.5rem;
    margin-bottom: 10px;
  }

  #estadisticas .tabs {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    margin-bottom: 20px;
  }

  #estadisticas .tabs button {
    width: 90%;
    font-size: 1rem;
    padding: 10px;
  }

  .tab-content h2 {
    font-size: 1.2rem;
    margin-bottom: 10px;
  }

  .tabla-posiciones {
    font-size: 0.70rem; /* ✅ levemente más chica */
}

.tabla-goleadores {
    font-size: 0.85rem;
}

  }

  .tabla-posiciones th,
  .tabla-posiciones td,
  .tabla-goleadores th,
  .tabla-goleadores td {
    padding: 8px 5px;
    word-break: break-word;
  }

  .tabla-goleadores th:nth-child(1),
  .tabla-goleadores td:nth-child(1) {
    max-width: 130px;
  }

  .tabla-goleadores th:nth-child(2),
  .tabla-goleadores td:nth-child(2) {
    max-width: 100px;
  }

  #estadisticas button.volver-menu {
    width: 90%;
    margin: 20px auto;
    font-size: 1rem;
    padding: 10px;
  }

  /* MVPs - tabla igual que goleadores */
  #mvps .tabla-goleadores th,
  #mvps .tabla-goleadores td {
    padding: 8px;
    font-size: 0.85rem;
  }
}





/* RESPONSIVE RESULTADOS */
@media (max-width: 480px) {
  #resultados {
    padding: 15px;
    margin: 15px auto;
    max-width: 100%;
    border-radius: 8px;
  }

  .resultados-content {
    padding: 15px;
    margin-bottom: 15px;
  }

  .fecha-titulo {
    font-size: 1em;
    text-align: center;
    margin-bottom: 10px;
  }


  

  .encuentro {
    flex-direction: column !important;
    align-items: stretch !important;
    text-align: left !important;
    gap: 4px;
    padding: 10px 12px;
  }

  .equipo-goles {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center;
    width: 100%;
  }

  .equipo-izquierda,
  .equipo-derecha {
    text-align: left !important;
    flex: 1;
    font-weight: bold;
    color: white;
    font-size: 0.95em;
    
  }

  .goles {
    text-align: right !important;
    font-weight: bold;
    color: gold;
    min-width: 30px;
    margin-left: auto;
  }

  .separador {
    display: none !important;
  }

  /* MVP centrado y destacado */
  .encuentro p {
    text-align: center;
    font-size: 0.8em;
    color: #FFD700;
    margin: 6px 0 0 0;
  }
}

  .badge-estado {
    font-size: 0.65em;
    top: -5px;
    right: -5px;
    padding: 2px 5px;
  }

  .encuentro p {
    font-size: 0.75em;
    text-align:

      
      
      
      
      
   /* 📱 RESPONSIVE - CLIMA */
@media (max-width: 480px) {
  #clima {
    padding: 15px;
    margin: 10px;
    max-width: 100%;
  }

  #clima .clima-content {
    font-size: 0.85em;
    padding: 10px;
  }

  .pronostico-item {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
  }

  .pronostico-item p {
    margin: 4px 0;
    text-align: left;
    font-size: 0.85em;
    color: #fff;
  }

  #clima button {
    width: 100%;
    font-size: 1em;
    padding: 10px;
    margin-top: 15px;
  }
}

    
    
    
    /* 📱 RESPONSIVE - REGLAMENTO */
@media (max-width: 480px) {
  #reglamento {
    padding: 15px;
    margin: 10px auto;
    max-width: 100%;
  }

  #reglamento .reglamento-content {
    font-size: 0.85em;
    padding: 12px;
    line-height: 1.4;
  }

  #reglamento ul {
    padding-left: 15px;
  }

  #reglamento ul li {
    margin-bottom: 12px;
    text-align: left;
  }

  #reglamento h1.screen-title {
    font-size: 1.6rem;
    margin-bottom: 15px;
  }

  #reglamento button {
    width: 100%;
    padding: 10px;
    font-size: 1em;
    margin-top: 20px;
  }
}
