/* 思源黑体完整字重定义 */
@font-face {
    font-family: 'Source Han Sans CN';
    src: url('./SourceHanSansCN-Extralight.otf') format('opentype');
    font-weight: 100;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Source Han Sans CN';
    src: url('./SourceHanSansCN-Light.otf') format('opentype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Source Han Sans CN';
    src: url('./SourceHanSansCN-Normal.otf') format('opentype');
    font-weight: 350;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Source Han Sans CN';
    src: url('./SourceHanSansCN-Regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Source Han Sans CN';
    src: url('./SourceHanSansCN-Medium.otf') format('opentype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Source Han Sans CN';
    src: url('./SourceHanSansCN-Bold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Source Han Sans CN';
    src: url('./SourceHanSansCN-Heavy.otf') format('opentype');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

/* === 全局强制应用 === */
* {
    font-family: 'Source Han Sans CN', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif !important;
}

/* === 具体元素细化控制 === */

/* 正文 */
body, p, div, span, li, td, th, article, section {
    font-weight: 400; /* Regular */
}

/* 标题 */
h1 {
    font-weight: 900 !important; /* Heavy */
    font-size: 2.5em;
}

h2 {
    font-weight: 700 !important; /* Bold */
    font-size: 2em;
}

h3 {
    font-weight: 700 !important; /* Bold */
    font-size: 1.75em;
}

h4 {
    font-weight: 500 !important; /* Medium */
    font-size: 1.5em;
}

h5 {
    font-weight: 500 !important; /* Medium */
    font-size: 1.25em;
}

h6 {
    font-weight: 400 !important; /* Regular */
    font-size: 1em;
}

/* 表单 */
input, textarea, select, button {
    font-weight: 400 !important;
    font-family: 'Source Han Sans CN', sans-serif !important;
}

/* 超细文本 */
.thin-text, .light-text {
    font-weight: 100 !important; /* Extralight */
}

/* 细体 */
.lighter-text {
    font-weight: 300 !important; /* Light */
}

/* 中等加粗 */
.medium-text, strong {
    font-weight: 500 !important; /* Medium */
}

/* 加粗 */
.bold-text, b, strong {
    font-weight: 700 !important; /* Bold */
}

/* 超粗 */
.heavy-text, .extra-bold {
    font-weight: 900 !important; /* Heavy */
}

/* === 针对FastAdmin后台特殊元素 === */
.navbar-brand, 
.navbar-header, 
.sidebar-menu, 
.content-header h1,
.box-title,
.panel-title {
    font-family: 'Source Han Sans CN', sans-serif !important;
}

/* 表格 */
.table th {
    font-weight: 500 !important; /* Medium */
}

.table td {
    font-weight: 400 !important; /* Regular */
}

/* 按钮 */
.btn {
    font-weight: 500 !important; /* Medium */
}

/* 导航菜单 */
.navbar-nav > li > a {
    font-weight: 500 !important;
}

/* 侧边栏 */
.sidebar-menu > li > a {
    font-weight: 500 !important;
}

/* 面包屑 */
.breadcrumb > li {
    font-weight: 400 !important;
}

/* 标签页 */
.nav-tabs > li > a {
    font-weight: 500 !important;
}

/* 模态框 */
.modal-title {
    font-weight: 700 !important;
}

/* 警告框 */
.alert {
    font-weight: 400 !important;
}

/* 进度条 */
.progress-text {
    font-weight: 400 !important;
}

/* 分页 */
.pagination > li > a {
    font-weight: 400 !important;
}

/* 卡片标题 */
.card-title, .card-header {
    font-weight: 700 !important;
}

/* 代码 */
code, pre, kbd, samp {
    font-family: 'Source Han Sans CN', monospace !important;
    font-weight: 400 !important;
}