/* =========================================
   1. CONFIGURACIÓN BASE
   ========================================= */
:root { 
    --luna-blue: #0b183c;
    --luna-gold: #C79912;
}

body { 
    font-family: 'Open Sans', sans-serif; 
    background-color: #000000; /* Fondo negro externo */
    color: white; 
    margin: 0;
    display: flex;
    justify-content: center;
    min-height: 100vh;
}

h1, h2, h3, h4, .font-title, label, button { 
    font-family: 'Montserrat', sans-serif; 
}

/* 2. CONTENEDOR TIPO APP (Límite 800px) */
.app-container {
    width: 100%;
    max-width: 800px; 
    background-color: var(--luna-blue); 
    position: relative;
    box-shadow: 0 0 50px rgba(199, 153, 18, 0.15); 
    overflow-x: hidden;
}

/* 3. UTILIDADES VISUALES */
.text-gold { color: var(--luna-gold); }
.bg-gold { background-color: var(--luna-gold); }
.border-gold { border-color: var(--luna-gold); }

/* Efecto Vidrio */
.glass-effect { 
    background: rgba(11, 24, 60, 0.95); 
    backdrop-filter: blur(12px); 
    -webkit-backdrop-filter: blur(12px); 
    border-top: 1px solid rgba(199, 153, 18, 0.3); 
}

/* 4. FORMULARIOS */
.form-input { 
    width: 100%; 
    padding: 14px; 
    background-color: white; 
    border: 1px solid #ccc; 
    border-radius: 8px; 
    color: #333; 
    outline: none; 
    transition: all 0.3s; 
}

.form-input:focus { 
    border-color: var(--luna-gold); 
    box-shadow: 0 0 0 2px var(--luna-gold);
}

/* Radio Buttons */
input[type="radio"] { 
    accent-color: var(--luna-gold); 
    transform: scale(1.2); 
}

/* Carga de Archivos */
.file-upload-label { 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    padding: 12px; 
    background-color: rgba(255,255,255,0.05); 
    border: 1px dashed rgba(199, 153, 18, 0.5); 
    border-radius: 8px; 
    color: #ccc; 
    cursor: pointer; 
    text-align: center; 
    font-size: 0.85rem; 
    transition: all 0.3s;
}

.file-upload-label:hover { 
    background-color: rgba(199, 153, 18, 0.1); 
    border-color: var(--luna-gold); 
    color: var(--luna-gold); 
}

input[type="file"] { display: none; }

/* 5. MODALES Y ANIMACIONES */
#modal-aplicar, 
#modal-requisitos, 
#modal-gracias {
    z-index: 60 !important; 
}
.hidden { display: none !important; }

/* Scroll dentro del modal */
#modal-aplicar > div,
#modal-requisitos > div {
    max-height: 90vh; 
    overflow-y: auto; 
}

.animate-fade-up { 
    animation: fadeInUp 0.4s ease-out forwards; 
}
@keyframes fadeInUp { 
    from { opacity: 0; transform: translateY(20px); } 
    to { opacity: 1; transform: translateY(0); } 
}

/* REPRODUCTOR DE AUDIO */
.custom-audio {
    width: 100%; 
    height: 40px;
    border-radius: 20px;
    outline: none;
    display: block;
}
audio::-webkit-media-controls-panel {
    background-color: #f1f5f9;
}

/* =========================================
   6. VALIDACIÓN VISUAL INTENSA (RESTAURADA)
   ========================================= */

/* Animación "Terremoto" */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10% { transform: translateX(-10px); }
    30% { transform: translateX(10px); }
    50% { transform: translateX(-10px); }
    70% { transform: translateX(10px); }
    90% { transform: translateX(-5px); }
}

.form-shake {
    animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
}

/* Borde Rojo GRUESO para Inputs */
.input-error {
    border: 2px solid #ef4444 !important; 
    background-color: #fff0f0 !important;
}

/* Estilo de error para FOTOS */
.file-error {
    border: 2px dashed #ef4444 !important; 
    background-color: rgba(239, 68, 68, 0.15) !important;
    color: #ef4444 !important;
    position: relative; 
}

/* Texto "Falta este campo" */
.error-msg-text {
    display: block;
    color: #ef4444;
    font-size: 0.75rem;
    font-weight: bold;
    margin-top: 4px;
    text-align: left;
    animation: fadeIn 0.3s;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* PANTALLA DE CARGA */
.loading-overlay {
    position: absolute; 
    inset: 0; 
    background-color: rgba(11, 24, 60, 0.85); 
    backdrop-filter: blur(4px); 
    z-index: 100; 
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 1rem; 
}
.spinner-gold {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(199, 153, 18, 0.2); 
    border-left-color: #C79912; 
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* OCULTAR BARRA DE SCROLL EN CARRUSEL */
.hide-scroll::-webkit-scrollbar {
    display: none;
}
.hide-scroll {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* ANIMACIÓN "BRINQUITO" (Indica que se puede deslizar) */
@keyframes swipeHint {
    0%, 100% { transform: translateX(0); }
    30% { transform: translateX(-20px); }
    50% { transform: translateX(0); }
    70% { transform: translateX(-10px); }
}
.animate-swipe {
    animation: swipeHint 1.5s ease-in-out 1s 1; /* Espera 1s y hace el brinco */
}

/* ============================================================
   SECCIÓN: ANIMACIONES PERSONALIZADAS
   Sirve para: Dar movimiento suave a la aparición de modales.
   ============================================================ */

/* Define la animación de "Fade Up" (Aparecer subiendo) */
@keyframes fade-up {
    from {
        opacity: 0;
        transform: translateY(20px); /* Empieza un poco más abajo */
    }
    to {
        opacity: 1;
        transform: translateY(0); /* Termina en su posición original */
    }
}

/* Clase utilitaria para aplicar la animación */
.animate-fade-up {
    animation: fade-up 0.4s ease-out forwards;
}

/* (Opcional) Animación de rebote suave para el icono del modal */
@keyframes bounce-soft {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.animate-bounce-soft {
    animation: bounce-soft 2s infinite;
}

/* ============================================================
   SECCIÓN: ANIMACIONES PERSONALIZADAS (CORREGIDO)
   ============================================================ */

/* 1. FADE UP: Para que los modales entren suavemente desde abajo */
@keyframes fade-up {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-fade-up { 
    animation: fade-up 0.4s ease-out forwards; 
}

/* 2. REBOTE SUAVE: Para el botón "Quiero ser parte" */
@keyframes bounce-soft {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}
.animate-bounce-soft { 
    animation: bounce-soft 2s infinite; 
}

/* 3. RESPIRACIÓN TARJETA: Solo para el cuadro de "Pagos Puntuales"
   (Incluye cambio de borde y sombra dorada) */
@keyframes breathe-card {
    0%, 100% { 
        transform: scale(1); 
        border-color: #1f2d5a; 
        box-shadow: 0 0 0 rgba(0,0,0,0);
    }
    50% { 
        transform: scale(1.05); 
        border-color: #C79912; 
        box-shadow: 0 0 25px rgba(199, 153, 18, 0.4);
    }
}
.animate-breathe-card {
    animation: breathe-card 2.5s ease-in-out infinite;
}

/* 4. RESPIRACIÓN ICONO: Para el Emoji dentro del Modal
   (SOLO Escala, SIN bordes ni sombras para evitar el aro) */
@keyframes breathe-icon {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}
.animate-breathe-icon {
    animation: breathe-icon 2.5s ease-in-out infinite;
    display: inline-block; /* Vital para que la animación funcione */
}

/* ============================================================
   SECCIÓN: JUEGO / CALCULADORA (Estilos Específicos)
   ============================================================ */

/* 1. Perspectiva 3D */
/* Necesario para que la tarjeta de resultado tenga ese efecto de profundidad al aparecer */
.perspective-1000 {
    perspective: 1000px;
}

/* 2. Transiciones Suaves para las Opciones */
.game-option {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); /* Movimiento fluido */
    position: relative;
}

/* Efecto al presionar (Active) */
.game-option:active {
    transform: scale(0.98); /* Se encoge un poquito al hacer clic */
}

/* 3. Animación del Check */
.check-circle {
    transition: all 0.3s ease;
}

/* 4. Scrollbar oculta para contenedores internos si fuera necesario */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}