/* 默认（白天模式） */
body {
  background-color: white;
  color: black;
}

[data-theme="dark"] body {
  background-color: #121212;
  color: white;
}

.pjax-leave-active {
  opacity: 0;
  background-color: inherit;
  /* 使用继承的背景色 */
}

.pjax-enter-active {
  transition: opacity 1s cubic-bezier(0.22, 0.61, 0.36, 1), background-color 1s ease-in-out, transform 1s ease-in-out;
  opacity: 1;
  background-color: inherit;
  /* 使用继承的背景色 */
}


/*侧边卡片的透明度 */
:root {
  --card-bg: rgba(255, 255, 255, 0.9);
}

[data-theme="dark"] {
  --card-bg: rgba(255, 255, 255, 0.2);
}

/* 覆盖文章列表项的高度 */
#recent-posts .recent-post-item {
  height: auto !important;
  /* 允许高度根据内容自适应 */
  padding-top: 40px !important;
  /* 顶部内边距 40px */
  padding-bottom: 40px !important;
  /* 底部内边距 40px */
}

/* 针对小屏幕的高度覆盖 */
@media screen and (max-width: 768px) {
  #recent-posts .recent-post-item {
    height: auto !important;
    padding-top: 10px !important;
    padding-bottom: 10px !important;
  }
}

/* 针对大屏幕的高度覆盖，但暂时无法测试 */
/* @media screen and (min-width: 2000px) {
  #recent-posts .recent-post-item {
    height: auto !important;
    padding-top: 10px !important;
    padding-bottom: 10px !important;
  }
} */

/* 针对白天模式下 .card-tag-cloud 内部链接的颜色 */
/* 使用 CSS 变量来获取 Hexo 辅助函数中生成的随机颜色 */
.card-tag-cloud .tag-cloud-item {
  color: var(--tag-color);
  text-decoration: none;
}

/* 暗黑模式下 .card-tag-cloud 内部链接的颜色 */
[data-theme="dark"] .card-tag-cloud .tag-cloud-item {
  color: rgba(255, 255, 255, 0.7) !important;
  /* 在暗黑模式下强制为灰白色 */
}

[data-theme="dark"] .collections-item-content a {
  color: rgba(255, 255, 255, 0.7) !important;
}

[data-theme="dark"] .post-copyright-meta {
  color: rgba(255, 255, 255, 0.8) !important;
}

[data-theme="dark"] .post-meta__tag-list a {
  color: white !important;
}

[data-theme="dark"] #post .tag_share .post-meta__tags {
  border: 1px solid white !important;
}

[data-theme="dark"] #post .tag_share .post-meta__tags:hover {
  border-color: #2a6e3f !important;
}

[data-theme="dark"] #post .post-copyright:before {
  color: white;
}

[data-theme='dark'] #recent-posts .recent-post-item>.recent-post-info>.article-title:hover {
  color: rgba(255, 255, 255, 0.3) !important;
  /* 黑暗模式下悬停颜色 */
}

.pagination .space {
  color: white !important;
}


[data-theme="dark"] .collections-item-content a:hover {
  color: rgba(255, 255, 255, 0.3) !important;
}

[data-theme="dark"] #aside-content .card-tag-cloud a:hover {
  color: rgba(255, 255, 255, 0.3) !important;
}

[data-theme="dark"] .site-data a:hover .headline {
  color: rgba(255, 255, 255, 0.3) !important;
}

[data-theme="dark"] .site-data a:hover .length-num {
  color: rgba(255, 255, 255, 0.3) !important;
}

[data-theme="dark"] .content a:hover {
  color: rgba(255, 255, 255, 0.3) !important;
}

html[data-theme="dark"] #card-toc .toc-content .toc-link:hover {
  color: rgba(255, 255, 255, 0.3) !important;
}

html[data-theme="dark"] #page-header.post-bg.nav-fixed.nav-visible #nav {
  a:hover,
  span.site-page:hover,
  #toggle-menu:hover {
    color: white !important;
  }

  #blog-info:hover {
    color: white !important;
  }
}

html[data-theme="dark"] #page-header.full_page.nav-fixed.nav-visible #nav {
  #blog-info a.nav-site-title:hover {
    color: white!important;
  }
  #search-button span.site-page.social-icon.search:hover {
    color: white !important;
  }
  .menus_items .menus_item a.site-page:hover {
    color: white !important;
  }
  #toggle-menu:hover {
    color: white !important;
  }
}

html[data-theme="dark"] #page-header.full_page.nav-fixed.nav-visible #nav {
  .menus_items .menus_item:hover span.site-page.group,
  .menus_items .menus_item:hover span.site-page.group>i,
  .menus_items .menus_item:hover span.site-page.group>span {
    color: white !important;
  }

}

/* 默认状态：为文字添加过渡效果，确保颜色和透明度变化都平滑 */
.flink-list>.flink-list-item .flink-item-name,
.flink-list>.flink-list-item .flink-item-desc,
.flink-list>.flink-list-item a {
  transition: color 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

/* 白天模式下悬停：改变文字颜色 */
.flink-list>.flink-list-item:hover .flink-item-name,
.flink-list>.flink-list-item:hover .flink-item-desc,
.flink-list>.flink-list-item:hover a {
  color: #2a6e3f;
  opacity: 1;
}

/* 在黑暗模式下，覆盖悬停时的文字透明度 */
html[data-theme="dark"] .flink-list>.flink-list-item:hover .flink-item-name,
html[data-theme="dark"] .flink-list>.flink-list-item:hover .flink-item-desc,
html[data-theme="dark"] .flink-list>.flink-list-item:hover a {
  color: white;
}

html[data-theme="dark"] #local-search .search-dialog .search-nav .search-dialog-title {
  color: rgba(255, 255, 255, 0.7) !important;
}

html[data-theme="dark"] #local-search .search-close-button .fas.fa-times {
  color: rgba(255, 255, 255, 0.7) !important;
  transition: none !important;
}

html[data-theme="dark"] #local-search .search-close-button:hover .fas.fa-times {
  color: white !important;
}

html[data-theme="dark"] #local-search-input .local-search-box .local-search-box--input:focus {
  border-color: rgba(255, 255, 255, 0.7) !important;
}

html[data-theme="dark"] #local-search-results .search-result-list .local-search-hit-item:hover a,
html[data-theme="dark"] #local-search-results .search-result-list .local-search-hit-item:hover span.search-result-title,
html[data-theme="dark"] #local-search-results .search-result-list .local-search-hit-item:hover p.search-result {
  color: white !important;
}

html[data-theme="dark"] #local-search-results .search-result-list .local-search-hit-item::marker {
  color: white !important;
}

html[data-theme="dark"] #local-search-input .local-search-box .local-search-box--input {
  border: 1px solid rgba(255, 255, 255, 0.7) !important;
  color: rgba(255, 255, 255, 0.7) !important;
}

html[data-theme="dark"] a.article-meta__categories:hover {
  color: white !important;
}

html[data-theme="dark"] a.post-meta-categories:hover {
    color: white !important;
}

html[data-theme="dark"] a.twikoo-count:hover {
  color: white !important;
}

html[data-theme="dark"] span#twikoo-count:hover {
  color: white !important;
}

html[data-theme="dark"] a[href*="#post-comment"]:hover {
  color: white !important;
}

html[data-theme="dark"] a[href="http://wiki.diraw.top"]:hover {
  color: rgba(255, 255, 255, 0.7) !important;
}

html[data-theme="dark"] a.article-sort-item-title:hover {
  color: white !important;
}

html[data-theme="dark"] a.category-list-link:hover {
  color: white !important;
}

html[data-theme="light"] article a:not(#aside-content a) {
  color: #8b0000;
}

html[data-theme="light"] article a:not(#aside-content a):hover {
  color: #f40002;
}

/* 暗模式下，正文内 <p> 标签中超链接的颜色 */
html[data-theme="dark"] article a {
  color: #beb8dc;
}

html[data-theme="dark"] article a:hover {
  color: #ddd7ff;
}

html[data-theme="dark"] code {
  /* color: #8ecfc9 !important; */
  color: #82b0d2 !important;
}

html[data-theme="dark"] .post-copyright a:hover {
  color: rgba(255, 255, 255, 0.9) !important;
}

html[data-theme="dark"] footer a:hover {
  color: white !important;
}

html[data-theme="dark"] #post-comment a:hover {
  color: white !important;
}

html[data-theme="dark"] #nav a:hover {
  color: white !important;
}

html[data-theme="dark"] #nav .menus_item span:hover {
  color: white !important;
}

html[data-theme="dark"] #nav #search-button span:hover {
  color: white !important;
}

.archive-announcement {
  position: relative;
  padding-left: 40px;
  margin-bottom: 0;

  font-size: 1.1em;
  color: #fff;
  line-height: 1.5;
  border-radius: 5px;

  padding-bottom: 15px;
}

.archive-announcement::before {
  content: '';
  position: absolute;
  left: 10px;
  /* 竖线距离左侧的距离，与下方时间轴竖线对齐 */
  top: 0;
  bottom: -10px;
  /* 关键：向下延伸，覆盖与下方元素的间距 */
  width: 2px;
  background-color: #46b869;
  z-index: 1;
  /* 确保竖线在其他元素之上 */
}

.archive-announcement p {
  margin: 0;
}

html[data-theme="dark"] .archive-announcement a {
  color: #beb8dc;
  font-weight: bold;
}

html[data-theme="dark"] .archive-announcement a:hover {
  color: #ddd7ff;
}

html[data-theme="light"] .archive-announcement p {
  color: #000000;
}

html[data-theme="dark"] #page a:hover {
  color: white !important;
}

html[data-theme="dark"] pre.language-bash {
  background-color: rgba(0, 0, 0, 0.5);
}


html[data-theme="dark"] pre.language-bash code {
  text-shadow: none !important;
  /* 保持移除阴影 */
  /* 设置一个基础的文字颜色，通常是代码的默认颜色 */
  color: #D4D4D4;
  /* 比如一个亮灰色 */
}

/* 假设你用的是 Prism.js 的类名，你可以这样覆盖： */
html[data-theme="dark"] pre.language-bash .token.comment {
  /* # Start tailscaled... */
  color: #6A9955;
  /* 更亮的绿色 */
}

html[data-theme="dark"] pre.language-bash .token.keyword {
  /* if, else, then, fi */
  color: #569CD6;
  /* 清晰的蓝色 */
}

html[data-theme="dark"] pre.language-bash .token.string {
  /* "Starting tailscaled..." */
  color: #CE9178;
  /* 温暖的橘色 */
}

html[data-theme="dark"] pre.language-bash .token.operator {
  /* >, &, / */
  color: #D4D4D4;
  /* 与默认文字颜色相同，或更亮一点 */
  background-color: transparent !important;
  /* 如果操作符有背景色，将其移除 */
}

html[data-theme="dark"] pre.language-bash .token.builtin {
  /* echo, sudo - 内置命令可能用这个 */
  color: #C586C0;
  /* 紫红色 */
}

/* 首先针对按钮本身进行设置，确保它有背景和边框 */
html[data-theme="dark"] .copy-to-clipboard-button {
  background-color: rgba(255, 255, 255, 0.1);
  /* 浅灰半透明背景 */
  border: 1px solid rgba(255, 255, 255, 0.2);
  /* 浅灰半透明边框 */
  border-radius: 4px;
  /* 轻微圆角，可选 */
  padding: 4px 8px;
  /* 调整内边距，可选 */
  box-sizing: border-box;
  /* 确保 padding 不会增加按钮总尺寸，可选 */
}

/* 接着设置按钮内文字的颜色 */
html[data-theme="dark"] .copy-to-clipboard-button span {
  color: #E0E0E0;
  /* 亮灰色文字，确保可见 */
  /* 如果还有图标，可能需要设置图标的颜色，例如：
     fill: #E0E0E0; (如果是 SVG 图标)
     或者直接设置 button 的 color 如果图标是字体图标 */
}

/* 鼠标悬停时的效果，增加交互性 */
html[data-theme="dark"] .copy-to-clipboard-button:hover {
  background-color: rgba(255, 255, 255, 0.2);
  /* 悬停时背景更亮一点 */
  border-color: rgba(255, 255, 255, 0.4);
  /* 悬停时边框更亮一点 */
  cursor: pointer;
  /* 提示用户这是可点击元素 */
}

html[data-theme="dark"] .highlight-tools i.fa-angle-down:hover,
html[data-theme="dark"] .highlight-tools i.fa-paste:hover {
  /* 悬停时的颜色：设置为一个更亮的颜色，例如纯白色 */
  color: #FFFFFF;
  /* 纯白色 */
}
