 {
            const dropdown = document.getElementById('examplesDropdown');
            dropdown.classList.toggle('show');
        }

        function loadExample(exampleKey) {
            if (examples[exampleKey]) {
                editor.setValue(examples[exampleKey]);
                toggleExamples(); // Close dropdown
                clearOutput();
            }
        }

        function shareCode() {
            const code = editor.getValue();
            const encoded = btoa(encodeURIComponent(code