CN';
    if (!isInitial) {
        localStorage.setItem('preferredLanguage', document.documentElement.lang);
    }
    
    langEnOption.classList.toggle('active', targetLang === 'en');
    langZhOption.classList.toggle('active', targetLang === 'zh');
    document.querySelectorAll('[data-lang-zh], [data-lang-en]').forEach(el => {
        const text = el.getAttribute(`data-lang-${targetLang}`);
        if(text !== null) el.textContent = text;
    });
    document.querySelectorAll('[data-lang-placeholder-zh],