/**
 * i18n 字体样式覆盖
 * 将 styles.css 中的硬编码字体样式替换为 CSS 变量
 * 此文件必须在 i18n-fonts.css 之后、styles.css 之后引入
 */

/* ============================================
   基础样式
   ============================================ */

html, body {
    font-family: var(--font-family-primary);
}

/* ============================================
   导航栏
   ============================================ */

.nav-link {
    font-size: var(--font-size-nav);
    font-family: var(--font-family-primary);
}

.community-menu-item {
    font-family: var(--font-family-primary);
    font-size: var(--font-size-nav);
}

/* ============================================
   语言选择器
   ============================================ */

.lang-options-menu {
    font-size: var(--font-size-small);
    line-height: var(--line-height-normal);
}

html[lang="en-US"] .lang-options-menu,
body.lang-en-US .lang-options-menu {
    font-family: var(--font-family-secondary);
}

html[lang="zh-CN"] .lang-options-menu,
html[lang="zh-TW"] .lang-options-menu,
body.lang-zh-CN .lang-options-menu,
body.lang-zh-TW .lang-options-menu {
    font-family: var(--font-family-primary);
}

/* ============================================
   心愿单面板
   ============================================ */

.wishlist-btn-text {
    font-family: var(--font-family-primary);
    font-size: var(--font-size-wishlist-title);
}

.wishlist-title {
    font-family: var(--font-family-primary);
    font-size: var(--font-size-wishlist-title);
}

.release-date-label {
    font-family: var(--font-family-primary);
    font-size: var(--font-size-wishlist-footer);
    line-height: var(--line-height-normal);
}

.release-date-value {
    font-family: var(--font-family-primary);
    font-size: var(--font-size-wishlist-footer);
    line-height: var(--line-height-normal);
}

/* 英文心愿单样式 */
html[lang="en-US"] .wishlist-btn-text,
html[lang="en-US"] .wishlist-title,
html[lang="en-US"] .release-date-label,
html[lang="en-US"] .release-date-value,
body.lang-en-US .wishlist-btn-text,
body.lang-en-US .wishlist-title,
body.lang-en-US .release-date-label,
body.lang-en-US .release-date-value {
    font-family: var(--font-family-secondary);
}

/* ============================================
   新闻区块
   ============================================ */

/* 左侧导航栏 - 新闻列表项 */
.news-item-time {
    font-family: var(--font-family-secondary);
    font-size: var(--font-size-news-item-time);
    line-height: var(--line-height-normal);
}

.news-item-title {
    font-family: var(--font-family-primary);
    font-size: var(--font-size-news-item-title);
    line-height: var(--line-height-normal);
}

/* 未选中状态的新闻标题 */
.news-list-item:not(.selected) .news-item-title {
    font-size: var(--font-size-news-item-title-small);
}

/* 选中状态的新闻标题 */
.news-list-item.selected .news-item-title {
    font-size: var(--font-size-news-item-title);
}

/* 右侧预览区域 */
.news-preview-title {
    font-family: var(--font-family-primary);
    font-size: var(--font-size-news-preview-title);
    line-height: var(--line-height-normal);
}

.news-preview-description {
    font-family: var(--font-family-primary);
    font-size: var(--font-size-news-preview-desc);
    line-height: var(--line-height-normal);
}

/* 新闻弹窗 */
.news-modal-title {
    font-family: var(--font-family-primary);
    font-size: var(--font-size-news-modal-title);
    line-height: var(--line-height-normal);
}

.news-modal-subtitle {
    font-family: var(--font-family-primary);
    font-size: var(--font-size-body);
    line-height: var(--line-height-normal);
}

.news-modal-text {
    font-family: var(--font-family-primary);
    font-size: var(--font-size-news-modal-body);
    line-height: var(--line-height-normal);
}

/* 英文新闻样式 */
html[lang="en-US"] .news-item-title,
html[lang="en-US"] .news-preview-title,
html[lang="en-US"] .news-preview-description,
html[lang="en-US"] .news-modal-title,
html[lang="en-US"] .news-modal-subtitle,
html[lang="en-US"] .news-modal-text,
body.lang-en-US .news-item-title,
body.lang-en-US .news-preview-title,
body.lang-en-US .news-preview-description,
body.lang-en-US .news-modal-title,
body.lang-en-US .news-modal-subtitle,
body.lang-en-US .news-modal-text {
    font-family: var(--font-family-secondary);
}

/* ============================================
   游戏介绍区块
   ============================================ */

.intro-title {
    font-family: var(--font-family-primary);
    font-size: var(--font-size-intro-title);
    line-height: var(--line-height-tight);
}

.intro-description {
    font-family: var(--font-family-primary);
    font-size: var(--font-size-intro-desc);
    line-height: var(--line-height-normal);
}

/* 英文游戏介绍样式 */
html[lang="en-US"] .intro-description,
body.lang-en-US .intro-description {
    font-family: var(--font-family-secondary);
}

/* ============================================
   媒体下载区块
   ============================================ */

.media-tab-item {
    font-family: var(--font-family-primary);
    font-size: var(--font-size-body);
    line-height: var(--line-height-normal);
}

/* 英文媒体样式 */
html[lang="en-US"] .media-tab-item,
body.lang-en-US .media-tab-item {
    font-family: var(--font-family-secondary);
}

/* ============================================
   页脚
   ============================================ */

.footer-link {
    font-family: var(--font-family-primary);
    font-size: var(--font-size-footer-text);
    line-height: var(--line-height-normal);
}

.copyright-line {
    font-family: var(--font-copyright-zh-CN);
    font-size: var(--font-size-small);
    line-height: var(--line-height-normal);
}

/* 英文页脚样式 */
html[lang="en-US"] .footer-link,
html[lang="en-US"] .copyright-line,
body.lang-en-US .footer-link,
body.lang-en-US .copyright-line {
    font-family: var(--font-family-secondary);
}

/* ============================================
   其他欧洲语言字体覆盖
   ============================================ */

/* 西班牙语、葡萄牙语、法语、德语、意大利语、俄语使用西文字体 */
html[lang="es-ES"] .nav-link,
html[lang="es-ES"] .wishlist-btn-text,
html[lang="es-ES"] .wishlist-title,
html[lang="es-ES"] .news-item-title,
html[lang="es-ES"] .news-preview-title,
html[lang="es-ES"] .news-preview-description,
html[lang="es-ES"] .footer-link,
html[lang="pt-PT"] .nav-link,
html[lang="pt-PT"] .wishlist-btn-text,
html[lang="pt-PT"] .wishlist-title,
html[lang="pt-PT"] .news-item-title,
html[lang="pt-PT"] .news-preview-title,
html[lang="pt-PT"] .news-preview-description,
html[lang="pt-PT"] .footer-link,
html[lang="fr-FR"] .nav-link,
html[lang="fr-FR"] .wishlist-btn-text,
html[lang="fr-FR"] .wishlist-title,
html[lang="fr-FR"] .news-item-title,
html[lang="fr-FR"] .news-preview-title,
html[lang="fr-FR"] .news-preview-description,
html[lang="fr-FR"] .footer-link,
html[lang="de-DE"] .nav-link,
html[lang="de-DE"] .wishlist-btn-text,
html[lang="de-DE"] .wishlist-title,
html[lang="de-DE"] .news-item-title,
html[lang="de-DE"] .news-preview-title,
html[lang="de-DE"] .news-preview-description,
html[lang="de-DE"] .footer-link,
html[lang="it-IT"] .nav-link,
html[lang="it-IT"] .wishlist-btn-text,
html[lang="it-IT"] .wishlist-title,
html[lang="it-IT"] .news-item-title,
html[lang="it-IT"] .news-preview-title,
html[lang="it-IT"] .news-preview-description,
html[lang="it-IT"] .footer-link,
html[lang="ru-RU"] .nav-link,
html[lang="ru-RU"] .wishlist-btn-text,
html[lang="ru-RU"] .wishlist-title,
html[lang="ru-RU"] .news-item-title,
html[lang="ru-RU"] .news-preview-title,
html[lang="ru-RU"] .news-preview-description,
html[lang="ru-RU"] .footer-link,
body.lang-es-ES .nav-link,
body.lang-es-ES .wishlist-btn-text,
body.lang-es-ES .wishlist-title,
body.lang-es-ES .news-item-title,
body.lang-es-ES .news-preview-title,
body.lang-es-ES .news-preview-description,
body.lang-es-ES .footer-link,
body.lang-pt-PT .nav-link,
body.lang-pt-PT .wishlist-btn-text,
body.lang-pt-PT .wishlist-title,
body.lang-pt-PT .news-item-title,
body.lang-pt-PT .news-preview-title,
body.lang-pt-PT .news-preview-description,
body.lang-pt-PT .footer-link,
body.lang-fr-FR .nav-link,
body.lang-fr-FR .wishlist-btn-text,
body.lang-fr-FR .wishlist-title,
body.lang-fr-FR .news-item-title,
body.lang-fr-FR .news-preview-title,
body.lang-fr-FR .news-preview-description,
body.lang-fr-FR .footer-link,
body.lang-de-DE .nav-link,
body.lang-de-DE .wishlist-btn-text,
body.lang-de-DE .wishlist-title,
body.lang-de-DE .news-item-title,
body.lang-de-DE .news-preview-title,
body.lang-de-DE .news-preview-description,
body.lang-de-DE .footer-link,
body.lang-it-IT .nav-link,
body.lang-it-IT .wishlist-btn-text,
body.lang-it-IT .wishlist-title,
body.lang-it-IT .news-item-title,
body.lang-it-IT .news-preview-title,
body.lang-it-IT .news-preview-description,
body.lang-it-IT .footer-link,
body.lang-ru-RU .nav-link,
body.lang-ru-RU .wishlist-btn-text,
body.lang-ru-RU .wishlist-title,
body.lang-ru-RU .news-item-title,
body.lang-ru-RU .news-preview-title,
body.lang-ru-RU .news-preview-description,
body.lang-ru-RU .footer-link {
    font-family: var(--font-family-secondary);
}

/* 欧洲语言和其他西文语言游戏介绍标题使用 Alverata 字体 */
html[lang="en-US"] .intro-title,
html[lang="es-ES"] .intro-title,
html[lang="es-419"] .intro-title,
html[lang="pt-PT"] .intro-title,
html[lang="pt-BR"] .intro-title,
html[lang="fr-FR"] .intro-title,
html[lang="de-DE"] .intro-title,
html[lang="it-IT"] .intro-title,
html[lang="ru-RU"] .intro-title,
html[lang="vi-VN"] .intro-title,
body.lang-en-US .intro-title,
body.lang-es-ES .intro-title,
body.lang-es-419 .intro-title,
body.lang-pt-PT .intro-title,
body.lang-pt-BR .intro-title,
body.lang-fr-FR .intro-title,
body.lang-de-DE .intro-title,
body.lang-it-IT .intro-title,
body.lang-ru-RU .intro-title,
body.lang-vi-VN .intro-title {
    font-family: var(--font-alverata-en);
}

/* ============================================
   响应式调整
   ============================================ */

@media (max-width: 768px) {
    .intro-title {
        font-size: calc(var(--font-size-intro-title) * 0.5);
    }

    .news-modal-title {
        font-size: calc(var(--font-size-news-modal-title) * 0.875);
    }
}
