/* ============================================
   梦幻刀剑ol · 自研主题样式
   02 粉 × 毛玻璃 × 小黑洞
   ============================================ */
:root {
  --pink: #ff5c93;
  --pink-deep: #d4537e;
  --pink-light: #ffb7c5;
  --pink-pale: #ffe4ee;
  --purple: #7f77dd;
  --text: #5a3a47;
  --text-2: #b77a93;
  --glass: rgba(255, 255, 255, 0.62);
  --glass-border: rgba(255, 255, 255, 0.6);
  --shadow: 0 4px 24px -6px rgba(255, 92, 147, 0.2);
  --radius: 16px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", sans-serif;
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  background: #fff2f6;
}
::selection { background: rgba(255, 92, 147, 0.28); }
a { color: inherit; text-decoration: none; }

/* ---------- 背景 ---------- */
.bg-layer {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(rgba(255, 240, 246, 0.32), rgba(255, 240, 246, 0.42)),
    url("/img/bg-main.jpg") center / cover no-repeat fixed;
}

/* ---------- 导航（透明 + 磨砂玻璃按钮 + 居中） ---------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: transparent;
  border-bottom: none;
}
.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.65rem 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  position: absolute;
  left: 1.2rem;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(12px) saturate(1.4);
  -webkit-backdrop-filter: blur(12px) saturate(1.4);
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  padding: 0.3rem 1rem;
}
/* 小黑洞 Logo */
.blackhole {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #120a10;
  box-shadow: 0 0 10px rgba(255, 92, 147, 0.5), inset 3px 2px 0 rgba(255, 143, 171, 0.35);
  position: relative;
}
.blackhole::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 32px;
  height: 8px;
  border: 2px solid rgba(255, 92, 147, 0.55);
  border-radius: 50%;
  transform: translate(-50%, -50%) rotate(-15deg);
}
.nav-title {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--pink-deep);
}
.nav-menu { display: flex; gap: 0.45rem; flex-wrap: wrap; justify-content: center; }
.nav-link {
  font-size: 0.88rem;
  padding: 0.35rem 1rem;
  border-radius: 16px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(12px) saturate(1.4);
  -webkit-backdrop-filter: blur(12px) saturate(1.4);
  border: 1px solid var(--glass-border);
  transition: all 0.2s;
}
.nav-link:hover {
  background: rgba(255, 92, 147, 0.22);
  color: var(--pink-deep);
  border-color: rgba(255, 92, 147, 0.4);
  transform: translateY(-1px);
}
.nav-link.active {
  background: rgba(255, 92, 147, 0.28);
  color: var(--pink-deep);
  border-color: rgba(255, 92, 147, 0.45);
}
/* 白天/夜晚切换按钮 */
.theme-btn {
  position: absolute;
  right: 1.2rem;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(12px) saturate(1.4);
  -webkit-backdrop-filter: blur(12px) saturate(1.4);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  color: var(--text);
  transition: all 0.2s;
}
.theme-btn:hover { background: rgba(255, 92, 147, 0.25); color: var(--pink-deep); }

/* ---------- 特效切换（樱花/雨滴，深色按钮旁） ---------- */
.fx-switch {
  position: absolute;
  right: 4rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  gap: 6px;
}
.fx-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(12px) saturate(1.4);
  -webkit-backdrop-filter: blur(12px) saturate(1.4);
  cursor: pointer;
  font-size: 0.85rem;
  line-height: 1;
  transition: all 0.2s;
  opacity: 0.7;
}
.fx-btn:hover { background: rgba(255, 92, 147, 0.25); opacity: 1; }
.fx-btn.on {
  background: rgba(255, 92, 147, 0.85);
  opacity: 1;
  box-shadow: 0 0 12px rgba(255, 92, 147, 0.5);
}

/* ---------- 首页 Hero ---------- */
.hero {
  max-width: 1100px;
  margin: 1.5rem auto 0;
  padding: 2.5rem 1.2rem;
  text-align: center;
  background: rgba(255, 233, 241, 0.35);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: var(--radius);
  border: 1px solid var(--glass-border);
}
.hero-title {
  font-size: 1.9rem;
  font-weight: 500;
  color: var(--pink-deep);
}
.hero-sub { margin-top: 0.5rem; font-size: 0.95rem; color: var(--text-2); }

/* ---------- 主体布局 ---------- */
.layout {
  max-width: 1100px;
  margin: 1.5rem auto;
  padding: 0 1.2rem;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 1.5rem;
}
.layout-main { min-width: 0; order: 2; }
.layout-aside { min-width: 0; order: 1; }

/* ---------- 文章卡片 ---------- */
.post-card {
  display: flex;
  background: var(--glass);
  backdrop-filter: blur(14px) saturate(1.35);
  -webkit-backdrop-filter: blur(14px) saturate(1.35);
  border-radius: var(--radius);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow);
  margin-bottom: 1.3rem;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.post-card:hover { transform: translateY(-4px); box-shadow: 0 10px 32px -6px rgba(255, 92, 147, 0.32); }
.post-cover {
  width: 240px;
  min-height: 160px;
  flex-shrink: 0;
  background-size: cover;
  background-position: center;
}
.post-body { padding: 1.1rem 1.3rem; }
.post-title { font-size: 1.2rem; font-weight: 500; margin-bottom: 0.4rem; }
.post-title a:hover { color: var(--pink); }
.post-meta { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 0.5rem; }
.post-date { font-size: 0.8rem; color: var(--text-2); }
.post-tag {
  font-size: 0.78rem;
  padding: 0.15rem 0.7rem;
  border-radius: 12px;
  background: rgba(212, 83, 126, 0.1);
  color: var(--pink-deep);
}
.post-excerpt {
  font-size: 0.88rem;
  color: #888;
  margin-bottom: 0.6rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-more { font-size: 0.85rem; color: var(--pink); }
.post-more:hover { text-decoration: underline; }

/* ---------- 分页 ---------- */
.pagination { display: flex; justify-content: center; align-items: center; gap: 1rem; padding: 0.8rem 0; }
.page-btn {
  padding: 0.4rem 1.1rem;
  border-radius: 14px;
  font-size: 0.85rem;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--glass-border);
  color: var(--text);
}
.page-btn:hover { background: rgba(255, 92, 147, 0.2); color: var(--pink-deep); }
.page-info { font-size: 0.85rem; color: var(--text-2); }

/* ---------- 侧边栏 ---------- */
.card {
  background: var(--glass);
  backdrop-filter: blur(14px) saturate(1.35);
  -webkit-backdrop-filter: blur(14px) saturate(1.35);
  border-radius: var(--radius);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow);
  padding: 1.2rem 1.3rem;
  margin-bottom: 1.3rem;
}
.aside-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255, 143, 171, 0.65);
  box-shadow: 0 0 18px rgba(255, 92, 147, 0.35);
  margin: 0 auto 0.6rem;
  display: block;
}
.aside-name { text-align: center; font-size: 1.05rem; font-weight: 500; color: var(--pink-deep); }
.aside-desc { text-align: center; font-size: 0.82rem; color: var(--text-2); margin-top: 0.3rem; }
.card-title {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--pink-deep);
  margin-bottom: 0.6rem;
  padding-left: 0.6rem;
  border-left: 3px solid var(--pink);
}
.recent-list { list-style: none; }
.recent-list li { padding: 0.3rem 0; border-bottom: 1px dashed rgba(212, 83, 126, 0.15); font-size: 0.85rem; }
.recent-list li:last-child { border-bottom: none; }
.recent-list a:hover { color: var(--pink); }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tag-chip {
  font-size: 0.78rem;
  padding: 0.2rem 0.7rem;
  border-radius: 12px;
  background: rgba(212, 83, 126, 0.1);
  color: var(--pink-deep);
}
.tag-chip:hover { background: rgba(255, 92, 147, 0.25); }
.info-list { list-style: none; font-size: 0.85rem; }
.info-list li { padding: 0.25rem 0; }

/* ---------- 文章页 ---------- */
.post-page, .archive-page {
  border-radius: var(--radius);
  padding: 1.2rem 1.4rem;
  margin-bottom: 1.5rem;
}
/* 普通页面：去毛玻璃背景框，直接透出背景 */
.post-page {
  background: transparent;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
/* 文章详情页：保留毛玻璃框 */
.post-glass {
  background: var(--glass);
  backdrop-filter: blur(14px) saturate(1.35);
  -webkit-backdrop-filter: blur(14px) saturate(1.35);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow);
}
.post-h1 { font-size: 1.5rem; font-weight: 500; color: var(--pink-deep); }
.post-header { margin-bottom: 1.2rem; border-bottom: 1px solid rgba(212, 83, 126, 0.15); padding-bottom: 1rem; }
.post-content { font-size: 0.95rem; }
.post-content h2 { font-size: 1.25rem; color: var(--pink-deep); margin: 1.4rem 0 0.6rem; }
.post-content h3 { font-size: 1.1rem; color: var(--pink-deep); margin: 1.2rem 0 0.5rem; }
.post-content p { margin: 0.7rem 0; }
.post-content img { max-width: 100%; border-radius: 10px; }
.post-content a { color: var(--pink); }
.post-content a:hover { text-decoration: underline; }
.post-content code {
  background: rgba(212, 83, 126, 0.1);
  color: var(--pink-deep);
  padding: 0.1rem 0.4rem;
  border-radius: 5px;
  font-size: 0.88em;
}
.post-content pre {
  background: #fff;
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  padding: 1rem;
  overflow-x: auto;
  margin: 0.9rem 0;
}
.post-content pre code { background: none; padding: 0; }
.post-content blockquote {
  border-left: 3px solid var(--pink);
  background: rgba(255, 233, 241, 0.4);
  padding: 0.6rem 1rem;
  margin: 0.9rem 0;
  border-radius: 0 10px 10px 0;
}
.post-content ul, .post-content ol { padding-left: 1.4rem; margin: 0.7rem 0; }
.post-nav { display: flex; justify-content: space-between; gap: 1rem; margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid rgba(212, 83, 126, 0.15); }
.post-nav-link { font-size: 0.85rem; color: var(--pink); }
.post-nav-link.right { margin-left: auto; }
.comment-card { margin-top: 1.5rem; }

/* ---------- 归档 ---------- */
.archive-title { font-size: 1.4rem; font-weight: 500; color: var(--pink-deep); margin-bottom: 1rem; }
.archive-year { font-size: 1.1rem; color: var(--pink); margin: 1rem 0 0.5rem; }
.archive-item { display: flex; gap: 0.8rem; align-items: baseline; padding: 0.35rem 0; font-size: 0.9rem; }
.archive-date { color: var(--text-2); font-size: 0.82rem; flex-shrink: 0; }
.archive-link:hover { color: var(--pink); }
.empty { text-align: center; color: var(--text-2); padding: 2rem 0; }

/* ---------- 音乐条（右上角，自研） ---------- */
.music-bar {
  position: fixed;
  top: 14px;           /* 与导航内"梦幻刀剑ol"站名平行 */
  right: 16px;
  z-index: 200;
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border: 1px solid var(--glass-border);
  border-radius: 22px;
  padding: 5px 12px 5px 8px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
}
.music-controls { display: flex; align-items: center; gap: 8px; }
.m-btn { 
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  position: relative;
  transition: all 0.2s;
}
/* 歌词开关按钮（♪ 文字版，独立样式，无 ::before 三角） */
.m-lyric {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1;
}
.m-lyric.on { background: rgba(255, 92, 147, 0.85); color: #fff; }
.m-lyric.on:hover { background: rgba(255, 92, 147, 0.95); }
.m-btn:hover { background: rgba(255, 92, 147, 0.25); }
.m-btn::before { content: ""; position: absolute; inset: 0; margin: auto; }
#mPrev::before {
  width: 0; height: 0;
  border-right: 9px solid var(--text);
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  right: 8px;
}
#mNext::before {
  width: 0; height: 0;
  border-left: 9px solid var(--text);
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  left: 8px;
}
#mPlay::before {
  width: 0; height: 0;
  border-left: 10px solid var(--text);
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
}
#mPlay.playing::before {
  width: 4px; height: 14px;
  border: none;
  border-left: 4px solid #fff;
  border-right: 4px solid #fff;
}
#mPlay.playing { background: rgba(255, 92, 147, 0.85); }
#mPlay.playing:hover { background: rgba(255, 92, 147, 0.95); }
.m-title {
  font-size: 0.78rem;
  color: var(--text);
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding-left: 4px;
}
/* 播放器宿主放屏幕外 */
.player-host {
  position: fixed;
  left: -9999px;
  top: 0;
  width: 400px;
}

/* ---------- 歌词条（canvas 绘制，顶部左上角） ---------- */
.lyric-bar {
  position: fixed;
  top: 14px;           /* 与导航内"梦幻刀剑ol"站名平行 */
  left: 16px;          /* 左上角，显示时覆盖站名位置 */
  z-index: 105;        /* 高于导航(100)，显示时不被遮挡 */
  width: 360px;
  height: 40px;
  /* 背景/文字都在 canvas 内绘制（ctx.fillRect/fillText），不触发 DOM 排版 */
  opacity: 0;
  pointer-events: none;
  /* 无 transition、无 backdrop-filter：用户环境对动态渲染敏感 */
}
.lyric-bar.show {
  opacity: 1;
  pointer-events: auto; /* 显示时可点击（重新加载歌词） */
  cursor: pointer;
}

/* ---------- 页脚 ---------- */
.site-footer {
  max-width: 1100px;
  margin: 1rem auto;
  padding: 1rem 1.2rem 1.5rem;
  text-align: center;
  color: var(--text-2);
  font-size: 0.82rem;
}
.footer-heart { color: var(--pink); }
.footer-icp { margin-top: 0.5rem; font-size: 0.75rem; }
.footer-icp a { color: var(--text-2); }
.footer-icp a:hover { color: var(--pink); }

/* ---------- 樱花 canvas ---------- */
#sakuraCanvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 60;
}
#rainCanvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 60;
}
@media (max-width: 768px) {
  .fx-switch { right: 3.6rem; }
  .fx-btn { width: 40px; height: 40px; font-size: 1rem; }
  .theme-btn { width: 40px; height: 40px; font-size: 1.1rem; }
}

/* ---------- 滚动条 ---------- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-thumb { background: rgba(255, 143, 171, 0.6); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 92, 147, 0.8); }

/* ---------- 相册 ---------- */
.album-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.2rem; }
.album-group {
  display: block;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.5);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}
.album-group:hover { transform: translateY(-4px); box-shadow: 0 10px 28px -6px rgba(255, 92, 147, 0.3); }
.album-group-cover { height: 150px; background-size: cover; background-position: center; }
.album-group-info { padding: 0.8rem 1rem; }
.album-group-name { font-size: 0.95rem; font-weight: 500; color: var(--pink-deep); }
.album-group-count { font-size: 0.78rem; color: var(--text-2); }

.album-detail { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.album-item { border-radius: 14px; overflow: hidden; border: 1px solid var(--glass-border); background: rgba(255, 255, 255, 0.5); }
.album-item-img-wrap { display: block; }
.album-item-img { width: 100%; height: 180px; object-fit: cover; display: block; }
.album-item-info { padding: 0.6rem 0.9rem; }
.album-item-content { font-size: 0.92rem; color: #4a2a38; font-weight: 500; }
.album-item-meta { font-size: 0.8rem; color: #96607a; }

/* ---------- 友链 ---------- */
.link-group-name { font-size: 1.05rem; font-weight: 500; color: var(--pink); margin: 1rem 0 0.6rem; }
.link-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.link-card {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.9rem 1rem;
  border-radius: 14px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.5);
  transition: all 0.25s;
}
.link-card:hover { transform: translateY(-3px); box-shadow: 0 8px 22px -6px rgba(255, 92, 147, 0.28); background: rgba(255, 255, 255, 0.7); }
.link-avatar { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255, 143, 171, 0.5); flex-shrink: 0; }
.link-info { display: flex; flex-direction: column; min-width: 0; }
.link-name { font-size: 0.92rem; font-weight: 500; color: var(--text); }
.link-desc { font-size: 0.78rem; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- 游戏频道卡片（对齐友链卡片样式） ---------- */
.game-entry {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-top: 1.6rem;      /* 下移，与上方友链分组分隔 */
  margin-bottom: 0.5rem;
  padding: 0.9rem 1rem;
  border-radius: 14px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.5);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.game-entry:hover { transform: translateY(-3px); box-shadow: 0 8px 22px -6px rgba(255, 92, 147, 0.28); background: rgba(255, 255, 255, 0.7); }
.game-entry .blackhole { width: 40px; height: 40px; flex-shrink: 0; }
.game-entry .blackhole::before { width: 54px; height: 12px; }
.game-entry-title { font-size: 1.1rem; font-weight: 500; color: var(--pink-deep); }
.game-entry-desc { font-size: 0.82rem; color: var(--text-2); }

/* ---------- 音乐馆大屏（左列表 + 右歌词） ---------- */
.music-page { margin-bottom: 1rem; }
.mpt-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.mpt-btn {
  padding: 0.45rem 1.1rem;
  border-radius: 16px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(12px) saturate(1.4);
  -webkit-backdrop-filter: blur(12px) saturate(1.4);
  font-size: 0.85rem;
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s;
}
.mpt-btn:hover { background: rgba(255, 92, 147, 0.25); color: var(--pink-deep); }
.mpt-btn.mpt-play { background: rgba(255, 92, 147, 0.3); color: var(--pink-deep); border-color: rgba(255, 92, 147, 0.4); font-weight: 500; }
.mpt-title {
  font-size: 0.9rem;
  color: var(--text);
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mpt-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}
.mpt-left, .mpt-right {
  border-radius: var(--radius);
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.65);
  padding: 1rem;
  min-height: 420px;
  max-height: 62vh;
  overflow-y: auto;
}
.mpt-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 0.8rem; }
.mpt-tag {
  font-size: 0.75rem;
  padding: 3px 11px;
  border-radius: 12px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.55);
  color: var(--text);
  border: 1px solid var(--glass-border);
  transition: all 0.2s;
}
.mpt-tag:hover { background: rgba(255, 143, 171, 0.25); color: var(--pink-deep); }
.mpt-list { list-style: none; max-height: 420px; overflow-y: auto; }
.mpt-item {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.5rem 0.7rem;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text);
}
.mpt-item:hover { background: rgba(255, 143, 171, 0.25); }
.mpt-item.active { background: rgba(255, 92, 147, 0.25); color: var(--pink-deep); }
.mpt-item-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mpt-item-artist { color: var(--text-2); font-size: 0.78rem; flex-shrink: 0; }
.mpt-lrc {
  position: relative;   /* offsetTop 参照此容器，保证滚动定位准确 */
  max-height: 420px;
  overflow-y: auto;
  text-align: center;
  /* 不用 flex 居中：flex+justify-content:center 的滚动容器 scrollTop 行为异常（歌词无法跟随滚动） */
  padding: 8px 0;
}
.mpt-lrc-line { font-size: 0.95rem; color: #e78aa8; opacity: 0.65; transition: all 0.3s; padding: 0.15rem 0; }
.mpt-lrc-line.active { color: #5CB85C; opacity: 1; font-size: 1.05rem; font-weight: 600; }
.mpt-nolrc { color: var(--text-2); font-size: 0.85rem; }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .layout-aside { order: 2; }
  .post-card { flex-direction: column; }
  .post-cover { width: 100%; height: 160px; }
  .music-bar { top: 8px; right: 8px; max-width: 210px; }
  .m-title { max-width: 90px; }
  .nav-menu { display: none; }
  .lyric-bar { left: 8px; width: calc(100vw - 16px); }
  /* ---- 移动端导航：汉堡按钮 + logo 让位 ---- */
  .site-nav .hamburger { display: flex; }
  .nav-logo { left: 3.4rem; }
  .nav-title { font-size: 0.95rem; }
}

/* ---------- 汉堡按钮（仅移动端显示） ---------- */
.hamburger {
  display: none;
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(12px) saturate(1.4);
  -webkit-backdrop-filter: blur(12px) saturate(1.4);
  cursor: pointer;
  z-index: 101;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.hamburger span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--pink-deep);
  transition: transform 0.25s, opacity 0.25s;
}
.hamburger.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- 移动端抽屉菜单 ---------- */
.mobile-menu {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 99;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  padding: 76px 1.2rem 2rem;
  overflow-y: auto;
  flex-direction: column;
}
.mobile-menu.open { display: flex; }
.mobile-menu-list { display: flex; flex-direction: column; gap: 0.6rem; }
.mobile-nav-link {
  display: block;
  text-align: center;
  font-size: 1.05rem;
  padding: 0.9rem 0;
  border-radius: 14px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid var(--glass-border);
  transition: all 0.2s;
}
.mobile-nav-link.active {
  background: rgba(255, 92, 147, 0.28);
  color: var(--pink-deep);
  border-color: rgba(255, 92, 147, 0.45);
}
.mobile-waifu-toggle {
  margin-top: 1rem;
  padding: 0.85rem 0;
  border-radius: 14px;
  font-size: 0.95rem;
  color: var(--text);
  background: rgba(255, 255, 255, 0.5);
  border: 1px dashed var(--glass-border);
  cursor: pointer;
  transition: all 0.2s;
}
.mobile-waifu-toggle.on { color: var(--pink-deep); border-color: rgba(255, 92, 147, 0.5); }

/* ============================================
   夜晚模式
   ============================================ */
[data-theme="dark"] {
  --pink: #ff85a2;
  --pink-deep: #ff8fab;
  --pink-light: #ffb7c5;
  --pink-pale: #3a2330;
  --purple: #9a8cf7;
  --text: #eadbe1;
  --text-2: #b0909f;
  --glass: rgba(30, 22, 32, 0.58);
  --glass-border: rgba(255, 143, 171, 0.14);
  --shadow: 0 4px 24px -6px rgba(0, 0, 0, 0.45);
  color-scheme: dark;
}
[data-theme="dark"] body { background: #1b1420; }
[data-theme="dark"] .bg-layer {
  background:
    linear-gradient(rgba(24, 14, 22, 0.55), rgba(24, 14, 22, 0.72)),
    url("/img/bg-main.jpg") center / cover no-repeat fixed;
}
[data-theme="dark"] .nav-link,
[data-theme="dark"] .nav-logo,
[data-theme="dark"] .theme-btn,
[data-theme="dark"] .m-btn,
[data-theme="dark"] .page-btn,
[data-theme="dark"] .mpt-tag,
[data-theme="dark"] .mpt-item,
[data-theme="dark"] .link-card,
[data-theme="dark"] .album-group,
[data-theme="dark"] .album-item,
[data-theme="dark"] .game-entry,
[data-theme="dark"] .tag-chip,
[data-theme="dark"] .post-tag {
  background: rgba(30, 22, 32, 0.5);
  border-color: rgba(255, 143, 171, 0.14);
  color: var(--text);
}
[data-theme="dark"] .music-bar,
[data-theme="dark"] .lyric-bar,
[data-theme="dark"] .mpt-left,
[data-theme="dark"] .mpt-right,
[data-theme="dark"] .hero,
[data-theme="dark"] .post-content blockquote {
  background: rgba(30, 22, 32, 0.55);
  border-color: rgba(255, 143, 171, 0.14);
  color: var(--text);
}
[data-theme="dark"] .post-content pre { background: rgba(20, 14, 22, 0.75); border-color: rgba(255, 143, 171, 0.14); }
[data-theme="dark"] .m-btn::before { border-color: var(--text); }
[data-theme="dark"] #mPlay.playing::before { border-color: #fff; }
/* 深色模式下迷你播放器按钮加粉色底色，更明显 */
[data-theme="dark"] .m-btn {
  background: rgba(255, 92, 147, 0.22);
  box-shadow: inset 0 0 0 1px rgba(255, 143, 171, 0.35);
}
[data-theme="dark"] .m-btn:hover { background: rgba(255, 92, 147, 0.42); }
[data-theme="dark"] .m-lyric.on { background: rgba(255, 92, 147, 0.85); color: #fff; box-shadow: none; }
[data-theme="dark"] .post-content code { background: rgba(255, 133, 162, 0.15); }
[data-theme="dark"] .recent-list li { border-color: rgba(255, 143, 171, 0.12); }
[data-theme="dark"] .album-item-content,
[data-theme="dark"] .works-header .sub,
[data-theme="dark"] .work-body h3,
[data-theme="dark"] .work-body .desc { color: #ffdce8; }

/* ============================================
   02 看板娘（右下角浮动立绘）
   ============================================ */
.waifu-wrap {
  position: fixed;
  left: 0;             /* 位置由 JS 巡逻控制 */
  bottom: 0;
  z-index: 95;
  width: 220px;
  pointer-events: none;
}
.waifu-02-img {
  width: 100%;
  display: block;
  pointer-events: auto;
  cursor: pointer;
  filter: drop-shadow(0 6px 16px rgba(255, 92, 147, 0.25));
  animation: waifu-breathe 4s ease-in-out infinite;
  transition: transform 0.18s ease;
  transform-origin: bottom center;
  will-change: transform;
}
.waifu-02-img:hover { transform: scale(1.03) translateY(-2px); }
.waifu-02-img.bounce { animation: waifu-bounce 0.5s ease; }
.waifu-02-img.walking { animation: none; transition: transform 0s, opacity 0.08s linear; } /* 走路：transform 无过渡防拖影，opacity 保留过渡用于交叉淡化 */
.waifu-02-img.waifu-fade { position: absolute; inset: 0; pointer-events: none; opacity: 0; } /* 交叉淡化覆盖层 */

@keyframes waifu-breathe {
  0%, 100% { transform: translateY(0) scale(1, 1); }
  50% { transform: translateY(-6px) scale(1.01, 0.99); }
}
@keyframes waifu-bounce {
  0% { transform: translateY(0) scale(1.1, 0.9); }
  30% { transform: translateY(-18px) scale(0.95, 1.05); }
  60% { transform: translateY(0) scale(1.05, 0.95); }
  100% { transform: translateY(0) scale(1, 1); }
}

.waifu-bubble {
  position: absolute;
  top: -64px;           /* 悬浮在人物头顶上方，不被头部遮挡 */
  left: 0;
  max-width: 200px;
  padding: 8px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--glass-border);
  font-size: 0.82rem;
  color: var(--pink-deep);
  box-shadow: 0 4px 12px rgba(255, 92, 147, 0.18);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px) scale(0.95);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.waifu-bubble.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.waifu-bubble::after {
  content: '';
  position: absolute;
  left: 24px;           /* 气泡尾巴指向人物头部 */
  bottom: -6px;
  width: 10px; height: 10px;
  background: rgba(255, 255, 255, 0.88);
  border-left: 1px solid var(--glass-border);
  border-bottom: 1px solid var(--glass-border);
  transform: rotate(-45deg);
}

@media (max-width: 768px) {
  .waifu-wrap { width: 110px; right: 8px; bottom: 8px; }
  /* 音乐馆：双栏改单栏（歌词放下方） */
  .mpt-body { grid-template-columns: 1fr; }
  .mpt-left, .mpt-right { min-height: 0; }
  .mpt-right { min-height: 240px; }
}

/* ---------- 资源下载页 ---------- */
.dl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1rem; }
.dl-card {
  display: flex; align-items: center; gap: 0.9rem;
  padding: 1rem 1.1rem; border-radius: 16px;
  background: rgba(255,255,255,0.55);
  border: 1px solid var(--glass-border);
  transition: transform .25s ease, box-shadow .25s ease;
}
.dl-card:hover { transform: translateY(-3px); box-shadow: 0 10px 26px -6px rgba(255,92,147,.3); }
.dl-icon {
  width: 46px; height: 46px; border-radius: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 1.4rem;
}
.dl-icon.file { background: linear-gradient(135deg, #ffd6e4, #ecccf7); }
.dl-icon.link { background: linear-gradient(135deg, #d6e8ff, #cce0f7); }
.dl-info { flex: 1; min-width: 0; }
.dl-name { font-size: .98rem; font-weight: 600; color: var(--text); margin: 0 0 .2rem; }
.dl-desc { font-size: .8rem; color: var(--text-2); margin: 0 0 .25rem; line-height: 1.5; }
.dl-meta { font-size: .74rem; color: #9a6b7f; word-break: break-all; }
.dl-btn {
  flex-shrink: 0; padding: .4rem .9rem; border-radius: 12px;
  background: rgba(255,92,147,.16); color: var(--pink-deep);
  font-size: .8rem; font-weight: 500;
}
.dl-card:hover .dl-btn { background: rgba(255,92,147,.3); }
[data-theme="dark"] .dl-card { background: rgba(40,20,30,.55); }
[data-theme="dark"] .dl-name { color: #ffdce8; }
[data-theme="dark"] .dl-meta { color: #c78fa6; }

/* ---------- Live2D 看板娘 + 切换按钮 ---------- */
.l2d-box {
  position: fixed;
  right: 14px;
  bottom: 0;
  z-index: 94;
  width: 230px;
  display: none;
  pointer-events: none;
}
.l2d-box canvas { width: 100%; display: block; pointer-events: auto; }
.waifu-switch {
  position: fixed;
  right: 16px;
  bottom: 8px;
  z-index: 98;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 6px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 92, 147, 0.35);
  box-shadow: 0 4px 14px rgba(255, 92, 147, 0.18);
}
.ws-btn {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #ff9ebc, #ff5c93);
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease;
}
.ws-btn:hover { transform: scale(1.1); box-shadow: 0 4px 12px rgba(255, 92, 147, .4); }
.ws-btn:active { transform: scale(0.94); }
.ws-name { font-size: .78rem; color: var(--pink-deep); max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
[data-theme="dark"] .waifu-switch { background: rgba(40, 20, 30, .6); }

/* ---------- 小屏（≤480px 手机）细节 ---------- */
@media (max-width: 480px) {
  .nav-logo { left: 3.3rem; padding: 0.25rem 0.7rem; }
  .blackhole { width: 18px; height: 18px; }
  .nav-title { font-size: 0.9rem; }
  .fx-switch { right: 3.3rem; gap: 4px; }
  .fx-btn { width: 38px; height: 38px; font-size: 0.95rem; }
  .theme-btn { width: 38px; height: 38px; font-size: 1rem; }
  .footer-inner { flex-direction: column; gap: 0.3rem; text-align: center; }
  .music-bar { max-width: 170px; }
  .m-title { max-width: 58px; font-size: 0.72rem; }
  .mpt-title { font-size: 1rem; }
  .mpt-item { font-size: 0.9rem; padding: 0.6rem 0.7rem; }
}

/* ---------- 移动端组件 · 暗色模式 ---------- */
[data-theme="dark"] .mobile-menu { background: rgba(27, 20, 32, 0.92); }
[data-theme="dark"] .mobile-nav-link,
[data-theme="dark"] .mobile-waifu-toggle { background: rgba(255, 255, 255, 0.06); }
[data-theme="dark"] .hamburger { background: rgba(255, 255, 255, 0.06); }

/* ---------- 移动端音乐条：改为左侧竖排（不挡顶部标题/特效按钮） ---------- */
@media (max-width: 900px) {
  .music-bar {
    top: 50%;
    left: 8px;
    right: auto;
    bottom: auto;
    transform: translateY(-50%);
    flex-direction: column;
    padding: 6px 4px;
    border-radius: 16px;
    max-width: 46px;
    max-height: none;
  }
  .music-controls { flex-direction: column; gap: 6px; }
  .music-bar .m-title { display: none; }
  .music-bar .m-lyric { display: none; }
  /* 歌词条是横向滚动 canvas，移动端竖放不可用 → 隐藏（歌词功能保留桌面端） */
  .lyric-bar { display: none; }
}

/* ---------- 页脚·公安网安备案 ---------- */
.footer-gongan {
  text-align: center;
  margin-top: 0.4rem;
  font-size: 0.82rem;
  color: var(--text-2);
}
.footer-gongan a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-2);
  transition: color 0.2s;
}
.footer-gongan a:hover { color: var(--pink-deep); }
.footer-gongan img {
  width: 18px;
  height: 18px;
  display: inline-block;
}
