/* ================= 基础重置与变量 ================= */
:root {
  --bg-color: #0f172a;
  --text-primary: #e2e8f0;
  --text-secondary: #94a3b8;
  --accent-blue: #1d93d0;
  --accent-deep-blue: #0f225d;
  --font-main: 'Microsoft YaHei', 'PingFang SC', system-ui, sans-serif;
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-family: var(--font-main);
  line-height: 1.6;
}
/* ================= 主页动画 ================= */
#landing-page {
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
}
/* 落地页背景图/GIF
   .bg-show → 图片已就绪：从画面中心圆形扩散铺满
   .bg-fade → 图片在 SVG 结束后才下完：整体渐显 */
#landing-page::before {
  content: "";
/* 用 fixed 而不是 absolute：绝对定位只会铺满首屏 100vh，
       滚动到页脚时就露出 body 底色，出现一条水平分界。
       fixed + z-index:-1 后整页（含页脚）始终压在背景图之上，
       与归档页 body.page-archive::before 的处理方式一致。 */
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: url("/images/landing-bg.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  clip-path: circle(0% at 50% 50%);
  transition: clip-path 2.4s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.8s ease;
  pointer-events: none;
}
/* 手机端换一张竖版背景图 */
@media (max-width: 768px) {
  #landing-page::before {
    background-image: url("/images/landing-bg-mobile.webp");
    background-position: center top;
  }
  #landing-page.bg-fallback::before {
    background-image: url("/images/landing-bg.webp");
    background-position: center;
  }
  #moyuan-img {
    display: none;
  }
}
/* 深色遮罩，保证标题和按钮可读（跟随背景一起出现）
   必须与 ::before 同为 fixed + z-index:-1：同层级下按 DOM 顺序绘制，
   ::after 在 ::before 之上；若留 z-index:0 会盖住页脚文字。 */
#landing-page::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: var(--bg-color);
  opacity: 0;
  clip-path: circle(0% at 50% 50%);
  transition: clip-path 2.4s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.8s ease;
  pointer-events: none;
}
#landing-page.bg-show::before {
  opacity: 1;
  clip-path: circle(150% at 50% 50%);
}
#landing-page.bg-show::after {
  opacity: 0.55;
  clip-path: circle(150% at 50% 50%);
}
/* 渐显分支：取消 clip 过渡，直接铺满后淡入 */
#landing-page.bg-fade::before {
  opacity: 1;
  clip-path: circle(150% at 50% 50%);
  transition: opacity 1.2s ease;
}
#landing-page.bg-fade::after {
  opacity: 0.55;
  clip-path: circle(150% at 50% 50%);
  transition: opacity 1.2s ease;
}
@media (prefers-reduced-motion: reduce) {
  #landing-page::before,
  #landing-page::after {
    transition: opacity 0.3s ease;
  }
}
#effect-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}
.svg-container {
  width: 300px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}
.avatar-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 793.7007874015749/1122.5196850393702;
}
.avatar-wrapper svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
}
.svg-path {
  fill: none;
  stroke: var(--accent-blue);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 3s ease-in-out;
}
.svg-path.animated {
  stroke-dashoffset: 0;
}
#moyuan-img {
  position: absolute;
  top: -20px;
  left: -42px;
  width: 130%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
  z-index: 3;
}
#moyuan-img.show {
  opacity: 1;
}
.landing-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 2rem;
}
.landing-title {
  font-size: 1.5rem;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 1s ease, transform 1s ease;
  color: var(--text-primary);
}
.landing-title.show {
  opacity: 1;
  transform: translateY(0);
}
.enter-btn {
  margin-top: 2rem;
  padding: 0.8rem 2.5rem;
  background: transparent;
  border: 1px solid var(--accent-blue);
  color: var(--accent-blue);
  font-family: var(--font-main);
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
}
.enter-btn:hover {
  background: var(--accent-blue);
  color: var(--bg-color);
}
/* ================= 文章列表与布局 ================= */
.blog-layout {
  display: flex;
  gap: 4rem;
  padding: 2rem;
}
.sidebar {
  width: 250px;
  flex-shrink: 0;
  position: sticky;
  top: 5rem;
  height: fit-content;
}
.sidebar-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent-deep-blue);
  margin-bottom: 1rem;
}
.sidebar-name {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}
.sidebar-slogan {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
  font-style: italic;
}
.sidebar-nav a {
  display: block;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.5rem 0;
  font-size: 0.9rem;
  transition: color 0.2s;
  border-left: 2px solid transparent;
  padding-left: 1rem;
}
.sidebar-nav a:hover,
.sidebar-nav a.active {
  color: var(--text-primary);
  border-left-color: var(--accent-blue);
}
.sidebar-github {
  margin-top: 2rem;
  display: inline-block;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
}
.sidebar-github:hover {
  color: var(--text-primary);
}
.content-area {
  flex-grow: 1;
}
.search-bar {
  width: 100%;
  padding: 0.8rem 1.2rem;
  background: rgba(30,41,59,0.5);
  border: 1px solid var(--accent-deep-blue);
  color: var(--text-primary);
  font-family: var(--font-main);
  margin-bottom: 2rem;
  outline: none;
  transition: border-color 0.3s;
}
.search-bar:focus {
  border-color: var(--accent-blue);
}
/* 文章列表样式 (包含缩略图布局) */
.article-item {
  display: flex; /* 让图片和文字横向排列 */
  gap: 1.5rem; /* 图片和文字的间距 */
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(30,41,59,0.8);
  align-items: center; /* 垂直居中对齐 */
}
/* 缩略图容器 */
.article-banner {
  flex-shrink: 0; /* 防止图片被压缩 */
  width: 120px; /* 固定缩略图宽度 */
  height: 80px; /* 固定缩略图高度 */
  overflow: hidden; /* 裁剪溢出部分 */
  border-radius: 4px; /* 微圆角 */
  border: 1px solid var(--accent-deep-blue);
}
.article-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* 保证图片不变形，填满容器 */
  transition: transform 0.3s ease;
}
.article-banner:hover img {
  transform: scale(1.05); /* 鼠标悬停微微放大 */
}
/* 文字信息区 */
.article-info {
  flex-grow: 1;
}
/* 文字区占据剩余空间 */
.article-title {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  text-decoration: none;
  display: block;
}
.article-title:hover {
  color: var(--accent-blue);
}
.article-meta {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 0.8rem;
}
.article-tags span {
  font-size: 0.75rem;
  background: rgba(29,147,208,0.1);
  color: var(--accent-blue);
  padding: 0.2rem 0.6rem;
  margin-right: 0.5rem;
  border-radius: 2px;
}
.article-title {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  text-decoration: none;
  display: block;
}
.article-title:hover {
  color: var(--accent-blue);
}
.article-meta {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 0.8rem;
}
.article-tags span {
  font-size: 0.75rem;
  background: rgba(29,147,208,0.1);
  color: var(--accent-blue);
  padding: 0.2rem 0.6rem;
  margin-right: 0.5rem;
  border-radius: 2px;
}
/* 日记时间轴样式 */
.diary-item {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(30,41,59,0.5);
  display: flex;
  align-items: baseline;
  gap: 1.5rem;
}
.diary-date {
  color: var(--accent-blue);
  font-size: 0.9rem;
  font-family: var(--font-main);
  white-space: nowrap;
}
.diary-title {
  color: var(--text-primary);
  text-decoration: none;
  font-size: 1.1rem;
  transition: color 0.3s;
}
.diary-title:hover {
  color: var(--accent-blue);
}
/* ================= 全局顶部导航栏 ================= */
.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 1.5rem 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
  background: linear-gradient(to bottom, rgba(15,23,42,0.9), transparent);
}
.nav-logo {
  font-weight: bold;
  color: var(--accent-blue);
  text-decoration: none;
  font-size: 1.2rem;
}
.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  margin-left: 2rem;
  transition: color 0.3s ease;
  font-size: 0.9rem;
}
.nav-links a:hover {
  color: var(--text-primary);
}
/* ================= 关于页与文章详情页布局 ================= */
.about-layout,
.blog-layout {
  display: flex;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  gap: 4rem;
  padding-top: 100px; /* 给顶部导航留出空间 */
}
/* 左侧栏通用样式 */
.sidebar,
.about-left {
  width: 250px;
  flex-shrink: 0;
  position: sticky;
  top: 100px;
  height: fit-content;
}
.sidebar-avatar,
.about-avatar {
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent-deep-blue);
  margin-bottom: 0;
}
.sidebar-avatar {
  width: 80px;
  height: 80px;
}
.about-avatar {
  width: 120px;
  height: 120px;
}
.sidebar-name,
.about-name {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}
.sidebar-slogan,
.about-slogan {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
  font-style: italic;
}
.sidebar-nav a {
  display: block;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.5rem 0;
  font-size: 0.9rem;
  transition: color 0.2s;
  border-left: 2px solid transparent;
  padding-left: 1rem;
}
.sidebar-nav a:hover,
.sidebar-nav a.active {
  color: var(--text-primary);
  border-left-color: var(--accent-blue);
}
.sidebar-github {
  margin-top: 2rem;
  display: inline-block;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
}
.sidebar-github:hover {
  color: var(--text-primary);
}
.about-left {
  text-align: center;
}
.about-left .sidebar-nav {
  text-align: left;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--accent-deep-blue);
}
.content-area,
.about-right {
  flex-grow: 1;
}
/* 文章详情排版 */
.article-content {
  line-height: 1.8;
}
.article-content h1 {
  margin-bottom: 1rem;
}
.article-content p {
  margin-bottom: 1.2rem;
}
.article-content blockquote {
  border-left: 4px solid var(--accent-blue);
  padding: 0.5rem 1.5rem;
  margin: 1.5rem 0;
  color: var(--text-secondary);
  background: rgba(15,23,42,0.3);
}
/* 引用块内的段落不要沿用正文的段间距，否则底部会多出一行空白 */
.article-content blockquote p {
  margin: 0;
}
.article-content blockquote p + p {
  margin-top: 0.6rem;
}
/* 正文列表缩进（全局 * reset 把浏览器默认缩进也清掉了，这里补回来） */
.article-content > ul,
.article-content > ol,
.article-content li > ul,
.article-content li > ol {
  padding-left: 1.6rem;
  margin: 0.8rem 0;
}
.article-content li {
  line-height: 1.9;
}
.article-content pre {
  background: var(--code-bg);
  padding: 1.5rem;
  border-radius: 4px;
  overflow-x: auto;
  margin: 1.5rem 0;
}
.article-content code {
  font-family: 'Fira Code', monospace;
}
/* ================= 代码块标题栏 ================= */
.article-content figure.highlight {
  position: relative;
  margin: 1.5rem 0;
  padding-top: 2.1rem;
  border: 1px solid var(--accent-deep-blue);
  border-radius: 4px;
  overflow: hidden;
  background: rgba(15,34,93,0.28);
}
/* 顶部语言栏（语言名由 JS 写入 data-lang） */
.article-content figure.highlight::before {
  content: attr(data-lang);
  position: absolute;
  inset: 0 0 auto 0;
  height: 2.1rem;
  display: flex;
  align-items: center;
  padding: 0 4rem 0 1rem;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  color: var(--text-secondary);
  background: rgba(15,34,93,0.55);
  border-bottom: 1px solid var(--accent-deep-blue);
}
/* 内部结构全部清零，避免出现嵌套的小盒子 */
.article-content figure.highlight table,
.article-content figure.highlight tbody,
.article-content figure.highlight tr,
.article-content figure.highlight td,
.article-content figure.highlight pre,
.article-content figure.highlight code {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  margin: 0 !important;
  padding: 0 !important;
}
.article-content figure.highlight table {
  width: 100% !important;
  border-collapse: collapse !important;
}
/* 行号列：直接隐藏 */
.article-content figure.highlight .gutter {
  display: none !important;
}
/* 代码正文：只留这一层内边距 */
.article-content figure.highlight .code {
  padding: 0.9rem 1rem !important;
  vertical-align: top;
}
.article-content figure.highlight .code pre {
  overflow-x: auto;
}
/* 复制按钮 */
.code-copy-btn {
  position: absolute;
  top: 0.35rem;
  right: 0.6rem;
  z-index: 2;
  padding: 0.15rem 0.55rem;
  font-size: 0.72rem;
  color: var(--text-secondary);
  background: rgba(29,147,208,0.1);
  border: 1px solid var(--accent-deep-blue);
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.25s ease;
}
.code-copy-btn:hover {
  color: var(--accent-blue);
  border-color: var(--accent-blue);
}
/* ================= 正文表格样式 ================= */
.article-content table {
  width: 100%;
  margin: 1.8rem 0;
  border-collapse: collapse;
  border-spacing: 0;
  font-size: 0.9rem;
  line-height: 1.7;
  background: rgba(30,41,59,0.35);
}
.article-content table th,
.article-content table td {
  padding: 0.65rem 0.9rem;
  border: 1px solid rgba(148,163,184,0.4);
  text-align: left;
  vertical-align: top;
  word-break: break-word;
}
.article-content table th {
  background: rgba(29,147,208,0.18);
  color: var(--text-primary);
  font-weight: 600;
}
.article-content table tbody tr:nth-child(even) {
  background: rgba(148,163,184,0.06);
}
.article-content table tbody tr:hover {
  background: rgba(29,147,208,0.12);
}
/* 窄屏下压缩内边距并平均分配列宽，避免撑破页面 */
@media (max-width: 768px) {
  .article-content table {
    table-layout: fixed;
    font-size: 0.8rem;
  }
  .article-content table th,
  .article-content table td {
    padding: 0.45rem 0.5rem;
  }
}
/* ================= 文章正文图片大小限制 ================= */
.article-content img {
  max-width: 100%; /* 图片最大宽度绝不超过文章容器宽度 */
  height: auto; /* 高度自动等比例缩放，防止图片变形 */
  display: block; /* 让图片独占一行 */
  margin: 1.5rem auto; /* 上下留出1.5rem间距，左右自动居中 */
  border-radius: 4px; /* 加个微圆角，看起来更精致 */
  box-shadow: 0 4px 12px rgba(0,0,0,0.3); /* 加一点阴影，增加层次感 */
}
/* 置顶标签样式 */
.pin-top-label {
  display: inline-block;
  background-color: var(--accent-blue);
  color: var(--bg-color);
  font-size: 0.7rem;
  padding: 0.1rem 0.4rem;
  border-radius: 2px;
  margin-right: 0.5rem;
  vertical-align: middle;
  font-weight: bold;
}
/* ================= 文章页返回与上下章导航 ================= */
.back-to-list {
  display: inline-block;
  color: var(--accent-blue);
  margin-bottom: 2rem;
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.3s;
}
.back-to-list:hover {
  color: var(--text-primary);
}
/* ================= 文章页返回与上下章导航 ================= */
.back-to-list {
  display: inline-block;
  color: var(--accent-blue);
  margin-bottom: 2rem;
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.3s;
}
.back-to-list:hover {
  color: var(--text-primary);
}
.post-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--accent-deep-blue);
  gap: 2rem;
}
.post-nav-item {
  text-decoration: none;
  color: var(--text-secondary);
  flex: 1;
  transition: all 0.3s ease; /* 修改这里：让边框和背景变化也有过渡动画 */
/* 新增：边框与内边距 */
  border: 1px solid var(--accent-deep-blue);
  padding: 1rem 1.5rem;
  border-radius: 4px; /* 微圆角 */
}
.post-nav-item.next {
  text-align: right;
  margin-left: auto;
}
.post-nav-item span {
  display: block;
  font-size: 0.8rem;
  margin-bottom: 0.5rem;
}
.post-nav-item strong {
  display: block;
  color: var(--text-primary);
  font-size: 1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* 修改这里：Hover 时边框变亮，并加上微弱的背景底色 */
.post-nav-item:hover {
  border-color: var(--accent-blue);
  background: rgba(29,147,208,0.05);
}
.post-nav-item:hover strong {
  color: var(--accent-blue);
}
/* ================= 系列文章目录 ================= */
.series-box {
  margin-top: 3rem;
  border: 1px solid var(--accent-deep-blue);
  border-radius: 4px;
  background: rgba(29,147,208,0.03);
  overflow: hidden;
}
.series-summary {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1rem 1.5rem;
  list-style: none;
  user-select: none;
  transition: background 0.3s ease;
}
/* 去掉默认三角标记 */
.series-summary::-webkit-details-marker {
  display: none;
}
.series-summary::marker {
  content: "";
}
.series-summary:hover {
  background: rgba(29,147,208,0.06);
}
.series-icon {
  font-size: 1rem;
  line-height: 1;
}
.series-name {
  color: var(--text-primary);
  font-weight: 600;
}
.series-count {
  color: var(--text-secondary);
  font-size: 0.8rem;
}
/* 右侧展开箭头 */
.series-summary::after {
  content: "▾";
  margin-left: auto;
  color: var(--text-secondary);
  font-size: 0.8rem;
  transition: transform 0.3s ease;
}
.series-details[open] .series-summary::after {
  transform: rotate(180deg);
}
.series-list {
  margin: 0;
  padding: 0.4rem 1.5rem 1rem;
  list-style: none;
  counter-reset: series;
  border-top: 1px solid rgba(148,163,184,0.12);
}
.series-list li {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0;
  font-size: 0.92rem;
  counter-increment: series;
}
.series-list li + li {
  border-top: 1px dashed rgba(148,163,184,0.1);
}
/* 序号 */
.series-list li::before {
  content: counter(series);
  flex-shrink: 0;
  min-width: 1.2rem;
  font-size: 0.78rem;
  color: var(--text-secondary);
  opacity: 0.7;
}
.series-list .series-link {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.25s ease;
}
.series-list a.series-link:hover {
  color: var(--accent-blue);
}
/* 让整行都可点击，而不只是文字 */
.series-list a.series-link::after {
  content: "";
  position: absolute;
  inset: 0;
}
/* 当前所在篇 */
.series-list li.current .series-link {
  color: var(--accent-blue);
  font-weight: 600;
}
.series-badge {
  margin-left: auto;
  flex-shrink: 0;
  font-size: 0.7rem;
  padding: 0.12rem 0.5rem;
  border-radius: 2px;
  color: var(--accent-blue);
  background: rgba(29,147,208,0.12);
}
@media (max-width: 768px) {
  .series-summary {
    padding: 0.85rem 1rem;
    gap: 0.4rem;
  }
  .series-list {
    padding: 0.4rem 1rem 0.8rem;
  }
  .series-count {
    font-size: 0.75rem;
  }
}
/* 分页导航样式 */
.page-nav {
  margin-top: 3rem;
  text-align: center;
}
.page-nav a,
.page-nav span {
  display: inline-block;
  padding: 0.5rem 1rem;
  margin: 0 0.5rem;
  color: var(--text-secondary);
  text-decoration: none;
  border: 1px solid var(--accent-deep-blue);
  border-radius: 4px;
  transition: all 0.3s;
}
.page-nav a:hover {
  color: var(--text-primary);
  border-color: var(--accent-blue);
}
.page-nav .page-current {
  background: var(--accent-deep-blue);
  color: var(--text-primary);
  border-color: var(--accent-blue);
}
/* ================= 移动端响应式适配 ================= */
@media (max-width: 768px) {
  .top-nav {
    flex-direction: column; /* 改为上下排列 */
    padding: 1rem 1.5rem;
    gap: 0.5rem;
  }
  .nav-logo {
    margin-bottom: 0.5rem;
  }
  .nav-links {
    width: 100%;
    display: flex;
    justify-content: center; /* 链接居中 */
    flex-wrap: wrap; /* 允许换行 */
  }
  .nav-links a {
    margin: 0 0.8rem; /* 调整间距 */
    font-size: 0.85rem;
  }
  .svg-container {
    width: 70vw; /* 使用视口宽度，适配不同手机 */
    max-width: 250px; /* 最大不超过250px */
  }
  .landing-title {
    font-size: 1.2rem;
  }
  .enter-btn {
    padding: 0.6rem 2rem;
    font-size: 0.9rem;
  }
  .blog-layout,
  .about-layout {
    flex-direction: column; /* 强制单栏 */
    gap: 2rem;
    padding: 1.5rem;
    padding-top: 120px; /* 给导航栏留出空间 */
  }
  .sidebar,
  .about-left {
    width: 100%;
    position: static; /* 取消固定定位 */
    text-align: center;
    border-bottom: 1px solid var(--accent-deep-blue);
    padding-bottom: 1.5rem;
  }
  .sidebar-avatar,
  .about-avatar {
    margin: 0 auto 1rem auto;
    display: block;
  }
  .sidebar-nav {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--accent-deep-blue);
  }
  .sidebar-nav a {
    border-left: none;
    padding: 0;
  }
  .sidebar-github {
    margin-top: 1rem;
    display: block;
  }
  .article-item {
    flex-direction: column; /* 手机上图片和文字上下排列 */
    align-items: flex-start;
  }
  .article-banner {
    width: 100%; /* 手机上缩略图占满宽度 */
    height: auto;
    aspect-ratio: 16/9; /* 给个16:9的比例 */
  }
  .about-list li {
    justify-content: center;
  }
  .post-nav {
    flex-direction: column; /* 上下排列，防止撑爆 */
    gap: 1rem;
  }
  .post-nav-item.next {
    text-align: left;
    margin-left: 0;
  }
}
/* ================= 手机端汉堡菜单与响应式增强 ================= */
.nav-toggle {
  display: none;
  width: 42px;
  height: 36px;
  border: 0;
  background: transparent;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: transform 0.25s, opacity 0.25s;
}
@media (max-width: 768px) {
  .top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 64px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.2rem;
    background: rgba(15,23,42,0.72);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }
  .nav-logo {
    position: static !important;
    left: auto !important;
    top: auto !important;
    right: auto !important;
    transform: none !important;
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    margin: 0 !important;
    padding: 0;
    height: 64px;
    font-size: 1rem;
    line-height: 1;
    white-space: nowrap;
  }
  .nav-toggle {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin-left: auto;
    position: relative;
    z-index: 1002;
  }
  .nav-links {
    position: absolute;
    top: 64px;
    right: 12px;
    left: auto;
    z-index: 1001;
    width: 80vw;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    background: rgba(15,23,42,0.86);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-radius: 12px;
    transform: translateY(-20px) scale(0.96);
    transform-origin: top right;
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s ease, opacity 0.3s ease;
  }
  .nav-links.open {
    transform: translateY(0) scale(1);
    opacity: 1;
    pointer-events: auto;
  }
  .nav-links a {
    margin: 0;
    padding: 0.6rem 0;
    font-size: 1rem;
  }
  .nav-overlay {
    display: block;
    position: fixed;
    inset: 64px 0 0;
    z-index: 999;
    background: rgba(0,0,0,0.35);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }
  .nav-overlay.show {
    opacity: 1;
    pointer-events: auto;
  }
}
@media (max-width: 768px) {
  .nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: transform 0.25s ease, opacity 0.25s ease;
  }
  .nav-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  .nav-toggle.active span:nth-child(2) {
    opacity: 0;
  }
  .nav-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }
}
/* ================= 关于页右侧专属样式 ================= */
.about-right h2 {
  font-size: 1.2rem;
  border-bottom: 1px solid var(--accent-deep-blue);
  padding-bottom: 0.5rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}
.about-right h2:first-child {
  margin-top: 0;
}
.about-right ul {
  list-style: none;
  padding-left: 0;
}
.about-right ul li {
  padding: 0.5rem 0;
  display: flex;
  align-items: center;
}
.about-right ul li::before {
  content: "•";
  color: var(--accent-blue);
  margin-right: 0.8rem;
  font-size: 1.2rem;
  line-height: 1;
}
/* 标签样式 (类似GitHub的兴趣标签) */
.about-tag {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  margin: 0.3rem;
  border: 1px solid var(--accent-deep-blue);
  border-radius: 999px; /* 胶囊形状 */
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: all 0.3s ease;
}
.about-tag:hover {
  border-color: var(--accent-blue);
  color: var(--accent-blue);
}
/* ================= 关于页排版优化 ================= */
/* 1. 缓解拥挤：增加行高和段落间距，让文字有呼吸感 */
.about-right p {
  line-height: 1.8; /* 行间距拉开 */
  margin-bottom: 1.2rem; /* 段落间距增大 */
}
/* 2. 解决对比度：重置链接颜色，使用主题高亮蓝，并在悬停时加入墨渊的花纹色作为彩蛋 */
.about-right a {
  color: #1d93d0; /* 高对比度的亮蓝，替代默认的深蓝 */
  text-decoration: none; /* 默认无下划线，更整洁 */
  transition: color 0.3s ease;
}
.about-right a:hover {
  color: #fefea6; /* 悬停时变成墨渊的黄色花纹色，小彩蛋 */
  text-decoration: underline; /* 悬停时显示下划线提示可点击 */
}
/* ================= 友链页面（升级版） ================= */
.friend-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}
/* 卡片主体 */
.friend-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
  height: 110px;
  padding: 1rem;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid var(--accent-deep-blue);
  border-radius: 12px;
  background: rgba(15,23,42,0.35);
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}
/* ===== 头像(img 基础样式) ===== */
.friend-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}
/* ===== 头像包裹层(JS自动生成，尺寸+动画控制权) ===== */
.friend-card > .img-skeleton {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  border-radius: 50%;
  transition: transform 0.55s ease, opacity 0.45s ease, width 0.55s ease, margin 0.55s ease;
}
/* ===== 文本区域 ===== */
.friend-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
  transition: transform 0.35s ease;
}
.friend-name {
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: bold;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.friend-desc {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-top: 0.35rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
/* ===== hover 整体效果 ===== */
.friend-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-blue);
  background: linear-gradient(135deg, rgba(29,147,208,0.15), rgba(15,34,93,0.4));
}
/* ===== hover：头像消失（左滑+缩小） -> 作用于包裹层 ===== */
.friend-card:hover > .img-skeleton {
  transform: translate(-20px, -20px) scale(0);
  opacity: 0;
  width: 0;
  margin-right: -1rem;
}
/* ===== hover：文字整体左移 ===== */
.friend-card:hover .friend-info {
  transform: translateX(0);
  align-items: flex-start;
  text-align: left;
}
/* ================= 手机端 ================= */
@media (max-width: 768px) {
  .friend-cards {
    grid-template-columns: 1fr;
  }
  .friend-card {
    justify-content: flex-start;
    text-align: left;
  }
  .friend-card > .img-skeleton {
    width: 52px;
    height: 52px;
  }
  .friend-info {
    align-items: flex-start;
    text-align: left;
  }
}
.site-footer {
  text-align: center;
  padding: 2.5rem 1rem;
  margin-top: 4rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  color: var(--text-secondary);
}
.footer-title {
  font-size: 1rem;
  font-weight: bold;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}
.footer-desc {
  font-size: 0.85rem;
  opacity: 0.85;
}
/* ================= 鼠标基础优化 ================= */
a,
button,
.friend-card,
.post-nav-item,
.series-summary,
.back-to-top,
body {
  cursor: none !important;
}
/* 主光标 */
.cursor-dot {
  position: fixed;
  width: 14px;
  height: 14px;
  background: var(--accent-blue);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: background-color 0.25s ease, transform 0.15s ease;
}
/* 外圈 */
.cursor-ring {
  position: fixed;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(29,147,208,0.5);
  box-shadow: 0 0 18px rgba(29,147,208,0.45), 0 0 36px rgba(29,147,208,0.18);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: transform 0.15s ease, width 0.25s ease, height 0.25s ease, border-color 0.7s ease, box-shadow 0.7s ease, background-color 0.7s ease;
}
/* Hover增强态 */
.cursor-ring.active {
  width: 45px;
  height: 45px;
  border-color: rgba(254,254,166,0.9);
  background: rgba(254,254,166,0.08);
}
/* 点击反馈 */
.cursor-dot.click {
  transform: translate(-50%, -50%) scale(0.6);
}
:root {
  --cursor-yellow: #fefea6;
}
.cursor-dot.hover-link {
  background: var(--cursor-yellow);
}
.cursor-ring.hover-link {
  border-color: rgba(255,213,74,0.9);
  box-shadow: 0 0 16px rgba(255,213,74,0.45), 0 0 32px rgba(255,213,74,0.18);
}
.thanks-section {
  margin-bottom: 3rem;
  padding: 1.5rem 1.8rem;
  border: 1px solid var(--accent-deep-blue);
  border-radius: 12px;
  background: rgba(15,23,42,0.25);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.thanks-title {
  font-size: 1.2rem;
  color: var(--text-primary);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.thanks-title::before {
  content: "✦";
  color: var(--accent-blue);
}
.thanks-group {
  margin-bottom: 1rem;
}
.thanks-group:last-child {
  margin-bottom: 0;
}
.thanks-group h4 {
  font-size: 0.95rem;
  color: var(--accent-blue);
  margin-bottom: 0.5rem;
  font-weight: normal;
}
.thanks-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}
.thanks-list a,
.thanks-list span {
  color: var(--text-secondary);
  font-size: 0.9rem;
  text-decoration: none;
  transition: color 0.2s ease;
}
.thanks-list a:hover {
  color: var(--accent-blue);
}
/* 分割线 */
.friend-divider {
  height: 1px;
  background: linear-gradient(to right, transparent, var(--accent-deep-blue), transparent);
  margin: 2rem 0;
}
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-secondary);
  font-size: 1rem;
  opacity: 0.85;
}
/* ================= 全站图片骨架系统（优化版） ================= */
.img-skeleton {
  position: relative;
  display: inline-block;
  overflow: hidden;
  background: rgba(255,255,255,0.04);
  border-radius: inherit;
  line-height: 0; /* 消除 inline-block 底部间隙 */
}
/* 图片：默认隐藏，加载完成后渐显 */
.img-skeleton img {
  position: relative;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.5s ease;
/* ⚠️ 不覆盖 width/height，保持图片原有尺寸 */
}
/* 图片设为块级并清掉外边距，避免行内基线/外边距把包裹层撑高 */
.img-skeleton img {
  display: block;
  margin: 0;
}
/* 头像样式移到骨架层上，避免被裁在图片内部 */
.sidebar > .img-skeleton,
.sidebar-avatar.img-skeleton,
.about-left > .img-skeleton,
.about-avatar.img-skeleton {
  margin-bottom: 1rem;
}
.img-skeleton.loaded img {
  opacity: 1;
}
/* 扫光条 */
.img-skeleton::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
/* 扫光条宽度为容器的 300%，才能从左扫到右 */
  width: 300%;
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,0.06) 42%, rgba(255,255,255,0.18) 50%, rgba(255,255,255,0.06) 58%, transparent 70%);
  animation: skeleton-shimmer 1.6s ease-in-out infinite;
  pointer-events: none;
}
.img-skeleton.loaded::before {
  display: none;
}
/* ===== 各场景兼容微调 ===== */
/* 侧边栏头像骨架层 */
.sidebar-avatar.img-skeleton,
.sidebar > .img-skeleton {
  border-radius: 50%;
}
/* 关于页头像骨架层 */
.about-avatar.img-skeleton,
.about-left > .img-skeleton {
  border-radius: 50%;
}
/* 文章缩略图骨架层（由全局脚本动态包裹在 <a> 内，故用后代选择器） */
.article-banner .img-skeleton {
  width: 100%;
  height: 100%;
}
.article-banner .img-skeleton img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* 骨架层 img 的 transition 被 .img-skeleton img 覆盖，这里把 hover 缩放补回来 */
.article-banner .img-skeleton img {
  transition: opacity 0.5s ease, transform 0.3s ease;
}
/* ================= Waline 深蓝主题修正版 ================= */
/* ================= 1. 全局变量 ================= */
:root {
  --waline-bg: #0b1220;
  --waline-card: rgba(15,26,46,0.55);
  --waline-border: rgba(148,163,184,0.15);
  --waline-text: #e2e8f0;
  --waline-muted: #64748b;
  --waline-blue: #38bdf8;
}
/* ================= 2. 外层背景 ================= */
html[data-waline],
.wl-wrapper,
.wl-panel {
  background: var(--waline-bg) !important;
}
/* ================= 3. 评论卡片（玻璃态） ================= */
.wl-card {
  background: var(--waline-card) !important;
  backdrop-filter: blur(10px);
  border: 1px solid var(--waline-border) !important;
  border-radius: 12px;
}
/* ================= 4. 输入区（重点） ================= */
.wl-editor,
.wl-input,
.wl-textarea {
  background: rgba(15,26,46,0.6) !important;
  border: 1px solid var(--waline-border) !important;
  color: var(--waline-text) !important;
}
/* 输入文字 */
.wl-editor textarea,
.wl-input input {
  color: var(--waline-text) !important;
  background: transparent !important;
}
/* placeholder */
.wl-editor textarea::placeholder,
.wl-input input::placeholder {
  color: var(--waline-blue) !important;
  opacity: 0.8;
}
/* focus 高亮 */
.wl-editor textarea:focus,
.wl-input input:focus {
  border-color: var(--waline-blue) !important;
  outline: none;
}
/* ================= 5. 标签（昵称/邮箱） ================= */
.wl-header-label,
.wl-label,
.wl-form-label {
  color: var(--waline-blue) !important;
}
/* ================= 6. 评论内容 ================= */
.wl-content {
  color: var(--waline-text) !important;
}
/* 引用线 */
.wl-quote {
  border-left: 2px solid var(--waline-blue) !important;
}
/* ================= 7. 工具栏（极简关键） ================= */
.wl-actions {
  opacity: 0.6;
  transition: 0.2s;
}
.wl-actions:hover {
  opacity: 1;
}
/* 按钮统一风格 */
.wl-btn {
  background: transparent !important;
  color: var(--waline-muted) !important;
  border: 1px solid transparent !important;
  transition: 0.2s;
}
/* hover 才亮 */
.wl-btn:hover {
  color: var(--waline-blue) !important;
  border-color: var(--waline-blue) !important;
}
/* ================= 8. 上传按钮（保留但统一风格） ================= */
.wl-upload {
  color: var(--waline-blue) !important;
}
/* ================= 9. 表情 / 预览 / markdown ================= */
/* 表情 */
.wl-emoji {
  color: var(--waline-muted) !important;
}
/* 预览 */
.wl-preview {
  color: var(--waline-muted) !important;
}
/* markdown（直接隐藏） */
.wl-md,
.wl-markdown {
  display: none !important;
}
/* ================= 10. 订阅 / powered by ================= */
.wl-subscribe,
.wl-power {
  display: none !important;
}
/* ================= 11. 分割线统一 ================= */
.wl-panel hr {
  border-color: var(--waline-border) !important;
}
/* ================= FINAL FIX PATCH ================= */
/* 外层背景（关键修复） */
html[data-waline],
.wl-wrapper,
.wl-panel {
  background: #0b1220 !important;
}
/* 输入区彻底修复 */
.wl-editor,
.wl-input,
.wl-textarea {
  background: #0f1a2e !important;
}
.wl-editor textarea {
  background: transparent !important;
  color: #e2e8f0 !important;
}
/* placeholder 强制天蓝 */
.wl-editor textarea::placeholder,
.wl-input input::placeholder {
  color: #38bdf8 !important;
  opacity: 1;
}
/* 订阅按钮彻底隐藏 */
.wl-operation .wl-subscribe,
.wl-subscribe {
  display: none !important;
}
/* ================= 不可编辑文本（昵称/邮箱/标签）================= */
.wl-header-item,
.wl-header-label,
.wl-label,
.wl-form-item .wl-form-label,
.wl-meta .wl-label {
  color: #38bdf8 !important;
}
/* 更深层兜底（Waline v3 有 shadow DOM/嵌套情况） */
.wl-panel label {
  color: #38bdf8 !important;
}
/* ================= 1. 强制统一蓝色（解决绿色残留） ================= */
:root {
  --waline-theme-color: #38bdf8 !important;
  --waline-active-color: #38bdf8 !important;
  --waline-info-color: #38bdf8 !important;
}
/* ================= 2. 排序 / 工具文字颜色 ================= */
.wl-sort,
.wl-sort-button,
.wl-sort label,
.wl-sort span,
.wl-sort-item {
  color: var(--waline-muted) !important;
}
.wl-sort .active,
.wl-sort-item.active {
  color: #fefea6 !important;
}
/* ================= 3. 订阅按键彻底隐藏 ================= */
.wl-operation,
.wl-actions {
  font-size: inherit !important;
}
.wl-subscribe,
.wl-operation [class*="subscribe"],
.wl-actions [class*="subscribe"],
.wl-item[data-type="subscribe"],
[class*="subscribe"] {
  display: none !important;
}
/* ================= 4. Markdown Guide / 编辑模式按钮 ================= */
.wl-editor-mode,
.wl-tool-item,
.wl-menu-item,
.wl-item[data-type="markdown"] {
  display: none !important;
}
/* ================= 5. 工具栏图标统一蓝色 ================= */
.wl-operation svg,
.wl-actions svg {
  color: #38bdf8 !important;
  fill: #38bdf8 !important;
}
/* ================= 6. hover状态统一 ================= */
.wl-operation .wl-item:hover,
.wl-actions .wl-item:hover {
  color: #38bdf8 !important;
}
/* ================= Waline 评论数与空状态优化 ================= */
/* 1. 评论总数样式（让 Waline 顶部的评论数显示得更明显） */
.wl-count {
  color: var(--waline-blue, #38bdf8) !important;
  font-size: 1rem !important;
  font-weight: bold !important;
  margin-bottom: 1.5rem !important;
  display: block;
}
/* 隐藏 Waline 默认的空状态文字（如果有） */
.wl-empty {
  display: none !important;
}
/* 2. 自定义空状态提示文字 */
.custom-empty-tip {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--waline-muted, #64748b) !important;
  font-size: 0.9rem;
  background: var(--waline-card, rgba(15,26,46,0.55));
  border: 1px solid var(--waline-border, rgba(148,163,184,0.15));
  border-radius: 12px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
/* ================= 评论区统计与空状态UI补丁 ================= */
/* 1. 隐藏 Waline 原生报错（防止后端未部署时出现红色报错破坏UI） */
.wl-error {
  display: none !important;
}
/* 2. 隐藏 Waline 原生评论数（我们用自己的 HTML 替代，方便控制位置） */
.wl-count {
  display: none !important;
}
/* 3. 自定义评论数统计样式 */
.custom-comment-count {
  font-size: 1.1rem;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  padding-left: 0.8rem;
  border-left: 4px solid var(--accent-blue);
  line-height: 1.5;
}
.custom-comment-count span {
  color: var(--accent-blue);
  font-weight: bold;
  font-size: 1.3rem;
  margin: 0 0.2rem;
}
/* 4. 优化自定义空状态提示文字 */
/* 覆盖你原有的 .custom-empty-tip，将边框改为虚线，更像“空状态”占位符 */
.custom-empty-tip {
  border: 1px dashed var(--waline-border, rgba(148,163,184,0.3)) !important;
  padding: 3rem 1rem !important;
  font-size: 0.95rem !important;
}
.wl-error,
.wl-empty {
  display: none !important;
}
.wl-error,
.wl-init-error,
.wl-empty,
.wl-retry-btn,
.wl-init-error button,
.wl-error button,
.wl-btn button {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
}
/* 隐藏 Waline 原生评论数 */
.wl-count {
  display: none !important;
}
/* 评论主标题样式 */
.comment-main-title {
  font-size: 1.5rem;
  color: var(--text-primary);
  margin-bottom: 2rem;
  padding-left: 0.8rem;
  border-left: 4px solid var(--accent-blue);
  line-height: 1.5;
}
.wl-operation {
  display: none;
}
/* ================= 归档卡片滚动入场 ================= */
.article-item {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.article-item.in-view {
  opacity: 1;
  transform: translateY(0);
}
/* ================= 系列目录展开动画（JS 控制高度，开合都有过渡） ================= */
.series-body {
  height: 0;
  overflow: hidden;
  transition: height 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}
.series-details[open] .series-body {
  height: auto;
}
/* ================= 侧边栏导航指示器 ================= */
.sidebar-nav {
  position: relative;
  overflow: hidden;
}
.nav-indicator {
  position: absolute;
  left: 0;
  width: 2px;
  border-radius: 1px;
  background: var(--accent-blue);
  opacity: 0;
  transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1), height 0.32s ease, opacity 0.25s ease;
  pointer-events: none;
}
/* ================= 回到顶部（带阅读进度环） ================= */
.back-to-top {
  position: fixed;
  right: 2rem;
  bottom: 2rem;
  z-index: 50;
  width: 48px;
  height: 48px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: var(--bg-color);
  color: var(--accent-blue);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s, color 0.25s ease;
}
.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.back-to-top:hover {
  color: var(--cursor-yellow);
}
.btt-svg {
  width: 100%;
  height: 100%;
  display: block;
}
.btt-track {
  fill: none;
  stroke: var(--accent-deep-blue);
  stroke-width: 2;
}
.btt-progress {
  fill: none;
  stroke: var(--cursor-yellow);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 119.38; /* 2πr，r = 19 */
  stroke-dashoffset: 119.38;
  transition: stroke-dashoffset 0.1s linear;
}
.btt-arrow {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
@media (max-width: 768px) {
  .back-to-top {
    right: 1rem;
    bottom: 1rem;
    width: 44px;
    height: 44px;
  }
}
/* ================= 背景模糊调节滑块（圆形常驻，悬停展开） ================= */
.bg-blur-panel {
  position: fixed;
  right: 2rem;
  bottom: 2rem;
  z-index: 60;
  width: 48px;
  height: 48px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--bg-color);
  border: 1px solid var(--accent-deep-blue);
  overflow: hidden;
  transition: width 0.32s cubic-bezier(0.22, 1, 0.36, 1), height 0.32s cubic-bezier(0.22, 1, 0.36, 1), border-radius 0.32s ease, bottom 0.32s cubic-bezier(0.22, 1, 0.36, 1);
  animation: blurPulse 2.6s ease-in-out infinite;
}
/* 回到顶部按钮出现时，把滑块顶到上面去 */
body.back-to-top-visible .bg-blur-panel {
  bottom: calc(2rem + 60px);
}
/* 圆形状态中心的“光圈”标识 */
.bg-blur-panel::before {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--accent-blue);
  opacity: 0.75;
  transition: opacity 0.2s ease, transform 0.2s ease;
  animation: blurDot 2.6s ease-in-out infinite;
}
/* 展开时圆环缩掉并淡出（必须关掉动画，否则 keyframes 里的 opacity 会盖住这里的设置） */
.bg-blur-panel:hover::before,
.bg-blur-panel.open::before {
  opacity: 0;
  transform: scale(0.4);
  animation: none;
}
/* 圆形状态的呼吸波纹 */
.bg-blur-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid var(--accent-blue);
  opacity: 0;
  pointer-events: none;
  animation: blurRipple 2.6s ease-out infinite;
}
.bg-blur-panel:hover,
.bg-blur-panel.open {
  width: 148px;
  height: 48px;
  border-radius: 24px;
  animation: none;
  transform: none;
}
.bg-blur-panel:hover::after,
.bg-blur-panel.open::after {
  animation: none;
  opacity: 0;
}
.bg-blur-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100px;
  height: 4px;
  background: transparent;
  cursor: none;
  opacity: 0;
  transition: opacity 0.25s ease;
}
/* 悬停展开后滑块才显形 */
.bg-blur-panel:hover .bg-blur-slider,
.bg-blur-panel.open .bg-blur-slider {
  opacity: 1;
}
.bg-blur-slider::-webkit-slider-runnable-track {
  width: 100%;
  height: 4px;
  background: var(--accent-deep-blue);
  border-radius: 2px;
}
.bg-blur-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  margin-top: -4px;
  border-radius: 50%;
  background: var(--accent-blue);
  cursor: none;
}
.bg-blur-slider::-moz-range-track {
  width: 100%;
  height: 4px;
  background: var(--accent-deep-blue);
  border-radius: 2px;
}
.bg-blur-slider::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border: none;
  border-radius: 50%;
  background: var(--accent-blue);
  cursor: none;
}
/* 尊重系统的减少动效偏好 */
@media (prefers-reduced-motion: reduce) {
  .article-item {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .series-body {
    transition: none;
  }
  .back-to-top {
    transition: none;
  }
  .bg-blur-panel,
  .bg-blur-panel::before,
  .bg-blur-panel::after {
    animation: none;
  }
}
/* ================= 归档页：背景图 + 毛玻璃 ================= */
.page-archive {
  position: relative;
  background: var(--bg-color);
}
/* 背景图层：清晰显示，只压暗保证文字可读 */
.page-archive::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: url("/images/archive-bg.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: blur(var(--bg-blur, 0px)) brightness(0.5);
  pointer-events: none;
}
/* 手机端归档页背景
 * 注意：CSS 的 background-image 逗号叠加是「多个背景图层」，不是「降级备选」。
 * 写成 url(A), url(B) 时浏览器会同时请求 A 和 B，A 不存在就会额外产生一次 404
 * （服务器返回 HTML 错误页，DevTools 里显示为一个 text/html 类型的请求），
 * 由 style.css 发起 —— 既浪费一次请求，也会污染后台错误日志。
 * 因此这里只用单值引用；竖屏裁切由 background-size: cover 自动完成。
 * 若将来准备了真正的竖版图，放到 source/images/mobile/archive-bg.webp 后，
 * 在 768px 以下的媒体查询里把 background-image 换成该文件名（单值，不要用逗号叠加）。
 */
/* 毛玻璃质感：内容区上一层半透明磨砂，让正文浮在背景之上
   归档页 / 关于页 / 友链页 / 申请友链页 共用同一套背景与面板样式，
   body 上的 page-archive 类由 layout.ejs 统一挂载（归档 + 独立页面）。 */
.page-archive .blog-layout,
.page-archive .about-layout {
  position: relative;
}
/* 注意：页脚里也有一个 .about-right，这里必须用 .about-layout 限定作用域，
   否则会把页脚的容器也套成磨砂面板。 */
.page-archive .sidebar,
.page-archive .about-layout > .about-left,
.page-archive .article-item,
.page-archive .about-layout > .about-right {
  backdrop-filter: blur(10px) saturate(1.1);
  -webkit-backdrop-filter: blur(10px) saturate(1.1);
}
.page-archive .sidebar,
.page-archive .about-layout > .about-left {
  background: rgba(15,23,42,0.34);
  border-radius: 8px;
  padding: 1.5rem 1.25rem;
}
.page-archive .article-item,
.page-archive .about-layout > .about-right {
  background: rgba(15,23,42,0.28);
  border-radius: 8px;
  padding: 1.25rem;
  border-bottom: none;
}
/* 背景图缺失时不影响可读性，深色底依旧生效 */
@supports not (backdrop-filter: blur(1px)) {
  .page-archive .sidebar,
  .page-archive .about-layout > .about-left,
  .page-archive .article-item,
  .page-archive .about-layout > .about-right {
    background: rgba(15,23,42,0.75);
  }
}
/* ================= 文章卡片整卡可点击 ================= */
.article-item {
  position: relative;
}
/* 标题链接的伪元素铺满整张卡片，点哪里都能进文章 */
.article-title::after {
  content: "";
  position: absolute;
  inset: 0;
}
/* ================= 文章页：随机背景（图由 JS 从候选池里挑） ================= */
.page-post {
  position: relative;
  background: var(--bg-color);
}
.page-post::before {
  content: "";
  position: fixed;
  inset: -40px;
  z-index: -1;
  background-image: var(--post-bg, none);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: blur(var(--bg-blur, 0px)) brightness(0.42) saturate(1.05);
  transform: scale(1.03);
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
}
.page-post.bg-ready::before {
  opacity: 1;
}
/* ================= 移动端：滑块与回到顶部按钮统一尺寸和边距 =================
   注意：必须放在滑块基础规则之后，否则会被上面的 right/bottom/width 覆盖 */
@media (max-width: 768px) {
  .bg-blur-panel {
    right: 1rem;
    bottom: 1rem;
    width: 44px;
    height: 44px;
  }
  body.back-to-top-visible .bg-blur-panel {
    bottom: calc(1rem + 56px);
  }
  .bg-blur-panel:hover,
  .bg-blur-panel.open {
    width: 132px;
    height: 44px;
    border-radius: 22px;
  }
  .bg-blur-slider {
    width: 88px;
  }
  .bg-blur-panel::before {
    width: 12px;
    height: 12px;
  }
}
@-moz-keyframes skeleton-shimmer {
  0% {
    transform: translateX(-33.3%);
  }
  100% {
    transform: translateX(33.3%);
  }
}
@-webkit-keyframes skeleton-shimmer {
  0% {
    transform: translateX(-33.3%);
  }
  100% {
    transform: translateX(33.3%);
  }
}
@-o-keyframes skeleton-shimmer {
  0% {
    transform: translateX(-33.3%);
  }
  100% {
    transform: translateX(33.3%);
  }
}
@keyframes skeleton-shimmer {
  0% {
    transform: translateX(-33.3%);
  }
  100% {
    transform: translateX(33.3%);
  }
}
@-moz-keyframes blurDot {
  0%, 100% {
    transform: scale(1);
    opacity: 0.55;
  }
  50% {
    transform: scale(1.15);
    opacity: 0.95;
  }
}
@-webkit-keyframes blurDot {
  0%, 100% {
    transform: scale(1);
    opacity: 0.55;
  }
  50% {
    transform: scale(1.15);
    opacity: 0.95;
  }
}
@-o-keyframes blurDot {
  0%, 100% {
    transform: scale(1);
    opacity: 0.55;
  }
  50% {
    transform: scale(1.15);
    opacity: 0.95;
  }
}
@keyframes blurDot {
  0%, 100% {
    transform: scale(1);
    opacity: 0.55;
  }
  50% {
    transform: scale(1.15);
    opacity: 0.95;
  }
}
@-moz-keyframes blurPulse {
  0%, 100% {
    border-color: var(--accent-deep-blue);
    transform: scale(1);
  }
  50% {
    border-color: var(--accent-blue);
    transform: scale(1.06);
  }
}
@-webkit-keyframes blurPulse {
  0%, 100% {
    border-color: var(--accent-deep-blue);
    transform: scale(1);
  }
  50% {
    border-color: var(--accent-blue);
    transform: scale(1.06);
  }
}
@-o-keyframes blurPulse {
  0%, 100% {
    border-color: var(--accent-deep-blue);
    transform: scale(1);
  }
  50% {
    border-color: var(--accent-blue);
    transform: scale(1.06);
  }
}
@keyframes blurPulse {
  0%, 100% {
    border-color: var(--accent-deep-blue);
    transform: scale(1);
  }
  50% {
    border-color: var(--accent-blue);
    transform: scale(1.06);
  }
}
@-moz-keyframes blurRipple {
  0% {
    transform: scale(0.85);
    opacity: 0.5;
  }
  70% {
    transform: scale(1.3);
    opacity: 0;
  }
  100% {
    transform: scale(1.3);
    opacity: 0;
  }
}
@-webkit-keyframes blurRipple {
  0% {
    transform: scale(0.85);
    opacity: 0.5;
  }
  70% {
    transform: scale(1.3);
    opacity: 0;
  }
  100% {
    transform: scale(1.3);
    opacity: 0;
  }
}
@-o-keyframes blurRipple {
  0% {
    transform: scale(0.85);
    opacity: 0.5;
  }
  70% {
    transform: scale(1.3);
    opacity: 0;
  }
  100% {
    transform: scale(1.3);
    opacity: 0;
  }
}
@keyframes blurRipple {
  0% {
    transform: scale(0.85);
    opacity: 0.5;
  }
  70% {
    transform: scale(1.3);
    opacity: 0;
  }
  100% {
    transform: scale(1.3);
    opacity: 0;
  }
}
