/* 
 * Notesnook 自定义字体配置
 * 修改这个文件来更改应用的默认字体
 */

:root {
  /* 主要字体 - 用于界面文本 */
  --custom-font-family: "Inter", 
                        "SF Pro Display", 
                        -apple-system, 
                        BlinkMacSystemFont, 
                        "Segoe UI", 
                        "Roboto", 
                        "Helvetica Neue", 
                        Arial, 
                        sans-serif;
  
  /* 等宽字体 - 用于代码和编辑器 */
  --custom-mono-font: "SF Mono", 
                      "JetBrains Mono", 
                      "Fira Code", 
                      "Source Code Pro", 
                      "Consolas", 
                      "Monaco", 
                      "Courier New", 
                      monospace;
  
  /* 中文字体支持 */
  --custom-cjk-font: "Inter", 
                     "PingFang SC", 
                     "Hiragino Sans GB", 
                     "Microsoft YaHei", 
                     "WenQuanYi Micro Hei", 
                     sans-serif;
}

/* 性能优化：减少选择器复杂度 */
html {
  font-family: var(--custom-font-family);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* 全局字体继承 */
body, * {
  font-family: inherit;
}

/* 中文内容优化 */
html[lang^="zh"] {
  font-family: var(--custom-cjk-font);
}

/* 等宽字体元素 - 优化选择器 */
code, pre, kbd, samp, tt,
.monospace, .code, .editor-content,
[class*="code"], [class*="editor"] {
  font-family: var(--custom-mono-font) !important;
}

/* 表单元素继承优化 */
input, textarea, select, button {
  font-family: inherit;
}

/* 标题元素优化 */
h1, h2, h3, h4, h5, h6,
.title, .heading {
  font-family: inherit;
  font-weight: 600;
}

/* 性能优化：使用 contain 属性 */
.editor-content, [class*="editor"] {
  contain: style;
}

/* 
 * 自定义字体示例：
 * 
 * 如果你想使用其他字体，请修改上面的 CSS 变量：
 * 
 * 例如使用 Roboto：
 * --custom-font-family: "Roboto", sans-serif;
 * 
 * 例如使用系统字体：
 * --custom-font-family: system-ui, sans-serif;
 * 
 * 例如使用 Google Fonts：
 * 1. 在 index.html 中添加字体链接：
 *    <link href="https://fonts.googleapis.com/css2?family=Noto+Sans:wght@400;500;600;700&display=swap" rel="stylesheet">
 * 2. 修改字体变量：
 *    --custom-font-family: "Noto Sans", sans-serif;
 */