ocumentElement.classList.remove('dark-mode');
        document.documentElement.classList.add('light-mode');
        localStorage.setItem('theme', 'light');
    }
}
themeToggle.addEventListener('click', () => {
    const isDarkMode = document.documentElement.classList.contains('dark-mode');
    applyTheme(isDarkMode ? 'light' : 'dark');
});

function setLanguage(lang, isInitial = false) {
    const targetLang = lang === 'en' ? 'en' : 'zh';
    document.documentElement.lang = targetLang === 'en' ? 'en' : 'zh-