/* ========== 博客字体统一 + 代码块横向滚动修复 ========== */
/* 1. 全局字体统一 */
body,
article,
.post-content,
.entry-content,
.blog-content {
  font-family: system-ui, -apple-system, 'Segoe UI', 'Roboto', 'PingFang SC', 'Microsoft YaHei', 'WenQuanYi Micro Hei', sans-serif !important;
  line-height: 1.6;
}

/* 2. 代码块强制横向滚动 + 完整显示 + 明显区分 */
pre,
.highlight,
.code-block,
pre[class*="language-"] {
  display: block !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  white-space: pre !important;
  max-width: 100% !important;
  
  /* 🎨 新增：让代码块更显眼 */
  background: #2d2d2d !important;  /* 深色背景，与白色正文区分 */
  color: #f8f8f2 !important;       /* 亮色文字 */
  padding: 1.2rem !important;
  border-radius: 10px !important;
  font-family: 'SF Mono', 'Fira Code', 'Consolas', 'Monaco', 'Courier New', monospace !important;
  font-size: 0.9rem !important;
  line-height: 1.5 !important;
  
  /* 添加左侧彩色强调边框 */
  border-left: 5px solid #ff6b6b !important;
  
  /* 添加轻微阴影增加立体感 */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
  
  /* 代码内的文字间距 */
  letter-spacing: normal !important;
}

/* 3. 行内代码样式 - 也要明显区分 */
code:not(pre code) {
  background: #f0f0f0 !important;
  color: #d63384 !important;       /* 粉色/红色，与普通文字区分 */
  padding: 0.2rem 0.4rem !important;
  border-radius: 6px !important;
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace !important;
  font-size: 0.85em !important;
  font-weight: 500 !important;
  border: 1px solid #e0e0e0 !important;
}

/* 4. 🆕 代码块中的数字高亮（可选，让数字更显眼） */
.highlight .mi,  /* 整数 */
.highlight .mf,  /* 浮点数 */
.highlight .mh,  /* 十六进制 */
pre code .token.number,
pre .number {
  color: #f92672 !important;  /* 亮粉色 */
  font-weight: bold !important;
}

/* 5. 🆕 代码块中的字符串高亮 */
pre code .token.string,
pre .string {
  color: #a6e22e !important;  /* 亮绿色 */
}

/* 6. 🆕 代码块中的关键字高亮 */
pre code .token.keyword,
pre .keyword {
  color: #66d9ef !important;  /* 天蓝色 */
  font-weight: bold !important;
}

/* 7. 表格横向滚动（防止表格撑破页面） */
table {
  display: block !important;
  overflow-x: auto !important;
  width: 100% !important;
}

/* 8. 防止长文本撑破页面 */
p,
div {
  word-wrap: break-word !important;
}

/* 9. 🆕 为代码块添加一个"CODE"标识（可选，更醒目） */
pre::before {
  content: "💻 CODE";
  display: block;
  background: #ff6b6b;
  color: white;
  font-size: 0.7rem;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  margin-bottom: 0.8rem;
  width: fit-content;
  font-family: monospace;
  letter-spacing: 1px;
}