/* Fuente romántica */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;600&display=swap');

/* General */
body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;       /* Apila los elementos verticalmente */
    justify-content: flex-start;  /* Empieza desde arriba */
    align-items: center;
    min-height: 100vh;
    width: 100%;
    background: linear-gradient(to bottom, #db11a5, #fad0c4);
    overflow: hidden;
}

/* Sección Parallax (texto arriba de la tarjeta) */
.parallax {
    width: 100%;
    text-align: center;
    padding: 20px 10px;
    z-index: 1;
}

/* Fondo animado */
.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(120deg, #f980ff, #ffdde1);
    z-index: -1;
    animation: fondoAnimado 10s ease infinite;
}

@keyframes fondoAnimado {
    0% { background-position: 0 0; }
    100% { background-position: 100% 100%; }
}

/* Nieve o pétalos */
.snowflake {
    position: fixed;
    top: -50px;
    z-index: 1;
    color: #ef0fff;
    font-size: 1em;
    animation: caer 10s linear infinite;
    opacity: 0.8;
}

@keyframes caer {
    0% { transform: translateY(-100px) rotate(0deg); }
    100% { transform: translateY(100vh) rotate(360deg); }
}

/* Tarjeta */
.card {
    background: white;
    border-radius: 15px;
    padding: 30px 20px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    position: relative;
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
    animation: entradaZoom 0.8s ease-out;
    margin-top: 20px; /* Separación respecto a la sección parallax */
}

@keyframes entradaZoom {
    0% { transform: scale(0.5); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* Corazón animado */
.heart {
    width: 100px;
    height: 100px;
    background-color: red;
    position: relative;
    transform: rotate(-45deg);
    margin: 20px auto;
    animation: latido 1s infinite ease-in-out;
}

.heart:before,
.heart:after {
    content: "";
    width: 100px;
    height: 100px;
    background-color: red;
    border-radius: 50%;
    position: absolute;
}

.heart:before {
    top: -50px;
    left: 0;
}

.heart:after {
    left: 50px;
    top: 0;
}

.heart:hover {
    transform: scale(1.3) rotate(-45deg);
    animation: none;
}

@keyframes latido {
    0%, 100% { transform: scale(1) rotate(-45deg); }
    50% { transform: scale(1.1) rotate(-45deg); }
}

/* Botones */
.buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

button {
    padding: 10px 20px;
    border: none;
    font-size: 16px;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    transition: transform 0.2s ease;
    width: 100%; /* Para que ocupen todo el ancho en móviles */
}

button:hover {
    transform: scale(1.1);
}

#yes {
    background: #ff4081;
    color: white;
}

#no {
    background: #b0bec5;
    color: black;
}

#yes:hover {
    background: #d81b60;
}

#no:hover {
    background: #78909c;
}

/* Corazones y pétalos animados */
.amor {
    position: absolute;
    top: -50px;
    animation: caer 10s linear infinite;
    pointer-events: none;
    font-size: 1.5em;
    color: #FF69B4;
    opacity: 0.9;
}

/* Responsive para pantallas pequeñas */
@media screen and (max-width: 600px) {
    .card {
        width: 95%;
        padding: 15px;
    }

    h1 {
        font-size: 1.5em;
    }

    .message p {
        font-size: 1em;
    }

    button {
        font-size: 1em;
        padding: 8px 12px;
    }

    .amor {
        font-size: 1.2em;
    }
    
    .buttons {
        display: flex;
        flex-direction: column; /* Coloca los botones uno debajo del otro */
        gap: 10px;
        justify-content: center;
        align-items: center;
    }
    
    .background {
        height: 100%;
        animation: none; /* Desactiva la animación del fondo para mayor rendimiento */
    }
    
    /* Desactivar animaciones pesadas */
    .snowflake,
    .amor {
        display: none;
    }
}
