/* Estilos modernos y elegantes para la carta de amor con corazón de partículas */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    color: #fff;
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.contenedor {
    display: flex;
    flex-wrap: wrap;
    max-width: 1200px;
    width: 90%;
    margin: 0 auto;
    padding: 2rem;
    gap: 2rem;
    align-items: center;
    justify-content: center;
}

.lienzo-particulas-contenedor {
    flex: 1;
    min-width: 300px;
    height: 500px;
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
    position: relative;
}

.lienzo-particulas-contenedor::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,126,185,0.05) 0%, transparent 70%);
    pointer-events: none;
}

#lienzoParticulas {
    width: 100%;
    height: 100%;
    display: block;
}

.mensaje-amor {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    text-align: center;
    background: rgba(26, 26, 46, 0.85);
    padding: 2rem;
    border-radius: 20px;
    z-index: 10;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 126, 185, 0.5);
    opacity: 0;
    transition: all 1s ease;
}

.mensaje-amor.mostrar {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

.mensaje-amor h2 {
    color: #ff7eb9;
    font-size: 2rem;
    margin-bottom: 1rem;
}

.mensaje-amor p {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: #fff;
}

.controles {
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
    position: relative;
    z-index: 20;
}

button {
    background: linear-gradient(45deg, #ff7eb9, #ff758c);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(255, 117, 140, 0.4);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

button::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #ff758c, #ff7eb9);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

button:hover::after {
    opacity: 1;
}

button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255, 117, 140, 0.6);
}

button:active {
    transform: translateY(1px);
}

/* Efectos de pétalos */
.petalo {
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: #ff7eb9;
    border-radius: 50% 0;
    opacity: 0.8;
    z-index: 5;
    pointer-events: none;
}

/* Efectos de corazones flotantes */
.corazon-efecto {
    position: absolute;
    font-size: 24px;
    color: #ff7eb9;
    opacity: 0;
    z-index: 5;
    pointer-events: none;
    animation: levitar 3s ease-in-out forwards;
}

@keyframes levitar {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

/* Diseño responsivo */
@media (max-width: 768px) {
    .contenedor {
        flex-direction: column;
        padding: 1rem;
        gap: 1rem;
    }

    .lienzo-particulas-contenedor {
        width: 100%;
        height: 300px;
        min-height: 300px;
    }

    .controles {
        margin-top: 1rem;
    }

    button {
        padding: 0.7rem 1.2rem;
        font-size: 0.9rem;
    }

    .mensaje-amor {
        padding: 1.5rem;
    }

    .mensaje-amor h2 {
        font-size: 1.5rem;
    }

    .mensaje-amor p {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    body {
        padding: 0.5rem;
    }

    .contenedor {
        padding: 0.5rem;
        gap: 0.5rem;
    }

    .lienzo-particulas-contenedor {
        height: 250px;
        min-height: 250px;
    }

    .mensaje-amor {
        padding: 1rem;
        width: 90%;
    }

    .mensaje-amor h2 {
        font-size: 1.3rem;
    }

    .mensaje-amor p {
        font-size: 0.9rem;
    }

    button {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }
}

/* Para pantallas muy pequeñas */
@media (max-width: 360px) {
    .lienzo-particulas-contenedor {
        height: 200px;
        min-height: 200px;
    }

    .mensaje-amor {
        padding: 0.8rem;
    }

    .mensaje-amor h2 {
        font-size: 1.1rem;
    }

    .mensaje-amor p {
        font-size: 0.8rem;
    }

    button {
        padding: 0.5rem 0.8rem;
        font-size: 0.8rem;
    }
}

/* Animación para el título */
@keyframes titleFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

h1 {
    animation: titleFloat 3s ease-in-out infinite;
}