"scale(1)";
            glow.style.transform = "scale(1)";
            glow.style.opacity = "0.4";
            particles.style.opacity = "0.4";
          }, beatSpeed);
        }, beatDuration);

        // Update transition speed based on heart rate
        const heart = document.getElementById("heart");
        const glow = document.getElementById("glow");
        const transitionSpeed = `${beatDuration * 0.2}ms`;

        heart.style.transition = `transform ${transitionSpeed} ease-in-out`;
        glow.s