/* 让文章内容区域半透明，这样能看到全站背景 */
#page,
#archive,
#category,
#tag,
/* 主页文章卡片 - 只给整个卡片设置背景 */
.recent-post-item {
  background: rgba(255, 255, 255, 0.85) !important;
}

/* 文章详情页不透明 */
#post {
  background: rgba(255, 255, 255, 1) !important;
}

/* 文章卡片内部信息区域透明，避免重复背景 */
.recent-post-info,
.recent-post-info.no-cover {
  background: transparent !important;
}

/* 移除主页布局容器的背景，避免多层白色底板 */
#content-inner,
.layout > div,
.recent-posts,
#recent-posts,
.recent-post-items {
  background: transparent !important;
}

/* 侧边栏卡片半透明 */
.card-widget,
#aside-content .card-widget {
  background: rgba(255, 255, 255, 0.85) !important;
}

/* 页头页脚背景透明，让背景图融为一体 */
#footer,
#page-header {
  background: transparent !important;
}

/* 白天模式遮罩透明 */
#footer::before,
#page-header::before {
  background: transparent !important;
}

/* 夜间模式适配 */
[data-theme="dark"] #page,
[data-theme="dark"] #archive,
[data-theme="dark"] #category,
[data-theme="dark"] #tag,
[data-theme="dark"] .recent-post-item,
[data-theme="dark"] .card-widget,
[data-theme="dark"] #aside-content .card-widget {
  background: rgba(25, 25, 25, 0.85) !important;
}

/* 夜间模式文章详情页不透明 */
[data-theme="dark"] #post {
  background: rgba(25, 25, 25, 1) !important;
}

/* 夜间模式文章卡片内部信息区域透明 */
[data-theme="dark"] .recent-post-info,
[data-theme="dark"] .recent-post-info.no-cover {
  background: transparent !important;
}

/* 夜间模式下也移除主页布局容器的背景 */
[data-theme="dark"] #content-inner,
[data-theme="dark"] .layout > div,
[data-theme="dark"] .recent-posts,
[data-theme="dark"] #recent-posts,
[data-theme="dark"] .recent-post-items {
  background: transparent !important;
}

/* 夜间模式页头页脚背景透明 */
[data-theme="dark"] #footer,
[data-theme="dark"] #page-header {
  background: transparent !important;
}

/* 夜间模式遮罩透明 */
[data-theme="dark"] #footer::before,
[data-theme="dark"] #page-header::before {
  background: transparent !important;
}

/* 分类页面折叠功能样式 */
.category-lists ul li.has-children::before {
  display: none !important; /* 隐藏有子分类项的默认圆点 */
}

.category-expand-btn:hover {
  color: #ff7242 !important;
}

/* 翻页按钮居中 */
#pagination {
  width: 100%;
  margin: auto;
}

/* ========== 小冰双栏布局 ========== */
/* 首页文章双栏显示 - 针对 .recent-post-items 容器 */
#recent-posts .recent-post-items {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: space-between !important;
}

/* 每个文章卡片占一半宽度 */
#recent-posts .recent-post-items > .recent-post-item {
  width: calc(50% - 8px) !important;
  margin-bottom: 16px !important;
  flex-direction: column !important;
}

/* 封面图设置 */
#recent-posts .recent-post-items > .recent-post-item .post-bg {
  width: 100% !important;
  height: 200px !important;
  border-radius: 8px 8px 0 0 !important;
}

/* 文章信息区域 */
#recent-posts .recent-post-items > .recent-post-item .recent-post-info {
  width: 100% !important;
  padding: 15px !important;
}

/* 评论区占满一行（修复评论区被双栏影响的问题） */
#post-comment,
.comment-head,
.comment-wrap,
#twikoo,
#waline,
#gitalk-container,
#valine,
#disqus_thread,
#utterances,
.comment-wrap > *,
/* 首页评论区占满一行 */
#home-comment-section,
#home-comment-section .card-widget {
  width: 100% !important;
  max-width: 100% !important;
  flex-basis: 100% !important;
}

/* 确保文章详情页评论区不受影响 */
#post #post-comment {
  display: block !important;
}

/* 移动端响应式：小屏幕单栏显示 */
@media screen and (max-width: 768px) {
  #recent-posts .recent-post-items > .recent-post-item {
    width: 100% !important;
  }
}

/* ========== Footer 计时器样式 ========== */
div#runtime {
  width: auto;
  margin: 5px auto;
  color: #fff;
  padding: 3px 10px;
  border-radius: 10px;
  background-color: rgba(0, 0, 0, 0.7);
}

#workboard {
  font-size: 12px;
  text-align: center;
}

/* 减少 footer 内部间距 */
#footer .footer-other {
  padding: 10px 0;
}

#footer .footer_custom_text {
  margin-bottom: 5px;
}

/* ========== Footer 徽标样式 ========== */
/* 徽标容器居中 */
#ghbdages,
p#ghbdages {
  text-align: center;
  margin: 10px auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 5px;
}

/* 徽标链接样式 */
.github-badge {
  display: inline-block;
  position: relative;
}

/* 徽标悬停提示 - 使用 data-title 属性 */
.github-badge[data-title]:hover::after {
  content: attr(data-title);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  padding: 5px 10px;
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  font-size: 12px;
  white-space: nowrap;
  border-radius: 5px;
  z-index: 100;
  margin-bottom: 5px;
}

/* 提示框小三角 */
.github-badge[data-title]:hover::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: rgba(0, 0, 0, 0.8);
  z-index: 100;
}

/* 夜间模式计时器样式 - 呼吸灯效果 */
[data-theme="dark"] div#runtime {
  color: #28b4c8;
  box-shadow: 0 0 5px rgba(28, 69, 218, 0.71);
  animation: flashlight 1s linear infinite alternate;
}

@keyframes flashlight {
  from {
    box-shadow: 0 0 5px #1478d2;
  }
  to {
    box-shadow: 0 0 2px #1478d2;
  }
}

/* 兼容旧版浏览器 */
@-webkit-keyframes flashlight {
  from {
    box-shadow: 0 0 5px #1478d2;
  }
  to {
    box-shadow: 0 0 2px #1478d2;
  }
}

@-moz-keyframes flashlight {
  from {
    box-shadow: 0 0 5px #1478d2;
  }
  to {
    box-shadow: 0 0 2px #1478d2;
  }
}

/* ========== 夜间模式 - 评论框样式 ========== */
[data-theme="dark"] .wl-panel,
[data-theme="dark"] .wl-editor,
[data-theme="dark"] .wl-input,
[data-theme="dark"] .wl-comment .wl-card,
[data-theme="dark"] .wl-cards .wl-card {
  background: rgba(30, 30, 30, 0.9) !important;
  color: #ccc !important;
}

[data-theme="dark"] .wl-editor:focus,
[data-theme="dark"] .wl-input:focus {
  background: rgba(40, 40, 40, 0.95) !important;
  border-color: #49b1f5 !important;
}

[data-theme="dark"] .wl-panel {
  border-color: rgba(255, 255, 255, 0.1) !important;
}

/* Waline 头部信息输入框 */
[data-theme="dark"] .wl-header input,
[data-theme="dark"] .wl-header .wl-input {
  background: rgba(40, 40, 40, 0.8) !important;
  color: #ddd !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

/* Waline 按钮 */
[data-theme="dark"] .wl-btn {
  background: #49b1f5 !important;
  color: #fff !important;
}

/* 小冰分类分类磁铁黑夜模式适配 */
/* 一般状态 */
[data-theme="dark"] .magnet_link_context {
  background: #1e1e1e;
  color: antiquewhite;
}
/* 鼠标悬浮状态 */
[data-theme="dark"] .magnet_link_context:hover {
  background: #3ecdf1;
  color: #f2f2f2;
}

/* ========== 友链页面美化 ========== */
/* 友链卡片 */
.flink-list .flink-list-item {
  background: rgba(255, 255, 255, 0.85);
  border-radius: 12px;
  transition: all 0.3s ease;
  overflow: hidden;
}

.flink-list .flink-list-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

/* 友链头像 */
.flink-list .flink-list-item .flink-item-avatar img {
  border-radius: 50%;
  transition: all 0.5s ease;
}

.flink-list .flink-list-item:hover .flink-item-avatar img {
  transform: rotate(360deg);
}

/* 友链分类标题 */
.flink .flink-name {
  font-size: 1.2em;
  font-weight: bold;
  margin: 15px 0;
  padding-left: 10px;
  border-left: 4px solid #49b1f5;
}

/* 夜间模式友链卡片 */
[data-theme="dark"] .flink-list .flink-list-item {
  background: rgba(30, 30, 30, 0.9) !important;
}

[data-theme="dark"] .flink-list .flink-list-item:hover {
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .flink-list .flink-list-item .flink-item-name,
[data-theme="dark"] .flink-list .flink-list-item .flink-item-desc {
  color: #ccc !important;
}

/* ========== 关于页面个人信息卡片 ========== */
.about-profile {
  text-align: center;
  margin-bottom: 40px;
  padding: 30px 0;
}

.about-avatar {
  width: 120px !important;
  height: 120px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  border: 4px solid #49b1f5 !important;
  box-shadow: 0 4px 15px rgba(73, 177, 245, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.about-avatar:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(73, 177, 245, 0.5);
}

.about-name {
  margin: 20px 0 15px 0;
  font-size: 1.8em;
  font-weight: bold;
  color: #333;
}

[data-theme="dark"] .about-name {
  color: #e0e0e0;
}

.about-social {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.about-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  font-size: 1.3em;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
}

.about-social a:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(102, 126, 234, 0.5);
}

/* 各平台图标特定颜色 */
.about-social a[title="GitHub"] {
  background: linear-gradient(135deg, #333 0%, #555 100%);
}

.about-social a[title="Email"] {
  background: linear-gradient(135deg, #ea4335 0%, #fbbc05 100%);
}

.about-social a[title="LeetCode"] {
  background: linear-gradient(135deg, #ffa116 0%, #ff6b00 100%);
}

.about-social a[title="洛谷"] {
  background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
}

.about-social a[title="牛客"] {
  background: linear-gradient(135deg, #00c853 0%, #009624 100%);
}

.about-social .icon-text {
  font-size: 0.7em;
  font-weight: bold;
}

/* ========== 归档页面美化 ========== */
/* 彻底移除所有时间线相关样式 */
#archive .article-sort-title,
#archive .article-sort,
#archive .article-sort-item,
#archive .article-sort-item.year,
#archive .article-sort-item.no-article-cover {
  border-left: none !important;
  margin-left: 0 !important;
}

#archive .article-sort-title::before,
#archive .article-sort::before,
#archive .article-sort-item::before,
#archive .article-sort-item.year::before,
#archive .article-sort-item.no-article-cover::before,
#archive .article-sort-title::after,
#archive .article-sort::after,
#archive .article-sort-item::after {
  display: none !important;
  content: none !important;
}

/* 归档页面标题 - 共计xx篇文章 */
#archive .article-sort-title {
  font-size: 1.2em;
  font-weight: bold;
  text-align: center;
  margin-bottom: 20px;
  padding: 10px 0;
}

/* 归档列表容器 */
#archive .article-sort {
  padding-left: 20px;
}

/* 年份样式 */
#archive .article-sort-item.year {
  font-size: 1.5em;
  font-weight: bold;
  color: #49b1f5;
  margin: 20px 0 12px 0;
  padding-left: 0;
}

/* 文章项样式 */
#archive .article-sort-item.no-article-cover {
  margin: 6px 0;
  padding: 0;
  transition: all 0.2s ease;
}

/* 让整行可点击 - 包裹链接 */
#archive .article-sort-item-info {
  display: block;
}

#archive .article-sort-item-info a.article-sort-item-title {
  display: flex;
  align-items: center;
  padding: 8px 15px;
  border-radius: 5px;
  text-decoration: none;
  transition: all 0.2s ease;
}

#archive .article-sort-item-info a.article-sort-item-title:hover {
  background: rgba(73, 177, 245, 0.1);
}

/* 时间样式 - mm-dd 格式 */
#archive .article-sort-item-time {
  color: #858585;
  font-size: 0.9em;
  min-width: 55px;
  margin-right: 15px;
  pointer-events: none;
}

/* 隐藏日历图标 */
#archive .article-sort-item-time i {
  display: none;
}

/* 文章标题样式 */
#archive .article-sort-item-title {
  color: #333;
  font-size: 1em;
}

#archive .article-sort-item-info a.article-sort-item-title:hover {
  color: #49b1f5;
}

/* 移除原本的文章项悬停效果（已移到链接上） */
#archive .article-sort-item.no-article-cover:hover {
  background: transparent;
}

/* 夜间模式归档页面适配 */
[data-theme="dark"] #archive .article-sort-item.year {
  color: #49b1f5;
}

[data-theme="dark"] #archive .article-sort-item-time {
  color: #999;
}

[data-theme="dark"] #archive .article-sort-item-title {
  color: #ccc;
}

[data-theme="dark"] #archive .article-sort-item-info a.article-sort-item-title:hover {
  color: #49b1f5;
  background: rgba(73, 177, 245, 0.15);
}


/* --- MathJax v3 SVG 行内公式对齐补丁 --- */

/* 1. 核心容器调整：放弃 grid 改用 inline-block，利用 vertical-align 对齐 */
/* 1. 强力对齐：使用 flex 并配合 vertical-align */
mjx-container[jax="SVG"]:not([display="true"]) {
    display: inline-flex !important;
    flex-direction: row;
    align-items: center; /* 关键：让矩阵和分式的中心与行中心对齐 */
    vertical-align: middle !important;
    position: relative;
    top: 0.02em; /* 这里微调 0.05 左右即可 */
    margin: 0 2px !important;
    line-height: 0 !important;
}

/* 2. 消除多余的内边距，防止盒子被撑大导致偏移 */
mjx-container[jax="SVG"] > svg {
    margin: 0 !important;
    vertical-align: 0 !important;
    display: inline-block !important;
}

/* 3. 针对行内分式(frac)的微调：防止分式让行高变得太夸张 */
mjx-container:not([display="true"]) [data-mjx-texclass="ORD"] {
    line-height: 1;
}

/* 4. 解决你代码中提到的 padding-bottom 导致的“顶起”问题 */
mjx-container {
    padding-bottom: 0 !important;
    padding-top: 0 !important;
}

/* 5. 独立块公式保持居中且留有呼吸空间 */
mjx-container[display="true"] {
    margin: 1.2em 0 !important;
    padding: 0.5em 0 !important;
    overflow-x: auto;
    overflow-y: hidden;
}

/* ========== 分类页面高级设计样式 ========== */

/* 分类卡片容器 */
.category-card {
    background: rgba(255, 255, 255, 0.9) !important;
    border-radius: 16px !important;
    margin-bottom: 20px !important;
    overflow: hidden !important;
    box-shadow: 0 4px 16px rgba(135, 206, 250, 0.2) !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border: 1px solid rgba(135, 206, 250, 0.15) !important;
}

.category-card:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 8px 24px rgba(135, 206, 250, 0.3) !important;
}

/* 分类标题栏 - 柔和浅蓝色渐变 */
.category-card-header {
    padding: 18px 24px !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    background: linear-gradient(135deg, rgba(135, 206, 250, 0.85) 0%, rgba(100, 149, 237, 0.85) 100%) !important;
    color: white !important;
    font-weight: 500 !important;
    font-size: 16px !important;
    transition: all 0.3s ease !important;
    backdrop-filter: blur(10px) !important;
}

.category-card-header:hover {
    background: linear-gradient(135deg, rgba(135, 206, 250, 0.95) 0%, rgba(100, 149, 237, 0.95) 100%) !important;
}

/* 分类名称样式 */
.category-card-header .category-name {
    display: flex;
    align-items: center;
    font-weight: 600;
}

.category-card-header .category-name i {
    margin-right: 12px !important;
    font-size: 18px;
    opacity: 0.9;
}

/* 展开/收起图标 */
.category-card-header .category-toggle {
    transition: transform 0.3s ease !important;
}

.category-card-header .category-toggle i.fa-chevron-up {
    transform: rotate(180deg);
}

/* 文章列表容器 */
.category-articles {
    display: none;
    padding: 0 !important;
    background: rgba(255, 255, 255, 0.98) !important;
}

/* 文章列表项 - 优雅的钻石图标设计 */
.category-article-item {
    display: flex !important;
    align-items: center !important;
    padding: 14px 24px !important;
    border-bottom: 1px solid rgba(135, 206, 250, 0.1) !important;
    color: #555 !important;
    text-decoration: none !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative !important;
}

.category-article-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    background: linear-gradient(90deg, rgba(135, 206, 250, 0.15) 0%, transparent 100%);
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 0;
}

.category-article-item:hover::before {
    width: 100%;
}

.category-article-item:hover {
    background: transparent !important;
    color: #2c5f8d !important;
    transform: translateX(6px);
}

/* 文章序号 - 简洁圆形设计 */
.category-article-item > span:first-child {
    width: 28px !important;
    height: 28px !important;
    background: linear-gradient(135deg, rgba(135, 206, 250, 0.9) 0%, rgba(100, 149, 237, 0.9) 100%) !important;
    color: white !important;
    border-radius: 8px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    margin-right: 16px !important;
    flex-shrink: 0 !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 2px 8px rgba(135, 206, 250, 0.3);
    position: relative;
    z-index: 1;
}

.category-article-item:hover > span:first-child {
    background: linear-gradient(135deg, rgba(100, 149, 237, 0.95) 0%, rgba(70, 130, 180, 0.95) 100%) !important;
    box-shadow: 0 4px 12px rgba(135, 206, 250, 0.4) !important;
}

/* 文章标题 */
.category-article-item > span:nth-child(2) {
    flex: 1 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    position: relative;
    z-index: 1;
    font-weight: 500;
}

/* 文章日期 */
.category-article-item > span:last-child {
    color: #999 !important;
    font-size: 13px !important;
    margin-left: 16px !important;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace !important;
    position: relative;
    z-index: 1;
}

/* 加载状态 */
.loading-articles {
    padding: 24px !important;
    text-align: center !important;
    color: #87ceeb !important;
    font-size: 14px;
}

.loading-articles i {
    margin-right: 8px;
}

/* ========== 夜间模式适配 ========== */

[data-theme="dark"] .category-card {
    background: rgba(30, 30, 30, 0.95) !important;
    border-color: rgba(70, 130, 180, 0.2) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3) !important;
}

[data-theme="dark"] .category-card:hover {
    box-shadow: 0 8px 24px rgba(70, 130, 180, 0.4) !important;
}

[data-theme="dark"] .category-card-header {
    background: linear-gradient(135deg, rgba(70, 130, 180, 0.85) 0%, rgba(53, 122, 189, 0.85) 100%) !important;
}

[data-theme="dark"] .category-card-header:hover {
    background: linear-gradient(135deg, rgba(70, 130, 180, 0.95) 0%, rgba(53, 122, 189, 0.95) 100%) !important;
}

[data-theme="dark"] .category-articles {
    background: rgba(30, 30, 30, 0.98) !important;
}

[data-theme="dark"] .category-article-item {
    color: #ccc !important;
    border-bottom-color: rgba(70, 130, 180, 0.15) !important;
}

[data-theme="dark"] .category-article-item::before {
    background: linear-gradient(90deg, rgba(70, 130, 180, 0.2) 0%, transparent 100%);
}

[data-theme="dark"] .category-article-item:hover {
    color: #87ceeb !important;
}

[data-theme="dark"] .category-article-item > span:first-child {
    background: linear-gradient(135deg, rgba(70, 130, 180, 0.9) 0%, rgba(53, 122, 189, 0.9) 100%) !important;
    box-shadow: 0 2px 8px rgba(70, 130, 180, 0.4);
}

[data-theme="dark"] .category-article-item:hover > span:first-child {
    background: linear-gradient(135deg, rgba(135, 206, 250, 0.95) 0%, rgba(74, 144, 226, 0.95) 100%) !important;
    box-shadow: 0 4px 12px rgba(135, 206, 250, 0.5) !important;
}

[data-theme="dark"] .category-article-item > span:last-child {
    color: #777 !important;
}

[data-theme="dark"] .loading-articles {
    color: #4a90e2 !important;
}

/* ========== 代码块样式重写 - One Dark Pro 风格 ========== */

/* --- 亮色模式：柔和深蓝灰底 --- */
:root {
  --hl-bg: #282c34 !important;
  --hl-color: #abb2bf !important;
  --hltools-bg: #21252b !important;
  --hltools-color: #9da5b4 !important;
  --hlnumber-bg: #282c34 !important;
  --hlnumber-color: rgba(171, 178, 191, 0.4) !important;
  --hlscrollbar-bg: #3b4048 !important;
  --hlexpand-bg: linear-gradient(180deg, rgba(40,44,52,0.6), rgba(40,44,52,0.9)) !important;
}

/* --- 暗色模式：稍微更深一点，保持协调 --- */
[data-theme='dark'] {
  --hl-bg: #1e2028 !important;
  --hl-color: #abb2bf !important;
  --hltools-bg: #181a1f !important;
  --hltools-color: #7f848e !important;
  --hlnumber-bg: #1e2028 !important;
  --hlnumber-color: rgba(171, 178, 191, 0.3) !important;
  --hlscrollbar-bg: #2c313a !important;
  --hlexpand-bg: linear-gradient(180deg, rgba(30,32,40,0.6), rgba(30,32,40,0.9)) !important;
}

/* --- 语法高亮颜色 (One Dark Pro 调色板) --- */

/* 注释 - 斜体灰色 */
figure.highlight pre .comment {
  color: #5c6370 !important;
  font-style: italic;
}

/* 关键字 (if, for, while, return, using, namespace, const, void, class 等) - 紫色 */
figure.highlight pre .keyword {
  color: #c678dd !important;
}

/* 类型 (int, float, double, bool, char 等) - 金黄色 */
figure.highlight pre .type {
  color: #e5c07b !important;
}

/* 字符串、字符 - 绿色 */
figure.highlight pre .string {
  color: #98c379 !important;
}

/* 数字 - 橙色 */
figure.highlight pre .number {
  color: #d19a66 !important;
}

/* 内置函数/类 (cout, cin, endl, vector, map, string 等) - 金黄色 */
figure.highlight pre .built_in {
  color: #e5c07b !important;
}

/* 函数名 - 蓝色 */
figure.highlight pre .function,
figure.highlight pre .title {
  color: #61afef !important;
}

/* 预处理指令 (#include, #define 等) - 紫色 */
figure.highlight pre .meta {
  color: #c678dd !important;
}
figure.highlight pre .meta .keyword {
  color: #c678dd !important;
}
figure.highlight pre .meta .string {
  color: #98c379 !important;
}

/* 变量、属性 - 红色 */
figure.highlight pre .variable,
figure.highlight pre .attribute {
  color: #e06c75 !important;
}

/* 标签 (模板参数 < >, 标点) - 浅蓝 */
figure.highlight pre .tag {
  color: #e06c75 !important;
}
figure.highlight pre .tag .name {
  color: #e06c75 !important;
}
figure.highlight pre .tag .attr {
  color: #d19a66 !important;
}

/* 常量、布尔值 (true, false, NULL, nullptr) - 橙色 */
figure.highlight pre .literal,
figure.highlight pre .constant,
figure.highlight pre .params {
  color: #d19a66 !important;
}

/* 正则表达式 */
figure.highlight pre .regexp {
  color: #98c379 !important;
}

/* 符号 */
figure.highlight pre .symbol {
  color: #56b6c2 !important;
}

/* 操作符相关 (<<, >>, ::等) */
figure.highlight pre .operator {
  color: #56b6c2 !important;
}

/* 继承、特殊值 */
figure.highlight pre .inheritance,
figure.highlight pre .header,
figure.highlight pre .value,
figure.highlight pre .special,
figure.highlight pre .formula {
  color: #98c379 !important;
}

/* diff 高亮 */
figure.highlight pre .deletion {
  color: #e06c75 !important;
}
figure.highlight pre .addition {
  color: #98c379 !important;
}

/* CSS 类名/ID */
figure.highlight pre .css .id,
figure.highlight pre .css .class,
figure.highlight pre .css .pseudo {
  color: #e06c75 !important;
}
figure.highlight pre .css .hexcolor {
  color: #d19a66 !important;
}
figure.highlight pre .css .rules .attribute {
  color: #98c379 !important;
}

/* python/ruby 装饰器 */
figure.highlight pre .python .decorator,
figure.highlight pre .python .title,
figure.highlight pre .ruby .function .title,
figure.highlight pre .ruby .title .keyword,
figure.highlight pre .ruby .class .title,
figure.highlight pre .ruby .symbol,
figure.highlight pre .perl .sub,
figure.highlight pre .javascript .title,
figure.highlight pre .javascript .function,
figure.highlight pre .coffeescript .title {
  color: #61afef !important;
}

/* XML */
figure.highlight pre .xml .tag .title,
figure.highlight pre .xml .pi,
figure.highlight pre .xml .doctype,
figure.highlight pre .html .doctype,
figure.highlight pre .xml .cdata {
  color: #e06c75 !important;
}

/* preprocessor / command */
figure.highlight pre .preprocessor,
figure.highlight pre .command {
  color: #56b6c2 !important;
}

/* 行内代码样式 (亮色模式) */
.container code {
  background: rgba(40, 44, 52, 0.08) !important;
  color: #c678dd !important;
  border-radius: 4px !important;
  padding: 2px 6px !important;
  font-size: 0.9em !important;
}

/* 行内代码样式 (暗色模式) */
[data-theme="dark"] .container code {
  background: rgba(171, 178, 191, 0.12) !important;
  color: #c678dd !important;
}

/* 代码块内的 code 不受行内代码影响 */
.container pre code {
  background: none !important;
  color: var(--hl-color) !important;
  padding: 0 !important;
  font-size: 14px !important;
  border-radius: 0 !important;
}

/* 代码块圆角与阴影 */
.container figure.highlight {
  border-radius: 8px !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
  border: 1px solid rgba(255, 255, 255, 0.05) !important;
}

[data-theme="dark"] .container figure.highlight {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

/* 工具栏圆角 */
.container .highlight-tools {
  border-radius: 8px 8px 0 0 !important;
}

/* 行号分隔线 */
.container figure.highlight .gutter {
  border-right: 1px solid rgba(171, 178, 191, 0.1) !important;
}
