/* --- BASE GENERAL --- */
body {
    background: radial-gradient(circle, #f0f7ff 0%, #d1e9ff 100%);
    color: #2c3e50; 
    font-family: 'Segoe UI', Tahoma, sans-serif;
    display: flex; 
    justify-content: center; 
    align-items: center;
    min-height: 100vh; /* Cambiado de height a min-height para evitar cortes */
    margin: 0; 
    overflow-x: hidden; /* Evita scroll lateral */
}

.container { 
    text-align: center; 
    width: 90%; 
    max-width: 500px; 
    z-index: 10; 
    padding: 20px 0; /* Espacio para que no pegue a los bordes */
}

/* --- IMAGEN Y MARCO --- */
.marco-luz {
    border: 5px solid white; 
    border-radius: 50%; 
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1); 
    display: inline-block;
    transition: 0.3s;
}

#mago-img { 
    width: 160px; /* Reducido un poco para móviles */
    height: 160px; 
    object-fit: cover; 
    display: block; 
}

/* --- CONTADOR --- */
#contador-luz {
    margin-top: 10px; 
    font-size: 0.8rem; 
    color: #7f8c8d;
    background: rgba(255,255,255,0.8); 
    padding: 5px 15px;
    border-radius: 20px; 
    display: inline-block;
}

/* --- CAJA DE RESPUESTA --- */
.caja-texto {
    background: rgba(255, 255, 255, 0.95); 
    padding: 20px; 
    border-radius: 20px;
    margin: 15px 0; 
    box-shadow: 0 8px 30px rgba(0,0,0,0.06);
    min-height: 100px; 
    border: 1px solid #e1f0ff;
    word-wrap: break-word; /* Evita que el texto largo rompa el diseño */
}

.cita-biblica { 
    display: block; 
    color: #2980b9; 
    font-weight: bold; 
    margin-bottom: 8px; 
    font-size: 1rem; 
}

/* --- ENTRADA Y BOTONES --- */
input {
    width: 90%; /* Más ancho en móviles */
    padding: 14px; 
    border-radius: 30px; 
    border: 2px solid #3498db;
    text-align: center; 
    font-size: 16px; /* Evita el zoom automático de iOS al enfocar */
    outline: none; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    box-sizing: border-box; /* Asegura que el padding no sume al ancho */
}

.button-group {
    display: flex;
    flex-direction: column; /* Botones uno sobre otro en móviles */
    align-items: center;
    gap: 10px;
    margin-top: 15px;
}

.btn {
    width: 90%; /* Botones grandes fáciles de tocar */
    padding: 14px; 
    border-radius: 30px; 
    border: none; 
    color: white;
    font-weight: bold; 
    cursor: pointer; 
    display: none; 
    transition: 0.3s;
    font-size: 1rem;
}

/* --- ANIMACIONES Y EFECTOS --- */
.aura {
    position: absolute; 
    top: 50%; left: 50%; 
    transform: translate(-50%, -50%);
    width: 300px; /* Más pequeña para que no cause scroll en móvil */
    height: 300px; 
    border-radius: 50%; 
    z-index: 1;
    filter: blur(50px); 
    opacity: 0.3; 
    transition: 1.5s;
    pointer-events: none; /* Para que no interfiera con los clics */
}

.aura-paz { background: #3498db; }
.aura-amor { background: #f1c40f; }

.pulse-luz { animation: pulse 0.6s ease-out; color: #2980b9 !important; }

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* --- AJUSTES PARA PANTALLAS GRANDES (TABLETS/PC) --- */
@media (min-width: 600px) {
    #mago-img { width: 200px; height: 200px; }
    .button-group { flex-direction: row; justify-content: center; }
    .btn { width: auto; min-width: 180px; }
    input { width: 85%; }
    .aura { width: 500px; height: 500px; opacity: 0.4; }
}

/* --- AJUSTE PARA ALTURAS PEQUEÑAS (Móvil horizontal) --- */
@media (max-height: 500px) {
    body { display: block; }
    .container { margin: 20px auto; }
    #mago-img { width: 100px; height: 100px; }
}