/* ============================================================
   练声 · 界面样式
   想调整外观，基本只需要改下面 :root 里的变量
   ============================================================ */

:root {
  /* —— 颜色 —— */
  --accent: #fa2d48;                   /* 强调色：选中标签、播放键、进度条、循环开启 */
  --bg: #f2f2f7;                       /* 页面背景 */
  --card: #ffffff;                     /* 列表卡片、要点卡片背景 */
  --text: #1c1c1e;                     /* 主要文字 */
  --text-2: #8e8e93;                   /* 次要文字：标签、时长、要点 */
  --separator: rgba(60, 60, 67, .1);   /* 列表分割线 */
  --chip-bg: rgba(120, 120, 128, .12); /* 未选中标签底色 */
  --glass: rgba(255, 255, 255, .78);   /* 毛玻璃底色（迷你播放器、标签栏） */
  --shadow: 0 10px 30px rgba(0, 0, 0, .12);

  /* —— 形状与字号 —— */
  --radius: 16px;                      /* 卡片圆角 */
  --title-size: 34px;                  /* 顶部大标题 */
  --row-size: 17px;                    /* 列表曲名字号 */
  --maxw: 680px;                       /* 桌面端内容最大宽度 */

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC",
          "Helvetica Neue", "Microsoft YaHei", sans-serif;
}

/* 深色模式：跟随系统自动切换 */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --card: #1c1c1e;
    --text: #f2f2f7;
    --text-2: #98989f;
    --separator: rgba(84, 84, 88, .45);
    --chip-bg: rgba(120, 120, 128, .22);
    --glass: rgba(28, 28, 30, .78);
    --shadow: 0 10px 30px rgba(0, 0, 0, .55);
  }
}

* { margin: 0; padding: 0; box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button { font-family: inherit; border: 0; background: none; color: inherit; cursor: pointer; }
svg { width: 1em; height: 1em; fill: currentColor; display: block; }

/* ———— 顶部大标题 ———— */
.page-head {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: calc(28px + env(safe-area-inset-top)) 20px 8px;
}
.page-head h1 { font-size: var(--title-size); font-weight: 700; letter-spacing: .5px; }

/* ———— 标签栏（横向滑动，吸顶） ———— */
.tag-bar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 10px 20px 12px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  backdrop-filter: blur(20px) saturate(1.6);
  scrollbar-width: none;
}
.tag-bar::-webkit-scrollbar { display: none; }

.chip {
  flex: 0 0 auto;
  padding: 7px 16px;
  font-size: 15px;
  border-radius: 999px;
  background: var(--chip-bg);
  transition: background .2s, color .2s, transform .1s;
}
.chip:active { transform: scale(.96); }
.chip.on { background: var(--accent); color: #fff; }

/* ———— 曲目列表 ———— */
.track-list {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 4px 16px 40px;
}
body.has-player .track-list { padding-bottom: 120px; } /* 给迷你播放器留位置 */

.card {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
}
.row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 13px 16px;
  text-align: left;
}
.row:not(:last-child)::after {          /* iOS 式细分隔线 */
  content: '';
  position: absolute;
  left: 16px; right: 0; bottom: 0;
  height: .5px;
  background: var(--separator);
}
.row:active { background: var(--chip-bg); }
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.row-title {
  font-size: var(--row-size);
  font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.row.playing .row-title { color: var(--accent); }
.row-sub {
  font-size: 13px;
  color: var(--text-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.row-time { font-size: 14px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.row.playing .row-time { display: none; }

/* 正在播放的跳动指示条 */
.eq { display: none; align-items: flex-end; gap: 2.5px; height: 14px; }
.row.playing .eq { display: inline-flex; }
.eq i { width: 3px; border-radius: 2px; background: var(--accent); animation: eq .9s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: .3s; }
.eq i:nth-child(3) { animation-delay: .6s; }
body:not(.is-playing) .eq i { animation-play-state: paused; }
@keyframes eq { 0%, 100% { height: 4px; } 50% { height: 14px; } }

.empty { padding: 60px 0; text-align: center; font-size: 15px; color: var(--text-2); }

/* ———— 底部迷你播放器（毛玻璃） ———— */
.mini-player {
  position: fixed;
  left: 12px; right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  z-index: 20;
  max-width: calc(var(--maxw) - 24px);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 18px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(24px) saturate(1.6);
  backdrop-filter: blur(24px) saturate(1.6);
  box-shadow: var(--shadow);
}
.mp-progress {                          /* 顶部细进度条 */
  position: absolute;
  top: 0; left: 18px; right: 18px;
  height: 2.5px;
  border-radius: 2px;
  overflow: hidden;
}
.mp-progress span { display: block; height: 100%; width: 0; background: var(--accent); }
.mp-text { flex: 1; min-width: 0; }
.mp-title { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp-note { font-size: 12px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-btn { flex: 0 0 auto; padding: 6px; font-size: 26px; color: var(--text); }
.icon-btn.on { color: var(--accent); }  /* 循环按钮开启状态 */

/* ———— 全屏播放页 ———— */
.full-player {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  transform: translateY(100%);
  transition: transform .35s cubic-bezier(.32, .72, .35, 1);
}
.full-player.open { transform: translateY(0); }
.fp-close {
  align-self: center;
  margin-top: calc(10px + env(safe-area-inset-top));
  font-size: 30px;
  color: var(--text-2);
}
.fp-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  padding: 24px 32px calc(32px + env(safe-area-inset-bottom));
}
.fp-body .chip { align-self: center; }
#fpTitle { font-size: 28px; font-weight: 700; text-align: center; letter-spacing: .3px; }
.fp-note {
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--card);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-2);
  text-align: center;
}
.fp-note:empty { display: none; }

/* 进度滑杆 */
#fpSeek {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 30px;
  background: transparent;
  --p: 0%;
}
#fpSeek::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(var(--accent), var(--accent)) 0 / var(--p) 100% no-repeat var(--chip-bg);
}
#fpSeek::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px; height: 24px;
  margin-top: -9px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .3);
}
#fpSeek::-moz-range-track { height: 6px; border-radius: 3px; background: var(--chip-bg); }
#fpSeek::-moz-range-progress { height: 6px; border-radius: 3px; background: var(--accent); }
#fpSeek::-moz-range-thumb {
  width: 24px; height: 24px; border: 0; border-radius: 50%;
  background: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .3);
}
.fp-times {
  display: flex;
  justify-content: space-between;
  margin-top: -12px;
  font-size: 12px;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}

/* 播放控制按钮 */
.fp-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  margin-top: 8px;
}
.fp-controls .icon-btn { font-size: 30px; color: var(--text-2); }
.fp-controls .icon-btn.on { color: var(--accent); }
.play-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 76px; height: 76px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 34px;
  box-shadow: 0 8px 20px rgba(250, 45, 72, .35); /* 换强调色时这里一起改 */
}
.play-btn:active { transform: scale(.95); }
