/* 视觉统一（第一批：分类条 + 可读性），由 _config.anzhiyu.yml 的 inject.head 引入，放在 slider.css 之后 */

/* ===== 令牌：全站只用一个强调色，浅色主色 / 深色同色相提亮 ===== */
:root,
[data-theme="light"] {
  --lx-accent: #2474b5;
  --lx-accent-strong: #1d5f95;
  --lx-accent-soft: rgba(36, 116, 181, 0.12);
  --lx-tint: rgba(36, 116, 181, 0.08);
  --lx-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}
[data-theme="dark"] {
  --lx-accent: #6ea8da;
  --lx-accent-strong: #8dbbe3;
  --lx-accent-soft: rgba(110, 168, 218, 0.16);
  --lx-tint: rgba(255, 255, 255, 0.08);
  /* 主题深色默认是金色 / iOS 蓝，和浅色的蓝对不上 */
  --anzhiyu-lighttext: var(--lx-accent);
  --anzhiyu-hovertext: var(--lx-accent);
}
:where([data-theme="dark"]) a:hover {
  color: var(--lx-accent);
}

/* ===== 分类条：去掉渐变描边和外发光，悬停只把 1px 描边换成主色 ===== */
#categoryBar,
#categoryBar:hover {
  border: 0;
  border-radius: 12px;
  background: none;
  box-shadow: none;
}
#categoryBar::before,
#category-bar.category-bar::before {
  content: none;
}
#category-bar.category-bar:hover {
  box-shadow: none;
}
[data-theme="dark"] #category-bar.category-bar {
  --category-bar-bg: var(--anzhiyu-card-bg);
  background: var(--category-bar-bg);
}
@media (hover: hover) and (min-width: 769px) {
  #category-bar.category-bar {
    transition: border-color 0.2s var(--lx-ease);
  }
  #category-bar.category-bar:hover {
    border: var(--style-border-hover);
  }
}
/* 实心主色只留给当前项（首页是 .select，分类页是 .selected）；普通项悬停只染一层淡色 */
.catalog-list-item.selected a {
  background: var(--anzhiyu-main);
}
.catalog-list-item:not(.select):not(.selected):hover a {
  background: var(--lx-tint);
  color: var(--anzhiyu-fontcolor);
}
.category-bar-next:hover,
a.catalog-more:hover {
  color: var(--lx-accent);
}
#catalog-list {
  overflow-x: hidden;
}

/* ===== 深色下悬停文章卡，标题原本变成 25% 白几乎消失 ===== */
#recent-posts .recent-post-item:hover .recent-post-info .article-title {
  color: var(--lx-accent);
}

/* ===== 行内代码：原来是橙底白字（对比度约 2:1） ===== */
#article-container :not(pre) > code,
[data-theme="dark"] #article-container .note code {
  background: var(--lx-accent-soft);
  color: var(--lx-accent-strong);
  box-shadow: none;
}
#twikoo code {
  color: var(--lx-accent-strong);
}

/* ===== 选中文字：原来是浅青底白字（对比度约 1.4:1） ===== */
*::selection {
  background: rgba(36, 116, 181, 0.24);
  color: var(--anzhiyu-fontcolor);
}
[data-theme="dark"] *::selection {
  background: rgba(110, 168, 218, 0.34);
}
