@import url('https://fonts.loli.net/css2?family=HarmonyOS+Sans:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

body {
  font-family: 'HarmonyOS Sans', sans-serif;
}

code, pre, .hljs {
  font-family: 'JetBrains Mono', monospace;
}

code, pre code, .highlight code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.94em;
  backdrop-filter: blur(7px);
}

.post-content .card, .card-widget, #recent-posts .recent-post-item, .layout_post .recent-posts .recent-post-item {
  border-radius: 16px !important;
  backdrop-filter: blur(7px);
}

.card:hover, #recent-posts .recent-post-item:hover {
  transform: translateY(-6px);
  backdrop-filter: blur(7px);
}

/* ==================== 阅读体验优化 ==================== */


figure.highlight {
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0,0,0,0.22);
  margin: 2em 0;
}

/* ==================== 目录 TOC 美化 ==================== */
#post .post-toc-wrap {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  box-shadow: var(--shadow-soft);
}

/* ==================== APlayer 音乐播放器美化（右下角） ==================== */
.aplayer.aplayer-fixed {
  bottom: 20px !important;
  right: 20px !important;
  border-radius: 16px !important;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35) !important;
  background: rgba(30, 41, 59, 0.78) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border: 1px solid rgba(148, 163, 184, 0.2) !important;
  transition: all 0.4s ease;
}

.aplayer .aplayer-body {
  background: transparent !important;
}

.aplayer .aplayer-pic {
  border-radius: 50% !important;
  box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3) !important;
}

.aplayer .aplayer-info .aplayer-music,
.aplayer .aplayer-info .aplayer-lrc {
  color: #e2e8f0 !important;
}

.aplayer .aplayer-bar .aplayer-loaded,
.aplayer .aplayer-bar .aplayer-played {
  background: linear-gradient(to right, #7c3aed, #a78bfa) !important;
}

.aplayer.aplayer-fixed {
  bottom: 20px !important;
  right: 20px !important;
  border-radius: 16px !important;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35) !important;
  background: rgba(30, 41, 59, 0.78) !important;
  backdrop-filter: blur(12px) !important;
  border: 1px solid rgba(148, 163, 184, 0.2) !important;
}

.aplayer .aplayer-bar .aplayer-played,
.aplayer .aplayer-bar .aplayer-loaded {
  background: linear-gradient(to right, #7c3aed, #a78bfa) !important; /* 紫色进度条 */
}

.aplayer .aplayer-pic {
  box-shadow: 0 4px 15px rgba(124, 58, 237, 0.4) !important; /* 封面紫光晕 */
}
/* 全局超链接基础样式：清除默认下划线，定位为后续动画做准备 */
a {
  text-decoration: none !important;
  position: relative;
  transition: color 0.2s ease; /* 文字颜色柔滑过渡 */
}
/* 鼠标悬浮时，文字轻微变主色（可选，不喜欢可删掉这行） */
a:hover {
  color: var(--blog-main-color) !important;
}

/* 正文超链接专属：渐变下划线从左到右动画【核心效果】 */
.post-content a, .sidebar-content a, .comment-content a {
  padding-bottom: 1px; /* 微调下划线和文字的间距，不贴字 */
}
.post-content a::after, .sidebar-content a::after, .comment-content a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px; /* 下划线高度，细一点更精致 */
  background: linear-gradient(90deg, var(--blog-main-color), var(--blog-light-color)); /* 主色渐变下划线 */
  border-radius: 1px; /* 下划线半圆边角，不生硬 */
  transition: width 0.3s ease-in-out; /* 下划线动画速度，丝滑不急促 */
}

/* 粒子背景容器：全屏+低层级+透明背景+阅读模式隐藏【核心】 */
#particle-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -10; /* 层级拉到最低，不遮挡任何内容 */
  pointer-events: none; /* 禁止鼠标事件，不影响点击链接/按钮 */
  overflow: hidden;
}
/* 关键：开启阅读模式时，隐藏粒子容器 */
body.read-mode #particle-bg {
  display: none !important;
}
/* 粒子画布样式 */
#particle-canvas {
  width: 100%;
  height: 100%;
  background: transparent; /* 透明背景，继承你博客原有背景 */
}

#site-title {
  font-family: "思源柔黑", Source Han Sans Soft, sans-serif !important;
  font-weight: 500 !important; /* 字重，可选300(轻)/400(常规)/500(中粗)/600(粗)，500最柔和 */
  /* 可选：微调字体大小，不想改就删掉下面这行 */
  /* font-size: 20px !important; */
}

/* 2. 首页大标题（如果你的首页有独立站点大标题，加这行生效） */
.home-title {
  font-family: "思源柔黑", Source Han Sans Soft, sans-serif !important;
  font-weight: 1000 !important;
}

/* 3. 可选：移动端导航栏标题（保证手机端字体一致） */
@media screen and (max-width: 768px) {
  #site-title {
    font-family: "思源柔黑", Source Han Sans Soft, sans-serif !important;
  }
}

[data-theme=dark] .social-icon i {
  color: rgba(188, 188, 188) !important; /* 设置为白色 */
}

