/* ---- 底部音乐播放器与全屏歌词页面模块样式 ---- */
footer.player {
  position: relative;
  flex: 0 0 auto;
  margin: 0 clamp(14px, 2.6vw, 28px) clamp(14px, 2.6vh, 26px);
  background: rgba(16, 20, 26, 0.48);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.4vw, 16px);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35), inset 0 1px 1px rgba(255, 255, 255, 0.14);
  transition: border-color .2s ease;
}

footer.player.drag {
  border-color: var(--amber);
}

/* 播放器状态控制 */
footer.player:not(.has-track) .track-info,
footer.player:not(.has-track) .controls,
footer.player:not(.has-track) .progress-wrap,
footer.player:not(.has-track) #listBtn,
footer.player:not(.has-track) .vol-wrap {
  display: none !important;
}

footer.player:not(.has-playlist) #listBtn {
  display: none !important;
}

footer.player.has-track .player-empty {
  display: none !important;
}

.track-art {
  width: 42px;
  height: 42px;
  border-radius: 9px;
  background: var(--panel2);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  color: var(--muted);
  cursor: pointer;
  position: relative;
  transition: border-color .2s ease, transform .2s ease, color .2s ease;
  overflow: hidden;
}

.track-art:hover {
  border-color: var(--amber);
  color: var(--amber);
  transform: scale(1.05);
}

.track-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

.track-art svg {
  width: 18px;
  height: 18px;
  transition: transform .2s ease;
}

.track-art .art-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .55);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .2s ease;
  color: var(--amber);
}

.track-art:hover .art-overlay {
  opacity: 1;
}

.track-art .art-overlay svg {
  width: 16px;
  height: 16px;
}

.track-info {
  min-width: 0;
  flex: 0 0 auto;
  width: clamp(90px, 16vw, 190px);
  cursor: pointer;
}

.track-title {
  font-size: .85rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color .2s ease;
}

.track-info:hover .track-title {
  color: var(--amber);
}

.track-sub {
  font-size: .72rem;
  color: var(--muted);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.controls {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

.ctrl-btn {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: color .2s ease, background .2s ease;
}

.ctrl-btn:hover {
  color: var(--ink);
  background: var(--panel2);
}

.ctrl-btn svg {
  width: 17px;
  height: 17px;
}

#playBtn,
#lmPlayBtn {
  width: 38px;
  height: 38px;
  background: var(--sky);
  color: #081a28;
  border-radius: 50%;
  box-shadow: 0 0 14px var(--sky-glow);
  transition: background .2s ease, transform .2s ease, box-shadow .2s ease;
}

#lmPlayBtn {
  width: 42px;
  height: 42px;
}

#playBtn:hover,
#lmPlayBtn:hover {
  background: #7dd3fc;
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.7);
  transform: scale(1.05);
}

#playBtn svg,
#lmPlayBtn svg {
  width: 16px;
  height: 16px;
}

#lmPlayBtn svg {
  width: 18px;
  height: 18px;
}

.progress-wrap {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.time {
  font-family: 'JetBrains Mono', monospace;
  font-size: .72rem;
  color: var(--muted);
  width: 38px;
  text-align: center;
  flex: 0 0 auto;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  border-radius: 2px;
  background: var(--panel2);
  width: 100%;
  min-width: 0;
  flex: 1 1 auto;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--pink);
  box-shadow: 0 0 10px var(--pink-glow);
  margin-top: 0;
  cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border: none;
  border-radius: 50%;
  background: var(--pink);
  box-shadow: 0 0 10px var(--pink-glow);
  cursor: pointer;
}

input[type="range"]#seek,
input[type="range"]#lmSeek {
  background: linear-gradient(to right, var(--sky) 0%, var(--sky) 0%, var(--panel2) 0%);
}

input[type="range"]#volume,
input[type="range"]#lmVolume {
  background: linear-gradient(to right, var(--sky) 70%, var(--sky) 70%, var(--panel2) 70%);
}

.vol-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
  width: 95px;
  min-width: 0;
}

#volBtn {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  width: 26px;
  height: 26px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  flex: 0 0 auto;
  transition: color .2s ease, background .2s ease;
}

#volBtn:hover {
  color: var(--ink);
  background: var(--panel2);
}

#volBtn svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.playlist-pop {
  position: absolute;
  bottom: calc(100% + 10px);
  right: 18px;
  width: 240px;
  max-height: 260px;
  overflow-y: auto;
  background: var(--panel2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px;
  display: none;
  flex-direction: column;
  gap: 2px;
  z-index: 20;
  box-shadow: 0 20px 40px rgba(0, 0, 0, .4);
}

.playlist-pop.open {
  display: flex;
}

.pl-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: .82rem;
  color: var(--muted);
  transition: background .15s ease, color .15s ease;
}

.pl-item:hover {
  background: var(--panel);
  color: var(--ink);
}

.pl-item.active {
  color: var(--amber);
  background: var(--amber-dim);
}

.pl-item .n {
  font-family: 'JetBrains Mono', monospace;
  font-size: .72rem;
  opacity: .7;
  width: 16px;
  flex: 0 0 auto;
}

.player-empty {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: .85rem;
  gap: 8px;
}

.player-empty b {
  color: var(--ink);
}

/* ---- 沉浸式全屏歌词页面 ---- */
.lyric-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(11, 13, 16, 0.94);
  backdrop-filter: blur(45px) saturate(160%);
  -webkit-backdrop-filter: blur(45px) saturate(160%);
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transform: translateY(24px) scale(0.985);
  transition: opacity .32s cubic-bezier(0.16, 1, 0.3, 1), transform .32s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.lyric-modal.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.lm-bg-glow {
  position: absolute;
  top: 38%;
  left: 32%;
  translate: -50% -50%;
  width: min(75vw, 650px);
  height: min(75vw, 650px);
  background: radial-gradient(circle, rgba(255, 176, 32, .12) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  filter: blur(40px);
}

.lm-header {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px clamp(18px, 4vw, 40px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.lm-close-btn {
  background: var(--panel2);
  border: 1px solid var(--line);
  color: var(--muted);
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all .2s ease;
}

.lm-close-btn:hover {
  border-color: var(--amber);
  color: var(--amber);
  transform: translateY(2px);
}

.lm-close-btn svg {
  width: 18px;
  height: 18px;
}

.lm-song-meta {
  text-align: center;
  min-width: 0;
  padding: 0 16px;
}

.lm-meta-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 60vw;
}

.lm-meta-artist {
  font-size: .8rem;
  color: var(--muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 60vw;
}

.lm-header-right {
  width: 38px;
  height: 38px;
}

.lm-body {
  position: relative;
  z-index: 2;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px clamp(20px, 5vw, 60px);
  gap: clamp(28px, 6vw, 90px);
}

/* 左侧：黑胶唱片 / 专辑大图 */
.lm-cover-wrap {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.lm-disc-box {
  position: relative;
  width: clamp(210px, 26vw, 340px);
  height: clamp(210px, 26vw, 340px);
  border-radius: 50%;
  background: radial-gradient(#14181f 0%, #0d0f13 70%, #060709 100%);
  box-shadow: 0 20px 50px rgba(0,0,0,.7), inset 0 0 0 7px #171b22, inset 0 0 0 11px #090b0e, inset 0 0 0 13px #1f2530;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: disc-rotate 24s linear infinite;
  animation-play-state: paused;
  transition: box-shadow .3s ease;
}

.lm-disc-box.playing {
  animation-play-state: running;
  box-shadow: 0 20px 60px rgba(0,0,0,.8), 0 0 35px rgba(255, 176, 32, .12), inset 0 0 0 7px #171b22, inset 0 0 0 11px #090b0e, inset 0 0 0 13px #1f2530;
}

@keyframes disc-rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.lm-disc-grooves {
  position: absolute;
  inset: 16px;
  border-radius: 50%;
  border: 1px dashed rgba(255,255,255,.05);
  box-shadow: inset 0 0 22px rgba(0,0,0,.9);
  pointer-events: none;
}

.lm-disc-center {
  width: 48%;
  height: 48%;
  border-radius: 50%;
  overflow: hidden;
  background: var(--panel2);
  border: 4px solid #111419;
  box-shadow: 0 0 18px rgba(0,0,0,.6);
  display: flex;
  align-items: center;
  justify-content: center;
}

.lm-disc-center img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lm-disc-center svg {
  width: 44px;
  height: 44px;
  color: var(--amber);
}

.lm-cover-info {
  text-align: center;
  max-width: clamp(210px, 26vw, 340px);
}

.lm-cover-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lm-cover-artist {
  font-size: .88rem;
  color: var(--muted);
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 右侧：网易云式多行滚动歌词 */
.lm-lyrics-box {
  flex: 1 1 auto;
  height: 100%;
  max-width: 620px;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  mask-image: linear-gradient(to bottom, transparent 0%, black 18%, black 82%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 18%, black 82%, transparent 100%);
  display: flex;
  flex-direction: column;
  padding: 180px 0;
  scroll-behavior: smooth;
}

.lm-lyrics-box::-webkit-scrollbar {
  display: none;
}

.lm-lrc-item {
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  color: rgba(237, 239, 242, 0.42);
  padding: 12px 18px;
  border-radius: 10px;
  cursor: pointer;
  transition: color .25s ease, font-size .25s ease, transform .25s ease, background .25s ease;
  line-height: 1.6;
  text-align: left;
  user-select: none;
  transform-origin: left center;
}

.lm-lrc-item:hover {
  color: #ffffff;
  background: transparent;
}

.lm-lrc-item.active {
  font-size: clamp(1.22rem, 1.9vw, 1.55rem);
  font-weight: 700;
  color: var(--sky);
  text-shadow: 0 0 22px var(--sky-glow);
  transform: translateX(4px) scale(1.02);
}

.lm-no-lrc {
  text-align: center;
  color: var(--muted);
  font-size: 1rem;
  margin: auto;
  letter-spacing: .02em;
}

/* 底部全屏控制器 */
.lm-footer {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  padding: 14px clamp(18px, 4vw, 40px) 24px;
  background: rgba(14, 17, 22, 0.7);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.lm-progress-row {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 780px;
  width: 100%;
  margin: 0 auto;
}

.lm-controls-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  position: relative;
  max-width: 780px;
  width: 100%;
  margin: 0 auto;
}

.lm-side-ctrls {
  position: absolute;
  right: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

@media (max-height: 620px) {
  footer.player {
    margin-bottom: 12px;
    padding: 9px 14px;
  }
}

@media (max-width: 768px) {
  /* 移动端方案 A：双行自适应弹性布局 */
  footer.player {
    flex-wrap: wrap;
    padding: 10px 14px 10px;
    gap: 8px 10px;
    margin: 0 clamp(10px, 3vw, 16px) clamp(10px, 2.5vh, 16px);
    border-radius: 14px;
  }

  /* 第一行左侧：封面与歌曲信息（自适应撑开剩余空间，文字不折行） */
  .track-art {
    order: 1;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
  }

  .track-info {
    order: 2;
    flex: 1 1 0;
    width: auto;
    min-width: 0;
  }

  .track-title {
    font-size: .84rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .track-sub {
    font-size: .7rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* 第一行右侧：主控按键与歌单按钮 */
  .controls {
    order: 3;
    gap: 4px;
    margin-left: auto;
    flex: 0 0 auto;
  }

  .ctrl-btn {
    width: 32px;
    height: 32px;
  }

  .ctrl-btn svg {
    width: 15px;
    height: 15px;
  }

  #playBtn {
    width: 34px;
    height: 34px;
  }

  #playBtn svg {
    width: 15px;
    height: 15px;
  }

  #listBtn {
    order: 4;
    flex: 0 0 auto;
  }

  /* 第二行：整行进度条与时间 */
  .progress-wrap {
    order: 5;
    flex: 1 0 100%;
    width: 100%;
    gap: 8px;
    padding-top: 2px;
  }

  .time {
    font-size: .68rem;
    width: 34px;
    flex: 0 0 34px;
  }

  /* 移动端隐藏音量控件（手机有物理音量键，避免挤占空间） */
  .vol-wrap {
    display: none !important;
  }

  /* 移动端歌单弹窗自适应宽度 */
  .playlist-pop {
    right: 8px;
    left: 8px;
    width: auto;
    max-width: none;
    bottom: calc(100% + 8px);
  }

  .lm-body {
    flex-direction: column;
    gap: 14px;
    padding: 10px 18px;
  }

  .lm-cover-wrap {
    gap: 10px;
  }

  .lm-disc-box {
    width: 140px;
    height: 140px;
  }

  .lm-disc-center svg {
    width: 28px;
    height: 28px;
  }

  .lm-cover-info {
    display: none;
  }

  .lm-lyrics-box {
    padding: 90px 0;
    text-align: center;
  }

  .lm-lrc-item {
    text-align: center;
    transform-origin: center center;
  }

  .lm-side-ctrls .vol-wrap {
    display: none;
  }
}
