/*
 * Theme: theme-Serenity
 * Author: Serenity
 * Build: 2026-09-06 17:19:05
 * Fingerprint: aadec520d901c075
 * Copyright (c) 2026 Serenity. All rights reserved.
 */

/*
 * Theme: theme-Serenity
 * Author: Serenity
 * Build: 2026-08-31 17:36:30
 * Fingerprint: 897f796e1b7f0d91
 * Copyright (c) 2026 Serenity. All rights reserved.
 */

/*
 * Theme: theme-Serenity
 * Author: Serenity
 * Build: 2026-07-05 00:01:15
 * Fingerprint: 1a93cc3686d739b8
 * Copyright (c) 2026 Serenity. All rights reserved.
 */

:root {
  --color-bg: var(--gateway-bg-dark-start, #1b1b22);
  --color-bg-soft: var(--gateway-bg-dark-end, #242430);
  --color-bg-mute: var(--gateway-bg-dark-mute, #2c2c36);
  
  --space-1-5: 6px;
  
  --color-text: #f5f5f5;
  --color-text-secondary: rgba(255, 255, 255, 0.6);
  --color-text-muted: rgba(255, 255, 255, 0.4);
  
  /* 主题色 - 默认值，将被 Hue 动态调节覆盖 */
  --color-accent: #c084fc;
  --color-accent-secondary: #a78bfa;
  --color-accent-rgb: 192, 132, 252;
  
  --color-border: rgba(255, 255, 255, 0.08);
  --color-border-hover: rgba(255, 255, 255, 0.15);
  
  --max-width: 1200px;
  --header-height: 64px;
  
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-8: 48px;
  --space-10: 64px;
  --space-12: 80px;
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  
  --font-global: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-sans: var(--font-global);
  --font-serif: var(--font-global);
  --font-rounded: var(--font-global);
  --font-mono: var(--font-global);
  
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --duration-fast: 150ms;
  --duration-normal: 300ms;
}

/* 页面过渡遮罩 */
.page-transition {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: var(--color-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.page-transition.active {
  opacity: 1;
  visibility: visible;
}

/* 跨文档导航过渡：页面跳转/刷新时 root 层交叉淡入淡出，替代纯色硬切。
   仅 Chromium 系 MPA 支持，其它浏览器自动降级为普通整页加载（无副作用）。
   主题切换的圆形扩散由 html.theme-vt 单独接管，不走此默认动画。
   sticky 失效的历史根因是 welcome 的 body overflow，已单独修复，故可安全启用。 */
@view-transition {
  navigation: auto;
}

html:not(.theme-vt)::view-transition-old(root),
html:not(.theme-vt)::view-transition-new(root) {
  animation-duration: 0.4s;
  animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

@media (prefers-reduced-motion: reduce) {
  html:not(.theme-vt)::view-transition-old(root),
  html:not(.theme-vt)::view-transition-new(root) {
    animation: none;
  }
}

/* 优雅的加载动画 - 三个跳动的圆点 */
.page-transition-spinner {
  display: flex;
  align-items: center;
  gap: 8px;
}

.page-transition-spinner::before,
.page-transition-spinner::after,
.page-transition-spinner span {
  content: '';
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--color-accent);
  animation: bounce 1.4s ease-in-out infinite;
}

.page-transition-spinner::before {
  animation-delay: 0s;
}

.page-transition-spinner span {
  animation-delay: 0.2s;
}

.page-transition-spinner::after {
  animation-delay: 0.4s;
}

@keyframes bounce {
  0%, 80%, 100% {
    transform: scale(0.6);
    opacity: 0.4;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

/* 加载提示文字 */
.page-transition-text {
  font-size: 13px;
  color: var(--color-text-muted);
  letter-spacing: 2px;
  animation: fadeInOut 2s ease-in-out infinite;
}

/* 自定义 GIF 加载动画 */
.page-transition-gif {
  max-width: 120px;
  max-height: 120px;
  object-fit: contain;
}

@keyframes fadeInOut {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

[data-theme="light"] {
  --color-bg: var(--gateway-bg-light-start, #f5f5f5);
  --color-bg-soft: var(--gateway-bg-light-end, #efefef);
  --color-bg-mute: var(--gateway-bg-light-mute, #e8e8e8);
  
  --color-text: #1a1a1a;
  --color-text-secondary: rgba(0, 0, 0, 0.6);
  --color-text-muted: rgba(0, 0, 0, 0.4);
  
  /* 亮色模式主题色 - 将被 Hue 动态调节覆盖 */
  --color-accent: #8b5cf6;
  --color-accent-secondary: #6366f1;
  --color-accent-rgb: 139, 92, 246;
  
  --color-border: rgba(0, 0, 0, 0.08);
  --color-border-hover: rgba(0, 0, 0, 0.15);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-tap-highlight-color: transparent;
  overflow-y: scroll;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

html::-webkit-scrollbar {
  display: none;
}

body {
  font-family: var(--font-global);
  font-size: 15px;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
}

/* 首页 body 和 html 背景透明，让模糊壁纸透过 */
html.index-page {
  background-color: transparent;
}

.index-page body {
  background-color: transparent;
}

/* 页面切换淡入淡出动画 */
.main {
  flex: 1;
  /* 页面过渡已交给原生 View Transitions（base.css 顶部），此处不再叠加动画，避免双重淡入 */
}

/* 首页 .main 不使用 opacity 动画，避免遮挡背景模糊效果 */
.index-page .main {
  animation: none;
}

@keyframes pageEnter {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* 页面离开动画类 */
body.page-leaving .main {
  animation: pageLeave 0.2s ease-in forwards;
}

@keyframes pageLeave {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-10px);
  }
}

::selection {
  background-color: var(--color-accent);
  color: #fff;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

ul, ol {
  list-style: none;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-5);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.theme-transitioning,
.theme-transitioning *,
.theme-transitioning *::before,
.theme-transitioning *::after {
  transition: 
    background-color 0.5s ease,
    border-color 0.5s ease,
    color 0.5s ease,
    fill 0.5s ease,
    stroke 0.5s ease,
    box-shadow 0.5s ease !important;
}

/* 圆形扩散仅用于暗黑/主题切换（同文档，由 main.js 调 startViewTransition 触发，带 .theme-vt 标记）。
   页面跳转/刷新为普通整页加载，不做跨文档过渡，避免破坏 position:sticky 等布局。 */
html.theme-vt::view-transition-old(root),
html.theme-vt::view-transition-new(root) {
  animation-duration: 1200ms;
  animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}

html.theme-vt::view-transition-old(root) {
  animation: none;
}

html.theme-vt::view-transition-new(root) {
  animation-name: circle-spread;
}

::view-transition {
  pointer-events: auto;
}

@keyframes circle-spread {
  0% {
    clip-path: circle(0px at var(--tx, 50%) var(--ty, 50%));
  }
  100% {
    clip-path: circle(var(--tr, 200vmax) at var(--tx, 50%) var(--ty, 50%));
  }
}

.theme-decor {
  position: absolute;
  right: 100px;
  top: 70px;
  bottom: 60px;
  z-index: 10;
  pointer-events: none;
}

.theme-decor img {
  height: calc(100vh - 140px);
  width: auto;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.theme-decor-dark {
  display: block;
}

.theme-decor-light {
  display: none;
}

[data-theme="dark"] .theme-decor-dark {
  opacity: 1;
}

[data-theme="light"] .theme-decor-dark {
  display: none;
}

[data-theme="light"] .theme-decor-light {
  display: block;
  opacity: 1;
}

/* ===== 音乐播放器 (胶囊药丸样式) ===== */
@media screen and (max-width: 768px) {
  #nav-music { display: none !important; }
}

#nav-music {
  display: flex;
  align-items: center;
  z-index: 999;
  position: fixed;
  bottom: 20px;
  left: 20px;
  cursor: pointer;
  transition: all 0.5s, left 0s;
  transform-origin: left bottom;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
  border-radius: 40px;
  overflow: hidden;
  height: 41px;
}

#nav-music:active {
  transform: scale(0.97);
}

#nav-music.playing {
  border: 1px solid color-mix(in srgb, var(--color-accent) 40%, transparent);
  box-shadow: 0 0 12px -3px transparent;
  animation: navMusicGlow 5s linear infinite;
}

@keyframes navMusicGlow {
  0% { box-shadow: 0 0 12px -3px transparent; }
  50% { box-shadow: 0 0 12px 0px var(--color-accent); }
  100% { box-shadow: 0 0 12px -3px transparent; }
}

/* Album art */
#nav-music .aplayer.aplayer-withlrc .aplayer-pic {
  height: 25px;
  width: 25px;
  border-radius: 40px;
  z-index: 1;
  transition: 0.3s;
  transform: rotate(0deg) scale(1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  animation: navMusicRotate 24s linear infinite;
  animation-play-state: paused;
}

#nav-music.playing .aplayer.aplayer-withlrc .aplayer-pic {
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.65);
  transform: rotate(0deg) scale(1.1);
  border-color: rgba(255, 255, 255, 0.8);
  animation-play-state: running;
}

@keyframes navMusicRotate {
  0% { transform: rotate(0deg) scale(1.1); box-shadow: 0 0 2px transparent; }
  25% { transform: rotate(90deg) scale(1.1); box-shadow: 0 0 14px #fff; }
  50% { transform: rotate(180deg) scale(1.1); box-shadow: 0 0 2px transparent; }
  75% { transform: rotate(270deg) scale(1.1); box-shadow: 0 0 14px #fff; }
  100% { transform: rotate(360deg) scale(1.1); box-shadow: 0 0 2px transparent; }
}

/* Info area */
#nav-music .aplayer.aplayer-withlrc .aplayer-info {
  height: 100%;
  color: #fff;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
}

/* Hover tips */
#nav-music.playing .nav-music-tips {
  width: 0;
  opacity: 0;
}

#nav-music .nav-music-tips {
  color: #fff;
  background: var(--color-accent);
  border: 0;
  padding: 0;
  font: inherit;
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  align-items: center;
  justify-content: center;
  display: flex;
  border-radius: 40px;
  opacity: 0;
  font-size: 12px;
  z-index: 2;
  transition: 0.3s;
  cursor: pointer;
  text-decoration: none;
}

#nav-music:hover:not(.playing) .nav-music-tips {
  opacity: 1;
}

/* 禁止胶囊内进度条点击跳转 */
#nav-music .aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap {
  pointer-events: none;
}

/* APlayer base */
#nav-music .aplayer {
  background: var(--color-accent);
  border-radius: 60px;
  height: 41px;
  display: flex;
  margin: 0;
  transition: 0.3s;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

#nav-music.playing .aplayer {
  background: var(--color-accent) !important;
  border-color: rgba(255, 255, 255, 0.2);
}

#nav-music .aplayer .aplayer-notice { display: none; }
#nav-music .aplayer .aplayer-miniswitcher { display: none; }

#nav-music .aplayer .aplayer-body {
  position: relative;
  display: flex;
  align-items: center;
}

#nav-music .aplayer-list { display: none; }

/* Song title */
#nav-music .aplayer .aplayer-info .aplayer-music {
  margin: 0;
  display: flex;
  align-items: center;
  padding: 0 12px 0 8px;
  cursor: pointer;
  z-index: 1;
  height: 100%;
}

#nav-music .aplayer .aplayer-info .aplayer-controller .aplayer-time { display: none; }
#nav-music .aplayer .aplayer-info .aplayer-music .aplayer-author { display: none; }
#nav-music .aplayer.aplayer-withlist .aplayer-info { border: none; }

#nav-music .aplayer .aplayer-pic .aplayer-button {
  bottom: 50%;
  right: 50%;
  transform: translate(50%, 50%);
  margin: 0;
  transition: 0.3s;
}

#nav-music .aplayer .aplayer-pic:has(.aplayer-button.aplayer-play) {
  animation-play-state: paused;
  transform: rotate(0deg) scale(1) !important;
}

#nav-music .aplayer.aplayer-withlrc .aplayer-pic {
  margin-left: 8px;
}

#nav-music .aplayer .aplayer-info .aplayer-music .aplayer-title {
  cursor: pointer;
  line-height: 1;
  display: inline-block;
  white-space: nowrap;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: 0.3s;
  user-select: none;
  font-size: 12px;
  color: #fff;
}

/* Controller overlay */
#nav-music .aplayer .aplayer-info .aplayer-controller {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
}

#nav-music .aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap {
  margin: 0;
  padding: 0;
}

#nav-music .aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap .aplayer-bar {
  height: 100%;
  background: transparent;
}

#nav-music .aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap .aplayer-bar .aplayer-loaded {
  display: none;
}

#nav-music .aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap .aplayer-bar .aplayer-played {
  height: 100%;
  opacity: 0.1;
  background-color: #fff !important;
  animation: navMusicLightBar 5s ease infinite;
  animation-play-state: paused;
}

#nav-music.playing .aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap .aplayer-bar .aplayer-played {
  animation-play-state: running;
}

@keyframes navMusicLightBar {
  0% { opacity: 0.1; }
  60% { opacity: 0.3; }
  100% { opacity: 0.1; }
}

/* Lyrics */
#nav-music .aplayer.aplayer-withlrc .aplayer-lrc {
  width: 0;
  opacity: 0;
  transition: 0.3s;
  margin-top: -2px;
  padding: 5px 0;
}

#nav-music.stretch .aplayer.aplayer-withlrc .aplayer-lrc {
  width: 200px;
  margin-left: 8px;
  opacity: 1;
}

#nav-music .aplayer .aplayer-lrc p.aplayer-lrc-current {
  color: #fff !important;
  font-weight: 600;
  border: none;
  min-height: 20px;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
}

#nav-music .aplayer .aplayer-lrc:after,
#nav-music .aplayer .aplayer-lrc:before {
  display: none;
}

#nav-music .aplayer .aplayer-lrc p {
  color: rgba(255, 255, 255, 0.35);
  line-height: 40px !important;
  height: 40px !important;
  margin: 0 !important;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.3s;
}

#nav-music .aplayer .aplayer-pic {
  pointer-events: none;
}

#nav-music .aplayer .aplayer-pic .aplayer-button {
  pointer-events: all;
}

.back-to-top {
  position: fixed;
  right: 30px;
  bottom: 100px;
  width: 48px;
  height: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: color-mix(in srgb, var(--color-accent) 10%, transparent);
  border: 1px solid var(--color-accent);
  border-radius: var(--radius-lg);
  color: var(--color-accent);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s ease;
  z-index: 1000;
}

[data-theme="light"] .back-to-top {
  background: color-mix(in srgb, var(--color-accent) 8%, transparent);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: color-mix(in srgb, var(--color-accent) 20%, transparent);
  border-color: var(--color-accent-secondary);
  color: var(--color-accent-secondary);
  transform: translateY(-4px);
  box-shadow: 0 8px 20px color-mix(in srgb, var(--color-accent) 25%, transparent);
}

[data-theme="light"] .back-to-top:hover {
  background: color-mix(in srgb, var(--color-accent) 15%, transparent);
  box-shadow: 0 8px 20px color-mix(in srgb, var(--color-accent) 20%, transparent);
}

.back-to-top-icon {
  width: 18px;
  height: 18px;
  transition: transform 0.3s ease;
}

.back-to-top:hover .back-to-top-icon {
  transform: translateY(-2px);
}

.back-to-top-text {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1px;
}

.back-to-top-arrow {
  font-size: 14px;
  line-height: 1;
  margin-bottom: 1px;
}

@media (max-width: 768px) {
  .back-to-top {
    width: 36px;
    height: 36px;
    right: 16px;
    bottom: 80px;
    border-radius: var(--radius-md);
    gap: 1px;
  }

  .back-to-top-icon {
    width: 14px;
    height: 14px;
  }

  .back-to-top-text {
    font-size: 7px;
    letter-spacing: 0.5px;
  }

  .back-to-top-arrow {
    font-size: 11px;
  }
}

.footer {
  padding: var(--space-4) 0 var(--space-3);
  background: linear-gradient(to bottom, var(--color-bg), var(--color-bg-soft));
  border-top: 1px solid var(--color-border);
  position: relative;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 40%;
  max-width: 400px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
  opacity: 0.5;
}

.footer-inner {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 var(--space-8);
}

/* 2.1.77：页脚改「纵向居中」——① 版权行（© + 站名 + 版权所有 + 隐私协议/服务条款）
   独占一行；② 备案行从下一行开始；两行各自水平居中（与 ≤1200px 的既有行为统一） */
.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  flex-wrap: wrap;
  text-align: center;
}

.footer-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
  text-align: center;
}

.footer-copyright {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-2);
  font-size: 13px;
  color: var(--color-text-muted);
  white-space: nowrap;
}

.footer-copyright-icon {
  font-size: 20px;
  color: var(--color-accent);
}

/* 自定义版权文本：容器是 nowrap，长文案给个换行兜底，避免横向溢出 */
.footer-copyright-custom {
  white-space: normal;
}

.footer-beian {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.footer-beian-separator {
  color: var(--color-text-muted);
  opacity: 0.5;
}

.footer-beian-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1-5);
  font-size: 12px;
  color: var(--color-text-secondary);
  transition: all var(--duration-fast);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.footer-beian-link:hover {
  color: var(--color-accent);
  background: color-mix(in srgb, var(--color-accent) 10%, transparent);
}

.footer-beian-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
  margin-right: 4px;
  transition: all var(--duration-fast);
}

.footer-beian-link:hover .footer-beian-icon {
  transform: scale(1.1);
}

.footer-runtime {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 12px;
  color: var(--color-text-muted);
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(var(--color-accent-rgb, 245, 150, 170), 0.1);
  flex-wrap: wrap;
}

.footer-runtime svg {
  opacity: 0.6;
  flex-shrink: 0;
}

.footer-runtime-value {
  font-variant-numeric: tabular-nums;
  color: var(--color-accent);
  font-weight: 600;
  min-width: 1.2em;
  text-align: center;
}

.footer-runtime-separator {
  color: var(--color-text-muted);
  opacity: 0.6;
  padding: 0 4px;
}

.footer-online-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.footer-online-icon-wrap {
  position: relative;
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-accent);
}

.footer-online-icon {
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 0 5px rgba(var(--color-accent-rgb, 245, 150, 170), 0.45));
  animation: footerOnlineIconBlink 1.5s ease-in-out infinite;
}

.footer-online-label,
.footer-online-detail {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
}

.footer-online-label {
  color: var(--color-text-primary);
  flex-shrink: 0;
}

.footer-online-detail {
  min-width: 24em;
  justify-content: flex-start;
  color: var(--color-text-muted);
}

.footer-online-headline,
.footer-online-count {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.footer-online-headline,
.footer-online-count {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-primary);
  font-weight: 600;
  line-height: 1;
}

.footer-online-count {
  color: var(--color-text-muted);
}

.footer-online-status.is-online .footer-online-headline {
  color: var(--color-text-primary);
}

.footer-online-status.is-online .footer-online-detail {
  color: var(--color-text-primary);
}

.footer-online-status.is-offline .footer-online-headline,
.footer-online-status.is-connecting .footer-online-headline,
.footer-online-status.is-offline .footer-online-detail,
.footer-online-status.is-connecting .footer-online-detail {
  color: var(--color-text-muted);
}

.footer-online-status.is-offline .footer-online-icon-wrap {
  color: var(--color-text-muted);
}

.footer-online-status.is-offline .footer-online-icon {
  animation: none;
  opacity: 0.55;
  filter: none;
}

.footer-online-status.is-connecting .footer-online-icon {
  opacity: 0.75;
}

@media (max-width: 768px) {
  .footer-online-detail {
    min-width: 0;
  }
}

@keyframes footerOnlineIconBlink {
  0%, 100% {
    opacity: 0.4;
  }
  50% {
    opacity: 1;
  }
}

.footer-right {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.footer-about-text {
  font-size: 13px;
  color: var(--color-text-muted);
  line-height: 1.6;
  margin: 0;
  white-space: nowrap;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: 13px;
}

.footer-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1-5);
  color: var(--color-text-secondary);
  transition: all var(--duration-fast);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.footer-link:hover {
  color: var(--color-accent);
  background: color-mix(in srgb, var(--color-accent) 10%, transparent);
}

.footer-link svg {
  flex-shrink: 0;
}

.footer-link strong {
  font-weight: 600;
  color: var(--color-accent);
}

/* 服务商标识 */
.footer-provider {
  cursor: default;
}

a.footer-provider {
  cursor: pointer;
}

.footer-provider-logo {
  height: 1.2em;
  width: auto;
  vertical-align: middle;
  margin: 0 2px;
}

@media (max-width: 1200px) {
  .footer-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  
  .footer-left,
  .footer-right {
    justify-content: center;
  }
}

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-height);
  background: transparent;
  transition: background var(--duration-normal) var(--ease-out),
              box-shadow var(--duration-normal) var(--ease-out),
              transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.header.header-hidden {
  transform: translateY(-100%);
}

.header.scrolled {
  background: rgba(17, 17, 17, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 0 var(--color-border);
}

[data-theme="light"] .header.scrolled {
  background: rgba(255, 255, 255, 0.8);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-5);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-left {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.header-right {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.logo {
  display: flex;
  align-items: center;
}

.logo-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  overflow: hidden;
  border: 2px solid var(--color-border);
  transition: border-color var(--duration-fast);
  /* xhj 定制：站点 logo 是横向实拍图，不加 object-fit 会被硬压成方形（"扁"）。
     cover = 保持比例裁掉两侧，不拉伸变形。 */
  object-fit: cover;
  object-position: center;
  aspect-ratio: 1 / 1;
  flex-shrink: 0;
  background: var(--color-bg-soft);
}

.logo:hover .logo-avatar {
  border-color: var(--color-accent);
}

.nav {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  font-size: 14px;
  color: var(--color-text-secondary);
  border-radius: var(--radius-md);
  transition: all var(--duration-fast);
}

.nav-item:hover {
  color: var(--color-text);
  background: var(--color-bg-soft);
}

.nav-item.active {
  color: var(--color-accent);
}

.nav-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.nav-left,
.nav-right {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

/* 关闭导航图标（html.nav-icons-off）：隐藏所有导航图标，项目之间用「丨」分隔，更简约 */
.nav-icons-off .nav-left {
  gap: var(--space-1);
}

.nav-icons-off .nav-left .nav-btn-text {
  padding: 0 var(--space-2);
}

.nav-icons-off .nav-left .nav-custom-icon,
.nav-icons-off .nav-left svg,
.nav-icons-off .compass-item .nav-custom-icon,
.nav-icons-off .compass-item svg {
  display: none !important;
}

.nav-separator {
  display: none;
  align-items: center;
  color: var(--color-accent);
  opacity: 0.35;
  font-size: 13px;
  line-height: 1;
  user-select: none;
  pointer-events: none;
}

.nav-icons-off .nav-left .nav-separator {
  display: inline-flex;
}

.nav-btn {
  position: relative;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--duration-fast);
}

.nav-btn svg {
  width: 20px;
  height: 20px;
  color: var(--color-accent);
  transition: color var(--duration-fast);
}

/* 自定义 icon class 图标（如 Font Awesome） */
.nav-btn .nav-custom-icon,
.nav-btn-text .nav-custom-icon,
.dropdown-item .nav-custom-icon {
  font-size: 18px;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--color-accent);
  transition: color var(--duration-fast);
  line-height: 1;
}

.nav-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

[data-theme="light"] .nav-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.nav-btn:hover svg {
  color: var(--color-accent-secondary);
}

.nav-btn:hover .nav-custom-icon {
  color: var(--color-accent-secondary);
}

.nav-btn.active svg {
  color: var(--color-accent-secondary);
}

.nav-btn.active .nav-custom-icon {
  color: var(--color-accent-secondary);
}

.nav-btn-text {
  width: auto;
  padding: 0 var(--space-3);
  font-size: 15px;
  font-weight: 600;
  color: var(--color-accent);
  letter-spacing: 0.5px;
  font-family: var(--font-sans);
  writing-mode: horizontal-tb;
  text-orientation: mixed;
  gap: 6px;
}

.nav-btn-text svg {
  flex-shrink: 0;
}

.nav-btn-text:hover {
  color: var(--color-accent-secondary);
  background: rgba(255, 255, 255, 0.08);
}

[data-theme="light"] .nav-btn-text:hover {
  background: rgba(255, 255, 255, 0.08);
}

.nav-btn-text.active {
  color: var(--color-accent-secondary);
  font-weight: 700;
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  min-width: 120px;
  padding: var(--space-2);
  background: rgba(30, 30, 40, 0.75);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
}

[data-theme="light"] .nav-dropdown-menu {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.nav-dropdown:hover .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(4px);
}

.nav-dropdown-menu::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 0;
  right: 0;
  height: 8px;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  font-size: 13px;
  color: var(--color-accent);
  border-radius: var(--radius-md);
  transition: all var(--duration-fast);
  white-space: nowrap;
}

.dropdown-item:hover {
  color: var(--color-accent-secondary);
  background: rgba(255, 255, 255, 0.08);
}

[data-theme="light"] .dropdown-item:hover {
  background: rgba(0, 0, 0, 0.05);
}

.dropdown-item svg {
  width: 16px;
  height: 16px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  position: relative;
}

.header-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--color-accent);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--duration-fast);
}

.header-btn svg {
  width: 20px;
  height: 20px;
  color: var(--color-accent);
  transition: color var(--duration-fast);
}

.header-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--color-accent-secondary);
}

[data-theme="light"] .header-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

.header-btn:hover svg {
  color: var(--color-accent-secondary);
}

.search-box {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-4);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--color-accent);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--duration-fast);
  min-width: 180px;
}

[data-theme="light"] .search-box {
  background: transparent;
  border-color: var(--color-accent);
}

.search-box:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--color-accent-secondary);
}

[data-theme="light"] .search-box:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--color-accent-secondary);
}

.search-box-text {
  flex: 1;
  font-size: 13px;
  color: var(--color-accent);
}

.search-box-icon {
  width: 16px;
  height: 16px;
  color: var(--color-accent);
}

.search-box-kbd {
  font-family: inherit;
  font-size: 11px;
  line-height: 1;
  padding: 2px 6px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--color-accent) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--color-accent) 30%, transparent);
  color: var(--color-accent);
  pointer-events: none;
  white-space: nowrap;
}

.menu-toggle {
  display: none;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
}

.menu-toggle svg {
  width: 20px;
  height: 20px;
  color: var(--color-text-secondary);
}

@media (max-width: 768px) {
  .nav {
    display: flex;
  }
  
  .menu-toggle {
    display: flex;
  }
}

.floating-timeline {
  position: fixed;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  color: var(--color-text-secondary);
  font-size: 12px;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transition: color var(--duration-fast), border-color var(--duration-fast);
}

[data-theme="light"] .floating-timeline {
  background: rgba(0, 0, 0, 0.04);
}

.floating-timeline:hover {
  color: var(--color-accent);
  border-color: var(--color-accent);
}

.floating-timeline svg {
  width: 20px;
  height: 20px;
  writing-mode: horizontal-tb;
}

.floating-timeline span {
  letter-spacing: 2px;
}

.archive-sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding-bottom: var(--space-6);
}

/* 小组件通用 */
.sidebar-widget {
  padding: var(--space-5);
  background: var(--color-bg-soft);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  transition: all var(--duration-fast);
}

.sidebar-widget:hover {
  border-color: var(--color-border-hover);
  background: var(--color-bg-mute);
}

.widget-header {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

.widget-icon {
  width: 16px;
  height: 16px;
  min-width: 16px;
  color: var(--color-accent);
  flex-shrink: 0;
}

.widget-divider {
  width: 2px;
  height: 14px;
  background: var(--color-accent);
  border-radius: 1px;
}

.widget-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
  letter-spacing: 0.02em;
}

/* 一言 */
.widget-hitokoto {
  text-align: center;
  padding: var(--space-2) 0;
}

.widget-hitokoto .hitokoto-text {
  font-size: 13px;
  color: var(--color-text);
  line-height: 1.7;
  font-style: italic;
}

.widget-hitokoto .hitokoto-from {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-top: var(--space-2);
}

/* 最近发布列表 */
.widget-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.widget-list li {
  position: relative;
  padding-left: var(--space-4);
}

.widget-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: transparent;
  border: 1.5px solid var(--color-accent);
  transition: all var(--duration-fast);
}

.widget-list li:hover::before {
  background: var(--color-accent);
}

.widget-list a,
.widget-link-placeholder {
  font-size: 13px;
  color: var(--color-text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: all var(--duration-fast);
  line-height: 1.5;
}

.widget-list a:hover {
  color: var(--color-accent);
  padding-left: var(--space-1);
}

/* 最新评论 */
.widget-comments {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.comment-item {
  display: flex;
  gap: var(--space-2);
  align-items: flex-start;
  padding: var(--space-2) var(--space-3);
  background: var(--color-bg-soft);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: all var(--duration-fast);
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.comment-item:hover {
  background: var(--color-bg-mute);
  border-color: var(--color-accent);
  transform: translateX(2px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.comment-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 1px solid var(--color-border);
}

.comment-body {
  min-width: 0;
  flex: 1;
}

.comment-author {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-accent);
  display: block;
  margin-bottom: var(--space-1);
}

.comment-text {
  font-size: 11px;
  color: var(--color-text-secondary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}

.comment-loading,
.comment-empty {
  text-align: center;
  padding: var(--space-3);
  font-size: 12px;
  color: var(--color-text-muted);
}


.comment-text:hover {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: var(--color-accent);
}

/* 标签云 */
.widget-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
}

.widget-tag {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-accent);
  background: color-mix(in srgb, var(--color-accent) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--color-accent) 20%, transparent);
  border-radius: 6px;
  text-decoration: none;
  transition: all var(--duration-fast);
  white-space: nowrap;
}

.widget-tag:hover {
  background: color-mix(in srgb, var(--color-accent) 20%, transparent);
  border-color: var(--color-accent);
  color: var(--color-accent);
}

/* 查看更多按钮 */
.widget-tags-more {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  padding: 8px 12px;
  margin-top: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-accent);
  background: transparent;
  border-radius: 6px;
  text-decoration: none;
  transition: all var(--duration-fast);
}

.widget-tags-more:hover {
  background: color-mix(in srgb, var(--color-accent) 10%, transparent);
}

.theme-toggle {
  position: relative;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--color-accent);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--duration-fast);
}

.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--color-accent-secondary);
  transform: scale(1.05);
}

[data-theme="light"] .theme-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
  color: var(--color-accent);
  transition: all var(--duration-fast);
}

.theme-toggle:hover svg {
  color: var(--color-accent-secondary);
}

.theme-toggle .icon-sun {
  display: block;
}

.theme-toggle .icon-moon {
  display: none;
}

[data-theme="light"] .theme-toggle .icon-sun {
  display: none;
}

[data-theme="light"] .theme-toggle .icon-moon {
  display: block;
}

.markdown-content pre {
  max-width: 100%;
  overflow-x: auto;
  word-wrap: normal;
  white-space: pre;
}

.markdown-content code {
  word-break: break-word;
}

.markdown-content table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
}

.post-content > *,
.markdown-content > * {
  max-width: 100%;
}

.post-content img,
.markdown-content img {
  max-width: 100%;
  height: auto;
}

.post-content pre,
.post-content pre code,
.post-content pre[class*="language-"],
.post-content pre[class*="language-"] code,
.markdown-content pre,
.markdown-content pre code,
.markdown-content pre[class*="language-"],
.markdown-content pre[class*="language-"] code,
article pre,
article pre code,
pre.hljs,
pre.hljs code,
.hljs,
.hljs code,
div[class*="code"] pre,
div[class*="code"] pre code {
  white-space: pre-wrap !important;
  word-wrap: break-word !important;
  overflow-wrap: break-word !important;
  word-break: break-all !important;
  max-width: 100% !important;
  overflow-x: hidden !important;
}

.post-content pre,
.markdown-content pre,
article pre,
pre.hljs,
.hljs,
div[class*="code"] pre {
  box-sizing: border-box !important;
  max-width: 100% !important;
  width: 100% !important;
}

code,
pre,
pre code,
.hljs,
.hljs code,
[class*="language-"],
[class*="language-"] code {
  white-space: pre-wrap !important;
  word-wrap: break-word !important;
  overflow-wrap: break-word !important;
}

.post-comments {
  margin-top: var(--space-8);
  padding-top: var(--space-8);
  border-top: 1px solid var(--color-border);
}

:root {
  color-scheme: dark;
  --halo-cw-primary-1-color: var(--color-accent);
  --halo-cw-primary-2-color: rgba(var(--color-accent-rgb, 192, 132, 252), 0.6);
  --halo-cw-primary-3-color: rgba(var(--color-accent-rgb, 192, 132, 252), 0.3);
  --halo-cw-text-1-color: #f5f5f5;
  --halo-cw-text-2-color: var(--color-accent);
  --halo-cw-text-3-color: rgba(var(--color-accent-rgb, 192, 132, 252), 0.6);
  --halo-cw-muted-1-color: rgba(255, 255, 255, 0.12);
  --halo-cw-muted-2-color: rgba(255, 255, 255, 0.06);
  --halo-cw-muted-3-color: rgba(255, 255, 255, 0.03);
  --halo-cw-base-rounded: 12px;
  --halo-cw-avatar-rounded: 50%;
  --halo-cw-avatar-size: 42px;
  --halo-cw-base-font-size: 14px;
  --halo-cw-base-font-family: var(--font-global);
  --halo-cw-emoji-picker-rgb-color: 245, 245, 245;
  --halo-cw-emoji-picker-rgb-accent: 245, 150, 170;
  --halo-cw-emoji-picker-rgb-background: 26, 26, 26;
  --halo-cw-emoji-picker-rgb-input: 17, 17, 17;
  --halo-cw-emoji-picker-color-border: rgba(255, 255, 255, 0.08);
  --halo-cw-emoji-picker-color-border-over: rgba(255, 255, 255, 0.15);
}

html[data-theme='light'],
html[data-theme='light'] body,
[data-theme='light'],
.light {
  color-scheme: light;
  --halo-cw-primary-1-color: var(--color-accent);
  --halo-cw-primary-2-color: rgba(var(--color-accent-rgb, 139, 92, 246), 0.6);
  --halo-cw-primary-3-color: rgba(var(--color-accent-rgb, 139, 92, 246), 0.3);
  --halo-cw-text-1-color: #1a1a1a;
  --halo-cw-text-2-color: var(--color-accent);
  --halo-cw-text-3-color: rgba(var(--color-accent-rgb, 139, 92, 246), 0.6);
  --halo-cw-muted-1-color: rgba(0, 0, 0, 0.08);
  --halo-cw-muted-2-color: rgba(0, 0, 0, 0.04);
  --halo-cw-muted-3-color: rgba(0, 0, 0, 0.02);
  --halo-cw-emoji-picker-rgb-color: 26, 26, 26;
  --halo-cw-emoji-picker-rgb-accent: 51, 166, 184;
  --halo-cw-emoji-picker-rgb-background: 255, 255, 255;
  --halo-cw-emoji-picker-rgb-input: 248, 248, 248;
  --halo-cw-emoji-picker-color-border: rgba(0, 0, 0, 0.08);
  --halo-cw-emoji-picker-color-border-over: rgba(0, 0, 0, 0.15);
}

/* 评论区头部 */
.comments-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--color-border);
}

.comments-header svg {
  width: 22px;
  height: 22px;
  color: var(--color-accent);
}

.comments-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-text);
  margin: 0;
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.comments-subtitle {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-left: var(--space-2);
  padding-left: var(--space-3);
  border-left: 1px solid var(--color-border);
}

.comments-count {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-left: auto;
  padding: 4px 10px;
  background: var(--color-bg-soft);
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
}

/* 评论组件容器 */
halo-comment {
  display: block;
}

/* 评论表单区域美化 */
halo-comment::part(form) {
  background: var(--color-bg-soft);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  transition: all 0.3s ease;
}

halo-comment::part(form):hover {
  border-color: var(--color-accent);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* 评论列表项美化 */
halo-comment::part(comment-item) {
  background: var(--color-bg-soft);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  margin-bottom: var(--space-3);
  border: 1px solid var(--color-border);
  transition: all 0.3s ease;
}

halo-comment::part(comment-item):hover {
  border-color: var(--color-border-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

/* 头像美化 */
halo-comment::part(avatar) {
  border: 2px solid var(--color-accent);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

halo-comment::part(avatar):hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 按钮美化 */
halo-comment::part(button) {
  border-radius: var(--radius-md);
  transition: all 0.3s ease;
}

halo-comment::part(button):hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.search-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 10vh;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0s linear 0.2s;
}

.search-modal.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.2s ease, visibility 0s linear 0s;
}

.search-modal-overlay {
  position: absolute;
  inset: 0;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.search-modal-content {
  position: relative;
  width: 90%;
  max-width: 600px;
  max-height: 70vh;
  background: rgba(20, 22, 29, 0.58);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-xl);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  transform: translateY(-16px) scale(0.985);
  transition: transform 0.2s ease;
  will-change: transform;
}

[data-theme="light"] .search-modal-content {
  background: rgba(236, 240, 245, 0.86);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-color: rgba(120, 130, 150, 0.22);
  box-shadow: 0 20px 48px rgba(32, 42, 56, 0.14);
}

[data-theme="light"] .search-item-title {
  color: #1a1a1a;
}

[data-theme="light"] .search-item:hover {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .search-item-excerpt {
  color: rgba(0, 0, 0, 0.6);
}

[data-theme="light"] .search-item-meta {
  color: rgba(0, 0, 0, 0.4);
}

[data-theme="light"] .search-item mark {
  color: white;
}

.search-modal.active .search-modal-content {
  transform: translateY(0) scale(1);
}

.search-modal-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  border-bottom: 1px solid var(--color-border);
}

.search-modal-header > svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--color-accent);
}

.search-input {
  flex: 1;
  padding: var(--space-3);
  background: transparent;
  border: none;
  font-size: 1rem;
  color: var(--color-accent) !important;
  outline: none;
  caret-color: var(--color-accent);
}

.search-input::placeholder {
  color: var(--color-accent);
  opacity: 0.6;
}

.search-input:focus {
  color: var(--color-accent) !important;
}

.search-close {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: transparent;
  border: none;
  color: var(--color-accent);
  cursor: pointer;
  transition: all 0.2s ease;
}

.search-close:hover {
  background: var(--color-bg-mute);
  color: var(--color-accent-secondary);
}

.search-close svg {
  width: 20px;
  height: 20px;
}

.search-results {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-2);
}

.search-empty,
.search-loading {
  padding: var(--space-8);
  text-align: center;
  color: var(--color-accent);
  font-size: 0.875rem;
}

.search-item {
  display: block;
  padding: var(--space-4);
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
  margin-bottom: var(--space-2);
  border: 1px solid transparent;
}

.search-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateX(4px);
}

.search-item-title {
  font-size: 1rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: var(--space-2);
  line-height: 1.4;
  transition: color 0.2s ease;
}

.search-item:hover .search-item-title {
  color: var(--color-accent);
}

.search-item-excerpt {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.6;
  margin-bottom: var(--space-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.search-item-meta {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
}

.search-item mark {
  background: linear-gradient(120deg, var(--color-accent) 0%, var(--color-accent-secondary) 100%);
  color: white;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 500;
}

@media (max-width: 640px) {
  .search-modal {
    padding-top: 5vh;
  }
  
  .search-modal-content {
    width: 95%;
    max-height: 80vh;
  }
}

/* 图片放大查看 */
.image-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.9);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  opacity: 0;
  animation: lightbox-fade-in 0.3s ease forwards;
}

@keyframes lightbox-fade-in {
  to {
    opacity: 1;
  }
}

.image-lightbox.closing {
  animation: lightbox-fade-out 0.3s ease forwards;
}

@keyframes lightbox-fade-out {
  to {
    opacity: 0;
  }
}

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-image {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
  position: absolute;
  top: -40px;
  right: 0;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  color: white;
  font-size: 24px;
  line-height: 1;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  color: white;
  font-size: 20px;
}

.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-50%) scale(1.1);
}

.lightbox-nav.prev {
  left: -60px;
}

.lightbox-nav.next {
  right: -60px;
}

@media (max-width: 768px) {
  .lightbox-nav.prev {
    left: 10px;
  }
  
  .lightbox-nav.next {
    right: 10px;
  }
  
  .lightbox-close {
    top: 10px;
    right: 10px;
  }
}


.plugin-notice {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 32px;
  margin: 48px auto;
  max-width: 500px;
  text-align: center;
}

.plugin-notice-icon {
  width: 80px;
  height: 80px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, 
    color-mix(in srgb, var(--color-accent) 15%, transparent) 0%, 
    color-mix(in srgb, var(--color-accent) 8%, transparent) 100%);
  border-radius: 50%;
  position: relative;
  animation: plugin-notice-pulse 2s ease-in-out infinite;
}

.plugin-notice-icon::before {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  background: linear-gradient(135deg, 
    color-mix(in srgb, var(--color-accent) 20%, transparent) 0%, 
    color-mix(in srgb, var(--color-accent) 8%, transparent) 100%);
  opacity: 0;
  animation: plugin-notice-ripple 2s ease-in-out infinite;
}

.plugin-notice-icon svg {
  width: 40px;
  height: 40px;
  color: var(--color-accent);
  stroke-width: 2.5;
  filter: drop-shadow(0 2px 8px color-mix(in srgb, var(--color-accent) 30%, transparent));
}

.plugin-notice-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-accent);
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.plugin-notice-desc {
  font-size: 0.9375rem;
  color: color-mix(in srgb, var(--color-accent) 70%, var(--color-text));
  line-height: 1.6;
  margin: 0;
}

@keyframes plugin-notice-pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

@keyframes plugin-notice-ripple {
  0% {
    opacity: 0;
    transform: scale(0.8);
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: scale(1.2);
  }
}

[data-theme="dark"] .plugin-notice-icon {
  background: linear-gradient(135deg, 
    color-mix(in srgb, var(--color-accent) 20%, transparent) 0%, 
    color-mix(in srgb, var(--color-accent) 12%, transparent) 100%);
}

[data-theme="dark"] .plugin-notice-icon::before {
  background: linear-gradient(135deg, 
    color-mix(in srgb, var(--color-accent) 25%, transparent) 0%, 
    color-mix(in srgb, var(--color-accent) 15%, transparent) 100%);
}

[data-theme="dark"] .plugin-notice-icon svg {
  filter: drop-shadow(0 2px 12px color-mix(in srgb, var(--color-accent) 40%, transparent));
}

[data-theme="dark"] .plugin-notice-desc {
  color: color-mix(in srgb, var(--color-accent) 80%, var(--color-text));
}

@media (max-width: 768px) {
  .plugin-notice {
    padding: 60px 24px;
    margin: 32px auto;
  }
  
  .plugin-notice-icon {
    width: 64px;
    height: 64px;
  }
  
  .plugin-notice-icon svg {
    width: 32px;
    height: 32px;
  }
  
  .plugin-notice-title {
    font-size: 1.125rem;
  }
  
  .plugin-notice-desc {
    font-size: 0.875rem;
  }
  
  .menu-toggle {
    display: none !important;
  }
  
  .header-inner {
    padding: 0 var(--space-3);
  }
  
  .logo-avatar {
    width: 32px;
    height: 32px;
  }
  
  .nav-left,
  .nav-right {
    gap: var(--space-1);
  }
  
  .nav-btn {
    width: 28px;
    height: 28px;
  }
  
  .nav-btn svg {
    width: 16px;
    height: 16px;
  }
  
  /* ── xhj 定制：移动端导航栏 ──────────────────────────────────────────
     原来这里把 .nav-btn-text / .nav-btn-text-label / .nav-separator 全隐藏，
     而 html 上又开着 nav-icons-off（全局隐藏导航图标），三者一叠加 →
     图标、文字、分隔符全都看不见，导航栏在手机上直接消失。
     改成「小字横向滚动行」：文字显示出来，一行放不下就左右滑，纯 CSS 不加 JS。 */
  .header-left {
    flex: 1 1 auto;
    min-width: 0;
    gap: var(--space-2);
    overflow: hidden;
  }

  .logo,
  .header-right {
    flex: 0 0 auto;
  }

  .nav-left {
    display: flex;
    align-items: center;
    gap: 0;
    flex: 1 1 auto;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    /* 右侧渐隐，提示还能往左滑 */
    -webkit-mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 16px), transparent 100%);
    mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 16px), transparent 100%);
  }

  .nav-left::-webkit-scrollbar {
    display: none;
  }

  /* 选择器带上 .nav-icons-off 是为了压过 1201 行那条
     `.nav-icons-off .nav-left .nav-btn-text{padding:0 8px}`（特异性 0,3,0）——
     否则手机上没有垂直内边距，点按区域太小。 */
  .nav-icons-off .nav-left .nav-btn-text,
  .nav-left .nav-btn-text {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    padding: 6px var(--space-2);
    font-size: 13px;
    line-height: 1.2;
    white-space: nowrap;
  }
  
  .nav-icons-off .nav-left .nav-separator,
  .nav-separator {
    display: none;
  }
  
  .nav-left .nav-btn-with-icon {
    width: auto;
    height: auto;
    padding: 6px var(--space-2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  
  .nav-left .nav-btn-with-icon svg {
    width: 15px;
    height: 15px;
    flex: 0 0 auto;
    margin-right: 4px;
  }
  
  /* 文字必须露出来 —— 移动端导航就靠它（nav-icons-off 下没有图标可用） */
  .nav-btn-text-label {
    display: inline !important;
  }
  
  .nav-left .nav-dropdown {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
  }
  
  /* xhj 定制：移动端二级子菜单默认隐藏，由 main.js 在父项点击时加 .mobile-open 展开。
     桌面端 hover 弹出层不受影响（这条只在 ≤768px 生效）。 */
  .nav-left .nav-dropdown .nav-dropdown-menu {
    display: none !important;
  }

  .nav-left .nav-dropdown .nav-dropdown-menu::before {
    display: none !important;
  }

  /* xhj 定制：移动端二级菜单 = 独立面板 #mobile-subnav（由 main.js 创建、挂在 body 末尾）。
     ⚠ 为什么不复用 nav 内部的 .nav-dropdown-menu + position:fixed（2.1.69 及以前的做法，
       别回滚）：实测 .header 是该 fixed 元素的包含块（offsetParent = header，成因未明），
       面板因此被 .nav-left(overflow:auto) 和 .header-left(overflow:hidden) 整体裁掉 ——
       computed style / getBoundingClientRect 全部显示「正常」，但视觉上完全不可见、
       命中测试也打不到，用户看到的就是「点父项没反应」。面板挂 body 末尾彻底绕开 header 子树。 */
  /* 2.1.71：面板不再是全宽横条，而是「按键阴影区向下拓展」的窄浮层 ——
     对齐父项按钮左缘、宽度按内容自适应（min 120px），从 header 底边向下展开。
     left 由 JS 按父项按钮实时写入，宽度这里只给 min/max 兜底。 */
  #mobile-subnav {
    position: fixed;
    top: 56px; /* JS 会按 .header 实际底部覆写 */
    z-index: 1000;
    display: block;
    min-width: 120px;
    max-width: calc(100vw - 24px);
    padding: 6px;
    background: rgba(255, 255, 255, 0.5);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.14);
    /* 展开动效：从左上角（按钮处）scale + 上移淡入；收起反向 */
    transform-origin: top left;
    opacity: 0;
    transform: translateY(-6px) scale(0.96);
    transition: opacity 0.18s ease, transform 0.18s cubic-bezier(0.2, 0.8, 0.3, 1);
    /* 兼容性兜底：子项数量多时面板不撑破屏幕，内部滚动 */
    max-height: min(60vh, 420px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  #mobile-subnav.open {
    opacity: 1;
    transform: translateY(0) scale(1);
  }

  /* 自己有 display:block 规则时，hidden 属性会被覆盖，必须显式写 */
  #mobile-subnav[hidden] {
    display: none;
  }

  /* ⚠ 保持 flex（桌面 .dropdown-item 是 flex，图标+文字横排）。
     不要改成 block，否则子项一旦带图标（某些路径 nav-icon 会渲染 svg），
     图标与文字会竖排错位。这里只微调字号/间距/按压态，横排交给继承。 */
  #mobile-subnav .dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    color: var(--color-text);
    font-size: 14px;
    line-height: 1.4;
    text-decoration: none;
    border-radius: 8px;
    white-space: nowrap;
    transition: background 0.15s ease, color 0.15s ease;
  }

  #mobile-subnav .dropdown-item svg {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
  }

  #mobile-subnav .dropdown-item .nav-custom-icon {
    flex: 0 0 auto;
  }

  #mobile-subnav .dropdown-item + .dropdown-item {
    margin-top: 2px;
  }

  #mobile-subnav .dropdown-item:active {
    background: rgba(0, 0, 0, 0.06);
  }

  /* xhj 定制（2026-09-22）：「全部」= 一级菜单自己的链接，由 main.js 插到面板最上方。
     手机端点一级项只会展开面板、到不了一级菜单页面（桌面是 hover 展开、点仍可导航），
     站长要求补这个入口。下边线把它与下面那组子项分开，加粗 + 强调色表示「上一层」。
     ⚠ 样式只加在这里，DOM 仍复用 .dropdown-item（点击分支靠这个 class 识别）。 */
  #mobile-subnav .dropdown-item.subnav-all {
    margin-bottom: 4px;
    font-weight: 700;
    color: var(--color-accent-secondary);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  }

  [data-theme="dark"] #mobile-subnav .dropdown-item.subnav-all {
    border-bottom-color: rgba(255, 255, 255, 0.1);
  }

  [data-theme="dark"] #mobile-subnav {
    background: rgba(30, 30, 40, 0.5);
    border-color: rgba(255, 255, 255, 0.08);
  }

  [data-theme="dark"] #mobile-subnav .dropdown-item:active {
    background: rgba(255, 255, 255, 0.08);
  }

  /* 父项展开态高亮（与 .nav-btn-text.active 同款视觉，让「点了有反应」）。
     注意 DOM：.nav-btn 和 .nav-btn-text 是同一个 <a>，文字在 .nav-btn-text-label 里。 */
  .nav-dropdown.subnav-open > .nav-btn,
  .nav-dropdown.subnav-open > .nav-btn .nav-btn-text-label {
    color: var(--color-accent-secondary);
    font-weight: 700;
  }

  /* ⚠ 历史坑（别回滚）：这里不能有
     `.nav-dropdown:hover .nav-dropdown-menu{visibility:hidden}` 这类
     依赖 hover 的规则 —— 移动端手指点父项会 latch 住 hover，把刚展开的子项又藏掉。 */
  
  .search-box {
    display: none;
  }
  
  .theme-toggle {
    width: 28px;
    height: 28px;
  }
  
  .theme-toggle svg {
    width: 16px;
    height: 16px;
  }
  
  .archive-sidebar {
    display: none !important;
  }
  
  .archive-layout {
    grid-template-columns: 1fr !important;
  }
  
  .archive-card {
    flex-direction: column;
    padding: var(--space-3);
  }
  
  .archive-card-cover {
    width: 100%;
    height: 160px;
    margin-bottom: var(--space-3);
  }
  
  .archive-card-title {
    font-size: 14px;
  }
  
  .archive-card-desc {
    font-size: 12px;
    line-height: 1.6;
  }
  
  .archive-card-meta {
    flex-wrap: wrap;
    gap: var(--space-2);
  }
  
  .archive-card-tags {
    flex-wrap: wrap;
  }
  
  .archive-tag {
    font-size: 10px;
    padding: 2px 8px;
  }
  
  .archive-card-date {
    font-size: 11px;
  }
  
  .footer {
    padding: var(--space-3) 0 var(--space-2);
  }
  
  .footer-content {
    flex-direction: column;
    gap: var(--space-4);
    align-items: center;
    text-align: center;
  }
  
  .footer-left {
    flex-direction: column;
    gap: var(--space-2);
  }
  
  .footer-copyright {
    font-size: 11px;
    gap: var(--space-1);
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .footer-copyright-icon {
    font-size: 16px;
  }
  
  .footer-beian {
    font-size: 10px;
    gap: var(--space-2);
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .footer-beian-link {
    font-size: 10px;
    padding: var(--space-1) var(--space-2);
  }
  
  .footer-beian-icon {
    width: 14px;
    height: 14px;
  }
  
  .footer-runtime {
    font-size: 10px;
    justify-content: center;
  }
  
  .footer-right {
    flex-direction: column;
    gap: var(--space-2);
  }
  
  .footer-about-text {
    font-size: 11px;
    line-height: 1.6;
  }
  
  .footer-links {
    gap: var(--space-2);
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .footer-link {
    font-size: 11px;
    padding: var(--space-1) var(--space-2);
  }
  
  .footer-link svg {
    width: 12px;
    height: 12px;
  }
}

.page-title-hollow {
  font-size: 2rem;
  font-weight: 800;
  font-style: italic;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--color-accent);
  transition: color var(--duration-normal), -webkit-text-fill-color var(--duration-normal);
  cursor: default;
}

.page-title-hollow:hover {
  color: var(--color-accent);
  -webkit-text-fill-color: var(--color-accent);
}

.page-header:hover .page-title-hollow {
  color: var(--color-accent);
  -webkit-text-fill-color: var(--color-accent);
}

/* 页面标题动画 */
@keyframes wave-flow {
  0%, 100% { width: 60px; opacity: 0.8; }
  50% { width: 100px; opacity: 1; }
}

@keyframes wave-pulse {
  0%, 100% { width: 30px; opacity: 0.3; }
  50% { width: 50px; opacity: 0.6; }
}

/* 通用页面标题样式 */
.page-title,
.moments-title,
.links-hero-title,
.guestbook-title,
.friends-circle-title,
.projects-title {
  font-size: 2rem;
  font-weight: 800;
  font-style: italic;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--color-accent);
  margin-bottom: var(--space-2);
  position: relative;
  display: inline-block;
  transition: color var(--duration-normal), -webkit-text-fill-color var(--duration-normal);
  cursor: default;
}

/* 标题 hover 效果 */
.page-header:hover .page-title,
.moments-header:hover .moments-title,
.links-hero:hover .links-hero-title,
.guestbook-header:hover .guestbook-title,
.friends-circle-header:hover .friends-circle-title,
.projects-header:hover .projects-title {
  color: var(--color-accent);
  -webkit-text-fill-color: var(--color-accent);
}

/* 标题装饰线 */
.page-title::before,
.page-title::after,
.moments-title::before,
.moments-title::after,
.links-hero-title::before,
.links-hero-title::after,
.guestbook-title::before,
.guestbook-title::after,
.friends-circle-title::before,
.friends-circle-title::after,
.projects-title::before,
.projects-title::after {
  content: '';
  position: absolute;
  bottom: -12px;
  height: 3px;
  border-radius: var(--radius-full);
}

/* 主装饰线 - 渐变流动效果 */
.page-title::before,
.moments-title::before,
.links-hero-title::before,
.guestbook-title::before,
.friends-circle-title::before,
.projects-title::before {
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  background: linear-gradient(90deg, 
    transparent, 
    var(--color-accent) 20%, 
    var(--color-accent-secondary) 50%, 
    var(--color-accent) 80%, 
    transparent);
  animation: wave-flow 3s ease-in-out infinite;
}

/* 次装饰线 - 脉冲效果 */
.page-title::after,
.moments-title::after,
.links-hero-title::after,
.guestbook-title::after,
.friends-circle-title::after,
.projects-title::after {
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  background: var(--color-accent);
  opacity: 0.4;
  animation: wave-pulse 2s ease-in-out infinite 0.5s;
}

/* 页面描述文字 */
.page-desc,
.moments-subtitle,
.links-hero-desc,
.guestbook-subtitle,
.friends-circle-subtitle,
.projects-subtitle {
  font-size: 13px;
  color: var(--color-text-muted);
  margin-top: var(--space-4);
}

/* 基础气泡样式 */
.serenity-popup {
  position: absolute;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
  pointer-events: none;
  z-index: 100;
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-secondary) 100%);
  padding: 12px;
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 260px;
}

/* 气泡显示状态 */
.serenity-popup.active,
*:hover > .serenity-popup {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* 气泡方向 - 上方 (默认) */
.serenity-popup--top {
  bottom: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
}

.serenity-popup--top.active,
*:hover > .serenity-popup--top {
  transform: translateX(-50%) translateY(0);
}

.serenity-popup--top::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 12px;
  height: 12px;
  background: var(--color-accent-secondary);
}

/* 气泡方向 - 下方 */
.serenity-popup--bottom {
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
}

.serenity-popup--bottom.active,
*:hover > .serenity-popup--bottom {
  transform: translateX(-50%) translateY(0);
}

.serenity-popup--bottom::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 12px;
  height: 12px;
  background: var(--color-accent);
}

/* 气泡方向 - 左侧 */
.serenity-popup--left {
  right: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%) translateX(4px);
}

.serenity-popup--left.active,
*:hover > .serenity-popup--left {
  transform: translateY(-50%) translateX(0);
}

.serenity-popup--left::after {
  content: '';
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
  width: 12px;
  height: 12px;
  background: var(--color-accent-secondary);
}

/* 气泡方向 - 右侧 */
.serenity-popup--right {
  left: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%) translateX(-4px);
}

.serenity-popup--right.active,
*:hover > .serenity-popup--right {
  transform: translateY(-50%) translateX(0);
}

.serenity-popup--right::before {
  content: '';
  position: absolute;
  left: -6px;
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
  width: 12px;
  height: 12px;
  background: var(--color-accent);
}

/* 气泡颜色变体 - 微信绿 */
.serenity-popup--wechat {
  background: linear-gradient(135deg, #07c160 0%, #06ae56 100%);
}

.serenity-popup--wechat.serenity-popup--top::after,
.serenity-popup--wechat.serenity-popup--left::after {
  background: #06ae56;
}

.serenity-popup--wechat.serenity-popup--bottom::before,
.serenity-popup--wechat.serenity-popup--right::before {
  background: #07c160;
}

/* 气泡颜色变体 - QQ蓝 */
.serenity-popup--qq {
  background: linear-gradient(135deg, #12b7f5 0%, #0ea5e9 100%);
}

.serenity-popup--qq.serenity-popup--top::after,
.serenity-popup--qq.serenity-popup--left::after {
  background: #0ea5e9;
}

.serenity-popup--qq.serenity-popup--bottom::before,
.serenity-popup--qq.serenity-popup--right::before {
  background: #12b7f5;
}

/* 气泡颜色变体 - 深色 */
.serenity-popup--dark {
  background: linear-gradient(135deg, #374151 0%, #1f2937 100%);
}

.serenity-popup--dark.serenity-popup--top::after,
.serenity-popup--dark.serenity-popup--left::after {
  background: #1f2937;
}

.serenity-popup--dark.serenity-popup--bottom::before,
.serenity-popup--dark.serenity-popup--right::before {
  background: #374151;
}

/* 气泡内容 - 二维码区域 */
.serenity-popup__qrcode {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  background: white;
  border-radius: var(--radius-md);
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.serenity-popup__qrcode img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

/* 气泡内容 - 文字区域 */
.serenity-popup__content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: white;
  min-width: 0;
}

.serenity-popup__title {
  font-size: 14px;
  font-weight: 600;
  color: white;
  margin: 0;
  line-height: 1.4;
}

.serenity-popup__text {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
  line-height: 1.5;
}

/* 简单提示气泡 (无二维码) */
.serenity-tooltip {
  position: absolute;
  padding: 8px 14px;
  background: var(--color-bg-soft);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: 13px;
  color: var(--color-text);
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  pointer-events: none;
  z-index: 100;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.serenity-tooltip.active,
*:hover > .serenity-tooltip {
  opacity: 1;
  visibility: visible;
}

/* 提示气泡方向 */
.serenity-tooltip--top {
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
}

.serenity-tooltip--top::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 10px;
  height: 10px;
  background: var(--color-bg-soft);
  border-right: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.serenity-tooltip--bottom {
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
}

.serenity-tooltip--bottom::before {
  content: '';
  position: absolute;
  top: -5px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 10px;
  height: 10px;
  background: var(--color-bg-soft);
  border-left: 1px solid var(--color-border);
  border-top: 1px solid var(--color-border);
}

/* 移动端隐藏气泡 */
@media (max-width: 640px) {
  .serenity-popup,
  .serenity-tooltip {
    display: none;
  }
}

   @keyframes entrance-fade-up {
    from {
      opacity: 0;
      transform: translateY(1.5rem);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  .onload-animation {
    opacity: 0;
    animation: entrance-fade-up 0.4s ease-out forwards;
  }
  
  .header {
    animation: entrance-fade-up 0.35s ease-out forwards;
    animation-delay: 0ms;
  }
  
  .footer {
    opacity: 0;
    animation: entrance-fade-up 0.4s ease-out forwards;
    animation-delay: 280ms;
  }
  
  .post-sidebar .sidebar-widget {
    opacity: 0;
    animation: entrance-fade-up 0.4s ease-out forwards;
  }
  .post-sidebar .sidebar-widget:nth-child(1) { animation-delay: calc(var(--content-delay, 120ms) + 50ms); }
  .post-sidebar .sidebar-widget:nth-child(2) { animation-delay: calc(var(--content-delay, 120ms) + 120ms); }
  .post-sidebar .sidebar-widget:nth-child(3) { animation-delay: calc(var(--content-delay, 120ms) + 190ms); }
  .post-sidebar .sidebar-widget:nth-child(4) { animation-delay: calc(var(--content-delay, 120ms) + 260ms); }
  
  /* 文章页 Hero 区域入场 */
  .post-hero {
    opacity: 0;
    animation: entrance-fade-up 0.5s ease-out forwards;
    animation-delay: calc(var(--content-delay, 120ms) + 0ms);
  }
  
  /* 文章页内容区块交错入场 */
  .post-main > .post > .post-content,
  .post-main > .post > .post-copyright,
  .post-main > .post-tags,
  .post-main > .post-nav {
    opacity: 0;
    animation: entrance-fade-up 0.4s ease-out forwards;
  }
  .post-main > .post > .post-content { animation-delay: calc(var(--content-delay, 120ms) + 80ms); }
  .post-main > .post > .post-copyright { animation-delay: calc(var(--content-delay, 120ms) + 140ms); }
  .post-main > .post-tags { animation-delay: calc(var(--content-delay, 120ms) + 200ms); }
  .post-main > .post-nav { animation-delay: calc(var(--content-delay, 120ms) + 260ms); }
  
  @media (prefers-reduced-motion: reduce) {
    .onload-animation,
    .header,
    .main,
    .footer,
    .post-hero,
    .post-sidebar .sidebar-widget,
    .post-main > .post > .post-content,
    .post-main > .post > .post-copyright,
    .post-main > .post-tags,
    .post-main > .post-nav {
      animation: none;
      opacity: 1;
    }
  }


/* ============================================================================
   站长前台编辑 —— 共享样式（xhj 定制 2026-09-20；2.1.57 从 moments.css 迁来）
   ----------------------------------------------------------------------------
   这一块是**跨页面共享**的：评论管理面板、点赞数浮层、面板里的小按钮。
   留言板（guestbook.html）与瞬间页（moments.html）都用它，逻辑在
   assets/js/xhj-cmt-admin.js。

   放 base.css 的理由：每页都会加载，加一处就够；放 moments.css 的话，
   留言板页根本不引那个文件。页面专属的少部分（.moment-edit-btn、
   .guestbook-admin-bar）各自留在自己的 css 里。

   可见性：入口默认 display:none，脚本探测出后台登录态后给 <html> 加
   .xhj-admin 才显示 —— 匿名访客看到的页面与改动前逐像素一致。
   ========================================================================== */

/* ---------- 行内小徽标（留言 / 回复 / 待审核 / 已隐藏） ---------- */
.xhj-cm-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.xhj-cm-badge {
  padding: 1px 8px;
  font-size: 11px;
  line-height: 18px;
  color: var(--color-accent);
  background: rgba(var(--color-accent-rgb), 0.12);
  border-radius: var(--radius-full);
}

.xhj-cm-badge.is-reply {
  color: var(--color-text-secondary);
  background: var(--color-bg-mute);
}

.xhj-cm-badge.is-pending {
  color: #b26a00;
  background: rgba(255, 176, 32, 0.16);
}

.xhj-cm-when,
.xhj-cm-name {
  font-size: 11px;
  color: var(--color-text-muted);
}

.xhj-cm-name {
  margin-left: auto;         /* 内部 name 靠右，方便报给站长排查 */
  font-family: var(--font-mono);
  opacity: .7;
}

/* ---------- 回复的行：缩进 + 左侧竖线，和留言区分开 ---------- */
.xhj-cm-row.is-reply {
  margin-left: var(--space-5);
  border-left: 2px solid rgba(var(--color-accent-rgb), 0.35);
}

/* ---------- 面板顶部的搜索 / 筛选条 ---------- */
.xhj-panel-bar {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-5);
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg-soft);
}

.xhj-panel-search {
  flex: 1;
  min-width: 0;
  padding: 6px 10px;
  font: inherit;
  font-size: 13px;
  color: var(--color-text);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  outline: none;
}

.xhj-panel-search:focus { border-color: var(--color-accent); }

.xhj-panel-kind {
  padding: 6px 8px;
  font: inherit;
  font-size: 13px;
  color: var(--color-text);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  outline: none;
}

.xhj-panel-count {
  flex: none;
  font-size: 12px;
  color: var(--color-text-muted);
  white-space: nowrap;
}

/* ---------- 面板底部说明 ---------- */
.xhj-panel-foot {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-5);
  border-top: 1px solid var(--color-border);
  background: var(--color-bg-soft);
}

.xhj-panel-note {
  flex: 1;
  font-size: 12px;
  line-height: 1.5;
  color: var(--color-text-muted);
}

.xhj-panel-more {
  align-self: center;
}

@media (max-width: 768px) {
  .xhj-panel-bar { flex-wrap: wrap; padding: var(--space-3) var(--space-4); }
  .xhj-panel-search { flex-basis: 100%; }
  .xhj-panel-foot { flex-wrap: wrap; }
  .xhj-cm-name { display: none; }   /* 手机上这条内部名只会挤地方 */
  .xhj-cm-row.is-reply { margin-left: var(--space-3); }
}

/* ---------- 通用小按钮 ---------- */
.xhj-btn {
  padding: 7px 14px;
  font: inherit;
  font-size: 13px;
  color: var(--color-text);
  background: var(--color-bg-mute);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color .2s, opacity .2s, background-color .2s;
  -webkit-appearance: none;
  appearance: none;
}

.xhj-btn:hover { border-color: var(--color-border-hover); }

.xhj-btn-primary {
  color: #fff;
  background: var(--color-accent);
  border-color: transparent;
}

.xhj-btn-primary:hover { opacity: .88; }

.xhj-btn[disabled] {
  opacity: .5;
  cursor: default;
}

/* ---------- 点赞数编辑：贴着数字弹出的小浮层 ---------- */
.xhj-pop {
  position: fixed;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3);
  background: var(--color-bg-soft);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: 0 14px 36px rgba(0, 0, 0, .24);
}

.xhj-pop input {
  width: 104px;
  padding: 7px 9px;
  font: inherit;
  font-size: 14px;
  color: var(--color-text);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  outline: none;
}

.xhj-pop input:focus { border-color: var(--color-accent); }

.xhj-pop-hint {
  font-size: 12px;
  color: var(--color-text-muted);
}

.xhj-pop-hint.err { color: #e5484d; }

/* 保存成功且浮层「多留一会儿」时的提示色（文章阅读量用它报「已保存」） */
.xhj-pop-hint.ok { color: #2ea043; }

/* ---------- 评论管理面板：新增评论 / 可编辑时间 / 删除（xhj 定制 2026-09-22，主题 2.1.84） ---------- */
.xhj-cm-new {
  padding: var(--space-3);
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg-soft);
}

.xhj-cm-new-row {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
  flex-wrap: wrap;
}

.xhj-cm-new-row input {
  flex: 1;
  min-width: 140px;
  padding: 6px 9px;
  font: inherit;
  font-size: 13px;
  color: var(--color-text);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  outline: none;
}

.xhj-cm-new textarea {
  width: 100%;
  min-height: 62px;
  margin-bottom: var(--space-2);
  padding: 6px 9px;
  font: inherit;
  font-size: 13px;
  color: var(--color-text);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  resize: vertical;
}

/* 行内可编辑的时间：做小、虚线边框，提示「这里能改」 */
.xhj-cm-when-edit {
  width: 152px;
  padding: 1px 4px;
  font: inherit;
  font-size: 11px;
  color: var(--color-text-muted);
  background: transparent;
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-md);
  outline: none;
}

.xhj-cm-when-edit:focus { border-color: var(--color-accent); }

.xhj-cm-del {
  color: #e5484d;
  border-color: rgba(229, 72, 77, .45);
}

.xhj-panel-bar .xhj-cm-new-toggle { white-space: nowrap; }

/* ---------- 评论管理面板 ---------- */
.xhj-mask {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: rgba(0, 0, 0, .45);
}

.xhj-panel {
  position: fixed;
  z-index: 9999;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(720px, calc(100vw - 32px));
  max-height: min(82vh, 780px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--color-bg-soft);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 64px rgba(0, 0, 0, .35);
}

.xhj-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--color-border);
}

.xhj-panel-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text);
}

.xhj-panel-close {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: inherit;
  font-size: 18px;
  line-height: 1;
  color: var(--color-text-muted);
  background: transparent;
  border: 0;
  border-radius: var(--radius-full);
  cursor: pointer;
}

.xhj-panel-close:hover {
  color: var(--color-accent);
  background: rgba(var(--color-accent-rgb), 0.12);
}

.xhj-panel-body {
  padding: var(--space-4) var(--space-5);
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.xhj-panel-empty {
  padding: var(--space-6) 0;
  text-align: center;
  color: var(--color-text-muted);
  font-size: 14px;
}

.xhj-cm-row {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.xhj-cm-row input,
.xhj-cm-row textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  font: inherit;
  font-size: 14px;
  color: var(--color-text);
  background: var(--color-bg-soft);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  outline: none;
}

.xhj-cm-row input:focus,
.xhj-cm-row textarea:focus {
  border-color: var(--color-accent);
}

.xhj-cm-row textarea {
  min-height: 54px;
  line-height: 1.6;
  resize: vertical;
}

.xhj-cm-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

/* 昵称框吃掉剩余宽度，保存按钮与状态文字不参与压缩 ——
   留言板近 700 条，三者挤一行比「昵称独占一行 + 按钮再占一行」省一半高度。 */
.xhj-cm-actions input {
  flex: 1 1 auto;
  min-width: 0;
}

.xhj-cm-actions .xhj-btn,
.xhj-cm-actions .xhj-cm-status {
  flex: none;
}

.xhj-cm-status {
  font-size: 12px;
  color: var(--color-text-muted);
}

.xhj-cm-status.ok { color: var(--color-accent); }
.xhj-cm-status.err { color: #e5484d; }

@media (max-width: 768px) {
  .xhj-panel-body { padding: var(--space-3); }
  .xhj-cm-row { padding: var(--space-3); }
}

/* ============================================================================
   
/* ============================================================================
   顶部导航「固定黑字 + 局部阴影/蒙版」—— xhj 定制 2026-09-21（v2.1.61）
   ----------------------------------------------------------------------------
   问题：导航文字 / 分隔符 / 搜索框 / 图标 全部取 var(--color-accent)（跟随主题设置
         的强调色，当前 #665454 灰棕），而首页顶部 header 是透明的，文字直接压在
         壁纸上 ⇒ 换一张壁纸就看不清。
   方案（v2.1.61，推翻 v2.1.60 的整条白底玻璃条）：
     · 不铺满整条白底，只在「文字附近」做处理，避免丑且挡视线；
     · 前景固定近黑（满足「先固定为黑」）；
     · 给文字加一层「白色光晕 + 轻微暗投影」的 text-shadow：暗壁纸上靠白晕托底让
       黑字清晰，亮壁纸上靠暗投影分层——任意壁纸下都始终可读，且只有文字周边有
       阴影，不碰整条顶栏；
     · 搜索框改成「极淡玻璃描边胶囊」（半透明 + 模糊），不再用实心白底；
     · 悬停时每个导航项是各自独立的极淡玻璃底（局部蒙版），不是整条白底。
   范围：全部规则都挂在 [data-theme="light"] 下 —— 暗色模式一行都不碰（维持原状）。
   回滚：整块删除即可（从本注释到文件末尾），别处零依赖。
   ========================================================================== */

/* ── 1) 前景固定近黑 + 局部白晕/暗投影（始终清晰、不铺整条白底） ───────────── */
[data-theme="light"] .header .nav-btn,
[data-theme="light"] .header .nav-btn svg,
[data-theme="light"] .header .nav-btn .nav-custom-icon,
[data-theme="light"] .header .nav-btn-text,
[data-theme="light"] .header .nav-btn-text-label,
[data-theme="light"] .header .nav-separator,
[data-theme="light"] .header .header-btn,
[data-theme="light"] .header .header-btn svg,
[data-theme="light"] .header .search-box-text,
[data-theme="light"] .header .search-box-icon {
  color: #14161a;
  text-shadow:
    0 0 1px rgba(255, 255, 255, 0.92),
    0 0 3px rgba(255, 255, 255, 0.85),
    0 1px 3px rgba(0, 0, 0, 0.28);
}

/* 悬停 / 当前页：纯黑，阴影略加重，反馈清晰但不抢戏 */
[data-theme="light"] .header .nav-btn:hover,
[data-theme="light"] .header .nav-btn-text:hover,
[data-theme="light"] .header .header-btn:hover {
  color: #000;
  text-shadow:
    0 0 1px rgba(255, 255, 255, 0.92),
    0 0 3px rgba(255, 255, 255, 0.85),
    0 1px 3px rgba(0, 0, 0, 0.32);
}

/* 当前页：近黑 + 细下划线（不引入强调色，避免和壁纸抢） */
[data-theme="light"] .header .nav-btn-text.active {
  color: #000;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 6px;
  text-decoration-color: rgba(0, 0, 0, 0.5);
}

/* ── 2) 搜索框：极淡玻璃描边胶囊（不再实心白底） ─────────────────────────── */
[data-theme="light"] .header .search-box {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(20, 22, 26, 0.14);
  backdrop-filter: blur(8px) saturate(1.2);
  -webkit-backdrop-filter: blur(8px) saturate(1.2);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

[data-theme="light"] .header .search-box:hover {
  background: rgba(255, 255, 255, 0.26);
  border-color: rgba(20, 22, 26, 0.24);
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

[data-theme="light"] .header .search-box-kbd {
  color: #5a616c;
  background: rgba(20, 22, 26, 0.06);
  border-color: rgba(20, 22, 26, 0.12);
}

/* ── 3) 悬停：每个导航项独立的极淡玻璃底（局部蒙版，不是整条白底） ──────── */
[data-theme="light"] .header .nav-btn:hover,
[data-theme="light"] .header .nav-btn-text:hover,
[data-theme="light"] .header .header-btn:hover {
  background: rgba(255, 255, 255, 0.42);
  box-shadow: 0 1px 6px rgba(15, 23, 42, 0.08);
}

[data-theme="light"] .header .header-btn {
  border-color: rgba(20, 22, 26, 0.14);
}
