/*!
 * 本地安全字体定义 - 避免版权风险
 * 使用系统内置字体和已下载的开源字体
 */

/* Roboto 本地字体定义 */
@font-face {
  font-family: 'Roboto Local';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/roboto-regular.woff2') format('woff2');
}

@font-face {
  font-family: 'Roboto Local';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/roboto-bold.woff2') format('woff2');
}

/* 安全的字体堆栈定义 */
:root {
  /* 西文字体堆栈 - 优先使用本地Roboto，回退到系统字体 */
  --font-family-sans: 'Roboto Local', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  
  /* 中文字体堆栈 - 使用系统内置中文字体 */
  --font-family-chinese: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', '微软雅黑', 'Source Han Sans SC', 'Noto Sans CJK SC', 'WenQuanYi Micro Hei', sans-serif;
  
  /* 组合字体堆栈 */
  --font-family-body: var(--font-family-sans), var(--font-family-chinese);
  
  /* 标题字体 - 使用系统等宽字体替代Orbitron */
  --font-family-heading: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
  
  /* 装饰字体 - 使用系统衬线字体替代Ma Shan Zheng */
  --font-family-decorative: 'Times New Roman', 'SimSun', '宋体', serif;
  
  /* 代码字体 */
  --font-family-mono: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
}

/* 应用字体到元素 */
body {
  font-family: var(--font-family-body) !important;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family-heading) !important;
}

.slogan-text {
  font-family: var(--font-family-decorative) !important;
}

code, pre {
  font-family: var(--font-family-mono) !important;
}

/* 覆盖现有的字体定义 */
.navbar .nav-link,
.btn,
.form-control,
.card,
.footer {
  font-family: var(--font-family-body) !important;
}