/* ===================================================
   基础 & 变量
=================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:       #0a0a12;
  --bg2:      #0f0f1a;
  --bg3:      #161626;
  --surface:  #1c1c2e;
  --surface2: #24243a;
  --border:   rgba(160,130,255,0.12);
  --text:     #eaeaf5;
  --text2:    #9494bb;
  --text3:    #5a5a88;
  /* per-page accents */
  --accent:   #a78bfa;
  --accent2:  #f472b6;
  --accent3:  #38bdf8;
  --radius:   18px;
  --radius-sm:10px;
  --shadow:   0 12px 48px rgba(0,0,0,0.5);
  --glow:     0 0 48px rgba(167,139,250,0.18);
}

/* ===================================================
   主题变量覆盖（默认 purple 由 :root 定义）
=================================================== */
html[data-theme="ocean"] {
  --bg: #060d14; --bg2: #0a1520; --bg3: #0f1e2e;
  --surface: #122233; --surface2: #183044;
  --border: rgba(56,189,248,0.15);
  --accent: #38bdf8; --accent2: #818cf8; --accent3: #a78bfa;
  --glow:   0 0 48px rgba(56,189,248,0.2);
}
html[data-theme="rose"] {
  --bg: #12080f; --bg2: #1a0d16; --bg3: #221220;
  --surface: #2a1525; --surface2: #341a2e;
  --border: rgba(244,114,182,0.15);
  --accent: #f472b6; --accent2: #e879f9; --accent3: #fb923c;
  --glow:   0 0 48px rgba(244,114,182,0.22);
}
html[data-theme="forest"] {
  --bg: #060e0a; --bg2: #0a1510; --bg3: #0f1e16;
  --surface: #122218; --surface2: #18301f;
  --border: rgba(52,211,153,0.15);
  --accent: #34d399; --accent2: #6ee7b7; --accent3: #38bdf8;
  --glow:   0 0 48px rgba(52,211,153,0.2);
}
html[data-theme="spring"] {
  --bg: #0d080e; --bg2: #160d18; --bg3: #1e1222;
  --surface: #261628; --surface2: #301c34;
  --border: rgba(249,168,212,0.15);
  --accent: #f9a8d4; --accent2: #86efac; --accent3: #fcd34d;
  --glow:   0 0 48px rgba(249,168,212,0.22);
}
html[data-theme="summer"] {
  --bg: #050d10; --bg2: #081520; --bg3: #0c1e2e;
  --surface: #0f2030; --surface2: #152840;
  --border: rgba(34,211,238,0.15);
  --accent: #22d3ee; --accent2: #a3e635; --accent3: #f0abfc;
  --glow:   0 0 48px rgba(34,211,238,0.22);
}
html[data-theme="autumn"] {
  --bg: #0d0805; --bg2: #180f07; --bg3: #22160a;
  --surface: #2a1a0c; --surface2: #352112;
  --border: rgba(251,146,60,0.15);
  --accent: #fb923c; --accent2: #fbbf24; --accent3: #f87171;
  --glow:   0 0 48px rgba(251,146,60,0.22);
}
html[data-theme="winter"] {
  --bg: #06080e; --bg2: #0a0e18; --bg3: #0e1422;
  --surface: #121828; --surface2: #181f34;
  --border: rgba(147,197,253,0.15);
  --accent: #93c5fd; --accent2: #e2e8f0; --accent3: #7dd3fc;
  --glow:   0 0 48px rgba(147,197,253,0.22);
}

html {
  scroll-behavior: smooth;
  background: var(--bg); /* 主背景色始终在 html 层，保证自定义背景可透出 */
}

body {
  background: transparent; /* body 透明，使 #siteBg 可见 */
  color: var(--text);
  font-family: 'Space Grotesk', 'Noto Serif SC', sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }


/* ===================================================
   入场 Splash 动画
=================================================== */
.splash {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  animation: splashIn 0.5s ease both;
}
@keyframes splashIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.splash.splash-out {
  animation: splashOut 0.7s ease both;
  pointer-events: none;
}
@keyframes splashOut {
  from { opacity: 1; transform: scale(1); }
  to   { opacity: 0; transform: scale(1.04); }
}

.splash-bg {
  position: absolute; inset: 0;
  background: var(--bg);
}
.splash-bg::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 70% 55% at 25% 45%, rgba(167,139,250,0.28) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 60%, rgba(244,114,182,0.2) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 55% 10%, rgba(56,189,248,0.12) 0%, transparent 55%);
  animation: splashBgPulse 3s ease-in-out infinite alternate;
}
@keyframes splashBgPulse {
  from { opacity: 0.7; }
  to   { opacity: 1; }
}

.splash-video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}

.splash-content {
  position: relative; z-index: 1;
  text-align: center;
  animation: splashContentIn 0.9s 0.2s cubic-bezier(0.34,1.56,0.64,1) both;
}
@keyframes splashContentIn {
  from { opacity: 0; transform: translateY(30px) scale(0.9); }
  to   { opacity: 1; transform: none; }
}
.splash-logo {
  font-size: 56px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  margin-bottom: 16px;
  animation: splashLogoSpin 2.5s ease-in-out infinite;
}
@keyframes splashLogoSpin {
  0%,100% { transform: rotate(0deg) scale(1); }
  50%      { transform: rotate(180deg) scale(1.1); }
}
.splash-title {
  font-size: clamp(48px, 10vw, 96px);
  font-weight: 600;
  background: linear-gradient(135deg, #fff 20%, var(--accent) 60%, var(--accent2) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.splash-sub {
  margin-top: 16px;
  font-size: 16px;
  color: var(--text2);
  letter-spacing: 0.3em;
  animation: splashSubIn 1s 0.7s ease both;
}
@keyframes splashSubIn {
  from { opacity: 0; letter-spacing: 0.6em; }
  to   { opacity: 1; letter-spacing: 0.3em; }
}

.splash-skip {
  position: absolute;
  bottom: 36px; right: 36px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--text3);
  padding: 8px 20px;
  border-radius: 50px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.25s;
  z-index: 1;
  animation: splashSubIn 1s 1.2s ease both;
  backdrop-filter: blur(8px);
}
.splash-skip:hover {
  color: var(--text);
  background: rgba(255,255,255,0.14);
  border-color: rgba(255,255,255,0.25);
}


/* ===================================================
   页面切换遮罩
=================================================== */
.page-transition {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.page-transition.covering { opacity: 1; pointer-events: all; }


/* ===================================================
   进场动画系统
=================================================== */
[data-animate] {
  opacity: 0;
  transition: opacity 0.7s ease, transform 0.7s ease;
  will-change: opacity, transform;
}
[data-animate="fade-up"]    { transform: translateY(36px); }
[data-animate="fade-down"]  { transform: translateY(-36px); }
[data-animate="fade-right"] { transform: translateX(-48px); }
[data-animate="fade-left"]  { transform: translateX(48px); }
[data-animate="scale-in"]   { transform: scale(0.88); }

[data-animate].animated {
  opacity: 1;
  transform: none;
}

/* 延迟梯度 */
[data-delay="0"] { transition-delay: 0.05s; }
[data-delay="1"] { transition-delay: 0.20s; }
[data-delay="2"] { transition-delay: 0.35s; }
[data-delay="3"] { transition-delay: 0.50s; }
[data-delay="4"] { transition-delay: 0.65s; }
[data-delay="5"] { transition-delay: 0.80s; }


/* ===================================================
   通用按钮
=================================================== */
.btn-primary {
  display: inline-block;
  padding: 13px 34px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  border: none;
  border-radius: 50px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
  text-decoration: none;
  letter-spacing: 0.02em;
}
.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(167,139,250,0.45);
}

.btn-secondary {
  padding: 11px 26px;
  background: transparent;
  color: var(--text2);
  border: 1px solid var(--border);
  border-radius: 50px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s;
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

.icon-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text2);
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}
.icon-btn:hover { border-color: var(--accent2); color: var(--accent2); }
.icon-btn.delete:hover { border-color: #f87171; color: #f87171; }


/* ===================================================
   导航
=================================================== */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 56px;
  transition: all 0.45s;
}
.navbar.scrolled {
  background: rgba(10,10,18,0.82);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
  padding: 14px 56px;
}
.nav-logo {
  font-size: 19px;
  font-weight: 600;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
  cursor: pointer;
}
.nav-links { display: flex; gap: 40px; list-style: none; }
.nav-links a {
  color: var(--text2);
  text-decoration: none;
  font-size: 14px;
  letter-spacing: 0.04em;
  position: relative;
  transition: color 0.3s;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -5px; left: 0; right: 0;
  height: 1.5px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-links a.active::after, .nav-links a:hover::after { transform: scaleX(1); }
.nav-toggle { display: none; background: none; border: none; color: var(--text); font-size: 22px; cursor: pointer; }


/* ===================================================
   页头 (子页面共用)
=================================================== */
.page-header {
  position: relative;
  padding: 160px 56px 100px;
  text-align: center;
  overflow: hidden;
}
.page-header-bg {
  position: absolute;
  inset: 0;
  opacity: 0.6;
}
.page-header--music .page-header-bg {
  background:
    radial-gradient(ellipse 70% 60% at 30% 50%, rgba(167,139,250,0.25) 0%, transparent 65%),
    radial-gradient(ellipse 50% 40% at 80% 30%, rgba(56,189,248,0.15) 0%, transparent 60%);
}
.page-header--diary .page-header-bg {
  background:
    radial-gradient(ellipse 70% 60% at 50% 50%, rgba(244,114,182,0.2) 0%, transparent 65%),
    radial-gradient(ellipse 50% 40% at 20% 60%, rgba(167,139,250,0.15) 0%, transparent 60%);
}
.page-header--works .page-header-bg {
  background:
    radial-gradient(ellipse 70% 60% at 70% 40%, rgba(56,189,248,0.2) 0%, transparent 65%),
    radial-gradient(ellipse 50% 40% at 20% 60%, rgba(167,139,250,0.15) 0%, transparent 60%);
}
.page-header-content { position: relative; z-index: 1; }
.page-header-tag {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.35em;
  color: var(--accent);
  border: 1px solid rgba(167,139,250,0.3);
  padding: 5px 16px;
  border-radius: 50px;
  margin-bottom: 20px;
}
.page-header-title {
  font-size: clamp(40px, 7vw, 80px);
  font-weight: 600;
  background: linear-gradient(135deg, var(--text) 40%, var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
}
.page-header-sub {
  margin-top: 14px;
  font-size: 16px;
  color: var(--text2);
  letter-spacing: 0.08em;
}
.header-wave {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  line-height: 0;
}
.header-wave svg { width: 100%; height: 80px; }


/* ===================================================
   首页 Hero
=================================================== */
.home-hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 55% at 20% 40%, rgba(167,139,250,0.18) 0%, transparent 60%),
    radial-gradient(ellipse 60% 45% at 80% 65%, rgba(244,114,182,0.13) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 50% 5%,  rgba(56,189,248,0.09) 0%, transparent 55%);
}
.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.55;
}
.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
}
.hero-eyebrow {
  font-size: 12px;
  letter-spacing: 0.4em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 18px;
}
.hero-title {
  font-size: clamp(64px, 12vw, 140px);
  font-weight: 600;
  line-height: 1;
  background: linear-gradient(135deg, #fff 20%, var(--accent) 60%, var(--accent2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-tagline {
  margin-top: 22px;
  font-size: 18px;
  color: var(--text2);
  letter-spacing: 0.2em;
}
.hero-scroll {
  margin-top: 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--text3);
  font-size: 11px;
  letter-spacing: 0.2em;
}
.scroll-line {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, var(--text3), transparent);
  animation: scrollLine 2s ease-in-out infinite;
}
@keyframes scrollLine {
  0%,100% { transform: scaleY(1); opacity: 0.6; }
  50%      { transform: scaleY(1.3); opacity: 1; }
}


/* ===================================================
   首页媒体展示台
=================================================== */
.home-showcase {
  padding: 0 56px 80px;
  max-width: 1280px;
  margin: 0 auto;
}
.showcase-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
.showcase-screen {
  width: 100%;
  max-width: 900px;
  aspect-ratio: 16/9;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sc-media {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  animation: scFadeIn 0.5s ease;
}
@keyframes scFadeIn {
  from { opacity: 0; transform: scale(1.03); }
  to   { opacity: 1; transform: scale(1); }
}
.sc-caption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 12px 20px;
  background: linear-gradient(to top, rgba(0,0,0,0.65), transparent);
  font-size: 14px; color: #fff;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}
.showcase-placeholder {
  text-align: center; color: var(--text3); padding: 40px 24px;
}
.showcase-placeholder-icon { font-size: 52px; display: block; margin-bottom: 14px; }
.showcase-hint { font-size: 12px; margin-top: 8px; line-height: 1.7; }

.showcase-controls {
  display: flex;
  align-items: center;
  gap: 14px;
}
.sc-btn {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text2);
  width: 38px; height: 38px;
  border-radius: 50%;
  font-size: 22px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.25s;
  line-height: 1;
}
.sc-btn:hover { border-color: var(--accent); color: var(--accent); }
.sc-pause { font-size: 16px; }

.showcase-dots {
  display: flex; gap: 8px; align-items: center;
}
.sc-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  border: none;
  background: var(--surface2);
  cursor: pointer;
  transition: all 0.3s;
  padding: 0;
}
.sc-dot.active { background: var(--accent); transform: scale(1.3); }
.sc-dot:hover  { background: var(--text3); }

@media (max-width: 1024px) {
  .home-showcase { padding: 0 28px 60px; }
}
@media (max-width: 768px) {
  .home-showcase { padding: 0 24px 48px; }
  .showcase-screen { border-radius: var(--radius-sm); }
}


/* ===================================================
   首页 Portal 卡片
=================================================== */
.portals {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  padding: 0 56px 120px;
  max-width: 1280px;
  margin: 0 auto;
}
.portal-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 40px 36px 36px;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.4s ease, border-color 0.4s, box-shadow 0.4s;
  text-decoration: none;
  color: inherit;
}
.portal-card:hover {
  transform: translateY(-10px);
  border-color: rgba(167,139,250,0.35);
  box-shadow: var(--glow);
}
.portal-bg {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.5s;
}
.portal-music  { background: radial-gradient(ellipse at 70% 30%, rgba(167,139,250,0.22) 0%, transparent 65%); }
.portal-diary  { background: radial-gradient(ellipse at 70% 30%, rgba(244,114,182,0.22) 0%, transparent 65%); }
.portal-works  { background: radial-gradient(ellipse at 70% 30%, rgba(56,189,248,0.22) 0%, transparent 65%); }
.portal-card:hover .portal-bg { opacity: 1; }

.portal-icon {
  position: relative;
  width: 56px;
  height: 56px;
  color: var(--accent);
  margin-bottom: 24px;
}
.portal-icon svg { width: 100%; height: 100%; }

.portal-body { position: relative; }
.portal-tag {
  display: inline-block;
  font-size: 10px;
  letter-spacing: 0.3em;
  color: var(--accent);
  margin-bottom: 10px;
}
.portal-title {
  font-size: 30px;
  font-weight: 600;
  margin-bottom: 12px;
  background: linear-gradient(135deg, var(--text), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.portal-desc {
  font-size: 14px;
  color: var(--text2);
  line-height: 1.75;
}
.portal-arrow {
  position: absolute;
  top: 36px;
  right: 36px;
  font-size: 22px;
  color: var(--text3);
  transition: all 0.35s;
}
.portal-card:hover .portal-arrow {
  color: var(--accent);
  transform: translate(4px, -4px);
}


/* ===================================================
   音乐页面
=================================================== */
.music-layout {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 32px;
  padding: 48px 56px 100px;
  max-width: 1280px;
  margin: 0 auto;
  align-items: start;
}

.player-main {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  position: relative;
  overflow: hidden;
}
.player-main::before {
  content: '';
  position: absolute;
  width: 400px; height: 400px;
  top: -100px; left: 50%; transform: translateX(-50%);
  background: radial-gradient(circle, rgba(167,139,250,0.07), transparent 70%);
  pointer-events: none;
}

/* 专辑封面 */
.album-wrap { position: relative; width: 230px; height: 230px; }
.album-art {
  width: 230px; height: 230px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--surface2), var(--bg3));
  border: 3px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  position: relative; z-index: 1;
  transition: border-color 0.4s;
}
.album-art img { width: 100%; height: 100%; object-fit: cover; }
.album-art.spinning { animation: spin 10s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.album-placeholder { font-size: 72px; color: var(--text3); }

/* 旋转光环 */
.album-rings { position: absolute; inset: -20px; pointer-events: none; }
.ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(167,139,250,0.15);
  opacity: 0;
  transition: opacity 0.4s;
}
.ring-1 { inset: 14px; animation: ringPulse 3s 0.0s ease-in-out infinite; }
.ring-2 { inset: 4px;  animation: ringPulse 3s 0.4s ease-in-out infinite; }
.ring-3 { inset: -6px; animation: ringPulse 3s 0.8s ease-in-out infinite; }
.album-art.spinning ~ .album-rings .ring { opacity: 1; }
@keyframes ringPulse {
  0%,100% { transform: scale(1); opacity: 0.15; }
  50%      { transform: scale(1.04); opacity: 0.4; }
}

/* 音频可视化 */
.visualizer {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 32px;
  opacity: 0;
  transition: opacity 0.4s;
}
.visualizer.playing { opacity: 1; }
.v-bar {
  width: 3px;
  background: linear-gradient(to top, var(--accent), var(--accent2));
  border-radius: 2px;
  height: 4px;
  animation: none;
}
.visualizer.playing .v-bar {
  animation: barDance 0.8s ease-in-out infinite alternate;
}
.v-bar:nth-child(odd)  { animation-delay: 0s; }
.v-bar:nth-child(even) { animation-delay: 0.15s; }
.v-bar:nth-child(3n)   { animation-delay: 0.3s; }
.v-bar:nth-child(4n)   { animation-delay: 0.45s; }
@keyframes barDance {
  from { height: 4px; }
  to   { height: calc(4px + var(--h, 20px)); }
}

.player-info { text-align: center; }
.song-title  { font-size: 24px; font-weight: 600; }
.song-artist { font-size: 14px; color: var(--text2); margin-top: 5px; }

.progress-wrap {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
}
.time { font-size: 12px; color: var(--text3); min-width: 36px; }
.progress-bar {
  flex: 1;
  height: 4px;
  background: var(--surface2);
  border-radius: 2px;
  cursor: pointer;
  position: relative;
}
.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 2px;
}
.progress-thumb {
  position: absolute;
  top: 50%; left: 0%;
  transform: translate(-50%, -50%);
  width: 13px; height: 13px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 8px rgba(167,139,250,0.9);
  opacity: 0;
  transition: opacity 0.2s;
}
.progress-bar:hover .progress-thumb { opacity: 1; }

.controls {
  display: flex;
  align-items: center;
  gap: 12px;
}
.ctrl-btn {
  background: none;
  border: none;
  color: var(--text2);
  font-size: 20px;
  cursor: pointer;
  padding: 10px;
  border-radius: 50%;
  transition: all 0.25s;
  line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
.ctrl-btn:hover { color: var(--text); background: var(--surface2); }
.ctrl-btn.active { color: var(--accent); }
.play-btn {
  width: 62px; height: 62px;
  background: linear-gradient(135deg, var(--accent), var(--accent2)) !important;
  color: #fff !important;
  font-size: 24px;
  box-shadow: 0 6px 24px rgba(167,139,250,0.45);
}
.play-btn:hover { transform: scale(1.08) !important; background: linear-gradient(135deg, var(--accent), var(--accent2)) !important; }

.volume-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  justify-content: center;
}
.vol-icon { font-size: 14px; }
#volumeSlider { width: 110px; height: 4px; accent-color: var(--accent); cursor: pointer; }

/* 播放列表 */
.playlist {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 600px;
  position: sticky;
  top: 100px;
}
.playlist-header {
  padding: 20px 24px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text2);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.playlist-count { color: var(--text3); font-weight: 400; font-size: 13px; }
.playlist-list { flex: 1; overflow-y: auto; }
.playlist-empty {
  padding: 44px 24px;
  text-align: center;
  color: var(--text3);
  font-size: 14px;
  line-height: 1.7;
}
.playlist-empty .hint { margin-top: 10px; font-size: 12px; }
.playlist-empty code { background: var(--surface2); padding: 2px 7px; border-radius: 4px; color: var(--accent); }
.playlist-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 24px;
  cursor: pointer;
  transition: background 0.2s;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}
.playlist-item:hover { background: var(--surface2); }
.playlist-item.active { background: rgba(167,139,250,0.1); }
.playlist-item.active .item-title { color: var(--accent); }
.item-num { font-size: 12px; color: var(--text3); min-width: 22px; }
.item-info { flex: 1; overflow: hidden; }
.item-title { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-artist { font-size: 12px; color: var(--text3); margin-top: 2px; }
.item-duration { font-size: 12px; color: var(--text3); }
.upload-btn {
  display: block;
  padding: 15px 24px;
  text-align: center;
  color: var(--accent);
  font-size: 13px;
  cursor: pointer;
  border-top: 1px solid var(--border);
  transition: background 0.2s;
}
.upload-btn:hover { background: var(--surface2); }


/* ===================================================
   日记页面
=================================================== */
.diary-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
  padding: 48px 56px 100px;
  max-width: 1280px;
  margin: 0 auto;
  align-items: start;
}

.diary-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: 100px;
}
.diary-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: calc(100vh - 220px);
  overflow-y: auto;
  padding-right: 4px;
}
.diary-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  cursor: pointer;
  transition: all 0.25s;
}
.diary-item:hover { border-color: rgba(244,114,182,0.4); transform: translateX(4px); }
.diary-item.active { border-color: var(--accent2); background: rgba(244,114,182,0.07); }
.diary-item-title { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.diary-item.active .diary-item-title { color: var(--accent2); }
.diary-item-date { font-size: 11px; color: var(--text3); }
.diary-item-preview { font-size: 12px; color: var(--text2); margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.diary-main {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-height: 560px;
  padding: 48px;
}
.diary-welcome {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 460px; color: var(--text3); gap: 16px; text-align: center;
}
.diary-welcome-icon { font-size: 52px; }

.diary-read { display: flex; flex-direction: column; gap: 20px; }
.diary-read-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.diary-read-title { font-size: 28px; font-weight: 600; }
.diary-read-date { font-size: 12px; color: var(--text3); margin-top: 7px; letter-spacing: 0.05em; }
.diary-read-actions { display: flex; gap: 8px; flex-shrink: 0; }
.diary-read-content {
  font-family: 'Noto Serif SC', serif;
  font-size: 16px; color: var(--text2); line-height: 2.1;
  white-space: pre-wrap; word-break: break-word;
}

/* Modal */
.modal-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(6px);
  z-index: 2000;
  align-items: center; justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
  width: 580px; max-width: 92vw;
  display: flex; flex-direction: column; gap: 18px;
  animation: modalPop 0.35s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes modalPop { from{opacity:0;transform:scale(0.9) translateY(16px)} to{opacity:1;transform:none} }
.modal-header { display: flex; justify-content: space-between; align-items: center; }
.modal-header h3 { font-size: 20px; }
.modal-close { background: none; border: none; color: var(--text3); font-size: 20px; cursor: pointer; transition: color 0.2s; }
.modal-close:hover { color: var(--text); }
.modal-input {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  color: var(--text);
  font-size: 16px;
  outline: none;
  transition: border-color 0.2s;
  font-family: inherit;
}
.modal-input:focus { border-color: var(--accent2); }
.modal-textarea {
  width: 100%; height: 270px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  color: var(--text);
  font-size: 15px;
  font-family: 'Noto Serif SC', serif;
  line-height: 1.9;
  outline: none; resize: vertical;
  transition: border-color 0.2s;
}
.modal-textarea:focus { border-color: var(--accent2); }
.modal-footer { display: flex; justify-content: flex-end; gap: 12px; }


/* ===================================================
   作品页面
=================================================== */
.works-layout {
  padding: 48px 56px 100px;
  max-width: 1280px;
  margin: 0 auto;
}
.works-filter {
  display: flex; gap: 12px;
  justify-content: center;
  margin-bottom: 52px;
  flex-wrap: wrap;
}
.filter-btn {
  padding: 9px 26px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text2);
  border-radius: 50px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.3s;
}
.filter-btn.active, .filter-btn:hover {
  background: linear-gradient(135deg, var(--accent), var(--accent3));
  border-color: transparent;
  color: #fff;
}
.works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 26px;
}
.work-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.35s ease, box-shadow 0.35s, border-color 0.35s;
}
.work-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 48px rgba(56,189,248,0.15);
  border-color: rgba(56,189,248,0.3);
}
.work-card.hidden { display: none; }

.work-thumb { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; }
.work-thumb-placeholder {
  width: 100%; aspect-ratio: 4/3;
  background: linear-gradient(135deg, var(--bg3), var(--surface2));
  display: flex; align-items: center; justify-content: center;
  font-size: 52px; color: var(--text3);
}
.work-body { padding: 22px; }
.work-tag {
  display: inline-block;
  font-size: 10px; letter-spacing: 0.15em;
  color: var(--accent3);
  border: 1px solid rgba(56,189,248,0.25);
  padding: 3px 10px; border-radius: 50px;
  margin-bottom: 10px;
}
.work-title { font-size: 16px; font-weight: 600; margin-bottom: 7px; }
.work-desc { font-size: 13px; color: var(--text2); line-height: 1.65; }

.works-empty {
  grid-column: 1/-1;
  text-align: center;
  padding: 80px 24px;
  color: var(--text3);
}
.works-empty .hint { margin-top: 12px; font-size: 13px; line-height: 1.9; }
.works-empty code { background: var(--surface); padding: 2px 7px; border-radius: 4px; color: var(--accent); }

/* Lightbox */
.lightbox {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 3000;
  align-items: center; justify-content: center;
}
.lightbox.open { display: flex; }
.lightbox-inner {
  display: flex; flex-direction: column; align-items: center; gap: 24px;
  max-width: 80vw;
  animation: lbIn 0.35s ease;
}
@keyframes lbIn { from{opacity:0;transform:scale(0.92)} to{opacity:1;transform:scale(1)} }
.lightbox-content img { max-width: 80vw; max-height: 72vh; border-radius: 10px; display: block; }
.lightbox-info h3 { font-size: 20px; text-align: center; }
.lightbox-info p { font-size: 14px; color: var(--text2); text-align: center; margin-top: 6px; }

.lightbox-close, .lightbox-prev, .lightbox-next {
  position: fixed;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  color: #fff; cursor: pointer;
  border-radius: 50%;
  width: 50px; height: 50px;
  font-size: 24px;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.25s, transform 0.25s;
  backdrop-filter: blur(8px);
}
.lightbox-close { top: 28px; right: 28px; }
.lightbox-prev  { left: 28px; top: 50%; transform: translateY(-50%); }
.lightbox-next  { right: 28px; top: 50%; transform: translateY(-50%); }
.lightbox-close:hover { background: rgba(255,255,255,0.18); }
.lightbox-prev:hover  { background: rgba(255,255,255,0.18); transform: translateY(-50%) translateX(-3px); }
.lightbox-next:hover  { background: rgba(255,255,255,0.18); transform: translateY(-50%) translateX(3px); }


/* ===================================================
   Footer
=================================================== */
.footer {
  text-align: center;
  padding: 44px;
  color: var(--text3);
  font-size: 13px;
  border-top: 1px solid var(--border);
}


/* ===================================================
   Toast
=================================================== */
.toast {
  position: fixed;
  bottom: 36px; left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 12px 26px;
  border-radius: 50px;
  font-size: 14px;
  z-index: 9999;
  transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1);
  pointer-events: none;
  white-space: nowrap;
}
.toast.show { transform: translateX(-50%) translateY(0); }


/* ===================================================
   响应式
=================================================== */
@media (max-width: 1024px) {
  .portals { grid-template-columns: 1fr; padding: 0 28px 80px; }
  .music-layout { grid-template-columns: 1fr; padding: 32px 28px 80px; }
  .playlist { position: static; max-height: 400px; }
  .diary-layout { grid-template-columns: 1fr; padding: 32px 28px 80px; }
  .diary-sidebar { position: static; }
  .works-layout { padding: 32px 28px 80px; }
}
@media (max-width: 768px) {
  .navbar { padding: 16px 24px; }
  .navbar.scrolled { padding: 12px 24px; }
  .nav-links {
    display: none;
    position: absolute;
    top: 65px; right: 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px 24px;
    flex-direction: column;
    gap: 18px;
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
  .page-header { padding: 130px 28px 80px; }
  .hero-title { font-size: 56px; }
  .portal-card { padding: 28px 24px; }
  .player-main { padding: 32px 24px; }
  .diary-main { padding: 28px; }
  .works-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
}
@media (max-width: 480px) {
  .hero-title { font-size: 44px; }
  .album-wrap, .album-art { width: 180px; height: 180px; }
  .works-grid { grid-template-columns: 1fr; }
}

/* ===================================================
   文件管理 UI
=================================================== */

/* --- 宽 Modal --- */
.modal-wide { width: 620px; }

/* --- 文件拖拽区 --- */
.file-drop {
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 32px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.25s, background 0.25s;
  position: relative;
}
.file-drop:hover, .file-drop.drag-over {
  border-color: var(--accent);
  background: rgba(167,139,250,0.05);
}
.file-drop-inner { pointer-events: none; }
.file-drop-icon  { font-size: 38px; margin-bottom: 10px; }
.file-drop p     { font-size: 14px; color: var(--text2); }
.file-drop .hint { font-size: 12px; color: var(--text3); margin-top: 5px; }

/* --- 已选文件条 --- */
.file-chosen {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.file-chosen-icon   { font-size: 20px; flex-shrink: 0; }
.file-chosen-name   { flex: 1; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text2); }
.file-chosen-remove {
  background: none; border: none;
  color: var(--text3); font-size: 18px;
  cursor: pointer; padding: 2px 6px;
  transition: color 0.2s; flex-shrink: 0;
}
.file-chosen-remove:hover { color: #f87171; }

/* --- 封面选择 --- */
.form-label { font-size: 13px; color: var(--text2); }
.cover-row  { display: flex; align-items: center; gap: 16px; }
.cover-pick {
  width: 70px; height: 70px;
  border-radius: 10px;
  border: 2px dashed var(--border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 24px; color: var(--text3);
  overflow: hidden;
  transition: border-color 0.2s;
  flex-shrink: 0;
}
.cover-pick:hover { border-color: var(--accent); }
.cover-pick img   { width: 100%; height: 100%; object-fit: cover; }
.cover-pick-info p     { font-size: 13px; color: var(--text2); }
.cover-pick-info .hint { font-size: 11px; color: var(--text3); margin-top: 3px; }

/* --- Modal select --- */
.modal-select {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  color: var(--text);
  font-size: 15px;
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%235a5a88' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
.modal-select:focus { border-color: var(--accent); }
.modal-select option { background: var(--surface); }

/* --- 小号 textarea --- */
.modal-textarea--sm { height: 100px; }

/* --- 作品文件预览 --- */
.work-file-preview {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 12px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.work-preview-media img,
.work-preview-media video {
  max-width: 100%;
  max-height: 220px;
  border-radius: 8px;
  display: block;
}

/* --- 播放列表删除按钮 --- */
.item-delete {
  background: none; border: none;
  color: var(--text3); font-size: 16px;
  cursor: pointer; padding: 4px 8px;
  border-radius: 6px;
  opacity: 0;
  transition: opacity 0.2s, color 0.2s, background 0.2s;
  flex-shrink: 0;
}
.playlist-item:hover .item-delete { opacity: 1; }
.item-delete:hover { color: #f87171; background: rgba(248,113,113,0.12); }

/* --- 添加按钮（播放列表底部） --- */
.add-btn {
  display: block;
  width: 100%;
  padding: 15px 24px;
  background: none;
  border: none;
  border-top: 1px solid var(--border);
  color: var(--accent);
  font-size: 13px;
  cursor: pointer;
  text-align: center;
  transition: background 0.2s;
}
.add-btn:hover { background: var(--surface2); }

/* --- 作品卡片删除按钮 --- */
.work-card { position: relative; }
.work-delete {
  position: absolute;
  top: 10px; right: 10px;
  background: rgba(0,0,0,0.6);
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff;
  width: 30px; height: 30px;
  border-radius: 50%;
  font-size: 14px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transition: opacity 0.2s, background 0.2s;
  backdrop-filter: blur(4px);
}
.work-card:hover .work-delete { opacity: 1; }
.work-delete:hover { background: rgba(248,113,113,0.7); }

/* --- 日记操作按钮组 --- */
.diary-actions {
  display: flex; gap: 8px;
}
.btn-import {
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 13px;
  padding: 11px 18px;
}

/* --- works toolbar --- */
.works-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 48px;
}
.works-toolbar .works-filter { margin-bottom: 0; }

/* --- 日记导出按钮 --- */
.icon-btn.export:hover { border-color: var(--accent3); color: var(--accent3); }

/* --- 灯箱视频 --- */
.lightbox-content video {
  max-width: 80vw;
  max-height: 72vh;
  border-radius: 10px;
  display: block;
  outline: none;
}

/* --- 视频类型的作品缩略图 --- */
.work-thumb-video {
  width: 100%;
  aspect-ratio: 4/3;
  background: var(--bg3);
  display: flex; align-items: center; justify-content: center;
  font-size: 48px; color: var(--text3);
  position: relative;
}
.work-thumb-video::after {
  content: '▶';
  position: absolute;
  font-size: 32px;
  color: rgba(255,255,255,0.8);
  background: rgba(0,0,0,0.5);
  width: 56px; height: 56px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  text-indent: 3px;
}

/* ===================================================
   身份验证 — 管理员控件显隐
=================================================== */

/* 未登录时隐藏所有管理操作 */
body:not(.is-admin) .add-btn,
body:not(.is-admin) #openAddWork,
body:not(.is-admin) #newDiaryBtn,
body:not(.is-admin) .btn-import,
body:not(.is-admin) .item-delete,
body:not(.is-admin) .work-delete,
body:not(.is-admin) #editBtn,
body:not(.is-admin) #delBtn,
body:not(.is-admin) #exportBtn { display: none !important; }

/* 导航设置按钮 */
.settings-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 1px solid var(--border);
  color: var(--text2);
  padding: 6px 13px;
  border-radius: 50px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.25s;
  white-space: nowrap;
}
.settings-toggle svg { flex-shrink: 0; }
.settings-toggle:hover { color: var(--accent); border-color: var(--accent); }

/* 设置面板 */
.settings-panel {
  display: none;
  position: fixed;
  z-index: 2000;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  width: 200px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  animation: modalPop 0.25s cubic-bezier(0.34,1.56,0.64,1);
}
.settings-panel.open { display: block; }
.sp-title {
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--text3);
  text-transform: uppercase;
  margin-bottom: 10px;
}
.sp-themes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 4px;
}
.sp-theme {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 12px;
  color: var(--text2);
  cursor: pointer;
  transition: all 0.2s;
}
.sp-theme:hover { border-color: var(--accent); color: var(--text); }
.sp-theme.active { border-color: var(--accent); background: rgba(167,139,250,0.1); color: var(--accent); }
.sp-swatch {
  width: 14px; height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-block;
}
.sp-divider { height: 1px; background: var(--border); margin: 12px 0; }
.sp-link {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text2);
  text-decoration: none;
  padding: 6px 4px;
  border-radius: 6px;
  transition: color 0.2s;
}
.sp-link:hover { color: var(--accent); }

/* 导航登录/退出按钮 */
.nav-auth {
  font-size: 13px;
  color: var(--text3);
  text-decoration: none;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 50px;
  transition: all 0.25s;
  white-space: nowrap;
}
.nav-auth:hover {
  color: var(--accent);
  border-color: var(--accent);
}
.is-admin .nav-auth {
  color: var(--accent2);
  border-color: rgba(244,114,182,0.3);
}
.is-admin .nav-auth:hover {
  background: rgba(244,114,182,0.1);
}

/* ===================================================
   登录页
=================================================== */
.page-login {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.login-bg {
  position: fixed; inset: 0;
  pointer-events: none; overflow: hidden;
}
.login-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
}
.login-orb-1 { width: 500px; height: 500px; background: var(--accent);  top: -100px; left: -100px; }
.login-orb-2 { width: 400px; height: 400px; background: var(--accent2); bottom: -80px; right: -80px; }
.login-orb-3 { width: 300px; height: 300px; background: var(--accent3); top: 40%; left: 50%; transform: translate(-50%,-50%); }

.login-wrap {
  position: relative; z-index: 1;
  width: 420px; max-width: 92vw;
  display: flex; flex-direction: column; align-items: center; gap: 20px;
}
.login-logo {
  font-size: 20px; font-weight: 600;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  text-decoration: none;
  margin-bottom: 8px;
}
.login-card {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 36px;
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  box-shadow: var(--shadow);
  animation: modalPop 0.45s cubic-bezier(0.34,1.56,0.64,1);
}
.login-icon  { font-size: 40px; }
.login-title { font-size: 22px; font-weight: 600; }
.login-sub   { font-size: 13px; color: var(--text2); text-align: center; }

.login-form {
  width: 100%;
  display: flex; flex-direction: column; gap: 12px;
  margin-top: 4px;
}
.login-field {
  position: relative;
}
.login-input {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 13px 44px 13px 16px;
  color: var(--text);
  font-size: 15px; font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}
.login-input:focus { border-color: var(--accent); }
.login-input::placeholder { color: var(--text3); }
.pw-toggle {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; font-size: 16px;
  color: var(--text3); padding: 4px; transition: color 0.2s;
}
.pw-toggle:hover { color: var(--text); }
.login-submit { width: 100%; padding: 14px; font-size: 16px; margin-top: 4px; }

.login-hint {
  font-size: 11px; color: var(--text3);
  text-align: center; line-height: 1.7;
  margin-top: 8px;
}
.login-code {
  display: block;
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  font-family: monospace; font-size: 11px;
  color: var(--accent); word-break: break-all;
  text-align: center;
}

.change-pw-card { padding: 28px 36px; }
.change-pw-card .login-title { margin-bottom: 4px; }

/* ===================================================
   动态专辑封面（播放时无封面图的情况）
=================================================== */
.album-art.spinning .album-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  position: relative;
  color: transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent2), var(--accent3), var(--accent));
  background-size: 300% 300%;
  border-radius: 50%;
  animation: albumGradient 4s ease infinite;
}
.album-art.spinning .album-placeholder::after {
  content: '♫';
  position: absolute;
  font-size: 68px;
  color: rgba(255, 255, 255, 0.88);
  animation: albumNotePulse 1.6s ease-in-out infinite alternate;
}
@keyframes albumGradient {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes albumNotePulse {
  from { transform: scale(0.82); opacity: 0.6; }
  to   { transform: scale(1.1);  opacity: 1; }
}


/* ===================================================
   自定义背景层
=================================================== */
#siteBg {
  position: fixed; inset: 0;
  z-index: -1;
  pointer-events: none; overflow: hidden;
}
#siteBg img, #siteBg video {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}
#siteBg .bg-overlay {
  position: absolute; inset: 0;
  background: rgba(10,10,18,0.65);
}


/* ===================================================
   首页时钟
=================================================== */
.hero-clock {
  position: absolute;
  bottom: 40px; right: 56px;
  text-align: right;
  pointer-events: none;
  animation: splashSubIn 1s 0.5s ease both;
}
.clock-time {
  font-size: clamp(28px, 4vw, 52px);
  font-weight: 300;
  letter-spacing: 0.05em;
  background: linear-gradient(135deg, var(--text) 40%, var(--accent));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.clock-date {
  margin-top: 6px;
  font-size: 13px;
  color: var(--text3);
  letter-spacing: 0.12em;
}
@media (max-width: 768px) {
  .hero-clock { bottom: 24px; right: 24px; }
}


/* ===================================================
   隐藏导航按钮（长按 logo 解锁）
=================================================== */
.nav-auth,
.settings-toggle {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}
body.nav-revealed .nav-auth,
body.nav-revealed .settings-toggle {
  opacity: 1;
  pointer-events: auto;
}


/* ===================================================
   设置面板 — 背景管理
=================================================== */
.sp-bg-row {
  display: flex; gap: 8px; align-items: center; margin-bottom: 10px;
}
.sp-bg-btn {
  flex: 1;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 12px; color: var(--text2);
  cursor: pointer; transition: all 0.2s;
  text-align: center;
}
.sp-bg-btn:hover { border-color: var(--accent); color: var(--accent); }
.sp-bg-clear {
  background: none; border: 1px solid var(--border);
  color: var(--text3); font-size: 12px;
  padding: 7px 10px; border-radius: 8px;
  cursor: pointer; transition: all 0.2s;
  white-space: nowrap;
}
.sp-bg-clear:hover { border-color: #f87171; color: #f87171; }
.sp-bg-preview { margin-bottom: 8px; }
.sp-bg-thumb {
  width: 100%; height: 70px;
  object-fit: cover; border-radius: 6px;
  display: block;
}

/* 设置面板 — 8个主题 2列显示 */
.sp-themes { grid-template-columns: 1fr 1fr; }


/* ===================================================
   全局上传进度条
=================================================== */
.upload-progress-wrap {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: rgba(255,255,255,0.06);
  z-index: 9998;
}
.upload-progress-wrap.active { display: block; }
.upload-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  transition: width 0.3s ease;
  border-radius: 0 2px 2px 0;
}
.upload-progress-label {
  position: fixed;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text2);
  font-size: 12px;
  padding: 5px 14px;
  border-radius: 50px;
  pointer-events: none;
  white-space: nowrap;
  z-index: 9999;
}
