/* ===== 梵音播放器样式 ===== */
.fmp-container {
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 99999;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
}

/* 触发按钮 */
.fmp-toggle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, #d4af37, #b8860b, #8b6914);
  border: 3px solid rgba(240, 230, 210, 0.6);
  box-shadow:
    0 0 0 4px rgba(212, 175, 55, 0.15),
    0 8px 25px rgba(139, 105, 20, 0.5),
    inset 0 2px 4px rgba(255,255,255,0.2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  animation: fmpFloat 3s ease-in-out infinite;
}
.fmp-toggle:hover {
  transform: scale(1.12) rotate(10deg);
  box-shadow:
    0 0 0 6px rgba(212, 175, 55, 0.2),
    0 12px 35px rgba(139, 105, 20, 0.6),
    inset 0 2px 4px rgba(255,255,255,0.3);
}
.fmp-toggle svg {
  width: 24px;
  height: 24px;
  fill: #fff;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.3));
  transition: transform 0.3s;
}
.fmp-toggle:hover svg {
  transform: scale(1.1);
}
@keyframes fmpFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

/* 播放中呼吸灯 */
.fmp-wave {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff6b6b, #ee5a5a);
  border: 2px solid #1e1914;
  display: none;
  box-shadow: 0 0 8px rgba(238, 90, 90, 0.6);
}
.fmp-wave.playing {
  display: block;
  animation: fmpPulse 1.8s ease-in-out infinite;
}
@keyframes fmpPulse {
  0% { box-shadow: 0 0 0 0 rgba(238, 90, 90, 0.7); transform: scale(1); }
  50% { box-shadow: 0 0 0 10px rgba(238, 90, 90, 0); transform: scale(1.1); }
  100% { box-shadow: 0 0 0 0 rgba(238, 90, 90, 0); transform: scale(1); }
}

/* 面板 */
.fmp-panel {
  position: absolute;
  top: 0;
  left: 64px;
  width: 360px;
  max-height: 580px;
  background: rgba(25, 20, 15, 0.92);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  border-radius: 20px;
  border: 1px solid rgba(212, 175, 55, 0.2);
  box-shadow:
    0 20px 60px rgba(0,0,0,0.6),
    0 0 0 1px rgba(212, 175, 55, 0.05),
    inset 0 1px 0 rgba(255,255,255,0.05);
  overflow: hidden;
  opacity: 0;
  transform: translateX(-15px) scale(0.92);
  pointer-events: none;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.fmp-panel.active {
  opacity: 1;
  transform: translateX(0) scale(1);
  pointer-events: auto;
}

/* 头部 */
.fmp-header {
  padding: 16px 18px 12px;
  border-bottom: 1px solid rgba(212, 175, 55, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(180deg, rgba(212,175,55,0.06) 0%, transparent 100%);
}
.fmp-header-title {
  color: #d4af37;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 2px;
  text-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
  display: flex;
  align-items: center;
  gap: 8px;
}
.fmp-header-title::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #d4af37;
  box-shadow: 0 0 8px rgba(212, 175, 55, 0.6);
  animation: fmpDotPulse 2s ease-in-out infinite;
}
@keyframes fmpDotPulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 8px rgba(212,175,55,0.6); }
  50% { opacity: 0.5; box-shadow: 0 0 2px rgba(212,175,55,0.2); }
}
.fmp-close {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid rgba(212, 175, 55, 0.15);
  color: #b8a060;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
  transition: all 0.25s;
}
.fmp-close:hover {
  background: rgba(212, 175, 55, 0.25);
  color: #f0e6d2;
  transform: rotate(90deg);
  border-color: rgba(212, 175, 55, 0.4);
}

/* 唱片区域 */
.fmp-record-area {
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.fmp-record {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2a2015, #1a1510);
  border: 3px solid rgba(212, 175, 55, 0.3);
  box-shadow:
    0 0 0 4px rgba(212, 175, 55, 0.08),
    0 8px 30px rgba(0,0,0,0.5),
    inset 0 2px 8px rgba(255,255,255,0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all 0.4s;
  animation: fmpSpin 8s linear infinite;
  animation-play-state: paused;
}
.fmp-record.playing {
  animation-play-state: running;
  border-color: rgba(212, 175, 55, 0.5);
  box-shadow:
    0 0 0 4px rgba(212, 175, 55, 0.15),
    0 8px 30px rgba(0,0,0,0.5),
    0 0 20px rgba(212, 175, 55, 0.1),
    inset 0 2px 8px rgba(255,255,255,0.08);
}
@keyframes fmpSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.fmp-record-inner {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #d4af37, #8b6914);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.3);
}
.fmp-record-inner svg {
  width: 16px;
  height: 16px;
  fill: #fff;
}
.fmp-record-groove {
  position: absolute;
  top: 8px; left: 8px; right: 8px; bottom: 8px;
  border-radius: 50%;
  border: 1px solid rgba(212, 175, 55, 0.08);
}
.fmp-record-groove2 {
  position: absolute;
  top: 16px; left: 16px; right: 16px; bottom: 16px;
  border-radius: 50%;
  border: 1px solid rgba(212, 175, 55, 0.06);
}

/* 正在播放 */
.fmp-nowplaying {
  text-align: center;
  width: 100%;
}
.fmp-now-label {
  color: #8a7e6b;
  font-size: 11px;
  margin-bottom: 4px;
  letter-spacing: 1px;
}
.fmp-now-name {
  color: #f0e6d2;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 4px rgba(0,0,0,0.3);
  min-height: 22px;
}

/* 音频可视化 */
.fmp-visualizer {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  height: 24px;
  padding: 0 16px;
  margin-bottom: 4px;
}
.fmp-vbar {
  width: 3px;
  background: linear-gradient(to top, #8b6914, #d4af37);
  border-radius: 2px;
  transition: height 0.15s ease;
  opacity: 0.3;
}
.fmp-vbar.active {
  opacity: 0.8;
}

/* 控制按钮 */
.fmp-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 10px 16px 14px;
}
.fmp-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: #b8a060;
  transition: all 0.25s;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border-radius: 50%;
}
.fmp-btn:hover {
  color: #f0e6d2;
  transform: scale(1.2);
  background: rgba(212, 175, 55, 0.1);
}
.fmp-btn:active {
  transform: scale(0.95);
}
.fmp-btn-play {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, #d4af37, #b8860b, #8b6914);
  color: #fff;
  box-shadow:
    0 4px 15px rgba(139, 105, 20, 0.4),
    0 0 0 3px rgba(212, 175, 55, 0.15),
    inset 0 1px 2px rgba(255,255,255,0.2);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.fmp-btn-play:hover {
  transform: scale(1.12);
  box-shadow:
    0 6px 20px rgba(139, 105, 20, 0.5),
    0 0 0 5px rgba(212, 175, 55, 0.2),
    inset 0 1px 2px rgba(255,255,255,0.3);
  background: linear-gradient(135deg, #e0c060, #c9a030, #9a7518);
}
.fmp-btn-play:active {
  transform: scale(0.95);
}

/* 模式按钮 */
.fmp-modes {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 16px 10px;
}
.fmp-mode-btn {
  background: rgba(212, 175, 55, 0.06);
  border: 1px solid rgba(212, 175, 55, 0.1);
  cursor: pointer;
  color: #7a6e5b;
  font-size: 11px;
  padding: 4px 12px;
  border-radius: 20px;
  transition: all 0.25s;
  letter-spacing: 0.5px;
}
.fmp-mode-btn:hover {
  color: #b8a060;
  border-color: rgba(212, 175, 55, 0.25);
  background: rgba(212, 175, 55, 0.1);
}
.fmp-mode-btn.active {
  color: #d4af37;
  background: linear-gradient(135deg, rgba(212,175,55,0.15), rgba(139,105,20,0.1));
  border-color: rgba(212, 175, 55, 0.35);
  box-shadow: 0 2px 8px rgba(139, 105, 20, 0.15);
  font-weight: 600;
}

/* 音量 */
.fmp-vol-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 18px 10px;
}
.fmp-vol-wrap svg {
  flex-shrink: 0;
  transition: color 0.2s;
}
.fmp-vol-slider {
  flex: 1;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(212, 175, 55, 0.1);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}
.fmp-vol-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, #d4af37, #8b6914);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(139, 105, 20, 0.4);
  transition: transform 0.2s;
}
.fmp-vol-slider::-webkit-slider-thumb:hover {
  transform: scale(1.3);
}

/* 进度条 */
.fmp-progress-wrap {
  padding: 0 18px 6px;
}
.fmp-progress {
  width: 100%;
  height: 4px;
  background: rgba(212, 175, 55, 0.08);
  border-radius: 2px;
  overflow: visible;
  cursor: pointer;
  position: relative;
}
.fmp-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #8b6914, #d4af37, #e0c060);
  border-radius: 2px;
  width: 0%;
  position: relative;
  transition: width 0.1s linear;
  box-shadow: 0 0 6px rgba(212, 175, 55, 0.3);
}
.fmp-progress-bar::after {
  content: "";
  position: absolute;
  right: -5px;
  top: 50%;
  transform: translateY(-50%) scale(0);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, #d4af37, #8b6914);
  box-shadow: 0 2px 6px rgba(139, 105, 20, 0.4);
  transition: transform 0.2s;
}
.fmp-progress:hover .fmp-progress-bar::after {
  transform: translateY(-50%) scale(1);
}
.fmp-time {
  display: flex;
  justify-content: space-between;
  padding: 0 18px 10px;
  font-size: 11px;
  color: #6a5e4b;
  font-variant-numeric: tabular-nums;
}

/* 列表 */
.fmp-list {
  max-height: 280px;
  overflow-y: auto;
  padding: 6px 0;
  border-top: 1px solid rgba(212, 175, 55, 0.06);
}
.fmp-list::-webkit-scrollbar {
  width: 5px;
}
.fmp-list::-webkit-scrollbar-track {
  background: transparent;
  margin: 4px 0;
}
.fmp-list::-webkit-scrollbar-thumb {
  background: rgba(212, 175, 55, 0.2);
  border-radius: 3px;
}
.fmp-list::-webkit-scrollbar-thumb:hover {
  background: rgba(212, 175, 55, 0.35);
}
.fmp-item {
  display: flex;
  align-items: center;
  padding: 10px 18px;
  cursor: pointer;
  transition: all 0.25s;
  gap: 12px;
  margin: 0 8px;
  border-radius: 10px;
  position: relative;
}
.fmp-item:hover {
  background: rgba(212, 175, 55, 0.06);
}
.fmp-item.active {
  background: linear-gradient(90deg, rgba(212,175,55,0.12), rgba(139,105,20,0.08));
  box-shadow: inset 2px 0 0 #d4af37;
}
.fmp-item-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(212, 175, 55, 0.08);
  color: #8a7e6b;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-weight: 600;
  transition: all 0.3s;
}
.fmp-item.active .fmp-item-num {
  background: linear-gradient(135deg, #d4af37, #8b6914);
  color: #fff;
  box-shadow: 0 2px 8px rgba(139, 105, 20, 0.3);
  transform: scale(1.1);
}
.fmp-item-name {
  color: #a09580;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  transition: color 0.2s;
}
.fmp-item:hover .fmp-item-name {
  color: #c8bca8;
}
.fmp-item.active .fmp-item-name {
  color: #f0e6d2;
  font-weight: 600;
}
.fmp-item-wave {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 16px;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 0.3s;
}
.fmp-item.active .fmp-item-wave {
  opacity: 1;
}
.fmp-iwbar {
  width: 2px;
  background: linear-gradient(to top, #8b6914, #d4af37);
  border-radius: 1px;
  animation: fmpIWave 0.8s ease-in-out infinite alternate;
}
.fmp-iwbar:nth-child(1) { height: 6px; animation-delay: 0s; }
.fmp-iwbar:nth-child(2) { height: 10px; animation-delay: 0.15s; }
.fmp-iwbar:nth-child(3) { height: 14px; animation-delay: 0.3s; }
.fmp-iwbar:nth-child(4) { height: 8px; animation-delay: 0.1s; }
@keyframes fmpIWave {
  from { transform: scaleY(0.4); opacity: 0.5; }
  to { transform: scaleY(1); opacity: 1; }
}

/* 列表底部渐变遮罩 */
.fmp-list::after {
  content: "";
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;
  height: 20px;
  background: linear-gradient(to top, rgba(25,20,15,0.9), transparent);
  pointer-events: none;
  display: block;
}
