n = document.getElementById('download-btn');
        const formatSelect = document.getElementById('download-format');
        const closeBtn = document.getElementById('close-download-options-popup');
        const popup = document.getElementById('download-options-popup');

        downloadBtn.addEventListener('click', function () {
            const format = formatSelect.value;
            downloadMindmap(format);
        });

        closeBtn.addEventListener('click', function () {
            popup.style.