/* ==============================================
   GLOBAL PREMIUM MUSIC PLAYER (Liquid Glass)
   Uses pixel values for consistent sizing across all pages
   ============================================== */

/* Animation Keyframes */
@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-6px); }
  100% { transform: translateY(0px); }
}

@keyframes liquid-pulse {
  0% { box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1), inset 0 0 0 1px rgba(255, 255, 255, 0.2); }
  50% { box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15), inset 0 0 0 1px rgba(255, 255, 255, 0.4); }
  100% { box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1), inset 0 0 0 1px rgba(255, 255, 255, 0.2); }
}

/* Base Player Container */
.nav-music-player {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 10000;
  width: 340px;
  border-radius: 24px;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(40px) scale(0.9);
  transition: all 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
  cursor: grab;
  
  /* Liquid Glass Effect */
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 
    0 10px 40px rgba(0, 0, 0, 0.1),
    inset 0 0 20px rgba(255, 255, 255, 0.2);
    
  /* Typography */
  font-family: "Avant Garde Gothic Pro", "Poppins", "Futura", sans-serif;
  font-size: 16px; /* Reset base font size */
}

body.dark-mode .nav-music-player {
  background: rgba(10, 10, 10, 0.4);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 
    0 15px 50px rgba(0, 0, 0, 0.5),
    inset 0 0 20px rgba(255, 255, 255, 0.05);
}

/* Visibility State */
.nav-music-player.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  /* Animation removed - conflicts with drag functionality */
}

/* Dragging State - ensures no transitions/animations interfere */
.nav-music-player.dragging {
  animation: none !important;
  transition: none !important;
}

/* Content Layout */
.player-content {
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
}

/* Glass Reflection Highlight */
.player-content::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(
    180deg, 
    rgba(255, 255, 255, 0.15) 0%, 
    rgba(255, 255, 255, 0) 100%
  );
  pointer-events: none;
  border-radius: 24px 24px 0 0;
}

/* Track Info */
.track-info {
  text-align: center;
  margin-bottom: 4px;
  position: relative;
  z-index: 2;
}

.track-name {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
  color: #111;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 2px 10px rgba(255, 255, 255, 0.5);
}

.track-artist {
  font-size: 11px;
  letter-spacing: 0.2em;
  color: rgba(60, 60, 60, 0.9);
  text-transform: uppercase;
  font-weight: 500;
}

body.dark-mode .track-name { 
  color: #fff; 
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

body.dark-mode .track-artist { 
  color: rgba(255, 255, 255, 0.7); 
}

/* Controls */
.player-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 28px;
  position: relative;
  z-index: 2;
}

.control-btn {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.4);
  cursor: pointer;
  color: #111;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.3, 1.5, 0.5, 1);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  backdrop-filter: blur(4px);
  padding: 0;
}

.control-btn.play-pause {
  width: 56px;
  height: 56px;
  background: #111;
  color: #fff;
  border: none;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

body.dark-mode .control-btn {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  color: #fff;
}

body.dark-mode .control-btn.play-pause {
  background: #fff;
  color: #000;
  box-shadow: 0 8px 20px rgba(255, 255, 255, 0.15);
}

.control-btn:hover {
  transform: scale(1.1);
  background: rgba(255, 255, 255, 0.4);
}

.control-btn.play-pause:hover {
  transform: scale(1.1) rotate(5deg);
  background: #000;
}

body.dark-mode .control-btn.play-pause:hover {
  background: #fff;
}

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

/* Progress Bar */
.progress-bar {
  width: 100%;
  height: 4px;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 4px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  margin-top: 8px;
}

body.dark-mode .progress-bar {
  background: rgba(255, 255, 255, 0.15);
}

.progress-fill {
  height: 100%;
  background: #111;
  border-radius: 4px;
  width: 0%;
  transition: width 0.1s linear;
  position: relative;
}

.progress-fill::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 10px;
  background: #fff;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  transform: scale(0);
  transition: transform 0.2s ease;
}

.progress-bar:hover .progress-fill::after {
  transform: scale(1.5);
}

body.dark-mode .progress-fill {
  background: #fff;
}

/* Time Info */
.time-info {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  letter-spacing: 0.1em;
  color: rgba(17, 17, 17, 0.6);
  margin-top: -8px;
  font-weight: 500;
}

body.dark-mode .time-info {
  color: rgba(255, 255, 255, 0.5);
}

/* Volume Control */
.volume-control {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.volume-icon {
  font-size: 10px;
  letter-spacing: 0.15em;
  font-weight: 600;
  opacity: 0.7;
}

.volume-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 3px;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 2px;
  outline: none;
}

body.dark-mode .volume-slider {
  background: rgba(255, 255, 255, 0.15);
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #111;
  cursor: pointer;
  transition: all 0.2s ease;
}

body.dark-mode .volume-slider::-webkit-slider-thumb {
  background: #fff;
}

.volume-slider::-webkit-slider-thumb:hover {
  transform: scale(1.3);
}

.volume-slider::-moz-range-thumb {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #111;
  cursor: pointer;
  border: none;
}

body.dark-mode .volume-slider::-moz-range-thumb {
  background: #fff;
}

/* Close/minimize Button - now just an icon */
.close-player-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  width: 24px;
  height: 24px;
  border: none;
  cursor: pointer;
  color: rgba(17, 17, 17, 0.4);
  transition: all 0.3s ease;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

body.dark-mode .close-player-btn {
  color: rgba(255, 255, 255, 0.4);
}

.close-player-btn:hover {
  color: #d32f2f;
  background: rgba(211, 47, 47, 0.1);
  transform: rotate(90deg);
}

.close-player-btn svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.5;
}

/* Draggable handle hint */
.player-content::after {
  content: "";
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 4px;
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.1);
  pointer-events: none;
}

body.dark-mode .player-content::after {
  background: rgba(255, 255, 255, 0.1);
}

/* Responsive */
@media (max-width: 600px) {
  .nav-music-player {
    width: calc(100vw - 32px);
    right: 16px;
    left: 16px;
    bottom: 16px;
    backdrop-filter: blur(20px) saturate(180%);
  }
}
