:root {
  --theme-color-blue: rgb(160, 205, 220);
  --theme-color-green: rgb(155, 218, 205);
  --theme-color: var(--theme-color-green);
  --theme-color2: var(--theme-color-blue);
  --scrollbar-background: #e6f4f6;
  --border-hover:#409eff;
  --border-color: rgba(0, 30, 50, 0.3);
  --nav-color: rgba(160, 205, 220, 0.75);
  --nav-color-shi: rgb(160, 205, 220);
  --text-color: #4c4948;
  --button-color: #00C4B6;
  --button-hover-color: #0F7D7F;
  --button-light-color: var(--button-color);
  --button-dark-color: var(--button-hover-color);
  --docsearch-modal-background: var(--theme-color-blue) !important;
  --docsearch-footer-background: var(--theme-color-green) !important;
  --docsearch-searchbox-focus-background: var(--theme-color-green) !important;
  --docsearch-highlight-color: var(--border-color) !important;
  --docsearch-primary-color: var(--border-hover) !important;
  --docsearch-hit-background: var(--theme-color-green) !important;
}
:root[data-theme="dark"] {
  --theme-color-blue: rgb(50, 80, 110);
  --theme-color-green: rgb(40, 70, 80);
  --theme-color: var(--theme-color-blue);
  --theme-color2: var(--theme-color-green);
  --scrollbar-background: #1c2833;
  --border-hover:#6699cb;
  --border-color: rgb(255, 255, 255, 0.2);
  --nav-color: rgba(50, 80, 110, 0.75);
  --nav-color-shi: rgb(50, 80, 110);
  --text-color: #FFFFFFB3;
  --button-color: #2E4964;
  --button-hover-color: #446484;
  --button-light-color: var(--button-hover-color);
  --button-dark-color: var(--button-color);
}


/* ======= 白天模式（微调后） ======= */
/* 文章卡片 - 柔和浅蓝绿 */
.recent-post-item,
.post-block {
  background: rgba(160, 205, 220, 0.75) !important; /* 更清透的蓝绿 */
  backdrop-filter: blur(12px) saturate(150%);
  -webkit-backdrop-filter: blur(12px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(185, 225, 240, 0.3); /* 阴影匹配新色 */
  overflow: hidden;
}

#recent-posts > .recent-post-item {
  background: rgba(185, 225, 240, 0.75) !important;
}

/* 侧边栏卡片 - 柔和浅绿蓝 */
.aside-content .card-widget,
#aside-content .card-widget,
.sidebar .card-widget,
#sidebar .card-widget,
.card-widget {
  background: rgba(155, 218, 205, 0.75) !important;
  backdrop-filter: blur(12px) saturate(150%) !important;
  -webkit-backdrop-filter: blur(12px) saturate(150%) !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  border-radius: 12px !important;
  box-shadow: 0 4px 20px rgba(180, 238, 225, 0.2) !important; /* 阴影匹配 */
  overflow: hidden !important;
}

/* ======= 夜间模式（保持不变） ======= */
html[data-theme="dark"] .recent-post-item,
html[data-theme="dark"] .post-block {
  background: rgba(50, 80, 110, 0.75) !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4) !important;
}

html[data-theme="dark"] #recent-posts > .recent-post-item {
  border: solid 1px transparent !important;
  background: rgba(50, 80, 110, 0.75) !important;
}

html[data-theme="dark"] .aside-content .card-widget,
html[data-theme="dark"] #aside-content .card-widget,
html[data-theme="dark"] .sidebar .card-widget,
html[data-theme="dark"] #sidebar .card-widget,
html[data-theme="dark"] .card-widget {
  background: rgba(40, 70, 80, 0.75) !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
}

/* 标签云文字颜色（白天） */
.card-tag-cloud a {
  color: #00C4B6 !important; 
}
.card-tag-cloud a:hover {
  color: #00C4B6 !important;
}

/* 夜间模式 */
[data-theme="dark"] .card-tag-cloud a {
  color: #A4D4F0 !important;
}
[data-theme="dark"] .card-tag-cloud a:hover {
  color: #B3E5EF !important;
}
/*顶栏颜色*/
/* 白天模式 - 半透明毛玻璃风格（与卡片统一） */
nav#nav.show {
  
  background: var(--nav-color) !important; /* 浅蓝绿，透明度可调 */
  backdrop-filter: blur(12px) saturate(150%);
  -webkit-backdrop-filter: blur(12px) saturate(150%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

/* 夜间模式 - 深色半透明 */
[data-theme="dark"] nav#nav.show {
  background: var(--nav-color) !important;
  border-bottom-color: rgba(255, 255, 255, 0.15);
}


/* ========== Butterfly 代码块全局美化 ========== */
/* 外层容器 */
figure.highlight {
  margin: 1.2rem 0 !important;
  border-radius: 10px !important;
  overflow: hidden !important;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12) !important;
  transition: all 0.3s ease;
}
/* 暗黑模式阴影弱化 */
figure.highlight {
  box-shadow: 0 4px 16px rgba(0,0,0,0.35) !important;
}
figure.highlight:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.16);
}
 figure.highlight:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}

/* 代码头部语言栏 */
.highlight-tools {
  padding: 8px 16px !important;
  height: 42px !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
}
/* 浅色头部背景 */
/* 暗黑头部背景 */
.highlight-tools {
  background: #006b6b !important;
}
[data-theme="dark"] .highlight-tools {
  background: #003838 !important;
}
.highlight-tools .lang {
  font-weight: 500;
  letter-spacing: 0.5px;
  opacity: 0.85;
}
.highlight-tools .copy-btn {
  padding: 4px 10px;
  border-radius: 6px;
  transition: 0.2s;
}
:not([data-theme="dark"]) .copy-btn {
  background: rgba(0,0,0,0.08);
}
.copy-btn {
  background: rgba(255,255,255,0.1);
}
.copy-btn:hover {
  opacity: 1 !important;
}

/* 代码主体容器 */
.highlight table {
  border: none !important;
  margin: 0 !important;
}
.highlight td {
  border: none !important;
  padding: 0 !important;
}
.highlight pre {
  padding: 14px 18px !important;
  font-family: "JetBrains Mono", "Consolas", monospace !important;
  font-size: 14px !important;
  line-height: 1.7 !important;
}
.code-expand-btn {
  background: #1e2929a9 !important;
}
[data-theme="dark"] .code-expand-btn {
  background: #1d3535a9 !important;
}
/* 行号栏 */
.gutter {
  width: 50px !important;
  text-align: right !important;
  padding-right: 12px !important;
  user-select: none !important;
}
:not([data-theme="dark"]) .gutter {
  background: #f7f8fa !important;
  color: #909399 !important;
}
.gutter {
  background: #252930 !important;
  color: #7f848e !important;
}
.gutter pre {
  padding: 14px 8px !important;
}

/* 代码文字区域 */
.code {
  width: 100%;
}
.code pre {
  background: #1d3535!important;
}
[data-theme="dark"] .code pre {
  background: #1e2929 !important;
}

/* 代码选中文字样式 */
.code pre::-moz-selection {
  background: rgba(64, 158, 255, 0.2) !important;
}
.code pre::selection {
  background: rgba(64, 158, 255, 0.2) !important;
}



/* ========== 语法高亮微调（适配默认配色） ========== */
/* 浅色模式关键字蓝色 */
:not([data-theme="dark"]) .kd { color: #0066cc !important; }
:not([data-theme="dark"]) .nx { color: #333333 !important; }
:not([data-theme="dark"]) .s { color: #009966 !important; }
:not([data-theme="dark"]) .c { color: #999999 !important; }
/* 暗黑模式柔和配色 */
[data-theme="dark"] .kd { color: #61afef !important; }
[data-theme="dark"] .nx { color: #e6c07b !important; }
[data-theme="dark"] .s { color: #98c379 !important; }
[data-theme="dark"] .c { color: #7f848e !important; }

/* ========== 行高亮（hover 行变色） ========== */
.code .line {
  transition: background 0.2s;
}
:not([data-theme="dark"]) .code .line:hover {
  background: rgba(64, 158, 255, 0.06) !important;
}
[data-theme="dark"] .code .line:hover {
  background: rgba(64, 158, 255, 0.1) !important;
}

/* 无行号单行代码内联样式 */
:not(figure) > code {
  padding: 2px 8px !important;
  border-radius: 4px !important;
  font-size: 0.92em !important;
}
:not([data-theme="dark"]) :not(figure) > code {
  background: oklch(from var(--theme-color-green) calc(l * 0.9) c h) !important;
  color: #3471bc !important;
}
[data-theme="dark"] :not(figure) > code {
  background: oklch(from var(--theme-color-green) calc(l * 1.2) c h) !important;
  color: #5db6cf !important;
}

.tag-Link {
  background: var(--theme-color2) !important;
  border: 2px solid var(--theme-color) !important;
}
[data-theme="light"] .tag-Link:hover {
  background: oklch(from var(--theme-color2) calc(l * 0.9) c h) !important;
  box-shadow: 0 0 15px var(--theme-color);
}
[data-theme="dark"] .tag-Link:hover {
  background: oklch(from var(--theme-color2) calc(l * 1.2) c h) !important;
  box-shadow: 0 0 15px var(--theme-color);
}
.tag-link-left {
  border-radius: 10px;
}

[data-theme="light"] ::selection {
  background: oklch(from var(--theme-color-blue) calc(l * 0.8) c h);
}
[data-theme="dark"] ::selection {
  background: oklch(from var(--theme-color-blue) calc(l * 1.2) c h);
}

.custom-hr, .search-dialog hr {
    border: 2px dashed #37ffd0 !important;
}
.custom-hr::before, .search-dialog hr::before {
    color: #37ffd0 !important;
}

[data-theme="dark"] .custom-hr, .search-dialog hr {
    border: 2px dashed #4c99e2 !important;
}
[data-theme="dark"] .custom-hr::before, .search-dialog hr::before {
    color: #4c99e2 !important;
}


* {
  scrollbar-color: var(--scrollbar-color) var(--scrollbar-background);
}

/*******************************卡片边框***********************************/

#recent-posts .recent-post-item
/*
#aside-content .card-categories,
#aside-content .card-tags,
#aside-content .card-archives,
#aside-content .card-webinfo,
#aside-content .card-recent-post,
#aside-content .card-schedule,
#aside-content .card-calendar,
#aside-content .card-history,
#aside-content .card-card-announcement,
#aside-content .card-info */{
  border: 1px solid transparent !important;
  transition: all 0.3s ease !important;
}

[data-theme] { /*这里有点bug不知道为什么，删掉这行就会夜间无法生效*/
  #recent-posts .recent-post-item:hover
  /*
  #aside-content .card-categories:hover,
  #aside-content .card-tags:hover,
  #aside-content .card-archives:hover,
  #aside-content .card-webinfo:hover,
  #aside-content .card-recent-post:hover,
  #aside-content #card-schedule:hover,
  #aside-content #card-calendar:hover,
  #aside-content .card-history:hover */{
    border-color:  var(--border-hover)!important;
    box-shadow: none !important;
  }
}

.site-page.child {
  background: var(--nav-color-shi) !important;
}
i.fas.fa-chevron-down {
  display: none;
}
.menus_item_child {
  background: var(--nav-color-shi) !important;
}
.site-page.child:hover {
  background: var(--theme-color-green) !important;
}
.DocSearch-Reset {
  color: var(--border-hover) !important;
  display: flex !important;
}
.DocSearch-Reset:hover {
  background: var(--theme-color-blue) !important;
}
.DocSearch-LoadingIndicator svg, .DocSearch-MagnifierLabel svg {
  color: var(--border-hover) !important;
}
.DocSearch-Form {
  border-color: var(--border-hover) !important;
}