/* =======================================
    ESTILOS BASE / RESPONSIVE
    ======================================= */
body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
    color: #eaf2ff; /* Texto principal claro */
    
    /* -------------------------------------
       👉 INICIO: FONDO CON IMAGEN Y OVERLAY
       ------------------------------------- */
    /* 1. Imagen de fondo (Ajusta la ruta) */
    background: url('/public/img/fondo-registro.png') no-repeat center center fixed;
    background-size: cover;
    
    /* 2. Overlay oscuro para mejorar la legibilidad del texto (Superpone un color) */
    background-color: #09325b; /* Fondo muy oscuro como fallback */
    background-blend-mode: overlay; /* Mezcla el color con la imagen */
    /* Puedes ajustar el color de fondo para cambiar el tono del overlay */
    
    /* -------------------------------------
       👉 FIN: FONDO
       ------------------------------------- */
    
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    box-sizing: border-box;
    padding: 20px; /* Padding para evitar pegarse a los bordes en móvil */
}

.trivia-container {
    background: rgba(20, 31, 44, 0.95); /* Contenedor ligeramente más claro y un poco transparente */
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    width: 100%;
    max-width: 650px; /* Límite para escritorio */
    text-align: center;
    /* Borde inicial */
    border: 1px solid rgba(58, 71, 213, 0.5);
    position: relative; /* Importante para posicionar el botón de Home */

    /* === ANIMACIÓN DE BRILLO EN EL BORDE === */
    animation: borderGlow 3s infinite alternate; /* Aplica la animación */
}

/* === ESTILO DEL BOTÓN DE HOME === */
.home-btn {
    position: absolute;
    top: 15px; /* Separación superior */
    left: 15px; /* Separación izquierda */
    background: none;
    border: none;
    color: #8a2be2; /* Color morado */
    font-size: 1.5em;
    cursor: pointer;
    padding: 10px;
    border-radius: 50%;
    transition: all 0.2s ease;
    z-index: 10; /* Asegura que esté sobre el contenido */
}

.home-btn:hover {
    color: #a052ff; /* Morado más claro al pasar el ratón */
    background-color: rgba(138, 43, 226, 0.1);
    transform: scale(1.1);
}

/* === KEYFRAMES PARA LA ANIMACIÓN DEL BORDE === */
@keyframes borderGlow {
    0% {
        border-color: rgba(58, 71, 213, 0.5); /* Color inicial del borde */
        box-shadow: 0 0 15px rgba(58, 71, 213, 0.5); /* Resplandor sutil inicial */
    }
    50% {
        border-color: rgba(138, 43, 226, 0.8); /* Color intermedio (más brillante) */
        box-shadow: 0 0 25px rgba(138, 43, 226, 0.8), 0 0 40px rgba(138, 43, 226, 0.3); /* Resplandor más intenso */
    }
    100% {
        border-color: rgba(58, 71, 213, 0.5); /* Vuelve al color inicial */
        box-shadow: 0 0 15px rgba(58, 71, 213, 0.5); /* Resplandor sutil final */
    }
}


h1 {
    color: #ffffff;
    font-size: clamp(1.8em, 5vw, 2.5em); /* Responsive font size */
    margin-bottom: 10px;
}

h2 {
    color: #ffffff;
    margin-top: 20px;
}

/* =======================================
    PREGUNTAS
    ======================================= */
.question {
    background: #1e2a3a;
    padding: 20px 15px; /* Ajuste para móvil */
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: left;
    box-shadow: 0 0 10px rgba(0, 119, 255, 0.1);
}

.question h3 {
    color: #5d8aff;
    margin-top: 0;
    font-size: clamp(1em, 4vw, 1.2em);
}

.question p {
    font-size: clamp(1.1em, 4vw, 1.3em);
    color: #eaf2ff;
    margin-bottom: 15px;
}
/* =======================================
    BOTONES DE OPCIÓN (GRAN TAMAÑO TÁCTIL)
    ======================================= */
.options {
    display: grid;
    grid-template-columns: 1fr; /* Una columna en móvil */
    gap: 10px;
}

@media (min-width: 500px) {
    .options {
        grid-template-columns: 1fr 1fr; /* Dos columnas en tablet/desktop */
    }
}

.option-btn {
    background: #253141;
    color: #eaf2ff;
    border: 1px solid #3a47d5;
    padding: 15px; /* Aumenta el área táctil */
    border-radius: 8px;
    cursor: pointer;
    font-size: clamp(0.9em, 3vw, 1em);
    transition: all 0.2s ease;
    text-align: center; /* Centrar texto en botón */
    min-height: 50px; /* Altura mínima para mejor tacto */
}

.option-btn:hover:not(:disabled) {
    background: #3a47d5;
    box-shadow: 0 0 10px rgba(58, 71, 213, 0.5);
    transform: translateY(-2px);
}

.option-btn:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

/* Retroalimentación */
.option-btn.correct {
    background: #1abc9c; /* Verde */
    border-color: #1abc9c;
    box-shadow: 0 0 15px rgba(26, 188, 156, 0.7);
    color: #0b1219;
    font-weight: bold;
}

.option-btn.incorrect {
    background: #e74c3c; /* Rojo */
    border-color: #e74c3c;
    color: #0b1219;
    font-weight: bold;
}

/* =======================================
    BOTONES DE NAVEGACIÓN
    ======================================= */
.btn-primary, .btn-secondary {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 15px 30px;
    border: none;
    border-radius: 10px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    margin-top: 20px;
    transition: all 0.3s ease;
    text-decoration: none;
    text-transform: uppercase;
}

.btn-primary {
    background: linear-gradient(90deg, #3a47d5, #8a2be2);
    color: #eaf2ff;
    box-shadow: 0 5px 20px rgba(138, 43, 226, 0.4);
}

.btn-primary:hover {
    background: linear-gradient(90deg, #5d8aff, #a052ff);
    box-shadow: 0 5px 25px rgba(138, 43, 226, 0.7);
    transform: translateY(-2px);
}

.btn-secondary {
    background: #1e2a3a;
    color: #5d8aff;
    border: 2px solid #5d8aff;
}

.btn-secondary:hover {
    background: #3a47d5;
    color: #eaf2ff;
    border-color: #3a47d5;
    transform: translateY(-2px);
}
/* =======================================
    RESULTADOS
    ======================================= */
#trivia-results h2 {
    font-size: clamp(2em, 8vw, 4em);
    color: #1abc9c;
}

#resultMessage {
    font-size: clamp(1em, 4vw, 1.4em);
    padding: 10px 0;
}
