move('dark-mode');
      localStorage.setItem('theme', 'light');
    } else {
      // Dark mode is enabled in config, check other preferences
      const siteDefaultDark = html.getAttribute('data-dark-mode-default') === 'true';
      const prefersDark = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches;
      const storedTheme = localStorage.getItem('theme');
      
      if (storedTheme === 'dark' || (!storedTheme && siteDefaultDark)) {
        // Apply dark mode if:
        /