
/* --- ESTILOS GENERALES Y FUENTES --- */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 2rem; 
}

/* Aplicar Inter como fuente base a todo el sitio */
        body {
            font-family: 'Inter', sans-serif;
        }
        /* Asignar pesos según la jerarquía de los elementos */
        h1, h2 {
            font-weight: 800; /* Inter Extra-Bold para títulos principales */
            color: #4A4A49 !important;
        }
        h3, h4 {
            font-weight: 600; /* Inter Semi-Bold para subtítulos */
            color: #4A4A49 !important;
        }
        /* Párrafos, etiquetas y inputs usarán el peso por defecto (400 - Regular) */
        p, label, input {
            font-weight: 400;
        }
         p {
            color: #4A4A49 !important;
        }
 
        /* Botones usarán un peso intermedio para destacar */
        button {
            font-weight: 600; /* Inter Semi-Bold */
        }

        body {
            font-family: 'Inter', sans-serif; /* Usando una fuente similar a la de tu proyecto */
        }
        /* Contenedor del mapa, fijo en la parte superior */
        #map-container {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 33.33vh; /* Ocupa un tercio del alto de la pantalla */
            z-index: 30; /* CORRECCIÓN: Aumentado para que esté siempre arriba */
        }
        /* Contenedor del texto, con un margen superior para no quedar debajo del mapa */
        #chronicle-content {
            margin-top: 33.33vh;
            position: relative;
            /* z-index: 20; <-- CORRECCIÓN: Se elimina esta línea */
            background-color: white;
        }
        /* Clase para los párrafos que activarán el cambio en el mapa */
        .scroll-trigger {
            padding: 2rem 0; /* Espaciado para que el observador los detecte bien */
        }


        /* Estilos para el ciclista */
        #cyclist-wrapper {
            position: fixed;
            top: 45px;
            left: -7px;
            width: 80px;
            height: 80px;
            z-index: 100;
            opacity: 0; /* Inicialmente oculto */
            transition: opacity 0.3s ease-in-out;
            pointer-events: none; /* Para que no interfiera con el clic */
        }
        #cyclist-player {
            transition: transform 0.3s ease-in-out; /* Transición suave para la rotación */
        }

/* Estilos para el nuevo carrusel */
        #carousel-images {
            transition: transform 0.5s ease-in-out;
        }

/* --- ESTILOS DE LA RULETA --- */
#pointer {
    width: 0; 
    height: 0;
    position: absolute;
    z-index: 10;
    transition: all 0.3s ease;
    
    /* Estilos para crear una flecha roja apuntando desde la izquierda */
    border-top: 20px solid transparent;
    border-bottom: 20px solid transparent;
    border-left: none;
    border-right: 30px solid #ef4444; /* Flecha roja */

    /* Posicionamiento en el centro horizontal izquierdo */
    top: 44%;
    left: -10px; /* Un poco salido para que la punta toque el borde */
    transform: translateY(-50%); /* Centrado vertical perfecto */
    rotate: 180deg;
}

 /* --> NUEVO: Estilos para el contenedor de la bandera y el nombre */
    .flag-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        cursor: grab;
        transition: transform 0.2s ease;
        touch-action: none;
    }
    .flag-item:active {
        cursor: grabbing;
        transform: scale(1.1);
    }


/* --- ESTILOS DE LOS MODALES --- */
@keyframes zoomIn { from { transform: scale(0.5); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-zoom { animation: zoomIn 0.3s ease-out forwards; }
#intro-modal {
    position: fixed; inset: 0; background-color: rgba(0, 0, 0, 0.85); display: flex;
    justify-content: center; align-items: center; z-index: 100; padding: 1rem;
}
#intro-modal-content {
    background-color: white; padding: 2rem; border-radius: 0.75rem; text-align: center;
    max-width: 600px; width: 100%; box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}
#start-button {
    background-color: #22c55e; color: white; font-size: 1.5rem; font-weight: 900;
    padding: 0.75rem 2rem; border: none; border-radius: 0.5rem; cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease; margin-top: 1.5rem;
}
#start-button:hover { background-color: #16a34a; transform: scale(1.05); }

/* --- ESTILOS DE LAS SECCIONES DE JUEGO --- */
.juego-seccion {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
}

/* --- ESTILOS DEL JUEGO DE PIXELADO (JUEGO 2) --- */
.pixel-container {
    width: 300px;
    height: 300px;
    overflow: hidden;
    background-color: #f3f4f6;
    border-radius: 0.5rem;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    justify-content: center;
    align-items: center;
}
.pixel-container canvas {
    width: 100%;
    height: 100%;
    max-width:350px;
}

/* --- ESTILOS DEL JUEGO DE MEMORIA (JUEGO 3) --- */
.carta-memoria {
    width: 70px;
    height: 70px;
    position: relative;
    cursor: pointer;
    transform-style: preserve-3d;
    transition: transform 0.5s;
}
.carta-memoria.girada {
    transform: rotateY(180deg);
}
.cara {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 0.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2.5rem;
}
.dorso {
    background-color: #3b82f6;
    color: white;
}
.frente {
    background-color: #e5e7eb;
    transform: rotateY(180deg);
}


  /* Esta clase asegura que la carta se quede girada y le da un borde verde */
    .carta-memoria.acertada {
        cursor: default;
        border: 2px solid #22c55e; /* Borde verde */
        border-radius: 0.5rem;
    }

/* --- ESTILOS PARA EL BOTÓN DE GIRAR FLOTANTE --- */
#spin-btn-container {
    position: fixed;     /* Lo fija en la pantalla */
    bottom: 2rem;        /* A una distancia de la parte inferior */
    left: 50%;           /* Lo centra horizontalmente */
    transform: translateX(-50%); /* Ajuste fino del centrado */
    z-index: 50;         /* Se asegura de que esté por encima de las secciones de juego */
}

/* Agregamos un espacio en la parte inferior de la ruleta para que no se vea cortada */
#wheel-section {
    padding-bottom: 60px; /* Espacio extra en la parte inferior */
}


/* ▼▼▼ ESTILOS DEL JUEGO DE PREGUNTAS (JUEGO 1) - HOMOGENEIZADOS ▼▼▼ */

/* El contenedor principal del quiz ahora es transparente, sin estilos propios. */
.quiz_container {
    width: 100%;
    max-width: 500px; /* Le damos un ancho máximo para que no se estire demasiado */
}

/* El header del quiz, solo para espaciado. */
.quiz_header {
    padding: 1rem;
}

/* La pregunta (h2) con un estilo más prominente. */
.quiz_header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

/* La lista de opciones */
.quiz_header ul {
    list-style: none;
    padding: 0;
}

/* Cada opción de respuesta, ahora estilizada como un botón. */
.quiz_header ul li {
    background-color: #f3f4f6; /* Fondo gris claro */
    border: 2px solid #d1d5db; /* Borde gris */
    border-radius: 0.5rem;
    padding: 0.75rem;
    margin: 0.5rem 0;
    font-size: 1rem;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* Efecto al pasar el mouse sobre una opción */
.quiz_header ul li:hover {
    border-color: #3b82f6; /* Borde azul */
    background-color: #eff6ff; /* Fondo azul muy claro */
}

/* Estilo para la opción seleccionada */
.quiz_header ul li.selected {
    border-color: #2563eb;
    background-color: #dbeafe;
    font-weight: 700;
}


.quiz_header ul li label {
    margin-left: 0.5rem;
    cursor: pointer;
}

.quiz_header ul li input[type="radio"] {
    cursor: pointer;
}

.quiz_container {
margin-left:auto;
margin-right:auto;
}

.quiz_container button.submit {
    width: 100%;
    padding: 0.75rem 0;
    border: none;
    border-radius: 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    background-color: #3b82f6; /* Mismo azul que el dorso de las cartas de memoria */
    cursor: pointer;
    margin-top: 1rem;
    transition: background-color 0.2s ease;

}

.quiz_container button.submit:hover {
    background-color: #2563eb; /* Azul más oscuro */
}
/* ▲▲▲ FIN DE LOS ESTILOS DEL JUEGO DE PREGUNTAS ▲▲▲ */




    .basket {
        min-height: 150px; /* Reducido para mejor ajuste */
        transition: background-color 0.3s ease;
    }
    .basket.drag-over {
        background-color: #e0f2fe;
    }
    .flag {
        cursor: grab;
        transition: transform 0.2s ease;
        touch-action: none;
        width: 40px;
        height: 25px;
        object-fit: cover;
        border: 2px solid #ddd;
        border-radius: 4px;
    }
    .flag:active {
        cursor: grabbing;
        transform: scale(1.1);
    }
    .dragging {
        opacity: 0.4;
    }
    .correct {
        border-color: #22c55e;
    }
    .incorrect {
        border-color: #ef4444;
    }



/* --- ESTILOS RESPONSIVE PARA MÓVILES --- */
@media (max-width: 767px) {
    html, body { overflow-x: hidden; }
    #main-container { width: 100%; padding: 1rem; }
    #wheel-viewport {
        width: 110%;
        height: 700px;
        overflow: hidden;
        position: relative;
        transform: translateX(12%);
    }
    #wheel-container { position: absolute; left: 0; top: 0; }
.wheel-section {
    margin-top:-10%;
    margin-bottom:10%;
}
#girar {
    margin-top:-70%;
}
}


        