 'light');
            
            // Update editor theme immediately
            if (editor) {
                editor.setOption('theme', darkModeEnabled ? 'simpsons-dark' : 'default');
            }
            
            // Save preference
            localStorage.setItem('darkMode', darkModeEnabled);
        }

        // Load user preferences from localStorage
        function loadUserPreferences() {
            // Load advanced mode preference
            const advancedMode = localStorage.getItem('a