/* 背景音乐控制按钮样式 */

.music-control-btn {
  position: fixed;
  right: 30px;
  bottom: 30px;
  z-index: 9998;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: linear-gradient(135deg, rgba(247, 192, 92, 0.95), rgba(247, 192, 92, 0.85));
  border-radius: 16px;
  box-shadow: 
    0 8px 32px rgba(247, 192, 92, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.1) inset,
    0 16px 48px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: move;
  user-select: none;
  overflow: hidden;
}

.music-control-btn:hover {
  transform: translateY(-4px);
  box-shadow: 
    0 12px 40px rgba(247, 192, 92, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.2) inset,
    0 20px 60px rgba(0, 0, 0, 0.4);
}

.music-control-btn.dragging {
  cursor: grabbing;
  transform: scale(1.05);
  box-shadow: 
    0 16px 48px rgba(247, 192, 92, 0.6),
    0 0 0 2px rgba(255, 255, 255, 0.3) inset,
    0 24px 72px rgba(0, 0, 0, 0.5);
}

/* 按钮内容区 */
.music-btn-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 20px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.music-btn-content:active {
  transform: scale(0.95);
}

/* 音乐图标 */
.music-icon {
  position: relative;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(6, 7, 10, 0.95);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.music-icon svg {
  transition: all 0.3s ease;
}

/* 播放动画 */
.music-control-btn.playing .music-icon {
  animation: musicPulse 1.5s ease-in-out infinite;
}

@keyframes musicPulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.15);
  }
}

/* 音乐标签 */
.music-label {
  font-size: 13px;
  font-weight: 600;
  color: rgba(6, 7, 10, 0.9);
  letter-spacing: 0.05em;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.3);
}

/* 最小化按钮 */
.music-minimize-btn {
  width: 100%;
  padding: 8px;
  border: none;
  border-top: 1px solid rgba(6, 7, 10, 0.1);
  background: rgba(6, 7, 10, 0.05);
  color: rgba(6, 7, 10, 0.8);
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s ease;
}

.music-minimize-btn:hover {
  background: rgba(6, 7, 10, 0.1);
  color: rgba(6, 7, 10, 1);
}

.music-minimize-btn:active {
  background: rgba(6, 7, 10, 0.15);
}

/* 最小化状态 */
.music-control-btn.minimized {
  border-radius: 50%;
  width: 56px;
  height: 56px;
  padding: 0;
}

.music-control-btn.minimized .music-btn-content {
  padding: 12px;
}

.music-control-btn.minimized .music-label {
  display: none;
}

.music-control-btn.minimized .music-icon {
  width: 28px;
  height: 28px;
}

.music-control-btn.minimized .music-minimize-btn {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 24px;
  height: 24px;
  padding: 0;
  border-radius: 50%;
  border: 2px solid rgba(247, 192, 92, 0.95);
  background: rgba(6, 7, 10, 0.9);
  color: rgba(247, 192, 92, 0.95);
  font-size: 14px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.music-control-btn.minimized .music-minimize-btn:hover {
  background: rgba(247, 192, 92, 0.95);
  color: rgba(6, 7, 10, 0.95);
  transform: scale(1.1);
}

/* 波纹效果 */
.music-control-btn.playing::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: rgba(247, 192, 92, 0.3);
  transform: translate(-50%, -50%);
  animation: ripple 2s ease-out infinite;
  pointer-events: none;
}

@keyframes ripple {
  0% {
    width: 100%;
    height: 100%;
    opacity: 0.5;
  }
  100% {
    width: 200%;
    height: 200%;
    opacity: 0;
  }
}

/* 响应式设计 */
@media (max-width: 720px) {
  .music-control-btn {
    right: 20px;
    bottom: 80px;
  }

  .music-btn-content {
    padding: 14px 16px;
  }

  .music-icon {
    width: 28px;
    height: 28px;
  }

  .music-label {
    font-size: 12px;
  }

  .music-control-btn.minimized {
    width: 50px;
    height: 50px;
  }

  .music-control-btn.minimized .music-icon {
    width: 24px;
    height: 24px;
  }
}

/* 防止文字选中 */
.music-control-btn * {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
  .music-control-btn {
    cursor: grab;
  }

  .music-control-btn.dragging {
    cursor: grabbing;
  }
}
