/* Paleta de colores pasteles */
:root {
    --lila-claro: #E6E6FA;
    --rosa-pastel: #FFD1DC;
    --rosa-fuerte: #FFB6C1;
    --blanco-transparente: rgba(255, 255, 255, 0.4);
    --texto-oscuro: #5C4B51;
}

body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(45deg, var(--lila-claro), var(--rosa-pastel), #fdf4ff);
    background-size: 200% 200%;
    animation: moverFondo 10s ease infinite;
    color: var(--texto-oscuro);
    
    /* CAMBIOS PARA CELULAR */
    min-height: 100vh; 
    overflow-x: hidden; /* Evita que se mueva a los lados */
    overflow-y: auto;   /* Permite bajar a leer */
}

@keyframes moverFondo {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Efecto cristal (Glassmorphism) */
.glass-card {
    background: var(--blanco-transparente);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(220, 180, 200, 0.3);
    max-width: 400px;
    width: 90%;
    transition: transform 0.5s ease, opacity 0.5s ease;
}

.icon-vuelo {
    font-size: 3rem;
    margin-bottom: 10px;
}

h1 {
    margin: 0;
    font-size: 1.8rem;
    color: #a87b9f;
}

.instruccion {
    font-size: 0.9rem;
    color: #8a6c7e;
    margin-bottom: 25px;
}

input {
    width: 80%;
    padding: 12px;
    border: 2px solid white;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.7);
    color: var(--texto-oscuro);
    font-size: 1rem;
    text-align: center;
    outline: none;
    transition: border-color 0.3s;
}

input:focus {
    border-color: var(--rosa-fuerte);
}

button {
    margin-top: 20px;
    padding: 12px 25px;
    background-color: var(--rosa-fuerte);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 182, 193, 0.5);
    transition: transform 0.2s, background-color 0.2s;
}

button:hover {
    background-color: #f7a1b0;
    transform: scale(1.05);
}

.oculto {
    display: none !important;
}

.error {
    color: #d9534f;
    font-size: 0.85rem;
    margin-top: 10px;
}

/* Clases para transiciones de JS */
.desvanecer {
    opacity: 0;
    transform: translateY(-50px);
    pointer-events: none;
}

/* --- SECCIÓN CUMPLEAÑOS --- */
.titulo-animado {
    font-size: 2.2rem;
    color: #d16b8c;
    margin-bottom: 15px;
    animation: latido 1.5s infinite;
}

.mensaje-romantico {
    font-size: 1.1rem;
    line-height: 1.5;
    margin-bottom: 25px;
}

/* Animación de latido para el título */
@keyframes latido {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Efecto de aparecer suavemente */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

#cumple-section:not(.oculto) {
    animation: fadeIn 1s ease forwards;
}


@keyframes flotar {
    from { transform: translateY(0); }
    to { transform: translateY(-15px); }
}

#btn-siguiente-1 {
    background-color: #a87b9f; /* Un lila más oscuro para variar */
}
#btn-siguiente-1:hover {
    background-color: #8a6c7e;
}

/* --- NUEVA ESTÉTICA SECCIÓN CUMPLEAÑOS CON EMBLEMAS --- */

/* Asegurar que la sección sea el contenedor relativo para los iconos absolutos */
#cumple-section {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden; /* Para que no salgan barras de scroll si un icono flota mucho */
}

/* Estilos para la tarjeta dentro de esta sección */
.card-cumple {
    z-index: 10; /* Por encima de los iconos de fondo */
    position: relative;
    padding: 30px; /* Un poco más ajustado */
}

/* Eevee principal dentro de la tarjeta */
.detalle-central {
    margin-bottom: -10px;
    margin-top: -20px;
}

.eevee-principal {
    width: 100px; /* Ajusta según el tamaño de tu imagen */
    height: auto;
    filter: drop-shadow(0 4px 8px rgba(255, 182, 193, 0.6));
    animation: balanceoTierno 3s ease-in-out infinite;
}

/* Animación de balanceo suave para Eevee central */
@keyframes balanceoTierno {
    0%, 100% { transform: rotate(-3deg) translateY(0); }
    50% { transform: rotate(3deg) translateY(-5px); }
}

/* --- ICONOS DE FONDO FLOTANTES --- */
.iconos-fondo-val {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none; /* Para que no bloqueen los clics en el botón */
    z-index: 1; /* Detrás de la tarjeta */
}

.icono-flotante {
    position: absolute;
    opacity: 0.7; /* Ligeramente transparentes para no distraer demasiado */
    filter: drop-shadow(0 4px 10px rgba(230, 230, 250, 0.5));
}

/* Posiciones y tamaños específicos para cada emblema */
.f-balon {
    width: 70px;
    top: 15%;
    left: 10%;
    animation: flotarMovil 6s ease-in-out infinite;
}

.f-tortuga {
    width: 80px;
    bottom: 15%;
    left: 15%;
    animation: flotarMovil 7s ease-in-out infinite 1s; /* Con retraso */
}

.f-eevee {
    width: 90px;
    top: 20%;
    right: 10%;
    animation: flotarMovil 5s ease-in-out infinite 0.5s;
}

/* Añadimos un Eevee extra pequeño cerca del botón para diversión */
/*
.glass-card::after {
    content: '';
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    background-image: url('eevee.png');
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.5;
}
*/

/* Animación de flotado errático para los iconos de fondo */
@keyframes flotarMovil {
    0%, 100% { transform: translateY(0) translateX(0) rotate(0deg); }
    33% { transform: translateY(-20px) translateX(10px) rotate(5deg); }
    66% { transform: translateY(10px) translateX(-10px) rotate(-5deg); }
}

/* Ajuste del título animado (ya lo tienes, pero aseguremos) */
.titulo-animado {
    font-size: 2rem;
    color: #b388eb; /* Un lila un poco más intenso */
    margin-top: 10px;
    margin-bottom: 10px;
    animation: latido 1.5s infinite;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
}

.mensaje-romantico {
    font-size: 1rem;
    line-height: 1.6;
    color: #5C4B51;
    margin-bottom: 25px;
    padding: 0 10px;
}

#contenedor-globos-ascendentes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* No bloquea clics en los botones */
    z-index: 5; /* Detrás de la tarjeta principal pero delante del fondo */
    overflow: hidden;
}

.globo-lila {
    position: absolute;
    bottom: -100px; /* Empiezan fuera de la pantalla por abajo */
    width: 40px;
    height: 50px;
    background-color: #E6E6FA; /* Lila pastel suave */
    border-radius: 50%; /* Forma ovalada */
    opacity: 0.8;
    box-shadow: inset -5px -10px 10px rgba(220, 208, 255, 0.5);
    animation: subir 8s linear infinite; /* Animación base */
}

/* El nudo del globo (triangulito abajo) */
.globo-lila::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 15px;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 8px solid #E6E6FA;
}

/* La animación principal: subida suave y desvanecimiento al final */
@keyframes subir {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.8;
    }
    80% {
        opacity: 0.6;
    }
    100% {
        transform: translateY(-120vh) rotate(15deg); /* Suben más allá del techo */
        opacity: 0; /* Desaparecen suavemente */
    }
}
/* --- SECCIÓN 3: EL BOLETO Y EL SELLO --- */

#aceptado-section {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Estilo tipo pase de abordar */
.boleto-replica {
    position: relative;
    border: 2px dashed #b388eb; /* Borde punteado lila */
    background: rgba(255, 255, 255, 0.85); /* Un poco más sólido para leer bien */
    overflow: hidden; /* Para que el sello no se salga de los bordes si es muy grande */
}

.detalles-boleto {
    text-align: left;
    margin: 20px 0;
    padding: 15px;
    background: rgba(255, 209, 220, 0.3); /* Fondo rosita muy tenue */
    border-radius: 10px;
    border-left: 5px solid #d16b8c; /* Línea de color a la izquierda */
}

.detalles-boleto p {
    margin: 8px 0;
    color: #5C4B51;
    font-size: 1.1rem;
}

.codigo-barras {
    font-family: monospace;
    font-size: 1.5rem;
    letter-spacing: 2px;
    text-align: center;
    margin-top: 15px;
    color: #8a6c7e;
    font-weight: bold;
}

/* --- ANIMACIÓN DEL SELLO --- */
.sello {
    position: absolute;
    top: 25%;
    right: 5%;
    color: #d16b8c; /* Rosa fuerte/rojo romántico */
    border: 5px solid #d16b8c;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 2.5rem;
    font-weight: 900;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-align: center;
    pointer-events: none; /* Para que no estorbe si cae sobre un texto */
    background: rgba(255, 255, 255, 0.7); /* Fondo un poco blanco para resaltar */
    box-shadow: 0 0 15px rgba(209, 107, 140, 0.4);
}

.sello span {
    display: block;
    font-size: 0.9rem;
    letter-spacing: 1px;
    margin-top: 5px;
    font-weight: bold;
}

.sello-animado {
    /* La magia del golpe: empieza grande y transparente, se hace normal de golpe */
    animation: estampar 0.5s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes estampar {
    0% { transform: rotate(-15deg) scale(4); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: rotate(-15deg) scale(1); opacity: 1; }
}

.mt-4 {
    margin-top: 1.5rem;
}
/* --- SECCIÓN 4: LA CARTA Y EL DESTINO --- */

#destino-section {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.carta-final {
    width: 90%; /* Se adapta al ancho del celular */
    max-width: 650px;
    padding: 30px 20px; /* Un poco menos de relleno a los lados en móvil */
    margin: auto;
}


.texto-carta {
    margin: 20px 0;
    font-size: 1.05rem;
    color: #5C4B51;
    line-height: 1.6;
    text-align: justify; /* Que se vea como una carta formal */
}

/* Estado inicial de los párrafos (invisibles y un poco más abajo) */
.linea-oculta {
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 1.5s ease, transform 1.5s ease;
    margin-bottom: 15px; /* Espacio entre párrafos */
}

/* Estado final de los párrafos (visibles) */
.linea-visible {
    opacity: 1;
    transform: translateY(0);
}

.destello-pregunta {
    font-weight: bold;
    font-size: 1.25rem;
    color: #d16b8c;
    text-align: center;
    margin-top: 30px;
    font-style: italic;
}

/* Botón final más llamativo */
#btn-final {
    background-color: #d16b8c;
    animation: latido 2s infinite;
    margin-top: 10px;
}
/* Centrado adaptable para todas las pantallas */
section {
    min-height: 100vh;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 0; /* Da un respiro arriba y abajo en celulares */
    box-sizing: border-box;
}