

.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;
}

/* =========================================
   === ESTILOS DEL TABLERO OHANA MEMORIES ===
   ========================================= */

/* Fondo de corcho procedural (Granulado puro con SVG y CSS) */
.bg-wood-board {
    background-color: #a87b51; /* Tono base cálido de corcho */
    background-image: 
        /* 1. Generador de ruido para la textura de granulado */
        url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.12'/%3E%3C/svg%3E"),
        /* 2. Viñeta oscura en los bordes para hundir el tablero y dar iluminación al centro */
        radial-gradient(circle at center, transparent 20%, rgba(40, 20, 0, 0.75) 120%);
    background-size: 120px 120px, cover; /* El granulado se repite fino, la viñeta cubre todo */
    background-position: center;
    background-attachment: fixed;
    /* Sombra extra en los marcos de la pantalla */
    box-shadow: inset 0 0 120px rgba(0,0,0,0.8);
}

.bg-hearts-collage {
    background-color: #002366; 
    /* Reemplaza con tu imagen de corazones generada por IA */
    background-image: url('resources/tu-collage-corazones.jpg'); 
    background-size: cover;
    background-position: center;
}

/* --- POST-IT NOTE --- */
.post-it-note {
    width: 170px;
    min-height: 170px;
    height: auto;
    /* Sky Blue (Tertiary) de la paleta */
    /* Sky Blue (Tertiary) de la paleta */
    background: linear-gradient(135deg, #baeaff 0%, #89d0ed 100%); 
    /* Sombra profunda con tinte azulado */
    box-shadow: 3px 5px 15px rgba(0, 35, 102, 0.2), inset -2px -2px 10px rgba(0,0,0,0.05);
    position: relative;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
    /* Irregularidad de papel cortado */
    border-radius: 2px 8px 2px 12px; 
}
.post-it-note::before {
    /* Líneas de renglón sutiles */
    content: '';
    position: absolute;
    top: 40px; left: 10%; right: 10%; bottom: 10%;
    background: repeating-linear-gradient(transparent, transparent 23px, rgba(0, 53, 68, 0.1) 24px);
    pointer-events: none;
}
.post-it-note:hover {
    transform: scale(1.1) rotate(0deg) !important;
    z-index: 20;
    box-shadow: 8px 20px 30px rgba(0, 35, 102, 0.3);
}

/* Tachuela (Hibiscus Red Accent) */
.tack-pin {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 14px;
    height: 14px;
    /* Error container palette para rojo oscuro/vibrante */
    background: radial-gradient(circle at 30% 30%, #ffb4ab, #93000a); 
    border-radius: 50%;
    /* Sombra que detalla la altura del pin */
    box-shadow: 2px 8px 6px rgba(0,0,0,0.3), inset -2px -2px 4px rgba(0,0,0,0.4);
    z-index: 5;
}
.tack-pin::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 4px; height: 4px;
    background: rgba(255,255,255,0.7);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

/* --- ENVELOPE (TIME CAPSULE) --- */
.time-capsule-wrapper {
    position: relative;
}
.time-capsule {
    width: 200px;
    height: 130px;
    /* Royal Blue (Secondary Container) */
    background: #013fb9; 
    position: relative;
    box-shadow: 0 10px 25px rgba(0, 35, 102, 0.4);
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    border-radius: 4px;
    overflow: hidden;
}
.time-capsule:hover {
    transform: scale(1.05) translateY(-5px) !important;
    z-index: 20;
}
.time-capsule:hover .wax-seal {
    filter: drop-shadow(0 0 8px rgba(255, 180, 171, 0.6)); /* Soft glow */
    transform: translate(-50%, -50%) scale(1.1);
}

/* Solapas del sobre */
.time-capsule::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    /* Flap superior ligeramente más claro */
    border-top: 70px solid #2a4386; 
    border-left: 100px solid transparent;
    border-right: 100px solid transparent;
    z-index: 2;
    transform-origin: top;
    transition: transform 0.8s ease-in-out;
    filter: drop-shadow(0 2px 2px rgba(0,0,0,0.2));
}
.time-capsule::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    /* Flap inferior */
    border-bottom: 65px solid #003baf;
    border-left: 100px solid transparent;
    border-right: 100px solid transparent;
    z-index: 1;
}

/* Sello de cera rojo (Hibiscus Red) */
.wax-seal {
    position: absolute;
    top: 65px;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ffb4ab; /* Fondo del icono */
    background-color: #93000a;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    z-index: 3;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3), inset 0 0 4px rgba(255,255,255,0.2);
    transition: all 0.3s ease;
}

/* Animación de apertura del sobre */
.envelope-opening .time-capsule::before {
    transform: rotateX(180deg); 
    z-index: 0; 
}
.envelope-opening .wax-seal {
    opacity: 0; 
    transform: translate(-50%, -50%) scale(0);
}
.letter-paper {
    position: absolute;
    bottom: 0;
    left: 10px;
    right: 10px;
    height: 90%;
    background: #f0f9ff;
    z-index: 1;
    transform: translateY(100%);
    opacity: 0;
    border-radius: 4px 4px 0 0;
}
.envelope-opening .letter-paper {
    animation: pullPaper 1.2s cubic-bezier(0.34, 1.56, 0.64, 1) 0.4s forwards;
}

@keyframes pullPaper {
    0% { transform: translateY(100%); opacity: 0; }
    50% { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(-20%); opacity: 1; z-index: 10; }
}   