lay.style.animation = 'fadeOut 0.3s ease-out forwards';

        // Wait for animation to complete before hiding elements
        setTimeout(() => {
            closeModal();
        }, 300); // 300ms to match the animation duration
    });

    function addPopupTextToForm() {
        const popupText = document.getElementById('popupText').innerText;
        document.getElementById('popupTextContent').value = popupText;
    }
</script>
</body>

</html>
