/* 中文字体本地化配置 */

/* 定义中文字体堆栈 */
@font-face {
  font-family: 'SimHei';
  font-style: normal;
  font-weight: normal;
  src: local('SimHei'), local('黑体'),
       url('../fonts/simhei.ttf') format('truetype');
  font-display: swap;
}

/* 备选中文字体 */
@font-face {
  font-family: 'Microsoft YaHei';
  font-style: normal;
  font-weight: normal;
  src: local('Microsoft YaHei'), local('微软雅黑'),
       local('SimHei'), local('黑体');
  font-display: swap;
}

/* 全局字体设置 */
html, body {
  font-family: "SimHei", "Microsoft YaHei", "微软雅黑", "黑体", "Arial", "Helvetica", sans-serif !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 英文内容保持原字体 */
.font-en, [lang="en"] {
  font-family: "Arial", "Helvetica", "Tahoma", "Verdana", sans-serif !important;
}

/* 数字和字母使用等宽字体 */
.font-mono, .code, pre, code {
  font-family: "Consolas", "Monaco", "Courier New", monospace, "SimHei" !important;
}

/* 标题字体优化 */
h1, h2, h3, h4, h5, h6 {
  font-family: "SimHei", "Microsoft YaHei", "微软雅黑", "黑体", "Arial", "Helvetica", sans-serif !important;
  font-weight: 600;
}

/* 按钮字体 */
.btn {
  font-family: "SimHei", "Microsoft YaHei", "微软雅黑", "黑体", "Arial", "Helvetica", sans-serif !important;
}

/* 表单字体 */
.form-control, .form-label {
  font-family: "SimHei", "Microsoft YaHei", "微软雅黑", "黑体", "Arial", "Helvetica", sans-serif !important;
}

/* 表格字体 */
.table {
  font-family: "SimHei", "Microsoft YaHei", "微软雅黑", "黑体", "Arial", "Helvetica", sans-serif !important;
}

/* 导航栏字体 */
.navbar {
  font-family: "SimHei", "Microsoft YaHei", "微软雅黑", "黑体", "Arial", "Helvetica", sans-serif !important;
}

/* 确保FontAwesome图标不受影响 */
.fa, .fas, .far, .fab, .fal {
  font-family: "Font Awesome 6 Free", "Font Awesome 5 Free", "FontAwesome" !important;
}