/* ===========================================
   A 股小红书 — 自定义样式
   主题色：#B91C1C（中国红）
   =========================================== */

:root {
  /* 自定义品牌色覆盖 */
  --vp-c-brand-1: #B91C1C;
  --vp-c-brand-2: #DC2626;
  --vp-c-brand-3: #EF4444;
  --vp-c-brand-soft: rgba(185, 28, 28, 0.14);

  /* Logo 高度（默认 24px，调大到 36px） */
  --vp-nav-logo-height: 36px;

  /* 代码块主题色微调 */
  --vp-code-block-bg: #1f1f23;
}

.dark {
  --vp-c-brand-1: #EF4444;
  --vp-c-brand-2: #F87171;
  --vp-c-brand-3: #FCA5A5;
  --vp-c-brand-soft: rgba(239, 68, 68, 0.16);

  --vp-code-block-bg: #111318;
}

/* ===========================================
   自定义 Logo（VitePress 1.6 原生 light/dark 模式）
   =========================================== */
/* 直接用具体像素覆盖（VitePress 默认 vars 在 custom.css 之后加载） */
.VPNavBarTitle .VPImage.logo,
.VPNavBarTitle img.logo,
.VPNavBarTitle img.VPImage {
  height: 36px !important;
  max-height: 36px !important;
  width: auto !important;
  min-width: 0 !important;
}

/* ===========================================
   首页 Hero 区增强
   =========================================== */
.VPHero .name,
.VPHero .text {
  background: linear-gradient(120deg, #B91C1C 30%, #DC2626 50%, #EF4444 70%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.dark .VPHero .name,
.dark .VPHero .text {
  background: linear-gradient(120deg, #FCA5A5 30%, #F87171 50%, #EF4444 70%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ===========================================
   链接 hover 效果
   =========================================== */
.vp-doc a {
  transition: color 0.2s ease;
}

/* ===========================================
   代码块复制按钮
   =========================================== */
.vp-doc div[class*='language-'] {
  border-radius: 8px;
}

/* ===========================================
   表格样式微调
   =========================================== */
.vp-doc table {
  border-radius: 8px;
  overflow: hidden;
}

/* ===========================================
   移动端优化
   =========================================== */
@media (max-width: 640px) {
  .MyLogo {
    min-width: 100px;
  }
  .MyLogoImage {
    height: 26px;
  }
}

/* ===========================================
   自定义滚动条
   =========================================== */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--vp-c-bg-soft);
}

::-webkit-scrollbar-thumb {
  background: var(--vp-c-brand-1);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--vp-c-brand-2);
}

/* ===========================================
   访问统计样式（不蒜子 / vercount 通用）
   =========================================== */
.busuanzi-stat {
  display: inline-block;
  font-size: 0.85em;
  color: var(--vp-c-text-2);
  opacity: 0.85;
  margin-top: 4px;
}

/* 不蒜子元素 */
.busuanzi-stat #busuanzi_value_site_pv,
.busuanzi-stat #busuanzi_value_site_uv,
/* vercount 元素 */
.busuanzi-stat #vercount_value_site_pv,
.busuanzi-stat #vercount_value_site_uv {
  color: var(--vp-c-brand-1);
  font-weight: 600;
  margin: 0 2px;
  font-variant-numeric: tabular-nums;
}

.dark .busuanzi-stat #busuanzi_value_site_pv,
.dark .busuanzi-stat #busuanzi_value_site_uv,
.dark .busuanzi-stat #vercount_value_site_pv,
.dark .busuanzi-stat #vercount_value_site_uv {
  color: var(--vp-c-brand-2);
}
