/**
 * 全局字体设置
 * 使用 Noto Serif SC 作为主字体，确保中英文协调
 */

/* 引入 Noto Serif SC 字体（Google Fonts提供的高质量中文字体） */
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;500;600;700&display=swap');

/* 全局字体设置 - Noto Serif SC 对中英文都有完美支持 */
body {
    font-family: 'Noto Serif SC', 'Source Han Serif SC', 'Songti SC', SimSun, serif !important;
    font-weight: 400 !important;
    line-height: 1.6 !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* 确保所有元素继承字体 */
* {
    font-family: 'Noto Serif SC', 'Source Han Serif SC', 'Songti SC', SimSun, serif !important;
    font-weight: inherit;
}

/* 输入框、按钮等表单元素 */
input,
textarea,
select,
button {
    font-family: 'Noto Serif SC', 'Source Han Serif SC', 'Songti SC', SimSun, serif !important;
    font-weight: 400 !important;
    line-height: 1.5 !important;
}

/* 表格 */
table,
th,
td {
    font-family: 'Noto Serif SC', 'Source Han Serif SC', 'Songti SC', SimSun, serif !important;
    line-height: 1.6 !important;
}

/* 标题 - 使用正常字重避免过粗 */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Noto Serif SC', 'Source Han Serif SC', 'Songti SC', SimSun, serif !important;
    font-weight: 500 !important;
    line-height: 1.4 !important;
}

/* 普通文本段落 */
p {
    font-family: 'Noto Serif SC', 'Source Han Serif SC', 'Songti SC', SimSun, serif !important;
    font-weight: 400 !important;
    line-height: 1.6 !important;
}

/* 链接 */
a {
    font-family: 'Noto Serif SC', 'Source Han Serif SC', 'Songti SC', SimSun, serif !important;
    font-weight: 400 !important;
}

/* 列表 */
ul, ol, li {
    font-family: 'Noto Serif SC', 'Source Han Serif SC', 'Songti SC', SimSun, serif !important;
    font-weight: 400 !important;
    line-height: 1.6 !important;
}

/* 粗体文本 - 避免过粗 */
b, strong {
    font-weight: 500 !important;
}

/* 代码和预格式化文本保持等宽字体 */
code,
pre,
kbd,
samp {
    font-family: 'Courier New', Courier, monospace !important;
}

/* 修复垂直对齐问题 */
* {
    vertical-align: baseline;
}

/* Bootstrap 组件字体修复 */
.btn,
.form-control,
.form-select,
.input-group-text,
.dropdown-item,
.nav-link,
.card,
.badge,
.alert {
    font-family: 'Noto Serif SC', 'Source Han Serif SC', 'Songti SC', SimSun, serif !important;
    font-weight: 400 !important;
}
