/* ===== 全局重置 ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg-deep: #050510;
  --bg-mid: #0a0a25;
  --glass: rgba(12, 14, 35, 0.18);
  --glass-border: rgba(120, 160, 255, 0.15);
  --glass-hover: rgba(20, 25, 55, 0.7);
  --gold: #f0c87a;
  --cyan: #5ec8e8;
  --purple: #9d7cf0;
  --text: #e8eaf6;
  --text-dim: #a0a8c8;
  --text-faint: #6a7090;
  --radius: 16px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: var(--bg-deep);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.7;
}

/* ===== 全局深色滚动条：与星空主题统一，替换浏览器默认的白色滚动条 ===== */
html {
  scrollbar-width: thin;
  scrollbar-color: rgba(150, 140, 250, 0.5) transparent;
}
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(150, 140, 250, 0.45);
  border-radius: 8px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: rgba(150, 140, 250, 0.72); background-clip: padding-box; }
::-webkit-scrollbar-corner { background: transparent; }

/* ===== 星空背景 ===== */
#starfield {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ===== 全站背景图轮播（位于星空画布之下） ===== */
.bg-rotator {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: var(--bg-deep);
}
.bg-rotator .bg-layer {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.8s ease;
}
.bg-rotator .bg-layer.show {
  opacity: 1;
}

/* 内容遮罩层，保证文字可读 */
.content-wrap {
  position: relative;
  z-index: 1;
  min-height: 100vh;
}
.content-wrap::before {
  content: '';
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: radial-gradient(ellipse at 50% 0%, rgba(10, 10, 30, 0.22) 0%, rgba(5, 5, 16, 0.4) 100%);
  z-index: -1;
  pointer-events: none;
}

/* ===== 通用容器 ===== */
.container {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 20px;
}
.container-wide {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== 玻璃卡片 ===== */
.glass {
  background: var(--glass);
  backdrop-filter: blur(12px) saturate(1.2);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ===== 顶部黑色卡片导航栏（下滑收起 / 上滑出现） ===== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  margin: 0;
  padding: 12px 8px;
  background: rgba(8, 8, 14, 0.35);
  backdrop-filter: blur(20px) saturate(1.5);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  border: none;
  border-bottom: 1px solid rgba(120, 160, 255, 0.14);
  border-radius: 0;
  /* 景深：双层投影 + 顶部内高光，增强悬浮立体感 */
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55), 0 4px 14px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: transform .4s cubic-bezier(.4, 0, .2, 1), opacity .4s;
}
.navbar.navbar-hidden {
  transform: translateY(-105%);
  opacity: 0;
  pointer-events: none;
}
.navbar .container-wide,
.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.navbar .logo {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--gold);
  text-decoration: none;
  letter-spacing: 1px;
  white-space: nowrap;
}
.navbar .nav-links { display: flex; gap: 6px; align-items: center; }
.navbar .nav-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.92rem;
  padding: 7px 16px;
  border-radius: 12px;
  transition: color .25s, background .25s;
  position: relative;
}
.navbar .nav-links a:hover { color: var(--cyan); background: rgba(94, 200, 232, 0.08); }
.navbar .nav-links a.active {
  color: var(--gold);
  background: rgba(240, 200, 122, 0.1);
}
.navbar .nav-links a.nav-admin { padding: 7px 10px; opacity: 0.55; }
.navbar .nav-links a.nav-admin:hover { opacity: 1; }

/* ===== 入场动画 ===== */
@keyframes animUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
.anim-up { animation: animUp .6s cubic-bezier(.22, .9, .36, 1) both; }

/* ===== 首页双栏布局：左侧加宽列 + 右侧文章弹性占满 ===== */
.home-layout {
  display: grid;
  grid-template-columns: 432px minmax(0, 1fr);
  gap: 20px;
  padding-top: 28px;
  padding-bottom: 60px;
  align-items: start;
}
.home-layout.container-wide { max-width: 1450px; padding-left: 14px; padding-right: 14px; }

/* 左侧三卡竖排 */
.home-side {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

/* 个人信息卡（与云音乐播放器同色系） */
.profile-card {
  padding: 30px 26px 24px;
  background: linear-gradient(145deg, rgba(62, 56, 118, 0.38), rgba(26, 30, 70, 0.34));
  border: 1px solid rgba(150, 140, 250, 0.25);
  border-radius: 18px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
}
.profile-card.editable { cursor: pointer; transition: border-color .25s, box-shadow .25s; }
.profile-card.editable:hover {
  border-color: rgba(240, 200, 122, 0.45);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 24px rgba(240, 200, 122, 0.08);
}

/* 头像靠左，右侧自上而下：网名 / 简介 / 座右铭 */
.profile-top {
  display: flex;
  align-items: center;
  gap: 16px;
  text-align: left;
  margin-bottom: 16px;
}
.profile-info { flex: 1; min-width: 0; }
.avatar-ring {
  width: 98px; height: 98px;
  flex-shrink: 0;
  border-radius: 50%;
  padding: 3px;
  background: conic-gradient(var(--gold), var(--cyan), var(--purple), var(--gold));
  animation: ringSpin 8s linear infinite;
}
@keyframes ringSpin {
  to { transform: rotate(360deg); }
}
.avatar-ring .avatar,
.avatar-ring .avatar-fallback {
  width: 100%; height: 100%;
  border-radius: 50%;
  object-fit: cover;
  animation: ringSpin 8s linear infinite reverse; /* 抵消内容旋转 */
}
.avatar-ring .avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1a1a3e, #0d0d20);
  color: var(--gold);
  font-size: 1.8rem;
  font-weight: 700;
}
.p-name {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 5px;
  white-space: nowrap;
}
.p-name-text {
  font-size: 1.32rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--gold), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  overflow: hidden;
  text-overflow: ellipsis;
}
.p-bio { color: var(--text-dim); font-size: 0.88rem; line-height: 1.55; margin-bottom: 4px; }
.p-motto { color: var(--text-faint); font-size: 0.78rem; font-style: italic; }

/* 点赞爱心 + 打赏浮层 */
.like-btn {
  position: relative;
  flex-shrink: 0;
  margin-left: auto;      /* 推到名字行右侧；具体对齐“音乐”列由 JS 动态计算 margin-right */
  margin-right: 0;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: none;
  border: 0;
  padding: 2px;
  cursor: pointer;
  overflow: visible;
  -webkit-text-fill-color: initial; /* 脱离网名的渐变透明 */
}
.like-btn svg {
  width: 22px; height: 22px;
  fill: #b9c0dd;
  transition: transform .2s, fill .3s;
}
.like-btn:hover svg { transform: scale(1.15); }
.like-btn.liked svg { fill: #ff4d6d; animation: likePop .35s ease; }
@keyframes likePop { 0%{transform:scale(.7);} 50%{transform:scale(1.35);} 100%{transform:scale(1);} }
.like-count { font-size: .72rem; color: var(--text-dim); -webkit-text-fill-color: var(--text-dim); }

/* 飘心动画 */
.heart-float {
  position: absolute; top: 0; left: 12px;
  color: #ff4d6d; font-size: 14px; pointer-events: none;
  -webkit-text-fill-color: #ff4d6d;
  animation: heartFloat 1s ease-out forwards;
}
@keyframes heartFloat {
  0% { opacity: 1; transform: translateY(0) scale(.6); }
  100% { opacity: 0; transform: translateY(-36px) scale(1.35); }
}

/* 打赏浮层：默认隐藏；点过赞后悬停或刚点击时显示 */
.reward-pop {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(calc(-50% - 28px)) translateY(-6px);
  width: max-content;
  max-width: 300px;
  padding: 14px 14px 12px;
  background: rgba(16, 18, 40, .97);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  box-shadow: 0 14px 44px rgba(0, 0, 0, .55);
  text-align: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .25s, transform .25s, visibility .25s;
  z-index: 50;
}
.reward-pop::after {
  content: '';
  position: absolute; bottom: 100%; left: calc(50% + 28px);
  transform: translateX(-50%);
  border: 7px solid transparent;
  border-bottom-color: rgba(16, 18, 40, .97);
}
/* 透明桥：补上爱心与浮层之间的间隙，避免悬停闪隐 */
.reward-pop::before {
  content: '';
  position: absolute; bottom: 100%; left: 0; right: 0; height: 14px;
}
.like-btn.pop-on:hover .reward-pop {
  opacity: 1; visibility: visible; pointer-events: auto;
  transform: translateX(calc(-50% - 28px)) translateY(0);
}
.reward-text {
  color: var(--gold);
  -webkit-text-fill-color: var(--gold);
  font-size: .8rem; line-height: 1.5; margin-bottom: 10px;
  white-space: normal;
}
.reward-qr-wrap { display: flex; gap: 8px; justify-content: center; }
.reward-qr {
  width: 115px; height: 115px; object-fit: contain;
  border-radius: 8px; background: #fff;
  padding: 4px;
  flex: 0 0 auto;
}
.reward-empty {
  color: var(--text-faint);
  -webkit-text-fill-color: var(--text-faint);
  font-size: .76rem; padding: 16px 0;
}
.p-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  width: 100%;
  padding-top: 14px;
  border-top: 1px solid rgba(150, 140, 250, 0.2);
}
.p-stat { display: flex; flex-direction: column; align-items: center; gap: 1px; }
.p-stat b { color: var(--cyan); font-size: 1.12rem; }
.p-stat span { color: var(--text-faint); font-size: 0.74rem; }

/* 云音乐款播放器卡片 */
.cloud-player {
  position: relative;
  width: 100%;
  padding: 28px 24px 26px;
  text-align: left;
  background: linear-gradient(145deg, rgba(62, 56, 118, 0.38), rgba(26, 30, 70, 0.34));
  border: 1px solid rgba(150, 140, 250, 0.25);
  border-radius: 18px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
}
.cp-top {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 6px;
}
.cp-disc {
  width: 82px; height: 82px;
  flex-shrink: 0;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
  border: 3px solid rgba(255, 255, 255, 0.18);
  background: radial-gradient(circle at center, #555 16%, #151520 17%, #2a2a3a 60%);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  animation: discSpin 12s linear infinite;
  animation-play-state: paused;
}
.cp-disc img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cp-cover-fb {
  position: absolute; inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--gold);
}
.cp-disc.spinning { animation-play-state: running; }
.cp-meta { flex: 1; min-width: 0; }
.cp-badge {
  display: inline-block;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 2.5px;
  color: #b0a5ff;
  border: 1px solid rgba(160, 150, 255, 0.55);
  background: rgba(150, 140, 255, 0.12);
  padding: 2px 9px;
  border-radius: 6px;
  margin-bottom: 6px;
}
.cp-title {
  font-size: 1.02rem;
  color: var(--text);
  margin: 0 0 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cp-artist {
  font-size: 0.78rem;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cp-progress-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0 14px;
}
.cp-time {
  font-size: 0.7rem;
  color: var(--text-faint);
  min-width: 30px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.cp-progress {
  flex: 1;
  height: 6px;
  border-radius: 6px;
  background: rgba(140, 150, 230, 0.22);
  cursor: pointer;
}
.cp-bar {
  position: relative;
  height: 100%;
  width: 0;
  border-radius: 6px;
  background: linear-gradient(90deg, #9c8bf5, #6a7df0);
  transition: width .2s linear;
}
.cp-dot {
  position: absolute;
  right: -5px; top: 50%;
  transform: translateY(-50%);
  width: 12px; height: 12px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 8px rgba(150, 130, 250, 0.9);
}
.cp-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
}
.cp-btn {
  width: 42px; height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(150, 140, 250, 0.1);
  border: 1px solid rgba(150, 140, 250, 0.22);
  border-radius: 50%;
  color: var(--text-dim);
  cursor: pointer;
  transition: color .2s, transform .2s, background .2s;
  padding: 0;
}
.cp-btn svg { display: block; }
.cp-btn:hover { color: var(--text); background: rgba(150, 140, 250, 0.22); transform: scale(1.1); }
.cp-play {
  width: 54px; height: 54px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #9c8bf5, #6a5ae0);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 22px rgba(120, 100, 240, 0.5);
}
.cp-play:hover { color: #fff; background: linear-gradient(135deg, #a99af7, #7767e6); transform: scale(1.08); }

/* ===== 英雄区 ===== */
.hero {
  text-align: center;
  padding: 80px 20px 50px;
}
.hero h1 {
  font-size: 2.6rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--gold), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 12px;
  letter-spacing: 2px;
}
.hero p {
  color: var(--text-dim);
  font-size: 1.05rem;
  max-width: 500px;
  margin: 0 auto;
}

/* ===== 文章卡片列表（横向：左封面 + 右正文） ===== */
.article-list { display: flex; flex-direction: column; gap: 18px; }
.article-card {
  position: relative;
  padding: 0;
  transition: transform .25s, background .25s, border-color .25s, box-shadow .25s;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
  overflow: hidden;
}
.article-card:hover {
  transform: translateY(-3px);
  background: var(--glass-hover);
  border-color: rgba(120, 160, 255, 0.3);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 24px rgba(94, 200, 232, 0.06);
}
.article-card-inner {
  display: flex;
  gap: 20px;
  padding: 20px;
  align-items: stretch;
}
.article-card .cover {
  width: 200px;
  min-height: 130px;
  height: auto;
  flex-shrink: 0;
  object-fit: cover;
  border-radius: 10px;
  transition: transform .4s;
}
.article-card:hover .cover { transform: scale(1.03); }
.article-card .cover-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(30, 30, 70, 0.6), rgba(10, 10, 30, 0.6));
  color: var(--gold);
  font-size: 2rem;
}
.article-card-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.article-card h2 {
  font-size: 1.25rem;
  margin-bottom: 8px;
  color: var(--text);
}
.article-card .summary {
  color: var(--text-dim);
  font-size: 0.9rem;
  margin-bottom: 12px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.article-card .meta {
  display: flex;
  gap: 14px;
  font-size: 0.8rem;
  color: var(--text-faint);
  align-items: center;
  flex-wrap: wrap;
}
.article-card .meta .tag {
  background: rgba(94, 200, 232, 0.12);
  color: var(--cyan);
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
}

/* 卡片右上角编辑按钮（管理员可见） */
.card-edit {
  position: absolute;
  top: 10px; right: 10px;
  z-index: 5;
  width: 30px; height: 30px;
  border-radius: 8px;
  border: 1px solid rgba(240, 200, 122, 0.35);
  background: rgba(10, 10, 25, 0.75);
  color: var(--gold);
  cursor: pointer;
  font-size: 0.85rem;
  opacity: 0;
  transition: opacity .2s, transform .2s;
}
.article-card:hover .card-edit,
.project-card:hover .card-edit,
.photo-item:hover .card-edit,
.track-item:hover .card-edit { opacity: 1; }
.card-edit:hover { transform: scale(1.12); background: rgba(240, 200, 122, 0.2); }

/* ===== 文章详情页 ===== */
.article-detail { padding: 50px 0 60px; }
.article-detail h1 {
  font-size: 2rem;
  margin-bottom: 12px;
  line-height: 1.4;
}
.article-detail .article-meta {
  color: var(--text-faint);
  font-size: 0.85rem;
  margin-bottom: 30px;
  display: flex;
  gap: 16px;
  align-items: center;
  border-bottom: 1px solid var(--glass-border);
  padding-bottom: 20px;
}
.article-detail .article-cover {
  width: 100%;
  max-height: 360px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 30px;
}
.article-detail .article-body,
.article-reader .article-body {
  font-size: 1.02rem;
  line-height: 1.9;
}
.article-detail .article-body h2, .article-reader .article-body h2 { margin: 1.5em 0 .6em; color: var(--gold); }
.article-detail .article-body h3, .article-reader .article-body h3 { margin: 1.3em 0 .5em; color: var(--cyan); }
.article-detail .article-body p, .article-reader .article-body p { margin-bottom: 1em; }
.article-detail .article-body img, .article-reader .article-body img { max-width: 100%; border-radius: 10px; margin: 1em 0; }
.article-detail .article-body blockquote,
.article-reader .article-body blockquote {
  border-left: 3px solid var(--purple);
  padding: 10px 20px;
  margin: 1em 0;
  background: rgba(157, 124, 240, 0.08);
  border-radius: 0 8px 8px 0;
  color: var(--text-dim);
  font-style: italic;
}
.article-detail .article-body pre,
.article-reader .article-body pre {
  background: rgba(0,0,0,0.4);
  padding: 16px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 1em 0;
  font-size: 0.88rem;
}
.article-detail .article-body a, .article-reader .article-body a { color: var(--cyan); }
.article-detail .article-body video, .article-reader .article-body video { max-width: 100%; border-radius: 10px; margin: 1em 0; }

/* ===== 首页内嵌文章阅读器（游客点卡片原位展开） ===== */
.article-reader {
  background: var(--glass);
  backdrop-filter: blur(12px) saturate(1.2);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px 28px 36px;
}
.article-reader.open { animation: readerOpen .45s cubic-bezier(.32, .72, .28, 1); }
@keyframes readerOpen {
  from { opacity: 0; transform: translateY(-16px); }
  to { opacity: 1; transform: translateY(0); }
}
.reader-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 18px;
  padding: 7px 16px;
  border-radius: 20px;
  border: 1px solid var(--glass-border);
  background: rgba(150, 140, 250, 0.1);
  color: var(--text-dim);
  cursor: pointer;
  font-size: 0.85rem;
  font-family: inherit;
  transition: background .2s, color .2s, transform .2s;
}
.reader-back:hover {
  background: rgba(150, 140, 250, 0.24);
  color: var(--text);
  transform: translateX(-3px);
}
.article-reader h1 {
  color: var(--text);
  font-size: 1.5rem;
  line-height: 1.4;
  margin-bottom: 10px;
}
.article-reader .article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  color: var(--text-faint);
  font-size: 0.8rem;
  margin-bottom: 18px;
}
.article-reader .article-cover {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 18px;
}

/* ===== 评论系统 ===== */
.comments-section { padding: 20px 30px 30px; margin-top: 30px; }
.comments-section h3 {
  font-size: 1.15rem;
  margin-bottom: 20px;
  color: var(--gold);
}
.comment-form { margin-bottom: 24px; }
.comment-form input,
.comment-form textarea {
  width: 100%;
  padding: 12px 16px;
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  color: var(--text);
  font-size: 0.92rem;
  font-family: inherit;
  margin-bottom: 10px;
  transition: border-color .2s;
}
.comment-form input:focus,
.comment-form textarea:focus {
  outline: none;
  border-color: var(--cyan);
}
.comment-form textarea { min-height: 80px; resize: vertical; }
.comment-list .comment-item {
  padding: 14px 0;
  border-bottom: 1px solid rgba(120, 160, 255, 0.08);
}
.comment-item .comment-head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
}
.comment-item .comment-name {
  color: var(--cyan);
  font-weight: 600;
  font-size: 0.9rem;
}
.comment-item .comment-time {
  color: var(--text-faint);
  font-size: 0.78rem;
}
.comment-item .comment-text {
  color: var(--text-dim);
  font-size: 0.92rem;
  word-break: break-word;
}

/* 评论删除按钮（管理员可见） */
.comment-del {
  margin-left: 10px;
  padding: 1px 8px;
  font-size: 0.72rem;
  color: #ff7a7a;
  background: rgba(240, 100, 100, 0.12);
  border: 1px solid rgba(240, 100, 100, 0.3);
  border-radius: 6px;
  cursor: pointer;
  transition: background .2s;
}
.comment-del:hover { background: rgba(240, 100, 100, 0.25); }

/* ===== 按钮 ===== */
.btn {
  display: inline-block;
  padding: 10px 24px;
  border: none;
  border-radius: 10px;
  font-size: 0.92rem;
  font-family: inherit;
  cursor: pointer;
  transition: all .2s;
  text-decoration: none;
  color: var(--text);
}
.btn-primary {
  background: linear-gradient(135deg, var(--gold), #d4a44e);
  color: #1a1a2e;
  font-weight: 600;
}
.btn-primary:hover { opacity: 0.9; transform: translateY(-1px); }
.btn-ghost {
  background: rgba(94, 200, 232, 0.1);
  border: 1px solid rgba(94, 200, 232, 0.3);
  color: var(--cyan);
}
.btn-ghost:hover { background: rgba(94, 200, 232, 0.2); }
.btn-danger {
  background: rgba(240, 100, 100, 0.15);
  border: 1px solid rgba(240, 100, 100, 0.3);
  color: #ff7a7a;
}
.btn-danger:hover { background: rgba(240, 100, 100, 0.25); }
.btn-sm { padding: 6px 14px; font-size: 0.82rem; }

/* ===== 背景音乐播放器（左下角，右下角留给木鱼） ===== */
.bgm-player {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: rgba(10, 10, 30, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 40px;
  box-shadow: var(--shadow);
  transition: all .3s;
}
.bgm-player .bgm-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--gold), var(--cyan));
  color: #050510;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .2s;
}
.bgm-player .bgm-btn:hover { transform: scale(1.1); }
.bgm-player .bgm-volume {
  -webkit-appearance: none;
  appearance: none;
  width: 70px;
  height: 4px;
  border-radius: 4px;
  background: rgba(120, 160, 255, 0.25);
  outline: none;
  cursor: pointer;
}
.bgm-player .bgm-volume::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--cyan);
  cursor: pointer;
  transition: transform .15s;
}
.bgm-player .bgm-volume::-webkit-slider-thumb:hover { transform: scale(1.3); }
.bgm-player .bgm-volume::-moz-range-thumb {
  width: 12px; height: 12px;
  border: none;
  border-radius: 50%;
  background: var(--cyan);
  cursor: pointer;
}
.bgm-player .bgm-label {
  font-size: 0.8rem;
  color: var(--text-dim);
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bgm-player.playing .bgm-btn { animation: bgmPulse 2s infinite; }
@keyframes bgmPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(240, 200, 122, 0.4); }
  50% { box-shadow: 0 0 0 8px rgba(240, 200, 122, 0); }
}

/* ===== 管理后台 ===== */
.admin-page { padding: 40px 0 60px; }
.admin-page h1 { color: var(--gold); margin-bottom: 24px; font-size: 1.6rem; }
.login-box {
  max-width: 380px;
  margin: 80px auto;
  padding: 40px 36px;
  text-align: center;
}
.login-box h2 {
  color: var(--gold);
  margin-bottom: 8px;
  font-size: 1.5rem;
}
.login-box .subtitle {
  color: var(--text-faint);
  font-size: 0.85rem;
  margin-bottom: 28px;
}
.login-box input {
  width: 100%;
  padding: 12px 16px;
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  color: var(--text);
  font-size: 0.95rem;
  margin-bottom: 14px;
  font-family: inherit;
}
.login-box input:focus { outline: none; border-color: var(--cyan); }
.login-box .btn { width: 100%; margin-top: 6px; }
.login-error {
  color: #ff7a7a;
  font-size: 0.85rem;
  margin-top: 10px;
  min-height: 20px;
}

/* 管理仪表盘 */
.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.admin-tabs { display: flex; gap: 8px; margin-bottom: 24px; }
.admin-tab {
  padding: 8px 18px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text-dim);
  border: 1px solid transparent;
  transition: all .2s;
}
.admin-tab.active {
  background: rgba(94, 200, 232, 0.12);
  color: var(--cyan);
  border-color: rgba(94, 200, 232, 0.3);
}
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th, .admin-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--glass-border);
  font-size: 0.9rem;
}
.admin-table th { color: var(--text-faint); font-weight: 600; }
.admin-table td { color: var(--text-dim); }
.admin-table .actions { display: flex; gap: 8px; }

/* 编辑器 */
.editor-page { padding: 30px 0 60px; }
.field { margin-bottom: 20px; }
.field label {
  display: block;
  margin-bottom: 6px;
  color: var(--text-dim);
  font-size: 0.88rem;
}
.field input[type=text],
.field input[type=password] {
  width: 100%;
  padding: 10px 14px;
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
}
.field input[type=text]:focus,
.field input[type=password]:focus { outline: none; border-color: var(--cyan); }
.field-row { display: flex; gap: 10px; align-items: center; }
.field-row input[type=text] { flex: 1; }
.cover-preview {
  margin-top: 10px;
  max-width: 260px;
  max-height: 140px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--glass-border);
}
.editor-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

/* ===== 自研富文本编辑器 ===== */
.rte {
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  overflow: hidden;
  background: rgba(0,0,0,0.3);
}
.rte-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  padding: 8px 10px;
  background: rgba(10, 12, 35, 0.8);
  border-bottom: 1px solid var(--glass-border);
}
.rte-toolbar button {
  min-width: 30px;
  height: 30px;
  padding: 0 7px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--text-dim);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all .15s;
}
.rte-toolbar button:hover {
  background: rgba(94, 200, 232, 0.12);
  color: var(--cyan);
}
.rte-toolbar button.active {
  background: rgba(94, 200, 232, 0.2);
  color: var(--cyan);
  border-color: rgba(94, 200, 232, 0.4);
}
.rte-toolbar select {
  height: 30px;
  padding: 0 6px;
  background: rgba(0,0,0,0.4);
  border: 1px solid var(--glass-border);
  border-radius: 6px;
  color: var(--text-dim);
  font-size: 0.82rem;
  cursor: pointer;
}
.rte-toolbar input[type=color] {
  width: 30px; height: 30px;
  padding: 3px;
  background: transparent;
  border: 1px solid var(--glass-border);
  border-radius: 6px;
  cursor: pointer;
}
.rte-sep {
  width: 1px;
  height: 20px;
  background: var(--glass-border);
  margin: 0 4px;
}
.rte-progress {
  margin-left: auto;
  font-size: 0.78rem;
  color: var(--gold);
}
.rte-body {
  min-height: 320px;
  max-height: 560px;
  overflow-y: auto;
  padding: 16px 18px;
  color: var(--text);
  font-size: 0.98rem;
  line-height: 1.8;
  outline: none;
}
.rte-body h2 { color: var(--gold); margin: 0.8em 0 0.4em; }
.rte-body h3 { color: var(--cyan); margin: 0.7em 0 0.35em; }
.rte-body p { margin-bottom: 0.6em; }
.rte-body img, .rte-body video { max-width: 100%; border-radius: 8px; margin: 6px 0; }
.rte-body blockquote {
  border-left: 3px solid var(--purple);
  padding: 6px 14px;
  margin: 0.6em 0;
  background: rgba(157, 124, 240, 0.08);
  color: var(--text-dim);
}
.rte-body pre {
  background: rgba(0,0,0,0.5);
  padding: 12px;
  border-radius: 8px;
  overflow-x: auto;
  font-size: 0.86rem;
}
.rte-body a { color: var(--cyan); }
.rte-source {
  width: 100%;
  min-height: 320px;
  padding: 16px 18px;
  background: rgba(0,0,0,0.5);
  border: none;
  color: #9ecbff;
  font-family: Consolas, Monaco, monospace;
  font-size: 0.85rem;
  line-height: 1.6;
  resize: vertical;
  outline: none;
}

/* ===== Toast 提示 ===== */
#toast-box {
  position: fixed;
  top: 70px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
}
.toast {
  padding: 10px 22px;
  border-radius: 10px;
  font-size: 0.88rem;
  background: rgba(15, 18, 40, 0.92);
  border: 1px solid var(--glass-border);
  color: var(--text);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity .3s, transform .3s;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast-success { border-color: rgba(110, 220, 150, 0.4); color: #8fe8b0; }
.toast-error { border-color: rgba(240, 100, 100, 0.4); color: #ff9a9a; }

/* 空状态 */
.empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-faint);
}
.empty .icon { font-size: 2.5rem; margin-bottom: 12px; }

/* 加载 */
.loading { text-align: center; padding: 40px; color: var(--text-faint); }

/* ===== 空间页通用 ===== */
.space-page { padding: 40px 0 70px; }
.space-hero { text-align: center; margin-bottom: 40px; }
.space-hero h1 {
  font-size: 2.1rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--gold), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 10px;
  letter-spacing: 2px;
}
.space-hero p { color: var(--text-dim); font-size: 0.95rem; }

/* ===== 项目网格 ===== */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 22px;
}
.project-card {
  position: relative;
  overflow: hidden;
  transition: transform .3s, border-color .3s, box-shadow .3s;
}
.project-card:hover {
  transform: translateY(-6px);
  border-color: rgba(120, 160, 255, 0.35);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55), 0 0 30px rgba(157, 124, 240, 0.08);
}
.project-cover {
  height: 160px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(30, 30, 70, 0.5), rgba(10, 10, 30, 0.5));
}
.project-cover img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s;
}
.project-card:hover .project-cover img { transform: scale(1.08); }
.project-cover-fb {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.4rem;
  opacity: 0.7;
}
.project-body { padding: 20px 22px 22px; }
.project-body h3 { color: var(--text); font-size: 1.15rem; margin-bottom: 8px; }
.project-body p { color: var(--text-dim); font-size: 0.88rem; margin-bottom: 14px; min-height: 40px; }
.project-stack { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.project-stack .tag {
  background: rgba(157, 124, 240, 0.12);
  color: var(--purple);
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 0.74rem;
}
.project-link { display: inline-block; }

/* ===== 照片墙（瀑布流） ===== */
.photo-wall { columns: 3 260px; column-gap: 18px; }
.photo-item {
  position: relative;
  break-inside: avoid;
  margin-bottom: 18px;
  border-radius: 14px;
  overflow: hidden;
  cursor: zoom-in;
  border: 1px solid var(--glass-border);
  background: rgba(12, 14, 35, 0.4);
  transition: transform .3s, box-shadow .3s;
}
.photo-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.55);
}
.photo-item img {
  width: 100%;
  display: block;
  transition: transform .5s;
}
.photo-item:hover img { transform: scale(1.04); }
.photo-item figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 24px 14px 10px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
  color: var(--text);
  font-size: 0.82rem;
  opacity: 0;
  transition: opacity .3s;
}
.photo-item:hover figcaption { opacity: 1; }
.photo-item figcaption span { color: var(--text-dim); }

/* 灯箱 */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(3, 3, 10, 0.92);
  backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
}
.lightbox.open { opacity: 1; pointer-events: auto; }
.lightbox img {
  max-width: 92vw;
  max-height: 84vh;
  border-radius: 10px;
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.8);
  transform: scale(0.94);
  transition: transform .3s;
}
.lightbox.open img { transform: scale(1); }
.lightbox-caption { color: var(--text-dim); margin-top: 14px; font-size: 0.9rem; }
.lightbox-close {
  position: absolute;
  top: 20px; right: 26px;
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  background: rgba(20, 20, 45, 0.7);
  color: var(--text);
  font-size: 1.1rem;
  cursor: pointer;
  transition: transform .2s;
}
.lightbox-close:hover { transform: rotate(90deg); }

/* ===== 星际电台 ===== */
.now-playing {
  display: flex;
  gap: 24px;
  align-items: center;
  padding: 24px 28px;
  margin-bottom: 28px;
}
.np-disc {
  position: relative;
  width: 110px; height: 110px;
  flex-shrink: 0;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid rgba(255, 255, 255, 0.08);
  background: radial-gradient(circle at center, #333 18%, #111 19%, #222 60%);
}
.np-disc img, .np-cover-fb {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.np-cover-fb {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--gold);
}
.np-disc.spinning { animation: discSpin 12s linear infinite; }
@keyframes discSpin { to { transform: rotate(360deg); } }
.np-info { flex: 1; min-width: 0; }
.np-info h3 { color: var(--text); font-size: 1.2rem; margin-bottom: 4px; }
.np-info p { color: var(--text-faint); font-size: 0.85rem; margin-bottom: 14px; }
.np-progress {
  height: 6px;
  border-radius: 6px;
  background: rgba(120, 160, 255, 0.15);
  cursor: pointer;
  overflow: hidden;
}
.np-bar {
  height: 100%;
  width: 0;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--gold), var(--cyan));
  transition: width .2s linear;
}
.np-times {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-faint);
  margin-top: 6px;
}

.track-list { display: flex; flex-direction: column; gap: 12px; }
.track-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 18px;
  cursor: pointer;
  transition: transform .25s, background .25s, border-color .25s;
}
.track-item:hover {
  transform: translateX(4px);
  background: var(--glass-hover);
  border-color: rgba(120, 160, 255, 0.3);
}
.track-item.playing { border-color: rgba(240, 200, 122, 0.45); }
.track-play {
  width: 38px; height: 38px;
  flex-shrink: 0;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--gold), var(--cyan));
  color: #050510;
  cursor: pointer;
  font-size: 0.85rem;
}
.track-cover {
  width: 44px; height: 44px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
}
.track-cover img { width: 100%; height: 100%; object-fit: cover; }
.track-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.track-meta b { color: var(--text); font-size: 0.95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track-meta span { color: var(--text-faint); font-size: 0.78rem; }
.track-wave { display: none; gap: 3px; align-items: flex-end; height: 18px; margin-right: 30px; }
.track-item.playing .track-wave { display: flex; }
.track-wave i {
  width: 3px;
  background: var(--cyan);
  border-radius: 2px;
  animation: wave 0.9s ease-in-out infinite;
}
.track-wave i:nth-child(1) { height: 40%; animation-delay: 0s; }
.track-wave i:nth-child(2) { height: 90%; animation-delay: .2s; }
.track-wave i:nth-child(3) { height: 60%; animation-delay: .4s; }
.track-wave i:nth-child(4) { height: 80%; animation-delay: .1s; }
@keyframes wave {
  0%, 100% { transform: scaleY(0.4); }
  50% { transform: scaleY(1); }
}

/* ===== 后台照片管理网格 ===== */
.admin-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}
.admin-photo-item { padding: 12px; }
.admin-photo-item img {
  width: 100%;
  height: 130px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 8px;
}
.admin-photo-item input {
  width: 100%;
  padding: 6px 10px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.8rem;
  margin-bottom: 6px;
  font-family: inherit;
}
.admin-photo-item .actions { display: flex; gap: 6px; }

/* ===== 星空留言板（独立卡片） ===== */
.guestbook {
  width: 100%;
  padding: 28px 24px 22px;
  border-radius: 18px;
  text-align: left;
  background: linear-gradient(145deg, rgba(62, 56, 118, 0.38), rgba(26, 30, 70, 0.34));
  border: 1px solid rgba(150, 140, 250, 0.25);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
}
.gb-title {
  color: var(--gold);
  font-size: 0.95rem;
  margin-bottom: 14px;
  letter-spacing: 1px;
}
.gb-form input,
.gb-form textarea {
  width: 100%;
  padding: 9px 12px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  color: var(--text);
  font-size: 0.84rem;
  font-family: inherit;
  margin-bottom: 8px;
  transition: border-color .2s;
}
.gb-form input:focus,
.gb-form textarea:focus { outline: none; border-color: var(--cyan); }
.gb-form textarea { min-height: 60px; resize: vertical; }
.gb-form .btn { width: 100%; }
.gb-list {
  margin-top: 12px;
  max-height: 340px;
  overflow-y: auto;
}
.gb-item {
  padding: 10px 2px;
  border-top: 1px solid rgba(120, 160, 255, 0.08);
  animation: animUp .4s ease both;
}
.gb-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.gb-name {
  color: var(--cyan);
  font-weight: 600;
  font-size: 0.8rem;
  max-width: 45%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gb-time { color: var(--text-faint); font-size: 0.68rem; flex: 1; }
.gb-del {
  border: none;
  background: transparent;
  color: #ff7a7a;
  cursor: pointer;
  font-size: 0.75rem;
  opacity: 0.5;
  transition: opacity .2s;
}
.gb-del:hover { opacity: 1; }
.gb-text {
  color: var(--text-dim);
  font-size: 0.82rem;
  line-height: 1.6;
  word-break: break-word;
}
.gb-empty { color: var(--text-faint); font-size: 0.8rem; padding: 10px 2px; }

/* ===== 卡片就地放大编辑（card-editor） ===== */
.editable { cursor: pointer; }
.ce-src-hidden { visibility: hidden; }
.ce-overlay {
  position: fixed;
  inset: 0;
  z-index: 600;
  background: rgba(3, 3, 12, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity .42s;
}
.ce-overlay.show { opacity: 1; }
.ce-panel {
  position: fixed;
  z-index: 601;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  opacity: 0.92;
  background: rgba(14, 16, 40, 0.92);
}
.ce-panel.open { opacity: 1; }
.ce-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 22px 12px;
  border-bottom: 1px solid var(--glass-border);
  flex-shrink: 0;
}
.ce-head h3 { color: var(--gold); font-size: 1.02rem; }
.ce-head-right { display: flex; align-items: center; gap: 10px; }
.ce-hint { color: var(--text-faint); font-size: 0.72rem; white-space: nowrap; }
.ce-close {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border-radius: 8px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-dim);
  cursor: pointer;
  font-size: 0.9rem;
  line-height: 1;
  transition: all .2s;
}
.ce-close:hover { background: rgba(255, 90, 90, 0.16); color: #ff7a7a; border-color: rgba(255, 90, 90, 0.4); }
.ce-file-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-dim);
  font-size: 0.82rem;
  align-self: center;
}
.ce-file-upload {
  padding: 0 14px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(94, 200, 232, 0.3);
  background: rgba(94, 200, 232, 0.1);
  color: var(--cyan);
  cursor: pointer;
  font-size: 0.8rem;
  white-space: nowrap;
}
.ce-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 22px;
  opacity: 0;
  transition: opacity .3s .18s;
}
.ce-panel.open .ce-body { opacity: 1; }
.ce-field { margin-bottom: 14px; }
.ce-field label {
  display: block;
  color: var(--text-dim);
  font-size: 0.8rem;
  margin-bottom: 5px;
}
.ce-field input[type=text],
.ce-field textarea {
  width: 100%;
  padding: 9px 12px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  color: var(--text);
  font-size: 0.88rem;
  font-family: inherit;
}
.ce-field input:focus,
.ce-field textarea:focus,
.ce-richtext:focus { outline: none; border-color: var(--cyan); }
.ce-field textarea { min-height: 70px; resize: vertical; line-height: 1.6; }
/* 大号文本框：如学习页答案输入，放大更便于编辑长文本 */
.ce-field textarea.ce-textarea-lg { min-height: 220px; font-size: 0.98rem; line-height: 1.75; }
.ce-row { display: flex; gap: 8px; }
.ce-row input { flex: 1; }
.ce-upload {
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid rgba(94, 200, 232, 0.3);
  background: rgba(94, 200, 232, 0.1);
  color: var(--cyan);
  cursor: pointer;
  font-size: 0.8rem;
  white-space: nowrap;
}
/* 图片/文件字段的移除按钮 */
.ce-clear, .ce-file-clear {
  flex: 0 0 auto;
  width: 34px;
  border-radius: 10px;
  border: 1px solid rgba(240, 100, 100, 0.3);
  background: rgba(240, 100, 100, 0.08);
  color: #e88;
  cursor: pointer;
  font-size: 0.8rem;
}
.ce-clear:hover, .ce-file-clear:hover { background: rgba(240, 100, 100, 0.18); }
.ce-img-preview {
  margin-top: 8px;
  max-width: 180px;
  max-height: 100px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--glass-border);
}
.ce-static-img { text-align: center; }
.ce-static-img img {
  max-width: 100%;
  max-height: 220px;
  border-radius: 10px;
}
.ce-rte-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  padding: 6px 8px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--glass-border);
  border-bottom: none;
  border-radius: 10px 10px 0 0;
}
.ce-rte-bar button {
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 0.8rem;
}
.ce-rte-bar button:hover { background: rgba(94, 200, 232, 0.12); color: var(--cyan); }
.ce-progress { margin-left: auto; font-size: 0.72rem; color: var(--gold); }
.ce-richtext {
  min-height: 180px;
  max-height: 320px;
  overflow-y: auto;
  padding: 12px 14px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--glass-border);
  border-radius: 0 0 10px 10px;
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.7;
}
.ce-richtext img, .ce-richtext video { max-width: 100%; border-radius: 8px; }
.ce-foot {
  display: flex;
  justify-content: flex-start;
  padding: 10px 22px 14px;
  border-top: 1px solid var(--glass-border);
  flex-shrink: 0;
}
.ce-del {
  border: 1px solid rgba(240, 100, 100, 0.35);
  background: rgba(240, 100, 100, 0.1);
  color: #ff7a7a;
  padding: 6px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.8rem;
}
.ce-del:hover { background: rgba(240, 100, 100, 0.22); }

/* 新增入口卡片 */
.new-card {
  border-style: dashed !important;
  border-color: rgba(240, 200, 122, 0.35) !important;
  cursor: pointer;
  transition: border-color .25s, background .25s, transform .25s;
}
.new-card:hover {
  border-color: rgba(240, 200, 122, 0.7) !important;
  background: rgba(240, 200, 122, 0.05);
  transform: translateY(-2px);
}
.new-card-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 26px;
  color: var(--gold);
  font-size: 0.95rem;
  letter-spacing: 1px;
}

/* 文章详情页底部 */
.article-footer {
  display: flex;
  gap: 12px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--glass-border);
}

/* ===== 电子木鱼（右下角） ===== */
.woodfish {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  outline: none;
}
.wf-stage {
  position: relative;
  width: 78px;
  height: 74px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.45));
}
.wf-fish {
  transform-origin: 50% 86%;
}
.wf-fish.knocking { animation: wfKnock .3s cubic-bezier(.36, .07, .19, .97) .04s; }
@keyframes wfKnock {
  0% { transform: scale(1, 1); }
  30% { transform: scale(1.1, 0.84); }
  60% { transform: scale(0.95, 1.05); }
  100% { transform: scale(1, 1); }
}
/* 槌头在左下、柄朝右上；贴近鱼顶缝口，以柄尾为支点，敲击时顺时针向下砸向鱼顶 */
.wf-stick {
  position: absolute;
  top: -5px;
  right: -2px;
  transform-origin: 88% 12%;
  transform: rotate(-12deg);
}
.wf-stick.hitting { animation: wfHit .3s cubic-bezier(.36, .07, .19, .97); }
@keyframes wfHit {
  0% { transform: rotate(-12deg); }
  32% { transform: rotate(10deg); }   /* 砸下接触 */
  62% { transform: rotate(-18deg); }  /* 回弹过冲 */
  100% { transform: rotate(-12deg); }
}
/* 敲击冲击波 */
.wf-ripple {
  position: absolute;
  top: 18px;
  left: 50%;
  width: 14px;
  height: 14px;
  margin-left: -7px;
  border-radius: 50%;
  border: 2px solid rgba(240, 200, 122, 0.85);
  pointer-events: none;
  animation: wfRipple .5s ease-out forwards;
}
@keyframes wfRipple {
  0% { opacity: 0.9; transform: scale(0.4); }
  100% { opacity: 0; transform: scale(3.2); }
}
.wf-count {
  display: flex;
  align-items: baseline;
  gap: 4px;
  padding: 3px 12px;
  border-radius: 20px;
  background: rgba(10, 10, 28, 0.72);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(8px);
}
.wf-count b {
  color: var(--gold);
  font-size: 0.92rem;
  font-variant-numeric: tabular-nums;
}
.wf-count span { color: var(--text-faint); font-size: 0.68rem; }
.wf-float {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  color: var(--gold);
  font-size: 0.8rem;
  white-space: nowrap;
  pointer-events: none;
  animation: wfFloat .9s ease-out forwards;
  text-shadow: 0 0 8px rgba(240, 200, 122, 0.5);
}
@keyframes wfFloat {
  0% { opacity: 0; transform: translate(-50%, 0) scale(0.8); }
  20% { opacity: 1; transform: translate(-50%, -14px) scale(1.05); }
  100% { opacity: 0; transform: translate(-50%, -52px) scale(1); }
}

/* 中等宽度：左列适当收窄，保文章列空间 */
@media (max-width: 1024px) {
  .home-layout { grid-template-columns: 360px minmax(0, 1fr); gap: 16px; }
}

/* ===== 移动端适配 ===== */
@media (max-width: 768px) {
  .navbar { margin: 0; padding: 10px 4px; }
  .navbar .logo { font-size: 0.95rem; }
  .navbar .nav-links a { padding: 6px 9px; font-size: 0.85rem; }
  .home-layout { grid-template-columns: 1fr; }
  .profile-card { position: static; }
  .article-card-inner { flex-direction: column; }
  .article-card .cover { width: 100%; height: 170px; }
  .card-edit { opacity: 1; }
  .space-hero h1 { font-size: 1.5rem; }
  .photo-wall { columns: 2 140px; column-gap: 12px; }
  .now-playing { flex-direction: column; text-align: center; }
  .hero h1 { font-size: 1.8rem; }
  .hero { padding: 50px 20px 30px; }
  .article-card h2 { font-size: 1.15rem; }
  .comments-section { padding: 20px; }
  .article-detail h1 { font-size: 1.5rem; }
  .bgm-player { bottom: 16px; left: 16px; padding: 8px 12px; }
  .bgm-player .bgm-label { display: none; }
  .bgm-player .bgm-volume { width: 50px; }
  .woodfish { bottom: 14px; right: 12px; transform: scale(0.85); transform-origin: bottom right; }
  .ce-panel { border-radius: 14px; }
  .ce-hint { display: none; }
  .admin-table { font-size: 0.82rem; }
  .admin-table th, .admin-table td { padding: 8px 10px; }
  .rte-toolbar { gap: 2px; padding: 6px; }
  .rte-toolbar button { min-width: 28px; height: 28px; font-size: 0.8rem; }
  .rte-body { min-height: 240px; padding: 12px; }
  .field-row { flex-wrap: wrap; }
  .editor-actions { flex-direction: column; }
  .editor-actions .btn { width: 100%; text-align: center; }
}

/* ===== 播放器内嵌播放列表（游客可切歌） ===== */
.cp-playlist {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 88px;
  z-index: 8;
  max-height: 250px;
  overflow-y: auto;
  background: rgba(16, 16, 42, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(150, 140, 250, 0.3);
  border-radius: 14px;
  padding: 8px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity .25s, transform .25s;
}
.cp-playlist.show { opacity: 1; transform: translateY(0); pointer-events: auto; }
.cp-pl-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
  transition: background .18s;
}
.cp-pl-item:hover { background: rgba(150, 140, 250, 0.14); }
.cp-pl-item.playing { background: rgba(150, 140, 250, 0.2); }
.cp-pl-item .pl-idx {
  width: 18px;
  text-align: center;
  color: var(--text-faint);
  font-size: 0.74rem;
  flex-shrink: 0;
}
.cp-pl-item.playing .pl-idx { color: var(--gold); }
.cp-pl-item .pl-title {
  flex: 1;
  min-width: 0;
  color: var(--text);
  font-size: 0.84rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cp-pl-item .pl-artist {
  color: var(--text-faint);
  font-size: 0.72rem;
  max-width: 40%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cp-pl-empty { padding: 16px; text-align: center; color: var(--text-faint); font-size: 0.8rem; }

/* ===== 图片圆形裁剪器 ===== */
.crop-overlay {
  position: fixed;
  inset: 0;
  z-index: 800;
  background: rgba(3, 3, 12, 0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
}
.crop-panel {
  background: rgba(16, 18, 44, 0.97);
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  width: min(380px, calc(100vw - 32px));
}
.crop-panel h4 { color: var(--gold); font-size: 0.95rem; margin-bottom: 12px; }
.crop-viewport {
  position: relative;
  width: min(320px, calc(100vw - 74px));
  height: min(320px, calc(100vw - 74px));
  margin: 0 auto;
  overflow: hidden;
  border-radius: 12px;
  background: #0a0a18;
  cursor: grab;
  touch-action: none;
  user-select: none;
}
.crop-viewport.dragging { cursor: grabbing; }
.crop-viewport img {
  position: absolute;
  transform-origin: 0 0;
  max-width: none;
  pointer-events: none;
  -webkit-user-drag: none;
}
.crop-mask {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: 50%;
  box-shadow: 0 0 0 999px rgba(4, 4, 14, 0.62);
  border: 2px dashed rgba(240, 200, 122, 0.75);
}
.crop-zoom-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 4px 4px;
  color: var(--text-faint);
  font-size: 0.85rem;
}
.crop-zoom-row input[type=range] { flex: 1; accent-color: var(--purple); }
.crop-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 14px;
}
.crop-actions button {
  padding: 8px 20px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.85rem;
  font-family: inherit;
}
.crop-cancel {
  background: transparent;
  border: 1px solid var(--glass-border);
  color: var(--text-dim);
}
.crop-ok {
  background: linear-gradient(135deg, #9c8bf5, #6a5ae0);
  border: none;
  color: #fff;
}
.crop-ok:hover { filter: brightness(1.1); }

/* ===== 多歌曲编辑列表（card-editor tracks 字段） ===== */
.ce-tracks { display: flex; flex-direction: column; gap: 10px; }
.ce-track {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.18);
}
/* 歌词编辑：行内展开的 LRC 文本框 */
.ce-t-lyric {
  padding: 5px 10px;
  border-radius: 8px;
  border: 1px solid rgba(150, 140, 250, 0.3);
  background: rgba(150, 140, 250, 0.08);
  color: var(--purple);
  cursor: pointer;
  font-size: 0.74rem;
  font-family: inherit;
  white-space: nowrap;
}
.ce-t-lyric.has-lyric { border-color: rgba(120, 220, 150, 0.4); color: #7ddc96; background: rgba(120, 220, 150, 0.08); }
.ce-t-lyrics-box { flex-basis: 100%; }
.ce-t-lyrics-box textarea {
  width: 100%;
  min-height: 160px;
  padding: 9px 12px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  color: var(--text);
  font-size: 0.82rem;
  line-height: 1.7;
  font-family: inherit;
  resize: vertical;
}
.ce-t-lyrics-box textarea:focus { outline: none; border-color: var(--cyan); }
/* ▲▼ 调整播放顺序 */
.ce-track-move {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-shrink: 0;
}
.ce-track-move button {
  width: 26px;
  height: 22px;
  padding: 0;
  border-radius: 6px;
  border: 1px solid rgba(150, 140, 250, 0.3);
  background: rgba(150, 140, 250, 0.08);
  color: var(--text-dim);
  cursor: pointer;
  font-size: 0.6rem;
  line-height: 1;
  transition: background .2s, color .2s;
}
.ce-track-move button:hover {
  background: rgba(150, 140, 250, 0.25);
  color: var(--gold);
}
.ce-track-cover {
  position: relative;
  width: 52px; height: 52px;
  flex-shrink: 0;
  border-radius: 50%;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid rgba(150, 140, 250, 0.35);
  background: radial-gradient(circle at center, #555 16%, #151520 17%, #2a2a3a 60%);
}
.ce-track-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ce-track-cover .ce-track-cover-fb {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255, 255, 255, 0.5);
  font-size: 1.1rem;
}
.ce-track-cover:hover { border-color: var(--gold); }
.ce-track-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ce-track-main input {
  width: 100%;
  padding: 7px 10px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.82rem;
  font-family: inherit;
}
.ce-track-main input:focus { outline: none; border-color: var(--cyan); }
.ce-track-ops {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
}
.ce-t-audio {
  padding: 5px 10px;
  border-radius: 8px;
  border: 1px solid rgba(94, 200, 232, 0.3);
  background: rgba(94, 200, 232, 0.1);
  color: var(--cyan);
  cursor: pointer;
  font-size: 0.74rem;
  font-family: inherit;
  white-space: nowrap;
}
.ce-t-audio.has-audio { border-color: rgba(120, 220, 150, 0.4); color: #7ddc96; background: rgba(120, 220, 150, 0.08); }
.ce-t-del {
  padding: 5px 10px;
  border-radius: 8px;
  border: 1px solid rgba(240, 100, 100, 0.3);
  background: rgba(240, 100, 100, 0.08);
  color: #e88;
  cursor: pointer;
  font-size: 0.74rem;
  font-family: inherit;
}
.ce-t-del:hover { background: rgba(240, 100, 100, 0.18); }
.ce-track-add {
  margin-top: 10px;
  width: 100%;
  padding: 10px;
  border-radius: 12px;
  border: 1px dashed rgba(150, 140, 250, 0.4);
  background: rgba(150, 140, 250, 0.06);
  color: var(--purple);
  cursor: pointer;
  font-size: 0.85rem;
  font-family: inherit;
  transition: background .2s;
}
.ce-track-add:hover { background: rgba(150, 140, 250, 0.15); }

/* 同步歌词行：当前句居中显示，换句时淡入上浮 */
.cp-lyric {
  margin: 10px 2px 2px;
  min-height: 1.5em;
  text-align: center;
  color: var(--gold);
  font-size: 0.92rem;
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 0 12px rgba(240, 200, 122, 0.35);
}
.cp-lyric-in { animation: cpLyricIn .45s ease both; }
@keyframes cpLyricIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== 弹层滚动区深色滚动条（编辑面板/播放列表/背景设置） ===== */
.ce-body, .cp-playlist, .bgset-panel {
  scrollbar-width: thin;
  scrollbar-color: rgba(150, 140, 250, 0.45) transparent;
}
.ce-body::-webkit-scrollbar,
.cp-playlist::-webkit-scrollbar,
.bgset-panel::-webkit-scrollbar { width: 8px; }
.ce-body::-webkit-scrollbar-track,
.cp-playlist::-webkit-scrollbar-track,
.bgset-panel::-webkit-scrollbar-track { background: transparent; }
.ce-body::-webkit-scrollbar-thumb,
.cp-playlist::-webkit-scrollbar-thumb,
.bgset-panel::-webkit-scrollbar-thumb {
  background: rgba(150, 140, 250, 0.4);
  border-radius: 8px;
}
.ce-body::-webkit-scrollbar-thumb:hover,
.cp-playlist::-webkit-scrollbar-thumb:hover,
.bgset-panel::-webkit-scrollbar-thumb:hover { background: rgba(150, 140, 250, 0.65); }

/* ===== 背景设置面板（点击导航栏 logo 弹出） ===== */
.bgset-overlay {
  position: fixed;
  inset: 0;
  z-index: 700;
  background: rgba(3, 3, 12, 0.5);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  opacity: 0;
  transition: opacity .3s;
}
.bgset-overlay.show { opacity: 1; }
.bgset-panel {
  position: fixed;
  top: 72px;
  left: 50%;
  z-index: 701;
  width: min(560px, calc(100vw - 28px));
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  background: rgba(16, 18, 44, 0.96);
  border: 1px solid rgba(150, 140, 250, 0.3);
  border-radius: 18px;
  padding: 20px 22px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6);
  transform: translateX(-50%) translateY(-14px) scale(0.96);
  transform-origin: top center;
  opacity: 0;
  transition: transform .32s cubic-bezier(.32,.72,.28,1), opacity .32s;
}
.bgset-overlay.show .bgset-panel { transform: translateX(-50%) translateY(0) scale(1); opacity: 1; }
.bgset-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}
.bgset-head h3 { color: var(--gold); font-size: 1rem; }
.bgset-close {
  background: transparent;
  border: none;
  color: var(--text-faint);
  font-size: 1.05rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
}
.bgset-close:hover { color: var(--text); background: rgba(150, 140, 250, 0.12); }
.bgset-tip { color: var(--text-faint); font-size: 0.78rem; margin-bottom: 14px; }
.bgset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.bgset-item {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  background-size: cover;
  background-position: center;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color .2s, transform .2s;
}
.bgset-item:hover { transform: scale(1.04); }
.bgset-item.active { border-color: var(--gold); }
.bgset-item.active::after {
  content: '✔';
  position: absolute;
  right: 6px;
  bottom: 4px;
  color: var(--gold);
  font-size: 0.8rem;
  text-shadow: 0 0 6px rgba(0, 0, 0, 0.8);
}
/* 缩略图右上角删除钮（仅管理员） */
.bgset-del {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: none;
  background: rgba(10, 10, 25, 0.75);
  color: #e88;
  font-size: 0.66rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .2s, background .2s;
}
.bgset-item:hover .bgset-del { opacity: 1; }
.bgset-del:hover { background: rgba(200, 60, 60, 0.9); color: #fff; }
/* 上传背景图按钮（仅管理员） */
.bgset-upload {
  width: 100%;
  padding: 9px;
  margin-bottom: 14px;
  border-radius: 12px;
  border: 1px dashed rgba(150, 140, 250, 0.4);
  background: rgba(150, 140, 250, 0.06);
  color: var(--purple);
  cursor: pointer;
  font-size: 0.84rem;
  font-family: inherit;
  transition: background .2s;
}
.bgset-upload:hover { background: rgba(150, 140, 250, 0.15); }
.bgset-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  color: var(--text-dim);
  font-size: 0.84rem;
}
.bgset-row .bgset-label { width: 68px; flex-shrink: 0; }
.bgset-btn {
  padding: 6px 16px;
  border-radius: 20px;
  border: 1px solid var(--glass-border);
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 0.8rem;
  font-family: inherit;
  transition: all .2s;
}
.bgset-btn:hover { border-color: rgba(150, 140, 250, 0.5); color: var(--text); }
.bgset-btn.on {
  border-color: rgba(150, 140, 250, 0.6);
  background: rgba(150, 140, 250, 0.18);
  color: var(--text);
}

/* ===== 迷你音乐卡（非首页，右下角木鱼下方，与首页播放器同步续播） ===== */
.mini-player {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 300;
  display: flex;
  align-items: center;
  gap: 9px;
  width: 218px;
  padding: 10px 12px;
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(62, 56, 118, 0.6), rgba(26, 30, 70, 0.6));
  border: 1px solid rgba(150, 140, 250, 0.3);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
}
/* 有迷你音乐卡时，木鱼上移让位 */
body.has-mini-player .woodfish { bottom: 100px; }
.mini-player .mp-disc {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: radial-gradient(circle at center, #555 16%, #151520 17%, #2a2a3a 60%);
  border: 2px solid rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.8rem;
  animation: discSpin 10s linear infinite;
  animation-play-state: paused;
}
.mini-player.playing .mp-disc { animation-play-state: running; }
.mini-player .mp-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.35;
}
.mini-player .mp-title {
  color: var(--text);
  font-size: 0.76rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mini-player .mp-state { color: var(--text-faint); font-size: 0.64rem; }
.mini-player .mp-btn {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(150, 140, 250, 0.25);
  background: rgba(150, 140, 250, 0.1);
  color: var(--text-dim);
  cursor: pointer;
  padding: 0;
  transition: background .2s, color .2s, transform .2s;
}
.mini-player .mp-btn:hover { color: var(--text); background: rgba(150, 140, 250, 0.24); transform: scale(1.08); }
.mini-player .mp-btn svg { display: block; }

/* ===== 光影图册墙（堆叠拍立得） ===== */
.album-wall {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 44px 30px;
  padding-bottom: 50px;
}
.album-card { cursor: pointer; text-align: center; }
.album-stack {
  position: relative;
  aspect-ratio: 4 / 3;
  margin-bottom: 18px;
}
.album-frame {
  position: absolute;
  inset: 0;
  border-radius: 6px;
  padding: 10px 10px 26px;
  background-color: #f4f1ea;
  background-size: cover;
  background-position: center;
  background-origin: content-box;
  background-clip: content-box, border-box;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}
.album-back1 { transform: rotate(4deg) translate(7px, 5px); opacity: 0.9; }
.album-back2 { transform: rotate(-5deg) translate(-9px, 7px); opacity: 0.8; }
.album-front {
  transform: rotate(-1.2deg);
  transition: transform .3s cubic-bezier(.32, .72, .28, 1), box-shadow .3s;
  overflow: hidden;
}
.album-card:hover .album-front {
  transform: rotate(0deg) translateY(-8px) scale(1.03);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.55);
}
.album-front img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 3px;
  display: block;
}
.album-front .album-cover-fb {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  background: linear-gradient(135deg, #2a2a4a, #1a1a35);
  color: var(--gold);
  font-size: 2rem;
}
.album-hover {
  position: absolute;
  inset: 10px 10px 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border-radius: 3px;
  background: rgba(8, 8, 20, 0.5);
  opacity: 0;
  transition: opacity .25s;
  pointer-events: none;
}
.album-card:hover .album-hover { opacity: 1; }
.album-hover b { color: #fff; font-size: 1rem; }
.album-hover span { color: rgba(255, 255, 255, 0.75); font-size: 0.76rem; letter-spacing: 1px; }
.album-info h3 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 1rem;
}
.album-date {
  padding: 2px 9px;
  border-radius: 7px;
  border: 1px solid var(--glass-border);
  background: rgba(150, 140, 250, 0.12);
  color: var(--text-dim);
  font-size: 0.68rem;
  font-weight: 400;
  white-space: nowrap;
}
.album-info p {
  margin-top: 6px;
  color: var(--text-faint);
  font-size: 0.82rem;
}
.album-card.new-card .new-card-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  border: 1px dashed rgba(150, 140, 250, 0.4);
  border-radius: 12px;
  color: var(--purple);
  background: rgba(150, 140, 250, 0.05);
  transition: background .2s;
}
.album-card.new-card:hover .new-card-inner { background: rgba(150, 140, 250, 0.14); }

/* ===== 图册展开层（全部照片） ===== */
.gallery-overlay {
  position: fixed;
  inset: 0;
  z-index: 450;
  background: rgba(4, 4, 14, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  overflow-y: auto;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
  scrollbar-width: thin;
  scrollbar-color: rgba(150, 140, 250, 0.45) transparent;
}
.gallery-overlay.open { opacity: 1; pointer-events: auto; }
.gallery-overlay::-webkit-scrollbar { width: 8px; }
.gallery-overlay::-webkit-scrollbar-thumb { background: rgba(150, 140, 250, 0.4); border-radius: 8px; }
.gallery-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 70px 24px 70px;
}
.gallery-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
}
.gallery-head h3 { color: var(--gold); font-size: 1.3rem; }
.gallery-count { color: var(--text-faint); font-size: 0.8rem; }
.gallery-desc { color: var(--text-dim); font-size: 0.86rem; margin: 8px 0 22px; }
.gallery-grid { columns: 3 260px; column-gap: 14px; }
.gallery-grid img {
  width: 100%;
  display: block;
  break-inside: avoid;
  margin-bottom: 14px;
  border-radius: 10px;
  cursor: zoom-in;
  transition: transform .2s, box-shadow .2s;
}
.gallery-grid img:hover { transform: scale(1.02); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); }

/* ===== 图册编辑：多图网格（card-editor photos 字段） ===== */
.ce-photos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}
.ce-photo {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--glass-border);
}
.ce-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ce-photo-del {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  background: rgba(10, 10, 25, 0.75);
  color: #e88;
  font-size: 0.68rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .2s, background .2s;
}
.ce-photo:hover .ce-photo-del { opacity: 1; }
.ce-photo-del:hover { background: rgba(200, 60, 60, 0.9); color: #fff; }
.ce-photos-add {
  width: 100%;
  padding: 10px;
  border-radius: 12px;
  border: 1px dashed rgba(150, 140, 250, 0.4);
  background: rgba(150, 140, 250, 0.06);
  color: var(--purple);
  cursor: pointer;
  font-size: 0.85rem;
  font-family: inherit;
  transition: background .2s;
}
.ce-photos-add:hover { background: rgba(150, 140, 250, 0.15); }

/* 移动端：迷你卡/木鱼/图册适配 */
@media (max-width: 768px) {
  .mini-player { right: 12px; bottom: 14px; width: 190px; padding: 8px 10px; }
  body.has-mini-player .woodfish { bottom: 84px; }
  .album-wall { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 34px 18px; }
  .gallery-grid { columns: 2 150px; column-gap: 10px; }
  .gallery-inner { padding: 56px 14px 56px; }
}

/* ===== 设置面板：站点主题区 ===== */
.bgset-sec {
  color: var(--gold);
  font-size: 0.82rem;
  letter-spacing: 1px;
  margin: 14px 0 10px;
  padding-top: 12px;
  border-top: 1px solid var(--glass-border);
}
.bgset-sec:first-of-type { border-top: none; padding-top: 0; margin-top: 6px; }
.bgset-title-row {
  display: flex;
  gap: 8px;
  margin-bottom: 6px;
}
.bgset-title-row input {
  flex: 1;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  color: var(--text);
  font-size: 0.85rem;
  font-family: inherit;
}
.bgset-title-row input:focus { outline: none; border-color: var(--cyan); }

/* ===== 学习页：每日一题 S 型树状时间轴（SVG 主轴 + 分支挂接卡片） ===== */
.sq-add {
  width: min(420px, 90%);
  margin: 0 auto 30px;
  border: 1px dashed rgba(240, 200, 122, 0.35);
  border-radius: 14px;
  background: rgba(16, 16, 42, 0.6);
  backdrop-filter: blur(8px);
}
.sq-tree { position: relative; padding: 6px 34px 56px; }
.sq-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  z-index: 0;
}
.sq-row {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 320px));
  justify-content: space-between;
  gap: 0 44px;
}
/* 行间走廊：S 型主轴横穿此处（主轴在行底下方 28px） */
.sq-row + .sq-row { margin-top: 56px; }
.sq-item { position: relative; }
/* 手机端：左侧垂直主轴，卡片横向分支挂接 */
.sq-tree-mobile { padding: 6px 0 24px 6px; }
.sq-tree-mobile .sq-item { position: relative; z-index: 1; margin-left: 44px; }
.sq-tree-mobile .sq-item + .sq-item { margin-top: 26px; }
.sq-card {
  position: relative;
  height: 100%;
  padding: 16px 18px 12px;
  border-radius: 16px;
  cursor: pointer;
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.sq-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35);
  border-color: rgba(240, 200, 122, 0.4);
}
.sq-num {
  position: absolute;
  top: 10px;
  right: 12px;
  min-width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  border-radius: 11px;
  background: rgba(240, 200, 122, 0.14);
  border: 1px solid rgba(240, 200, 122, 0.35);
  color: #fff;
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
}
.sq-question {
  color: #fff;
  font-size: 1.18rem;
  line-height: 1.75;
  padding-right: 34px;
  white-space: pre-wrap;
  word-break: break-word;
}
.sq-hint { display: block; margin-top: 12px; color: rgba(255, 255, 255, 0.8); font-size: 0.8rem; }
/* 游客查看层：卡片 FLIP 放大到屏幕中央展示题目+答案（不动原卡片，主轴不受影响） */
.sqv-src-hidden { visibility: hidden; }
.sqv-overlay {
  position: fixed;
  inset: 0;
  z-index: 600;
  background: rgba(3, 3, 12, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity .42s;
}
.sqv-overlay.show { opacity: 1; }
.sqv-panel {
  position: fixed;
  z-index: 601;
  overflow: hidden;
  border-radius: 18px;
  background: rgba(14, 16, 40, 0.94);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
  transition: all .42s cubic-bezier(.32, .72, .28, 1);
}
.sqv-panel .sq-num { top: 14px; right: 54px; }
.sqv-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1;
  transition: all .2s;
}
.sqv-close:hover { background: rgba(255, 90, 90, 0.16); color: #ff7a7a; border-color: rgba(255, 90, 90, 0.4); }
.sqv-body {
  height: 100%;
  overflow-y: auto;
  padding: 24px 28px 26px;
  opacity: 0;
  transition: opacity .3s .16s;
}
.sqv-panel.open .sqv-body { opacity: 1; }
.sqv-question {
  color: #fff;
  font-size: 1.34rem;
  font-weight: 600;
  line-height: 1.9;
  padding-right: 70px;
  white-space: pre-wrap;
  word-break: break-word;
}
.sqv-answer { margin-top: 20px; }
.sqv-answer b { color: var(--cyan); font-size: 0.92rem; letter-spacing: 1px; }
.sqv-answer p {
  margin-top: 10px;
  padding: 16px 18px;
  color: #f2f4ff;
  font-size: 1.02rem;
  line-height: 1.9;
  white-space: pre-wrap;
  word-break: break-word;
  background: rgba(94, 200, 232, 0.08);
  border-left: 3px solid rgba(94, 200, 232, 0.5);
  border-radius: 8px;
}

/* ===== 生活切片：中轴错位时间轴 ===== */
.timeline {
  position: relative;
  max-width: 980px;
  margin: 0 auto;
  padding: 26px 0 70px;
}
/* 中央主轴 */
.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  transform: translateX(-50%);
  background: linear-gradient(180deg,
    transparent 0%,
    rgba(150, 140, 250, 0.55) 6%,
    rgba(150, 140, 250, 0.55) 94%,
    transparent 100%);
}
.tl-add {
  position: relative;
  z-index: 1;
  width: min(420px, 90%);
  margin: 0 auto 40px;
  cursor: pointer;
}
.tl-add .new-card-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  border: 1px dashed rgba(150, 140, 250, 0.4);
  border-radius: 14px;
  color: var(--purple);
  background: rgba(16, 16, 42, 0.6);
  backdrop-filter: blur(8px);
  transition: background .2s;
}
.tl-add:hover .new-card-inner { background: rgba(150, 140, 250, 0.16); }
/* 时刻卡片：左右交替，像树枝一样向下错位生长（交错上提，紧凑排列） */
.tl-item {
  position: relative;
  width: calc(50% - 46px);
  margin-bottom: 26px;
  cursor: pointer;
}
.tl-item + .tl-item { margin-top: -96px; }
.tl-add + .tl-item { margin-top: 0; }
.tl-left { margin-right: auto; }
.tl-right { margin-left: auto; }
/* 轴上的节点：对齐卡片垂直居中 */
.tl-dot {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(240, 200, 122, 0.18), 0 0 14px rgba(240, 200, 122, 0.8);
  z-index: 1;
}
.tl-left .tl-dot { right: -52.5px; }
.tl-right .tl-dot { left: -52.5px; }
/* 树枝：从卡片垂直居中处伸向主轴的横线 */
.tl-item::after {
  content: '';
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 2px;
  background: linear-gradient(90deg, rgba(150, 140, 250, 0.45), rgba(150, 140, 250, 0.15));
}
.tl-left::after { right: -46px; }
.tl-right::after {
  left: -46px;
  background: linear-gradient(270deg, rgba(150, 140, 250, 0.45), rgba(150, 140, 250, 0.15));
}
.tl-card {
  overflow: hidden;
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(62, 56, 118, 0.38), rgba(26, 30, 70, 0.34));
  border: 1px solid rgba(150, 140, 250, 0.25);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  transition: transform .3s cubic-bezier(.32, .72, .28, 1), border-color .25s, box-shadow .3s;
}
.tl-item:hover .tl-card {
  transform: translateY(-5px);
  border-color: rgba(240, 200, 122, 0.45);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.5);
}
.tl-cover {
  position: relative;
  height: 200px;
}
.tl-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.tl-count {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 3px 10px;
  border-radius: 14px;
  background: rgba(8, 8, 20, 0.65);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 0.7rem;
}
.tl-body { padding: 14px 18px 16px; }
.tl-date {
  display: inline-block;
  color: var(--gold);
  font-size: 0.78rem;
  letter-spacing: 1px;
  margin-bottom: 6px;
}
.tl-text {
  color: var(--text-dim);
  font-size: 0.86rem;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tl-open-hint {
  display: block;
  margin-top: 8px;
  color: var(--text-faint);
  font-size: 0.7rem;
  opacity: 0;
  transition: opacity .2s;
}
.tl-item:hover .tl-open-hint { opacity: 1; }

/* 移动端：主轴靠左，卡片全部右侧单列排列（取消交错上提，避免重叠） */
@media (max-width: 768px) {
  .timeline::before { left: 14px; transform: none; }
  .tl-item,
  .tl-left,
  .tl-right {
    width: auto;
    margin-left: 44px;
    margin-right: 0;
  }
  .tl-item + .tl-item { margin-top: 0; }
  .tl-left .tl-dot,
  .tl-right .tl-dot { left: -36.5px; right: auto; }
  .tl-left::after,
  .tl-right::after {
    left: -30px;
    right: auto;
    width: 30px;
    background: linear-gradient(270deg, rgba(150, 140, 250, 0.45), rgba(150, 140, 250, 0.15));
  }
  .tl-cover { height: 170px; }
}

/* ===== 音乐页（云音乐款：左唱片 + 右歌词/歌单） ===== */
.music-page { padding: 24px 0 70px; }
.mp-grid {
  display: grid;
  grid-template-columns: minmax(320px, 440px) 1fr;
  gap: 22px;
  height: calc(100vh - 170px);
  min-height: 520px;
}
.mp-player {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 28px 26px;
  border-radius: 22px;
  overflow: hidden;
}
/* 旋转唱片 */
.mp-disc {
  position: relative;
  width: 220px; height: 220px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .45), 0 0 0 8px rgba(255, 255, 255, .06);
  background: radial-gradient(circle at 50% 50%, #2a2a3a, #12121c);
  animation: mpSpin 18s linear infinite;
  animation-play-state: paused;
}
.mp-disc.spinning { animation-play-state: running; }
.mp-disc img { width: 100%; height: 100%; object-fit: cover; }
.mp-cover-fb {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem; color: rgba(255, 255, 255, .5);
}
@keyframes mpSpin { to { transform: rotate(360deg); } }

.mp-title {
  margin-top: 28px;
  font-size: 1.5rem; font-weight: 800; color: var(--text);
  text-align: center;
}
.mp-artist { margin-top: 6px; color: var(--text-dim); font-size: .95rem; }

.mp-progress {
  width: 100%; margin-top: 24px;
  height: 6px; border-radius: 3px;
  background: rgba(255, 255, 255, .14);
  cursor: pointer; position: relative;
}
.mp-bar {
  position: relative; height: 100%;
  border-radius: 3px; width: 0;
  background: linear-gradient(90deg, var(--purple), var(--cyan));
}
.mp-dot {
  position: absolute; right: -6px; top: 50%;
  width: 12px; height: 12px; margin-top: -6px;
  border-radius: 50%; background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .4);
}
.mp-times {
  width: 100%; margin-top: 8px;
  display: flex; justify-content: space-between;
  font-size: .78rem; color: var(--text-faint);
}
.mp-controls {
  display: flex; align-items: center; justify-content: center;
  gap: 22px; margin-top: 22px;
}
.mp-ctrl {
  display: flex; align-items: center; justify-content: center;
  background: none; border: 0; cursor: pointer;
  color: var(--text-dim); padding: 4px;
  transition: color .2s, transform .2s;
}
.mp-ctrl svg { width: 24px; height: 24px; }
.mp-ctrl:hover { color: var(--text); transform: scale(1.1); }
.mp-ctrl.on, .mp-ctrl.muted { color: var(--purple); }
.mp-play {
  width: 62px; height: 62px; border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), #6a5cff);
  box-shadow: 0 8px 24px rgba(120, 90, 250, .5);
}
.mp-play svg { width: 26px; height: 26px; }
.mp-play:hover { transform: scale(1.06); color: #fff; }

/* 音量弹层 */
.mp-vol-wrap { position: relative; display: flex; }
.mp-vol-pop {
  position: absolute; bottom: calc(100% + 12px); left: 50%;
  transform: translateX(-50%) translateY(6px);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 14px 10px 10px;
  background: rgba(16, 18, 40, .97);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, .5);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .2s, transform .2s, visibility .2s;
  z-index: 60;
}
.mp-vol-pop.open { opacity: 1; visibility: visible; pointer-events: auto; transform: translateX(-50%) translateY(0); }
.mp-vol-pop::after {
  content: ''; position: absolute; top: 100%; left: 50%;
  transform: translateX(-50%);
  border: 7px solid transparent; border-top-color: rgba(16, 18, 40, .97);
}
/* 竖向滞块 */
.mp-vol-pop input[type=range] {
  -webkit-appearance: none; appearance: none;
  writing-mode: vertical-lr; direction: rtl;
  width: 6px; height: 110px;
  border-radius: 3px; cursor: pointer;
  background: linear-gradient(to top, var(--purple), var(--cyan));
}
.mp-vol-pop input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 15px; height: 15px; border-radius: 50%;
  background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .4); cursor: pointer;
}
.mp-vol-pop input[type=range]::-moz-range-thumb {
  width: 15px; height: 15px; border: 0; border-radius: 50%;
  background: #fff; cursor: pointer;
}
.mp-vol-val { font-size: .72rem; color: var(--text-dim); }

/* 右侧面板 */
.mp-side {
  display: flex; flex-direction: column;
  padding: 22px 24px 8px;
  border-radius: 22px;
  min-height: 0;
}
.mp-tabs {
  position: relative;
  align-self: center;
  display: flex; gap: 4px;
  padding: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
}
.mp-tab-ind {
  position: absolute; top: 5px; left: 0; bottom: 5px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--purple), #6a5cff);
  transition: transform .3s cubic-bezier(.32,.72,.28,1), width .3s;
  z-index: 0;
}
.mp-tab {
  position: relative; z-index: 1;
  padding: 8px 30px;
  background: none; border: 0; cursor: pointer;
  color: var(--text-dim); font-size: .95rem; font-weight: 700;
  border-radius: 999px; transition: color .25s;
}
.mp-tab.active { color: #fff; }
.mp-manage {
  position: absolute; right: 24px; top: 24px;
  padding: 7px 14px; border-radius: 999px;
  border: 1px solid rgba(150, 140, 250, .4);
  background: rgba(150, 140, 250, .12);
  color: var(--purple); cursor: pointer; font-size: .8rem; font-weight: 700;
}
.mp-manage:hover { background: rgba(150, 140, 250, .22); }
.mp-tab-body { flex: 1; min-height: 0; margin-top: 18px; display: flex; }
/* 确保 hidden 真正隐藏（避免 display:flex 盖过 hidden 属性） */
.mp-lyric[hidden], .mp-list-view[hidden] { display: none !important; }

/* 歌词 */
.mp-lyric {
  flex: 1; min-height: 0; overflow-y: auto;
  position: relative;   /* 使歌词行 offsetTop 相对自身，居中滚动才准确 */
  text-align: center;
  scrollbar-width: none;
}
.mp-lyric::-webkit-scrollbar { display: none; }
.mp-lyric-pad { height: 45%; }
.mp-lyric-pad-top { height: 0; }
.mp-lyric-line {
  padding: 11px 8px;
  color: rgba(255, 255, 255, .38);
  font-size: 1.02rem; line-height: 1.5;
  transition: color .3s, transform .3s, font-size .3s;
}
.mp-lyric-line.active {
  color: #fff; font-weight: 700; font-size: 1.12rem;
  text-shadow: 0 0 16px rgba(150, 140, 250, .5);
}
.mp-lyric-empty, .mp-list-empty {
  margin: auto; padding: 40px 0;
  color: var(--text-faint); font-size: .9rem; text-align: center;
}

/* 歌单 */
.mp-list-view { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.mp-search {
  position: relative; margin-bottom: 14px; flex-shrink: 0;
}
.mp-search svg {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; color: var(--text-faint);
}
.mp-search input {
  width: 100%; padding: 12px 16px 12px 44px;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, .06);
  color: var(--text); font-size: .9rem; font-family: inherit;
}
.mp-search input:focus { outline: none; border-color: var(--purple); }
.mp-list { flex: 1; min-height: 0; overflow-y: auto; padding-right: 4px; }
.mp-song {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 14px; border-radius: 14px;
  cursor: pointer; transition: background .2s;
}
.mp-song:hover { background: rgba(255, 255, 255, .06); }
.mp-song.playing { background: rgba(150, 140, 250, .14); }
.mp-song-cover {
  width: 52px; height: 52px; flex-shrink: 0;
  border-radius: 12px; overflow: hidden;
  background: rgba(255, 255, 255, .08);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255, 255, 255, .5);
}
.mp-song-cover img { width: 100%; height: 100%; object-fit: cover; }
.mp-song-meta { flex: 1; min-width: 0; }
.mp-song-meta b {
  display: block; color: var(--text); font-size: .96rem; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mp-song.playing .mp-song-meta b { color: var(--purple); }
.mp-song-meta span { color: var(--text-dim); font-size: .8rem; }
.mp-song-eq { display: flex; align-items: flex-end; gap: 2px; height: 16px; }
.mp-song-eq i {
  width: 3px; background: var(--purple); border-radius: 2px;
  animation: mpEq .9s ease-in-out infinite alternate;
}
.mp-song-eq i:nth-child(2) { animation-delay: .3s; }
.mp-song-eq i:nth-child(3) { animation-delay: .6s; }
@keyframes mpEq { from { height: 4px; } to { height: 16px; } }

/* 窄屏：上下堆叠 */
@media (max-width: 860px) {
  .mp-grid { grid-template-columns: 1fr; height: auto; }
  .mp-player { min-height: 480px; }
  .mp-side { height: 460px; }
}
