/* ============================================================
   Timeseal 主题增强层 v2（2026-11-29）
   1) 修复博主卡片「🐟 状态气泡」变成白圆点、文字看不见的问题
   2) 重构深色模式配色：提高对比度、统一深色卡面、修掉各处浅色残留
   本文件在 index.css / custom.min.css / style.css 之后加载，用来覆盖它们。
   ============================================================ */

/* ---------- 1. 博主状态气泡（头像右下角） ---------- */
.card-info-avatar .author-status-box {
  left: calc(100% - 34px);
  bottom: -2px;
  width: 34px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  overflow: hidden;
  transition: width 0.35s ease, background 0.3s ease;
}
.card-info-avatar .author-status-box .author-status {
  height: 30px;
  padding: 0 4px;
  justify-content: flex-start;
}
.card-info-avatar .author-status-box .author-status span {
  width: auto;
  height: 30px;
  line-height: 30px;
  margin: 0;
  font-size: 12px;
  color: #4c4948;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: width 0.35s ease, margin 0.35s ease;
}
.card-info-avatar .author-status-box .author-status span:first-child {
  width: 18px;
  font-size: 15px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.card-info-avatar .author-status-box .author-status span:last-child {
  width: 0;
}
.card-info-avatar .author-status-box:hover {
  width: 132px;
  background: rgba(255, 255, 255, 0.99);
}
.card-info-avatar .author-status-box:hover .author-status span:last-child {
  width: auto;
  margin-left: 4px;
}
[data-theme="dark"] .card-info-avatar .author-status-box {
  background: rgba(36, 39, 46, 0.96);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}
[data-theme="dark"] .card-info-avatar .author-status-box .author-status span {
  color: rgba(236, 239, 244, 0.9);
}

/* ---------- 2. 深色模式：调色板 ---------- */
[data-theme="dark"] {
  --global-bg: #0a0b0d;
  --card-bg: #14161a;

  --font-color: rgba(236, 239, 244, 0.87);
  --text-highlight-color: #ffffff;
  --light-grey: rgba(236, 239, 244, 0.62);
  --grey: rgba(236, 239, 244, 0.45);
  --dark-grey: rgba(236, 239, 244, 0.2);
  --white: rgba(255, 255, 255, 0.94);

  --btn-bg: #232730;
  --btn-color: rgba(236, 239, 244, 0.9);
  --btn-hover-color: #313843;
  --text-bg-hover: #262b34;

  --blockquote-bg: #1b1e24;
  --blockquote-color: rgba(236, 239, 244, 0.82);

  --toc-link-color: rgba(236, 239, 244, 0.66);
  --timeline-bg: #1b1e24;
  --hr-border: rgba(255, 255, 255, 0.14);
  --hr-before-color: rgba(255, 255, 255, 0.5);
  --scrollbar-color: #4a515c;

  --card-friend-class-desc-bgcolor: #1b1e24;
  --card-friend-name-color: #eceff4;
  --card-friend-descr-color: rgba(236, 239, 244, 0.55);

  /* 玻璃卡面：由 0.6 提高到 0.9，正文不再被壁纸干扰 */
  --trans-dark: rgba(19, 21, 25, 0.9);
  --border-style: 1px solid rgba(255, 255, 255, 0.08);
  --bw-accent: #4cc9d4;
  --bw-link: #7cc4ff;
}

/* 卡面：统一成"深色玻璃 + 细边" */
[data-theme="dark"] div#post,
[data-theme="dark"] div#page,
[data-theme="dark"] div#archive,
[data-theme="dark"] #recent-posts > .recent-post-item,
[data-theme="dark"] #aside-content .card-widget,
[data-theme="dark"] .cardHover {
  background: var(--trans-dark);
  border: var(--border-style);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
}
[data-theme="dark"] #aside-content .card-info {
  background: rgba(22, 24, 29, 0.94);
}

/* ---------- 正文排版 ---------- */
[data-theme="dark"] #article-container,
[data-theme="dark"] #article-container p,
[data-theme="dark"] #article-container li,
[data-theme="dark"] #article-container ol,
[data-theme="dark"] #article-container ul {
  color: rgba(236, 239, 244, 0.88);
}
[data-theme="dark"] #article-container h1,
[data-theme="dark"] #article-container h2,
[data-theme="dark"] #article-container h3,
[data-theme="dark"] #article-container h4,
[data-theme="dark"] #article-container h5,
[data-theme="dark"] #article-container h6 {
  color: #f2f5f9;
}
[data-theme="dark"] #article-container a {
  color: var(--bw-link);
}
[data-theme="dark"] #article-container a:hover {
  color: #a5d8ff;
}
[data-theme="dark"] #article-container strong,
[data-theme="dark"] #article-container b {
  color: #ffffff;
}
[data-theme="dark"] #article-container blockquote {
  background: var(--blockquote-bg);
  border-left: 3px solid var(--bw-accent);
  color: var(--blockquote-color);
}
[data-theme="dark"] #article-container code {
  background: #23262d;
  color: #ffb4c6;
}
[data-theme="dark"] #article-container pre code,
[data-theme="dark"] #article-container figure.highlight,
[data-theme="dark"] #article-container figure.highlight pre {
  background: #16181d;
  color: rgba(236, 239, 244, 0.86);
}
[data-theme="dark"] #article-container kbd {
  background: #23262d;
  color: #eceff4;
  border-color: rgba(255, 255, 255, 0.14);
}

/* 表格 */
[data-theme="dark"] #article-container table {
  color: rgba(236, 239, 244, 0.86);
  border-color: rgba(255, 255, 255, 0.1);
}
[data-theme="dark"] #article-container table th {
  background: #21252c;
  color: #eef2f7;
  border-color: rgba(255, 255, 255, 0.1);
}
[data-theme="dark"] #article-container table td {
  border-color: rgba(255, 255, 255, 0.08);
}
[data-theme="dark"] #article-container table tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.03);
}

/* ---------- 文章页元信息 / 标题 ---------- */
[data-theme="dark"] #post-meta,
[data-theme="dark"] #post-meta span,
[data-theme="dark"] #post-meta time,
[data-theme="dark"] #post-meta a,
[data-theme="dark"] #post-info,
[data-theme="dark"] .post-meta-label {
  color: rgba(236, 239, 244, 0.62);
}
[data-theme="dark"] #post-meta a:hover {
  color: var(--bw-link);
}
[data-theme="dark"] #post .post-copyright,
[data-theme="dark"] .post-copyright-info {
  background: #1b1e24;
  color: rgba(236, 239, 244, 0.75);
  border-color: rgba(255, 255, 255, 0.08);
}

/* ---------- 首页文章卡 ---------- */
[data-theme="dark"] .recent-post-info .article-title,
[data-theme="dark"] .recent-post-info .article-title a {
  color: #f2f5f9;
}
[data-theme="dark"] .recent-post-info .article-title a:hover {
  color: var(--bw-accent);
}
[data-theme="dark"] .recent-post-meta,
[data-theme="dark"] .recent-post-meta span,
[data-theme="dark"] .recent-post-meta a,
[data-theme="dark"] .recent-post-meta time,
[data-theme="dark"] .recent-post-meta i,
[data-theme="dark"] .article-meta-label {
  color: rgba(236, 239, 244, 0.66);
}
[data-theme="dark"] .recent-post-meta a:hover {
  color: var(--bw-link);
}
[data-theme="dark"] .recent-post-meta .post-meta-separator {
  color: rgba(236, 239, 244, 0.25);
}

/* ---------- 归档 / 分类 / 标签 ---------- */
[data-theme="dark"] .article-sort-title,
[data-theme="dark"] .article-sort-item-title,
[data-theme="dark"] .article-sort-item-title a {
  color: rgba(236, 239, 244, 0.9);
}
[data-theme="dark"] .article-sort-item-title a:hover {
  color: var(--bw-accent);
}
[data-theme="dark"] .article-sort-item-time,
[data-theme="dark"] .article-sort-item-time time,
[data-theme="dark"] .article-sort-item-year {
  color: rgba(236, 239, 244, 0.55);
}
[data-theme="dark"] .article-sort-title .article-sort-title-text,
[data-theme="dark"] .article-sort-title:before {
  color: #f2f5f9;
}
[data-theme="dark"] #category .category-lists .category-title,
[data-theme="dark"] #category .category-lists a,
[data-theme="dark"] #tag .tag-cloud a,
[data-theme="dark"] #page .category-lists .category-title {
  color: rgba(236, 239, 244, 0.85);
}
[data-theme="dark"] #category .category-lists .category-title:hover,
[data-theme="dark"] #tag .tag-cloud a:hover {
  color: var(--bw-accent);
}
[data-theme="dark"] .category-list-count,
[data-theme="dark"] .tag-list-count {
  color: rgba(236, 239, 244, 0.45);
}
[data-theme="dark"] .article-sort-item-img img {
  filter: brightness(0.9);
}

/* ---------- 侧栏：公告 / 通讯录 / 目录 / 最新文章 ---------- */
[data-theme="dark"] #aside-content .card-widget .item-headline,
[data-theme="dark"] #aside-content .card-widget .item-headline span,
[data-theme="dark"] #aside-content .card-widget .item-headline i {
  color: #f2f5f9;
}
[data-theme="dark"] .announcement_content,
[data-theme="dark"] .announcement_content a {
  color: rgba(236, 239, 244, 0.78);
}
[data-theme="dark"] .card-friend-class-desc,
[data-theme="dark"] .card-widget.card-friend-link summary,
[data-theme="dark"] .card-widget.card-friend-link .card-friend-name {
  color: rgba(236, 239, 244, 0.86);
}
[data-theme="dark"] .card-friend-descr,
[data-theme="dark"] .card-friend-item .card-friend-descr {
  color: rgba(236, 239, 244, 0.5);
}
[data-theme="dark"] #card-toc .toc-link {
  color: var(--toc-link-color);
}
[data-theme="dark"] #card-toc .toc-link:hover {
  color: #ffffff;
}
[data-theme="dark"] #card-toc .toc-link.active,
[data-theme="dark"] .is-active-link {
  background: var(--bw-accent);
  color: #062026;
}
[data-theme="dark"] #card-toc .toc-percentage {
  color: rgba(236, 239, 244, 0.5);
}
[data-theme="dark"] .aside-list-item .content .title,
[data-theme="dark"] .aside-list-item .content .title a {
  color: rgba(236, 239, 244, 0.86);
}
[data-theme="dark"] .aside-list-item .content .date {
  color: rgba(236, 239, 244, 0.45);
}

/* ---------- 分页 / 按钮 / 返回顶部 ---------- */
[data-theme="dark"] .pagination .page-number,
[data-theme="dark"] .pagination .extend {
  background: #1d2128;
  color: rgba(236, 239, 244, 0.8);
  border-color: rgba(255, 255, 255, 0.08);
}
[data-theme="dark"] .pagination .page-number.active,
[data-theme="dark"] .pagination .page-number:hover {
  background: var(--bw-accent);
  color: #062026;
}
[data-theme="dark"] #rightside > div > button,
[data-theme="dark"] #rightside > div > a {
  background: rgba(30, 33, 40, 0.92);
  color: rgba(236, 239, 244, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
[data-theme="dark"] #rightside > div > button:hover {
  background: #2b313b;
}
[data-theme="dark"] #pagination .prev_info,
[data-theme="dark"] #pagination .next_info {
  color: #ffffff;
}

/* ---------- 搜索框 / 表单 ---------- */
[data-theme="dark"] .search-dialog .local-search-box input,
[data-theme="dark"] .search-dialog #local-search-input {
  background: #1b1e24;
  color: rgba(236, 239, 244, 0.9);
  border-color: rgba(255, 255, 255, 0.1);
}
[data-theme="dark"] .search-dialog .search-result,
[data-theme="dark"] .search-dialog .search-keyword {
  color: var(--bw-link);
}
[data-theme="dark"] #article-container input[type="text"],
[data-theme="dark"] #article-container textarea {
  background: #1b1e24;
  color: rgba(236, 239, 244, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
[data-theme="dark"] #article-container input::placeholder,
[data-theme="dark"] #article-container textarea::placeholder {
  color: rgba(236, 239, 244, 0.4);
}

/* ---------- 图片浮层（相册灯箱 / 图集标题） ---------- */
[data-theme="dark"] #article-container .gallery-container .gallery-item .gallery-caption,
[data-theme="dark"] .justified-gallery > figcaption {
  color: #ffffff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

/* ---------- 导航栏玻璃层 ---------- */
[data-theme="dark"] #page-header.nav-fixed #nav {
  background: rgba(10, 11, 13, 0.78) !important;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

/* ---------- 壁纸遮罩：略提亮，避免整站发灰 ---------- */
[data-theme="dark"] #web_bg:before {
  background-color: rgba(0, 0, 0, 0.62);
}

/* ---------- 标签云：深色下用提亮版颜色 ---------- */
.tag-cloud-list a,
#tag .tag-cloud a {
  color: var(--tagc, rgba(236, 239, 244, 0.85));
}
[data-theme="dark"] .tag-cloud-list a,
[data-theme="dark"] #tag .tag-cloud a {
  color: var(--tagc-dark, #7cc4ff);
}

/* ---------- 滚动条 ---------- */
[data-theme="dark"] ::-webkit-scrollbar-thumb {
  background: #454c57;
}
[data-theme="dark"] ::selection {
  background: rgba(76, 201, 212, 0.35);
  color: #ffffff;
}
