 `字符数: ${count}`;
    const durationSeconds = Math.max(0, Math.round((count / CHARS_PER_MINUTE) * 60));
    durationEstimate.textContent = lang === 'en' ? `Est. Duration: ${durationSeconds} sec` : `估计时长: ${durationSeconds} 秒`;
}
function setButtonState(state) {
    const lang = document.documentElement.lang.startsWith('zh') ? 'zh' : 'en';
    if (state === 'loading') {
        generateBtn.disabled = true;
        generateBtnContent.style.display = 'none';
        generateBtnText.textContent 