/*
 * Theme: theme-Serenity
 * Author: Serenity
 * Build: 2026-06-03 10:28:07
 * Fingerprint: 18f8d0015be24d2b
 * Copyright (c) 2026 Serenity. All rights reserved.
 */

@media screen and (max-width: 768px) {
  #music-panel { display: none !important; }
}

.music-panel {
  position: fixed;
  bottom: 68px;
  left: 20px;
  z-index: 998;
  pointer-events: none;
  opacity: 0;
  transform: translateY(12px) scaleY(0.6);
  transform-origin: center bottom;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              width 0.5s ease;
}

.music-panel.active {
  pointer-events: auto;
  opacity: 1;
  transform: translateY(0) scaleY(1);
  overflow: hidden;
  border-radius: 16px;
}

.music-panel-inner {
  background: var(--color-accent, #c084fc);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25), 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  color: #fff;
  box-sizing: border-box;
  width: 100%;
}

/* ===== 顶部：封面 + 歌曲信息 ===== */
.mp-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mp-cover {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.1);
}

.mp-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mp-song-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mp-title {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.mp-artist {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.75);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.mp-time {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
}

.mp-header-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

/* ===== 通用按钮 ===== */
.mp-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.7);
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mp-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.mp-btn:active {
  transform: scale(0.92);
}

.mp-btn.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.25);
}

.mp-btn.active svg {
  filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.5));
}

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

.mp-header-actions .mp-btn svg {
  width: 16px;
  height: 16px;
}

/* ===== 播放列表区域 ===== */
.mp-list-area {
  max-height: 160px;
  overflow-y: auto;
  overflow-x: hidden;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.15);
}

.mp-list-area::-webkit-scrollbar {
  width: 4px;
}

.mp-list-area::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.25);
  border-radius: 2px;
}

.mp-playlist {
  list-style: none;
  margin: 0;
  padding: 4px 0;
}

.mp-playlist li {
  display: flex;
  align-items: center;
  padding: 6px 12px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  transition: background 0.2s;
  gap: 8px;
}

.mp-playlist li:hover {
  background: rgba(255, 255, 255, 0.1);
}

.mp-playlist li.mp-list-active {
  color: #fff;
  font-weight: 600;
}

.mp-playlist li .mp-list-idx {
  width: 20px;
  text-align: center;
  flex-shrink: 0;
  font-size: 11px;
}

.mp-playlist li .mp-list-name {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mp-playlist li .mp-list-artist {
  flex-shrink: 0;
  font-size: 11px;
  opacity: 0.7;
}

/* ===== 进度条 ===== */
.mp-progress-wrap {
  padding: 0 2px;
}

.mp-progress {
  position: relative;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  cursor: pointer;
  transition: height 0.15s;
}

.mp-progress:hover {
  height: 6px;
}

.mp-progress-played {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background: #fff;
  border-radius: 2px;
  width: 0%;
  transition: width 0.1s linear;
}

.mp-progress-thumb {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 12px;
  height: 12px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(0,0,0,0.15);
  transition: transform 0.15s;
  left: 0%;
}

.mp-progress:hover .mp-progress-thumb {
  transform: translate(-50%, -50%) scale(1);
}

/* ===== 控制按钮 ===== */
.mp-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.mp-btn-play {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25) !important;
  color: #fff !important;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
  transition: all 0.2s;
}

.mp-btn-play:hover {
  background: rgba(255, 255, 255, 0.35) !important;
  transform: scale(1.08);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.mp-btn-play:active {
  transform: scale(0.95) !important;
}

.mp-btn-play svg {
  width: 22px;
  height: 22px;
  fill: #fff;
  color: #fff;
}

.mp-btn-prev svg,
.mp-btn-next svg {
  width: 20px;
  height: 20px;
}

/* ===== 底部：音量 ===== */
.mp-footer {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mp-volume-wrap {
  flex: 1;
}

.mp-volume-bar {
  position: relative;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  cursor: pointer;
}

.mp-volume-level {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background: #fff;
  border-radius: 2px;
  width: 70%;
  transition: width 0.1s;
}


