/* Background Music Player Styles */
.music-player {
  position: fixed;
  bottom: 30px;
  right: -200px; /* Start hidden */
  z-index: 1000;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 50px;
  padding: 10px 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.music-player:hover,
.music-player.expanded {
  right: 30px;
  transform: translateX(0);
}

.music-player:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.2);
}

/* Small visible button that's always showing */
.music-player::before {
  content: "";
  position: absolute;
  right: -15px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 50%;
  box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
  z-index: 1001;
  transition: all 0.3s ease;
}

.music-player::after {
  content: "♪";
  position: absolute;
  right: -12px;
  top: 50%;
  transform: translateY(-50%);
  color: white;
  font-size: 14px;
  font-weight: bold;
  z-index: 1002;
  pointer-events: none;
}

.music-player:hover::before {
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.music-controls {
  display: flex;
  align-items: center;
  gap: 15px;
}

.play-pause-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  color: white;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

.play-pause-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.play-pause-btn:active {
  transform: scale(0.95);
}

.music-info {
  display: flex;
  flex-direction: column;
  min-width: 120px;
}

.music-title {
  font-size: 12px;
  font-weight: 600;
  color: #333;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.music-status {
  font-size: 10px;
  color: #666;
  margin: 0;
}

.volume-control {
  display: flex;
  align-items: center;
  gap: 8px;
}

.volume-slider {
  width: 60px;
  height: 4px;
  border-radius: 2px;
  background: #e0e0e0;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #667eea;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.volume-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #667eea;
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.volume-icon {
  font-size: 14px;
  color: #666;
  cursor: pointer;
}

/* Animation for playing state */
.playing .play-pause-btn {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
  }
  50% {
    box-shadow: 0 2px 15px rgba(102, 126, 234, 0.6);
  }
  100% {
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
  }
}

/* Responsive design */
@media (max-width: 768px) {
  .music-player {
    bottom: 20px;
    right: -180px; /* Slightly less hidden on mobile */
  }

  .music-player:hover,
  .music-player.expanded {
    right: 20px;
  }

  .music-info {
    min-width: 100px;
  }

  .volume-control {
    display: none;
  }
}

@media (max-width: 480px) {
  .music-player {
    bottom: 15px;
    right: -160px; /* Even less hidden on small mobile */
  }

  .music-player:hover,
  .music-player.expanded {
    right: 15px;
  }

  .play-pause-btn {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }

  .music-info {
    min-width: 80px;
  }

  .music-title {
    font-size: 11px;
  }

  .music-status {
    font-size: 9px;
  }
}

/* Floating Music Player Styles */
.floating-music-player {
  position: fixed;
  bottom: 30px;
  left: 30px;
  z-index: 1000;
  opacity: 0.5;
  transition: opacity 0.3s ease;
}

.floating-music-player:hover {
  opacity: 1;
}

.music-toggle-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  animation: gentle-pulse 3s ease-in-out infinite;
}

@keyframes gentle-pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.music-toggle-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.4);
}

.music-toggle-btn:active {
  transform: scale(0.95);
}

.music-toggle-btn.playing {
  animation: pulse 2s infinite;
}

.music-toggle-btn.playing .fa-play,
.music-toggle-btn.playing .fa-pause,
.music-toggle-btn.playing .fa-music {
  animation: rotate 3s linear infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  }
  50% {
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.6);
  }
  100% {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  }
}

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

/* Responsive design for floating music player */
@media (max-width: 768px) {
  .floating-music-player {
    bottom: 20px;
    left: 20px;
  }

  .music-toggle-btn {
    width: 50px;
    height: 50px;
    font-size: 20px;
  }
}

@media (max-width: 480px) {
  .floating-music-player {
    bottom: 15px;
    left: 15px;
  }

  .music-toggle-btn {
    width: 45px;
    height: 45px;
    font-size: 18px;
  }
}
