/* =========================
   全局变量（浅色模式）
========================= */
/* 全局背景图 */
body {
  background: url("/assets/background.jpg") center/cover no-repeat fixed;
}

:root {
  --bg: #f5f5f7;
  --glass-bg: rgba(255, 255, 255, 0.20);
  --text: #1d1d1f;
  --text-light: #6e6e73;
  --accent: #007aff;
  --shadow: rgba(0, 0, 0, 0.08);
}

/* =========================
   深色模式变量
========================= */
body.dark-mode {
  --bg: #000;
  --glass-bg: rgba(255, 255, 255, 0.08);
  --text: #fff;
  --text-light: #8e8e93;
  --accent: #0a84ff;
  --shadow: rgba(255, 255, 255, 0.05);
}

/* =========================
   全局基础
========================= */
html, body {
  margin: 0;
  padding: 0;
  font-family: "SF Pro Display", "SF Pro Text", Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  height: 100%;
}

* {
  box-sizing: border-box;
}

img {
  user-select: none;
}

/* =========================
   背景层模糊
========================= */
.bg-wrapper {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: -1;
}

/* =========================
   顶部栏
========================= */
.topbar {
  position: fixed;
  top: 0;
  width: 100%;
  height: 70px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 var(--shadow);
  z-index: 50;
}

.topbar-container {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* =========================
   玻璃拟态通用类
========================= */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

/* =========================
   返回按钮（左侧固定）
========================= */
.back-btn {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
  display: grid;
  place-items: center;
  color: var(--text);
  text-decoration: none;
  font-size: 1.3rem;
  cursor: pointer;
  transition: all 0.2s;
}

body.dark-mode .back-btn {
  background: rgba(255,255,255,0.12);
}

.back-btn:hover {
  transform: translateY(-50%) scale(1.06);
}

/* =========================
   主题切换按钮（右侧固定）
========================= */
#themeToggle {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
  display: grid;
  place-items: center;
  font-size: 1.3rem;
  color: var(--text);
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

body.dark-mode #themeToggle {
  background: rgba(255,255,255,0.12);
}

#themeToggle:hover {
  transform: translateY(-50%) scale(1.06);
}

/* =========================
   迷你播放器（中间）
========================= */
.center-player-box {
  display: flex;
  align-items: center;
  padding: 0 16px;
  border-radius: 14px;
  height: 46px;
  position: relative;
  box-shadow: 0 4px 12px var(--shadow);
}

.track-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mini-cover {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  object-fit: cover;
}

.track-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.track-text #miniTitle {
  font-weight: 600;
}

.track-text #miniArtist {
  font-size: 0.75rem;
  color: var(--text-light);
}

/* ===== 按钮组 ===== */
.mini-controls {
  display: flex;
  align-items: center;
  margin-left: 20px;
  gap: 16px;
}

.ctrl-btn {
  font-size: 1rem;
  background: transparent;
  border: none;
  color: var(--text);
  cursor: pointer;
  transition: 0.2s;
}

.ctrl-btn.play {
  font-size: 1.2rem;
}

.ctrl-btn:hover {
  transform: scale(1.15);
}

/* ===== 音量 ===== */
.volume-control {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 20px;
}

.volume-bar {
  width: 80px;
  height: 4px;
  background: rgba(255,255,255,0.3);
  border-radius: 2px;
  overflow: hidden;
}

.volume-fill {
  width: 60%;
  height: 100%;
  background: var(--accent);
}

/* ===== 进度条 ===== */
.mini-progress-container {
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 4px;
  background: rgba(255,255,255,0.25);
  border-radius: 0 0 14px 14px;
}

.mini-progress-fill {
  height: 100%;
  width: 30%;
  background: var(--accent);
}

/* =========================
   主体区域（侧栏 + 内容）
========================= */
.music-main {
  display: flex;
  margin-top: 70px;
}

.music-sidebar {
  width: 260px;
  height: calc(100vh - 70px);
  padding: 20px;
  border-right: 1px solid var(--shadow);
}

.sidebar-header h2 {
  margin: 0 0 16px 0;
  font-size: 1.3rem;
}

.sidebar-search input {
  width: 100%;
  padding: 10px;
  border-radius: 10px;
  border: none;
  background: var(--glass-bg);
  color: var(--text);
}

.sidebar-nav {
  list-style: none;
  padding: 0;
  margin-top: 20px;
}

.sidebar-nav li a {
  display: block;
  padding: 12px 0;
  font-size: 1rem;
  color: var(--text);
  text-decoration: none;
}

.sidebar-nav li a.active {
  color: var(--accent);
}

/* =========================
   主内容区
========================= */
.music-content {
  flex: 1;
  padding: 40px;
}

/* ===== 专辑信息 ===== */
.album-detail {
  display: flex;
  gap: 40px;
  margin-bottom: 40px;
}

.album-cover {
  width: 260px;
  height: 260px;
  border-radius: 20px;
  box-shadow: 0 10px 20px var(--shadow);
}

.album-info h1 {
  margin: 0;
  font-size: 2rem;
}

.album-info h2 {
  color: var(--text-light);
  margin: 8px 0;
}

.meta {
  color: var(--text-light);
}

.play-btn {
  padding: 10px 24px;
  background: var(--accent);
  border-radius: 14px;
  border: none;
  color: white;
  font-size: 1rem;
  margin-top: 16px;
  cursor: pointer;
}

.album-meta {
  margin-top: 20px;
  color: var(--text-light);
  font-size: 0.9rem;
}

/* =========================
   推荐区
========================= */
.recommend h3 {
  margin-bottom: 20px;
}

.recommend-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
}

.album-card img {
  width: 100%;
  border-radius: 14px;
}

.album-card p {
  margin-top: 10px;
  font-size: 0.9rem;
}
