/* 引入思源宋体 (Noto Serif SC) - 使用国内 CDN 镜像 */
@import url('https://fonts.loli.net/css2?family=Noto+Serif+SC:wght@400;500;600;700&display=swap');

/* 整体字体设置 + 渐变背景 */
body {
  font-size: 0.90em !important;
  font-family: 'Noto Serif SC', 'Source Han Serif SC', 'Source Han Serif CN', 'STSong', 'SimSun', serif !important;
}

/* 标题字体 */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Noto Serif SC', 'Source Han Serif SC', serif !important;
}

/* 文章内容 */
.post-body, .post-content, article {
  font-family: 'Noto Serif SC', 'Source Han Serif SC', serif !important;
}

/* 代码块保持等宽字体 */
pre, code {
  font-size: 0.85em !important;
  font-family: 'Fira Code', 'Source Code Pro', Consolas, Monaco, 'Courier New', monospace !important;
}

/* 代码块内的代码 */
pre code {
  font-size: 0.85em !important;
}

/* 高亮代码块 */
.highlight pre {
  font-size: 0.85em !important;
}

/* ============================================
   亮色模式代码块 - GitHub Light 风格
   ============================================ */
.highlight,
.highlight pre,
pre {
  background: #f6f8fa !important;
  border-radius: 6px !important;
}

.highlight pre code,
pre code {
  background: transparent !important;
  color: #24292f !important;
}

.highlight {
  border: 1px solid #d0d7de !important;
}

/* 亮色模式语法高亮 */
.highlight .k,
.highlight .kd,
.highlight .kn,
.highlight .kp,
.highlight .kr,
.highlight .kt { color: #cf222e !important; } /* 关键字 - 红色 */

.highlight .s,
.highlight .s1,
.highlight .s2,
.highlight .se,
.highlight .sb,
.highlight .sc,
.highlight .sd,
.highlight .sh,
.highlight .sx { color: #0a3069 !important; } /* 字符串 - 深蓝 */

.highlight .c,
.highlight .c1,
.highlight .cm,
.highlight .cp,
.highlight .cs { color: #6e7781 !important; font-style: italic; } /* 注释 - 灰色 */

.highlight .nf,
.highlight .fm { color: #8250df !important; } /* 函数名 - 紫色 */

.highlight .nc { color: #953800 !important; } /* 类名 - 棕色 */
.highlight .nn { color: #953800 !important; } /* 模块名 */

.highlight .m,
.highlight .mi,
.highlight .mf,
.highlight .mh,
.highlight .mo { color: #0550ae !important; } /* 数字 - 蓝色 */

.highlight .o,
.highlight .ow { color: #cf222e !important; } /* 运算符 - 红色 */

.highlight .p { color: #24292f !important; } /* 标点 */

.highlight .nb,
.highlight .bp { color: #0550ae !important; } /* 内置函数 - 蓝色 */

.highlight .nv,
.highlight .vi,
.highlight .vc,
.highlight .vg { color: #953800 !important; } /* 变量 - 棕色 */

.highlight .nt { color: #116329 !important; } /* HTML 标签 - 绿色 */
.highlight .na { color: #0550ae !important; } /* 属性名 - 蓝色 */

.highlight .kc,
.highlight .no { color: #0550ae !important; } /* 常量 - 蓝色 */

/* 行内代码样式优化 */
p > code, li > code, td > code, th > code {
  background: #f5f5f5 !important;
  color: #c7254e !important;
  border: 1px solid #e1e1e1 !important;
  border-radius: 4px !important;
  padding: 2px 6px !important;
  font-size: 0.9em !important;
}

/* 暗色模式下的行内代码 */
:root[data-theme="dark"] p > code,
:root[data-theme="dark"] li > code,
:root[data-theme="dark"] td > code,
:root[data-theme="dark"] th > code {
  background: #3a3a3a !important;
  color: #e06c75 !important;
  border-color: #555 !important;
}

/* 暗色模式下的代码块 - JetBrains Darcula */
:root[data-theme="dark"] .highlight,
:root[data-theme="dark"] .highlight pre,
:root[data-theme="dark"] pre {
  background: #2b2b2b !important;
  border-radius: 6px !important;
}

:root[data-theme="dark"] .highlight pre code,
:root[data-theme="dark"] pre code {
  background: transparent !important;
  color: #a9b7c6 !important;
}

/* 代码块行号区域 - Darcula */
:root[data-theme="dark"] .highlight .gutter,
:root[data-theme="dark"] .highlight .gutter pre {
  background: #313335 !important;
  color: #606366 !important;
  border-right: 1px solid #3c3f41 !important;
}

/* 代码块边框 - Darcula */
:root[data-theme="dark"] .highlight {
  border: 1px solid #3c3f41 !important;
}

/* Darcula 语法高亮 */
:root[data-theme="dark"] .highlight .k,
:root[data-theme="dark"] .highlight .kd,
:root[data-theme="dark"] .highlight .kn,
:root[data-theme="dark"] .highlight .kp,
:root[data-theme="dark"] .highlight .kr,
:root[data-theme="dark"] .highlight .kt { color: #cc7832 !important; } /* 关键字 - 橙色 */

:root[data-theme="dark"] .highlight .s,
:root[data-theme="dark"] .highlight .s1,
:root[data-theme="dark"] .highlight .s2,
:root[data-theme="dark"] .highlight .se,
:root[data-theme="dark"] .highlight .sb,
:root[data-theme="dark"] .highlight .sc,
:root[data-theme="dark"] .highlight .sd,
:root[data-theme="dark"] .highlight .sh,
:root[data-theme="dark"] .highlight .sx { color: #6a8759 !important; } /* 字符串 - 绿色 */

:root[data-theme="dark"] .highlight .c,
:root[data-theme="dark"] .highlight .c1,
:root[data-theme="dark"] .highlight .cm,
:root[data-theme="dark"] .highlight .cp,
:root[data-theme="dark"] .highlight .cs { color: #808080 !important; font-style: italic; } /* 注释 - 灰色 */

:root[data-theme="dark"] .highlight .nf,
:root[data-theme="dark"] .highlight .fm { color: #ffc66d !important; } /* 函数名 - 黄色 */

:root[data-theme="dark"] .highlight .nc { color: #a9b7c6 !important; } /* 类名 */
:root[data-theme="dark"] .highlight .nn { color: #a9b7c6 !important; } /* 模块名 */

:root[data-theme="dark"] .highlight .m,
:root[data-theme="dark"] .highlight .mi,
:root[data-theme="dark"] .highlight .mf,
:root[data-theme="dark"] .highlight .mh,
:root[data-theme="dark"] .highlight .mo { color: #ffffff !important; } /* 数字 - 蓝色 */

:root[data-theme="dark"] .highlight .o,
:root[data-theme="dark"] .highlight .ow { color: #a9b7c6 !important; } /* 运算符 */

:root[data-theme="dark"] .highlight .p { color: #a9b7c6 !important; } /* 标点 */

:root[data-theme="dark"] .highlight .nb,
:root[data-theme="dark"] .highlight .bp { color: #8888c6 !important; } /* 内置函数 - 淡紫 */

:root[data-theme="dark"] .highlight .nv,
:root[data-theme="dark"] .highlight .vi,
:root[data-theme="dark"] .highlight .vc,
:root[data-theme="dark"] .highlight .vg { color: #9876aa !important; } /* 变量 - 紫色 */

:root[data-theme="dark"] .highlight .nt { color: #e8bf6a !important; } /* HTML 标签 - 金色 */
:root[data-theme="dark"] .highlight .na { color: #bababa !important; } /* 属性名 */

:root[data-theme="dark"] .highlight .kc,
:root[data-theme="dark"] .highlight .no { color: #9876aa !important; } /* 常量 - 紫色 */

/* 隐藏底部版权信息中的爱心图标 */
.copyright .with-love {
  display: none !important;
}
