/* 自定义字体配置 */

/* 自定义字体文件加载 - 您可以在 static/ainav/fonts/ 目录放置字体文件 */
@font-face {
    font-family: 'CustomFont';
    src: url('../fonts/ziti.woff2') format('woff2'),
         url('../fonts/ziti.woff') format('woff'),
         url('../fonts/ziti.ttf') format('truetype'),
         url('../fonts/ziti.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
    font-display: swap; /* 优化加载性能 */
}

/* 方案1：使用系统优化字体 - 更好的中文支持 */
body, 
input, 
button, 
select, 
optgroup, 
option, 
textarea, 
blockquote, 
dd, dl, 
figure, 
form, 
pre, 
.h1, .h2, .h3, .h4, .h5, .h6, 
h1, h2, h3, h4, h5, h6 {
    font-family: 
        "CustomFont",            /* 您的自定义字体 - 优先级最高 */
        "PingFang SC",           /* macOS 中文字体 */
        "Microsoft YaHei",       /* Windows 中文字体 */
        "Source Han Sans CN",    /* 思源黑体 */
        "Noto Sans CJK SC",      /* Google 中文字体 */
        "WenQuanYi Micro Hei",   /* Linux 中文字体 */
        -apple-system,           /* macOS 系统字体 */
        BlinkMacSystemFont,      /* macOS Chrome 字体 */
        "Segoe UI",              /* Windows 10 字体 */
        Roboto,                  /* Android 字体 */
        "Helvetica Neue",        /* macOS 旧版字体 */
        Arial,                   /* 通用字体 */
        sans-serif !important;   /* 备用字体 */
}

/* 方案2：如果想使用特定字体，可以取消下面的注释并注释上面的规则 */
/*
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

body, 
input, 
button, 
select, 
optgroup, 
option, 
textarea, 
blockquote, 
dd, dl, 
figure, 
form, 
pre, 
.h1, .h2, .h3, .h4, .h5, .h6, 
h1, h2, h3, h4, h5, h6 {
    font-family: 'Inter', 
        "PingFang SC", 
        "Microsoft YaHei", 
        sans-serif !important;
}
*/

/* 方案3：使用中文友好的字体组合 */
/*
body, 
input, 
button, 
select, 
optgroup, 
option, 
textarea, 
blockquote, 
dd, dl, 
figure, 
form, 
pre, 
.h1, .h2, .h3, .h4, .h5, .h6, 
h1, h2, h3, h4, h5, h6 {
    font-family: 
        "苹方-简",
        "PingFang SC",
        "微软雅黑",
        "Microsoft YaHei",
        "思源黑体",
        "Source Han Sans CN",
        "华文细黑",
        "STHeiti Light",
        "Helvetica Neue",
        Helvetica,
        Arial,
        sans-serif !important;
}
*/

/* 优化字体渲染 */
body, 
input, 
button, 
select, 
optgroup, 
option, 
textarea, 
blockquote, 
dd, dl, 
figure, 
form, 
pre, 
.h1, .h2, .h3, .h4, .h5, .h6, 
h1, h2, h3, h4, h5, h6 {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* 代码字体保持不变 */
code, 
kbd, 
pre, 
samp, 
.text-monospace {
    font-family: 
        "SF Mono",
        "Monaco",
        "Consolas", 
        "Liberation Mono", 
        "Courier New", 
        monospace !important;
}

/* ======================================
   自定义字体使用说明
   ======================================
   
   1. 字体文件放置位置：
      static/ainav/fonts/ 目录
      
   2. 支持的字体文件名（任选其一）：
      - ziti.woff2  （推荐，文件最小，加载最快）
      - ziti.woff   （兼容性好）
      - ziti.ttf    （通用格式）
      - ziti.otf    （OpenType格式）
      
   3. 使用方法：
      - 将您的字体文件重命名为 "ziti" + 对应扩展名
      - 放入 static/ainav/fonts/ 目录
      - 刷新网站即可生效
      
   4. 字体格式转换工具推荐：
      - 在线转换：https://convertio.co/zh/
      - 本地工具：FontForge
      
   5. 注意事项：
      - 建议同时提供多种格式以确保兼容性
      - woff2格式文件最小，加载速度最快
      - 如果字体文件不存在，会自动使用备用字体
      
   6. 测试字体是否加载成功：
      - 打开浏览器开发者工具
      - 查看 Network 标签页
      - 刷新页面，查看是否有字体文件加载
      
   ====================================== */ 