

.falling-heart {
    position: absolute;
    animation: fall linear infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    /* Allow some hearts to be behind, some in front */
    z-index: 10;
}

.falling-heart.behind {
    z-index: 1;
}

@keyframes fall {
    0% {
        transform: translateY(-100px) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.8;
    }
    90% {
        opacity: 0.8;
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

.glass-panel {
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

@keyframes leafShimmer {
    0%, 100% { transform: scale(1) rotate(0deg); opacity: 0.8; }
    50% { transform: scale(1.1) rotate(2deg); opacity: 1; }
}

@keyframes leafFall {
    0% { transform: translate(0, 0) rotate(0deg); opacity: 1; }
    25% { transform: translate(var(--sway), calc(var(--endY) * 0.25)) rotate(15deg); opacity: 1; }
    50% { transform: translate(calc(var(--sway) * -1), calc(var(--endY) * 0.5)) rotate(-15deg); opacity: 1; }
    75% { transform: translate(var(--sway), calc(var(--endY) * 0.75)) rotate(15deg); opacity: 0.5; }
    100% { transform: translate(calc(var(--sway) * -1), var(--endY)) rotate(-15deg); opacity: 0; }
}

.interaction-heart {
    position: absolute;
    width: 24px; /* Tamaño base, se escalará en JS */
    height: 24px;
    pointer-events-none; /* Asegurar que no bloqueen interacciones */
    will-change: transform, opacity; /* Optimización de rendimiento para animaciones */
}

/* Animación de la ESTELA (al deslizar/mover) */
@keyframes trailHeart {
    0% {
        transform: translate(-50%, -50%) scale(1.2); /* Empieza centrado y un poco más grande */
        opacity: 0.8;
    }
    100% {
        transform: translate(-50%, -150%) scale(0.6); /* Sube y se encoge */
        opacity: 0;
    }
}

/* Animación de la EXPLOSIÓN (al hacer clic/toque) */
@keyframes burstHeart {
    0% {
        /* JS definirá variables para dirección (--tx, --ty) y ángulo (--rot) */
        transform: translate(-50%, -50%) translate(0, 0) rotate(0deg) scale(1);
        opacity: 1;
    }
    20% {
        opacity: 1; /* Mantener visibilidad al inicio */
    }
    100% {
        /* Salir despedido radialmente, rotar y encogerse */
        transform: translate(-50%, -50%) translate(var(--tx), var(--ty)) rotate(var(--rot)) scale(0.4);
        opacity: 0;
    }
}

/* --- ESTILOS DEL REPRODUCTOR MP3 --- */
.player-glass {
    background: rgba(240, 249, 255, 0.4); /* Cristal azul hielo */
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 8px 32px rgba(30, 58, 138, 0.15);
}

.progress-bar-fill {
    background: linear-gradient(90deg, #1e3a8a, #7dd3fc);
}

/* --- ANIMACIÓN DE LATIDO PARA EL CORAZÓN GIGANTE --- */
@keyframes heartbeat {
    0% { transform: scale(1); }
    14% { transform: scale(1.08); } /* Primer latido */
    28% { transform: scale(1); }
    42% { transform: scale(1.08); } /* Segundo latido */
    70% { transform: scale(1); }    /* Pausa */
    100% { transform: scale(1); }
}

.animate-heartbeat {
    animation: heartbeat 1.5s infinite ease-in-out;
}

/* --- MARCO ORNAMENTAL Y FONDO (STITCH THEME) --- */
.ornamental-border {
    position: fixed;
    top: 72px; /* 56px del menú + 16px de espacio */
    left: 16px; 
    right: 16px; 
    bottom: 16px;
    border-radius: 24px;
    box-shadow: inset 0 0 40px rgba(30, 58, 138, 0.12); 
    pointer-events: none; 
    z-index: 0;
}
.ornamental-border::before, .ornamental-border::after {
    content: '';
    position: absolute;
    pointer-events: none;
}
.ornamental-border::before {
    top: 12px; left: 12px; right: 12px; bottom: 12px;
    border: 2px solid rgba(125, 211, 252, 0.4); 
    border-radius: 20px;
}
.ornamental-border::after {
    top: 24px; left: 24px; right: 24px; bottom: 24px;
    border: 1px solid rgba(30, 58, 138, 0.15); 
    border-radius: 12px;
}
.corner-motif {
    position: absolute;
    width: 50px; height: 50px;
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.6;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M0,0 C40,0 60,40 100,100 C60,40 0,60 0,0 Z' fill='%237dd3fc'/%3E%3C/svg%3E");
}
@media (min-width: 640px) { .corner-motif { width: 70px; height: 70px; } }

/* Ajuste exacto de las esquinas */
.corner-tl { top: 4px; left: 4px; }
.corner-tr { top: 4px; right: 4px; transform: scaleX(-1); }
.corner-bl { bottom: 4px; left: 4px; transform: scaleY(-1); }
.corner-br { bottom: 4px; right: 4px; transform: scale(-1, -1); }

/* =========================================
   === ESTILOS EXCLUSIVOS DE OUR STORY   ===
   ========================================= */

.glass-card {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(12, 103, 128, 0.15);
}

.photo-frame {
    border: 4px solid #D4AF37; /* Borde Champagne/Dorado */
    padding: 8px;
    background-color: white;
    box-shadow: 0 25px 50px -12px rgba(12, 103, 128, 0.25);
    position: relative;
}

.photo-frame::after {
    content: '';
    position: absolute;
    top: 2px; left: 2px; right: 2px; bottom: 2px;
    border: 1px solid #0c6780; /* Borde interior Azul Rey */
    pointer-events: none;
}