onst codeParam = params.get('code');
            
            if (codeParam) {
                try {
                    const decoded = decodeURIComponent(atob(codeParam));
                    editor.setValue(decoded);
                } catch (e) {
                    console.error('Failed to load code from URL:', e);
                }
            }
        }

        // Close dropdown when clicking outside
        document.addEventListener('click', function(event) {
            const dropdown = document.g