/* =========================================================
   album.css — 环绕专辑页
   背景层 / HUD / 书页式专辑堆 / 专辑详情 / 曲目 / 播放器
   ========================================================= */

:root {
  --accent: #ff4fa3;
  --ink: #f4f5f8;
  --muted: rgba(255, 255, 255, 0.55);
  --faint: rgba(255, 255, 255, 0.32);
  --line: rgba(255, 255, 255, 0.1);
  --panel: rgba(16, 18, 24, 0.86);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { height: 100%; }

body {
  min-width: 960px;
  background: #05060a;
  color: var(--ink);
  font: 14px/1.6 "PingFang SC", "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------------- 背景层（双图层交叉淡入） ---------------- */
.bg-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: radial-gradient(circle at 50% 35%, #1a1a2e 0%, #0b0b12 70%);
  opacity: 0;
  transition: opacity 0.6s ease;
  will-change: opacity;
}
.bg-layer.is-on { opacity: 1; }

/* 自定义照片背景压一层暗色，保证文字和封面看得清 */
.bg-layer::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(5, 6, 10, 0);
  transition: background-color 0.4s ease;
  pointer-events: none;
}
.bg-layer.is-photo::after { background: rgba(5, 6, 10, 0.45); }

/* 四周暗角，视线集中在专辑上 */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  background: radial-gradient(circle at 50% 45%, transparent 42%, rgba(0, 0, 0, 0.55) 100%);
}

/* ---------------- 顶部 HUD ---------------- */
.hud {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 34px 42px;
  pointer-events: none;
}

/* 轮播变亮以后，顶部压一层很淡的渐变保证标题可读 */
.hud::before {
  content: "";
  position: absolute;
  inset: 0 0 -40px;
  z-index: -1;
  background: linear-gradient(180deg, rgba(4, 5, 9, 0.72) 0%, rgba(4, 5, 9, 0) 100%);
  pointer-events: none;
}
.hud > * { pointer-events: auto; }

.kicker {
  color: var(--faint);
  font-size: 12px;
  letter-spacing: 7px;
}
.brand h1 {
  margin-top: 8px;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 3px;
}
.brand .hint {
  margin-top: 10px;
  color: var(--faint);
  font-size: 13px;
  letter-spacing: 0.4px;
}

.bg-switch {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
}
.bg-dot {
  width: 24px;
  height: 24px;
  border: 2px solid transparent;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
  transition: transform 0.2s, border-color 0.2s;
}
.bg-dot:hover { transform: scale(1.15); }
.bg-dot.is-active { border-color: #fff; }
.bg-upload {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border: 1px dashed rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.bg-upload:hover { border-color: #fff; color: #fff; }

/* ---------------- 斜向图片轮播（在专辑环下面、背景上面） ---------------- */
.marquees {
  position: fixed;
  inset: 0;
  z-index: 4;
  overflow: hidden;
  pointer-events: none;
}

/* 两条平行斜带：绕 45° 后横贯屏幕，一条在上半、一条在下半，中间留空隙 */
.marquee {
  position: absolute;
  left: 50%;
  width: 200vmax;
  height: 170px;
  margin-left: -100vmax;
  overflow: hidden;
  pointer-events: none;
  transform: rotate(45deg);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 7%, #000 93%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 7%, #000 93%, transparent 100%);
}

.marquee--top { top: calc(13% - 85px); }
.marquee--bottom { top: calc(87% - 85px); }

/* 上面的带：内容往东南（右下）走；下面的带：内容往西北（左上）走 */
.marquee--top .marquee-track { animation: marquee-se 64s linear infinite; }
.marquee--bottom .marquee-track { animation: marquee-nw 52s linear infinite; }

.marquee-track {
  display: flex;
  align-items: center;
  gap: 0;
  height: 100%;
  will-change: transform;
}
.marquee:hover .marquee-track { animation-play-state: paused; }

/* --loop 由脚本按重复份数写入，保证无缝衔接 */
@keyframes marquee-se {
  from { transform: translateX(calc(-1 * var(--loop, 0px))); }
  to { transform: translateX(0); }
}
@keyframes marquee-nw {
  from { transform: translateX(0); }
  to { transform: translateX(calc(-1 * var(--loop, 0px))); }
}

/* 16:9 的图片条；间距用 margin 而不是 flex gap，
   这样每张的占位宽度固定，整条宽度正好是「一份内容」的整数倍，循环才不会跳 */
.marquee-item {
  position: relative;
  pointer-events: auto;
  height: 100%;
  aspect-ratio: 16 / 9;
  flex: 0 0 auto;
  margin-right: 16px;
  overflow: hidden;
  border-radius: 10px;
  background: rgba(10, 12, 18, 0.6);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.45);
  opacity: 1;
  transition: opacity 0.3s;
}
.marquee-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
  -webkit-user-drag: none;
}

/* 单张的删除：悬停才出现 */
.marquee-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(8, 9, 13, 0.7);
  color: rgba(255, 255, 255, 0.75);
  font-size: 10px;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, background-color 0.2s;
}
.marquee-item:hover .marquee-remove { opacity: 1; pointer-events: auto; }
.marquee-remove:hover { background: rgba(232, 69, 60, 0.9); color: #fff; }

/* 每列一个低调的“＋”，点它从电脑里加图 */
.marquee-add {
  position: fixed;
  z-index: 50;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.5);
  font-size: 15px;
  line-height: 1;
  opacity: 0.5;
  pointer-events: auto;
  transition: opacity 0.2s, background-color 0.2s, color 0.2s;
}
.marquee-add:hover { opacity: 1; background: rgba(255, 255, 255, 0.1); color: #fff; }
.marquee-add--left { left: 26px; bottom: 26px; }
.marquee-add--right { right: 26px; top: 118px; }

/* ---------------- 舞台 ---------------- */
.stage {
  position: relative;
  z-index: 10;
  pointer-events: none; /* 让点击穿透到下方轮播层，只有封面响应 */
  display: grid;
  place-items: center;
  height: 100vh;
  perspective: 1900px;
  perspective-origin: 50% 48%;
}

/* 双层专辑环：外圈正向、内圈反向，各自独立旋转；小圈在上、大圈在下，约五分之一重叠 */
.ring {
  --radius: 430px;
  --card: 200px;
  --shift: 0px;
  grid-area: 1 / 1;
  position: relative;
  width: 0;
  height: 0;
  transform-style: preserve-3d;
  transform: translateY(var(--shift, 0px)) rotateX(-8deg);
  will-change: transform;
}

.ring--outer {
  --shift: 45px;
  animation: ring-spin 62s linear infinite;
}

.ring--inner {
  --shift: -110px;
  animation: ring-spin 46s linear infinite reverse;
}

@keyframes ring-spin {
  from { transform: translateY(var(--shift, 0px)) rotateX(-8deg) rotateY(0deg); }
  to { transform: translateY(var(--shift, 0px)) rotateX(-8deg) rotateY(360deg); }
}

/* 悬停某张专辑时只暂停它所在的那一圈；打开详情时两圈都停 */
.ring.is-paused { animation-play-state: paused; }

.album {
  pointer-events: auto;
  position: absolute;
  top: 0;
  left: 0;
  width: var(--card);
  height: var(--card);
  margin: calc(var(--card) / -2) 0 0 calc(var(--card) / -2);
  padding: 0;
  border-radius: 14px;
  background: #0b0d14;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.65);
  transform:
    rotateY(var(--angle)) translateZ(var(--radius)) scale(var(--scale, 1));
  transition: transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1), box-shadow 0.35s, opacity 0.4s ease;
  backface-visibility: visible;
  will-change: transform;
}

/* 以左侧边为轴的一层：悬停时像掀开一页，绕内侧边翻开 */
.album-inner {
  position: absolute;
  inset: 0;
  display: block;
  overflow: hidden;
  border-radius: inherit;
  transform-origin: left center;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  transition: transform 0.4s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.album:hover .album-inner {
  transform: scale(1.1) rotateY(-12deg);
}

/* 转到背面的专辑：始终不透明，只盖一层暗色，不做半透明处理 */
.album.is-back .album-meta { opacity: 0; }
.album.is-back .album-inner { transform: none; }

.album-inner::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  background: #05060a;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.album.is-back .album-inner::after { opacity: 0.45; }

.album img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
  -webkit-user-drag: none;
}

.album-meta {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 36px 14px 12px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
  text-align: left;
  transition: opacity 0.3s;
}
.album-meta strong { font-size: 13px; letter-spacing: 1px; }
.album-meta em { color: rgba(255, 255, 255, 0.62); font-size: 11px; font-style: normal; }

/* ---------------- 增删专辑 / 曲目的低调入口 ---------------- */
/* 新增专辑：平时是小圆点，悬停展开成圆角方形，里面是内外圈两个按钮 */
.fab {
  position: fixed;
  right: 34px;
  bottom: 34px;
  z-index: 45;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.55);
  opacity: 0.6;
  transition:
    width 0.28s cubic-bezier(0.22, 0.61, 0.36, 1),
    height 0.28s cubic-bezier(0.22, 0.61, 0.36, 1),
    border-radius 0.28s cubic-bezier(0.22, 0.61, 0.36, 1),
    opacity 0.2s,
    background-color 0.25s,
    border-color 0.25s;
}
.fab-plus {
  font-size: 20px;
  line-height: 1;
  transition: opacity 0.15s;
}
.fab-actions {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease 0.04s;
}
/* 展开状态：桌面靠 hover，触屏靠 JS 切换 .is-open */
.fab.is-open {
  width: 132px;
  height: 132px;
  border-radius: 26px;
  opacity: 1;
  background: rgba(14, 16, 22, 0.92);
  border-color: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(14px);
}
.fab.is-open .fab-plus { opacity: 0; }
.fab.is-open .fab-actions {
  opacity: 1;
  pointer-events: auto;
}

@media (hover: hover) {
  .fab:hover,
  .fab:focus-within {
    width: 132px;
    height: 132px;
    border-radius: 26px;
    opacity: 1;
    background: rgba(14, 16, 22, 0.92);
    border-color: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(14px);
  }
  .fab:hover .fab-plus,
  .fab:focus-within .fab-plus { opacity: 0; }
  .fab:hover .fab-actions,
  .fab:focus-within .fab-actions {
    opacity: 1;
    pointer-events: auto;
  }
}

/* 两个长方形：内圈在上、外圈在下，各占一半，把方形填满 */
.fab-btn {
  flex: 1 1 50%;
  width: 100%;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.86);
  font-size: 13px;
  letter-spacing: 2px;
  transition: background-color 0.2s, color 0.2s;
}
.fab-btn + .fab-btn { border-top: 1px solid rgba(255, 255, 255, 0.12); }
.fab-btn:hover {
  background: var(--accent);
  color: #12040b;
}

/* 专辑右上角的删除：悬停才浮现 */
.album-remove {
  position: absolute;
  top: -4px;
  right: -4px;
  z-index: 3;
  display: grid;
  place-items: center;
  /* 跟着卡片缩放，并且贴在角上，避免小卡片时盖住封面中心（挡住点击） */
  width: clamp(15px, 30%, 22px);
  height: auto;
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(10, 10, 14, 0.72);
  color: rgba(255, 255, 255, 0.72);
  font-size: 10px;
  line-height: 1;
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.2s, transform 0.2s, background-color 0.2s;
}
.album:hover .album-remove { opacity: 0.85; transform: none; }
.album-remove:hover { background: rgba(232, 69, 60, 0.9); color: #fff; opacity: 1; }

/* 曲目行：悬停出现删除按钮 */
.track-item { position: relative; }
.track { padding-right: 34px; }
.track-remove {
  position: absolute;
  top: 50%;
  right: 6px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.45);
  font-size: 11px;
  line-height: 1;
  opacity: 0;
  transform: translateY(-50%) scale(0.9);
  transition: opacity 0.2s, transform 0.2s, background-color 0.2s, color 0.2s;
}
.track-item:hover .track-remove { opacity: 0.75; transform: translateY(-50%); }
.track-remove:hover { background: rgba(232, 69, 60, 0.25); color: #fff; opacity: 1; }

/* 列表末尾的“添加歌曲” */
.track-add {
  width: 100%;
  margin-top: 4px;
  padding: 10px 12px;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  text-align: left;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.85);
  transition: color 0.2s, background-color 0.2s;
}
.track-add:hover { color: #fff; background: rgba(8, 9, 13, 0.55); }
.track-empty {
  padding: 10px 12px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.85);
}

/* 轻提示 */
.toast {
  position: fixed;
  left: 50%;
  bottom: 108px;
  z-index: 200;
  transform: translate(-50%, 10px);
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(20, 22, 28, 0.94);
  color: rgba(255, 255, 255, 0.86);
  font-size: 12.5px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* 小弹窗（新增专辑 / 新增歌曲 / 删除确认） */
.mini-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
}
.mini-mask {
  position: absolute;
  inset: 0;
  background: rgba(4, 5, 9, 0.66);
  backdrop-filter: blur(8px);
}
.mini-panel {
  position: relative;
  z-index: 1;
  width: 420px;
  padding: 26px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: linear-gradient(160deg, rgba(30, 32, 42, 0.96), rgba(11, 12, 17, 0.98));
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.6);
}
.mini-panel h3 { font-size: 17px; font-weight: 700; }
.mini-text { margin-top: 8px; color: rgba(255, 255, 255, 0.55); font-size: 13px; line-height: 1.7; }
.mini-field { display: flex; flex-direction: column; gap: 6px; margin-top: 16px; }
.mini-field > span { color: rgba(255, 255, 255, 0.5); font-size: 12px; }
.mini-field input {
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  outline: none;
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  font: inherit;
  font-size: 13px;
}
.mini-field input:focus { border-color: rgba(255, 255, 255, 0.3); }
.mini-field input[type="file"] {
  height: auto;
  padding: 9px 10px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 12px;
}
.cover-hint { color: rgba(255, 255, 255, 0.32); font-size: 12px; }
.mini-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 22px; }

/* 导出 / 导入 / 恢复默认：做成很淡的小字链接，不抢眼 */
.mini-links { display: flex; align-items: center; gap: 2px; margin-right: auto; }
.mini-link {
  padding: 3px 6px;
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.3);
  font-size: 11.5px;
  transition: color 0.2s, background-color 0.2s;
}
.mini-link:hover { color: rgba(255, 255, 255, 0.82); background: rgba(255, 255, 255, 0.06); }
.mini-btn {
  height: 34px;
  padding: 0 16px;
  border-radius: 17px;
  font-size: 13px;
}
.mini-btn.ghost { border: 1px solid var(--line); color: rgba(255, 255, 255, 0.62); }
.mini-btn.ghost:hover { border-color: rgba(255, 255, 255, 0.3); color: #fff; }
.mini-btn.primary { background: var(--accent); color: #12040b; font-weight: 600; }
.mini-btn.primary:hover { filter: brightness(1.08); }
.mini-btn.danger { background: #cf352b; color: #fff; }
.mini-btn.danger:hover { background: #b52c23; }

/* ---------------- 专辑详情 ---------------- */
.album-view {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  opacity: 0;
  transition: opacity 0.32s ease;
}
.album-view.is-open { opacity: 1; }

.view-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 5, 9, 0.72);
  backdrop-filter: blur(12px);
}

.view-panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(660px, 78vmin);
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  background: #0c0d12;
  box-shadow: 0 44px 110px rgba(0, 0, 0, 0.72);
}
.view-panel:focus { outline: none; }

/* 背景就是专辑封面本身，不加任何遮罩，原图全透明地铺满 */
.view-bg {
  position: absolute;
  inset: 0;
  background: #0c0d12 center / cover no-repeat;
  pointer-events: none;
}

.view-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(8px);
  color: rgba(255, 255, 255, 0.85);
  font-size: 15px;
  transition: background-color 0.2s, color 0.2s;
}
.view-close:hover { background: rgba(0, 0, 0, 0.62); color: #fff; }

.view-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  padding: 32px 34px 24px;
}

.view-title {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: 1px;
  line-height: 1.2;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.85), 0 1px 3px rgba(0, 0, 0, 0.7);
}
.view-sub {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.85);
}
.view-actions { display: flex; align-items: center; gap: 12px; margin: 18px 0 2px; }
.play-album {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 20px;
  border-radius: 19px;
  background: var(--accent);
  color: #12040b;
  font-size: 13px;
  font-weight: 600;
  transition: transform 0.12s, filter 0.2s;
}
.play-album:hover { filter: brightness(1.08); }
.play-album:active { transform: translateY(1px); }

/* ---------------- 曲目列表 ---------------- */
.track-list {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
  min-height: 0;
  margin-top: 14px;
  padding-right: 4px;
  overflow-y: auto;
  overscroll-behavior: contain;
  list-style: none;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}
.track-list::-webkit-scrollbar { width: 6px; }
.track-list::-webkit-scrollbar-thumb {
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.18);
}
.track {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 18px 44px;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  border-radius: 10px;
  background: transparent;
  color: rgba(255, 255, 255, 0.92);
  text-align: left;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.7), 0 0 2px rgba(0, 0, 0, 0.55);
  transition: background-color 0.18s, color 0.18s;
}
/* 只有鼠标移到这一行时才出现底色，平时干干净净贴在封面上 */
.track:hover { background: rgba(8, 9, 13, 0.62); color: #fff; }
.track-index { color: rgba(255, 255, 255, 0.6); font-size: 12px; font-variant-numeric: tabular-nums; }
.track-name { overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.track-time { color: rgba(255, 255, 255, 0.6); font-size: 12px; text-align: right; font-variant-numeric: tabular-nums; }

.track-eq { display: none; align-items: flex-end; gap: 2px; height: 14px; }
.track-eq i {
  width: 3px;
  height: 4px;
  border-radius: 2px;
  background: var(--accent);
  animation: eq 0.9s ease-in-out infinite;
}
.track-eq i:nth-child(2) { animation-delay: 0.15s; }
.track-eq i:nth-child(3) { animation-delay: 0.3s; }
@keyframes eq {
  0%, 100% { height: 4px; }
  50% { height: 14px; }
}
.track.is-current { background: transparent; color: #fff; }
.track.is-current:hover { background: rgba(8, 9, 13, 0.62); }
.track.is-current .track-index { color: var(--accent); }
.track.is-current .track-eq { display: inline-flex; }
.track.is-paused .track-eq i { animation-play-state: paused; }

/* ---------------- 播放器 ---------------- */
.player {
  position: fixed;
  bottom: 26px;
  left: 50%;
  z-index: 80;
  display: flex;
  align-items: center;
  gap: 16px;
  width: min(900px, calc(100vw - 96px));
  padding: 12px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  backdrop-filter: blur(16px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  transform: translate(-50%, 12px);
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
}
.player.is-on { opacity: 1; transform: translate(-50%, 0); }

.player-cover {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  object-fit: cover;
  background: #0b0d14;
}
.player-text { width: 170px; min-width: 0; }
.player-title {
  overflow: hidden;
  font-size: 13.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.player-sub {
  overflow: hidden;
  margin-top: 2px;
  color: var(--faint);
  font-size: 11.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-controls { display: flex; align-items: center; gap: 6px; }
.ctrl {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: var(--muted);
  font-size: 13px;
  transition: background-color 0.18s, color 0.18s;
}
.ctrl:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.ctrl.is-main {
  width: 38px;
  height: 38px;
  background: var(--accent);
  color: #12040b;
  font-size: 14px;
}
.ctrl.is-main:hover { filter: brightness(1.08); background: var(--accent); color: #12040b; }

.player-progress { display: flex; flex: 1; align-items: center; gap: 10px; min-width: 120px; }
.progress {
  position: relative;
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.14);
  cursor: pointer;
}
.progress::after {
  content: "";
  position: absolute;
  inset: -8px 0;
}
.progress > span {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 0;
  border-radius: 2px;
  background: var(--accent);
}
.progress-time {
  display: flex;
  gap: 6px;
  color: var(--faint);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.player-tag {
  display: none;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--faint);
  font-size: 10px;
}
.player-tag.is-on { display: inline-block; }

/* ---------------- 响应式（桌面优先，窄屏只做缩放） ---------------- */
@media (max-width: 1180px) {
  .view-content { padding: 26px 26px 20px; }
  .view-title { font-size: 26px; }
  .player-text { width: 140px; }
}

/* ---------------- 手机（竖屏） ---------------- */
@media (max-width: 760px) {
  body {
    min-width: 0;
  }

  .stage {
    height: 100vh;
    height: 100dvh;
    perspective: 1200px;
  }

  /* 顶部信息收紧，避免和背景切换按钮挤在一起 */
  .hud { padding: 16px 16px 0; }
  .kicker { font-size: 10px; letter-spacing: 4px; }
  .brand h1 { margin-top: 4px; font-size: 22px; letter-spacing: 2px; }
  .brand .hint { display: none; }
  .bg-switch { gap: 7px; padding: 6px 9px; }
  .bg-dot { width: 20px; height: 20px; }
  .bg-upload { width: 20px; height: 20px; font-size: 12px; }

  /* 两圈错位收窄，避免超出屏幕 */
  .ring--outer { --shift: 26px; }
  .ring--inner { --shift: -43px; }

  /* 轮播条变矮，贴住上下边缘 */
  .marquee { height: 92px; }
  .marquee--top { top: calc(11% - 46px); }
  .marquee--bottom { top: calc(89% - 46px); }
  .marquee-item { margin-right: 10px; border-radius: 8px; }
  .marquee-add { width: 26px; height: 26px; font-size: 13px; }
  .marquee-add--left { left: 14px; bottom: 14px; }
  .marquee-add--right { right: 14px; top: 74px; }

  /* 详情：方形卡片占满宽度 */
  .view-panel {
    width: min(94vw, 88vmin);
    border-radius: 20px;
  }
  .view-content { padding: 20px 18px 16px; }
  .view-title { font-size: 23px; }
  .view-sub { margin-top: 6px; font-size: 12px; }
  .view-actions { margin: 12px 0 2px; }
  .play-album { height: 34px; padding: 0 16px; font-size: 12px; }
  .view-close { top: 12px; right: 12px; width: 30px; height: 30px; font-size: 13px; }

  /* 小卡片上文字更紧凑，避免标题被裁掉 */
  .album-meta { padding: 18px 8px 7px; }
  .album-meta strong { font-size: 10px; letter-spacing: 0.5px; }
  .album-meta em { display: none; }
  .track-list { margin-top: 10px; }
  .track { grid-template-columns: 24px minmax(0, 1fr) 16px 40px; gap: 8px; padding: 8px 10px; }
  .track-name { font-size: 13px; }
  .track-index, .track-time { font-size: 11px; }

  /* 播放器改成两行：第一行封面+信息+控制，第二行进条 */
  .player {
    bottom: 10px;
    flex-wrap: wrap;
    gap: 8px 10px;
    width: calc(100vw - 20px);
    padding: 10px 12px;
    border-radius: 16px;
  }
  .player-cover { width: 38px; height: 38px; border-radius: 8px; }
  .player-text { flex: 1 1 0; width: auto; min-width: 0; }
  .player-controls { order: 3; }
  .ctrl { width: 30px; height: 30px; }
  .ctrl.is-main { width: 34px; height: 34px; }
  .player-progress { order: 4; flex: 1 0 100%; min-width: 0; }
  .progress-time { font-size: 10px; }

  /* 新增按钮上移，避开播放器 */
  .fab { right: 16px; bottom: 96px; }
  .fab.is-open,
  .fab:hover,
  .fab:focus-within {
    width: 112px;
    height: 112px;
    border-radius: 22px;
  }
  .fab-btn { font-size: 12px; letter-spacing: 1px; }
}

/* 触屏没有 hover：删除按钮不再依赖悬停 */
@media (hover: none) {
  .album-remove { opacity: 0.7; transform: none; }
  .track-remove { opacity: 0.6; transform: translateY(-50%); }
  .marquee-remove { opacity: 0.85; pointer-events: auto; }
  .marquee-item { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  /* 环形仍保持旋转，但放慢到 1/4；否则会被压成 0.01ms 变成闪烁 */
  .ring { animation-duration: 205.6s !important; }
}


















