/* ===== 音乐播放器 ===== */
.music-player {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 9999;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  user-select: none;
}

/* 折叠按钮 */
.mp-toggle {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #ff8c42 0%, #ff6b35 50%, #e63946 100%);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(230, 57, 70, .4);
  transition: transform .2s, box-shadow .2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mp-toggle:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 20px rgba(230, 57, 70, .55);
}
.mp-toggle:active { transform: scale(.95); }

.music-player.playing .mp-icon {
  display: inline-block;
  animation: mpSpin 3s linear infinite;
}
@keyframes mpSpin {
  to { transform: rotate(360deg); }
}

/* 播放器主体：固定高度，无毛玻璃 */
.mp-body {
  position: absolute;
  right: 0;
  bottom: 60px;
  width: 320px;
  height: 480px;
  min-height: 480px;
  max-height: 480px;
  padding: 14px;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid rgba(230, 57, 70, .2);
  box-shadow: 0 8px 32px rgba(180, 50, 50, .2);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px) scale(.95);
  transform-origin: bottom right;
  transition: opacity .25s, transform .25s, visibility .25s;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.music-player.open .mp-body {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

/* ===== 胶片封面（橙红色） ===== */
.mp-vinyl {
  position: relative;
  width: 130px;
  height: 130px;
  margin: 0 auto 12px;
  flex-shrink: 0;
  border-radius: 50%;
  background: radial-gradient(
    circle at center,
    #2a1215 0%,
    #3d1a1e 18%,
    #5c2028 30%,
    #8a2d35 45%,
    #c43a3f 58%,
    #e63946 70%,
    #ff6b35 85%,
    #ff8c42 100%
  );
  box-shadow:
    0 6px 20px rgba(230, 57, 70, .35),
    inset 0 0 20px rgba(0, 0, 0, .3);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: box-shadow .3s;
}

.music-player.playing .mp-vinyl {
  box-shadow:
    0 6px 24px rgba(230, 57, 70, .5),
    0 0 20px rgba(255, 140, 66, .3),
    inset 0 0 20px rgba(0, 0, 0, .3);
  animation: mpSpin 20s linear infinite;
}

.mp-vinyl::before {
  content: '';
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: repeating-radial-gradient(
    circle at center,
    transparent 0px,
    transparent 3px,
    rgba(0, 0, 0, .15) 3px,
    rgba(0, 0, 0, .15) 4px
  );
  pointer-events: none;
}

.mp-cover {
  position: relative;
  z-index: 1;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: linear-gradient(45deg, #ff8c42, #e63946);
  background-size: cover;
  background-position: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .3);
}

.mp-vinyl-center {
  position: absolute;
  z-index: 2;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: radial-gradient(circle at center, #fff, #e0e0e0);
  box-shadow: 0 0 4px rgba(0, 0, 0, .4);
}

/* ===== 歌曲信息 ===== */
.mp-info {
  text-align: center;
  margin-bottom: 10px;
  flex-shrink: 0;
}
.mp-title {
  font-size: 13px;
  font-weight: 700;
  color: #5a2d0c;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mp-artist {
  font-size: 11px;
  color: rgba(90, 45, 12, .6);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ===== 进度条 ===== */
.mp-progress {
  width: 100%;
  height: 3px;
  background: rgba(90, 45, 12, .15);
  border-radius: 2px;
  cursor: pointer;
  margin-bottom: 10px;
  flex-shrink: 0;
}
.mp-progress-inner {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #ff8c42, #e63946);
  border-radius: 2px;
}

/* ===== 控制按钮 ===== */
.mp-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
  flex-shrink: 0;
}
.mp-btn {
  border: none;
  background: none;
  cursor: pointer;
  font-size: 16px;
  color: #8a3d0f;
  transition: color .2s;
  line-height: 1;
}
.mp-btn:hover { color: #e63946; }
.mp-play {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff8c42, #e63946);
  color: #fff;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 10px rgba(230, 57, 70, .35);
}
.mp-play:hover {
  background: linear-gradient(135deg, #ff6b35, #d62839);
  color: #fff;
}

/* ===== 专辑区域：固定高度，内部滚动 ===== */
.mp-albums {
  height: 180px;
  min-height: 180px;
  max-height: 180px;
  flex: 0 0 180px;
  overflow-y: auto;
  border-top: 1px solid rgba(90, 45, 12, .12);
  padding: 8px 4px 0 0;
  box-sizing: border-box;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.mp-albums::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.mp-album-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  cursor: pointer;
  color: #5a2d0c;
  font-size: 12px;
  font-weight: 600;
  transition: background .2s;
}
.mp-album-header:hover {
  background: rgba(230, 57, 70, .12);
}

.mp-album-arrow {
  font-size: 8px;
  color: rgba(90, 45, 12, .5);
  transition: transform .25s;
  flex-shrink: 0;
}
.mp-album.expanded .mp-album-arrow {
  transform: rotate(90deg);
  color: #e63946;
}

.mp-album-name {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mp-album-count {
  font-size: 10px;
  color: rgba(90, 45, 12, .5);
  font-weight: 400;
  flex-shrink: 0;
}

.mp-album-songs {
  display: none;
  padding: 2px 0 4px 12px;
}
.mp-album.expanded .mp-album-songs {
  display: block;
  animation: mpFadeIn .2s ease;
}
@keyframes mpFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.mp-song {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border-radius: 6px;
  cursor: pointer;
  color: rgba(90, 45, 12, .75);
  font-size: 12px;
  transition: background .15s, color .15s;
}
.mp-song:hover {
  background: rgba(230, 57, 70, .1);
  color: #5a2d0c;
}
.mp-song.active {
  background: rgba(230, 57, 70, .18);
  color: #e63946;
  font-weight: 700;
}

.mp-song .mp-song-index {
  width: 16px;
  text-align: center;
  font-size: 10px;
  color: rgba(90, 45, 12, .5);
  flex-shrink: 0;
}
.mp-song.active .mp-song-index { color: #e63946; }
.mp-song .mp-song-name {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 移动端 */
@media (max-width: 480px) {
  .music-player { right: 12px; bottom: 12px; }
  .mp-body {
    width: calc(100vw - 32px);
    max-width: 320px;
    height: 440px;
  }
}