/* ==========================================================================
   ट्रक वाला (Truck Wala) - Glassmorphism Music Player
   ========================================================================== */

.player-container {
  position: absolute;
  bottom: 18vh;
  left: 50%;
  transform: translateX(-50%);
  z-index: 40;
  width: min(92vw, 490px);
  background: var(--glass-bg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-shadow);
  padding: 1.15rem 1.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.player-container:hover {
  background: var(--glass-bg-hover);
  border-color: rgba(255, 255, 255, 0.38);
  box-shadow: 
    0 20px 50px rgba(0, 0, 0, 0.75),
    0 0 25px rgba(250, 204, 21, 0.22);
}

/* Left Side: Track Title & Artist Info */
.track-info {
  flex: 1;
  min-width: 0; /* Crucial for text-overflow ellipsis */
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.track-artwork-cassette {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--secondary-accent), var(--primary-accent));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(249, 115, 22, 0.4);
  position: relative;
  overflow: hidden;
}

.cassette-icon {
  font-size: 24px;
  color: #1e1b4b;
  animation: spinCassette 8s linear infinite;
  animation-play-state: paused;
}

.is-playing .cassette-icon {
  animation-play-state: running;
}

@keyframes spinCassette {
  100% { transform: rotate(360deg); }
}

.track-details {
  flex: 1;
  min-width: 0;
}

.track-title {
  font-size: 0.98rem;
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
  margin-bottom: 2px;
  letter-spacing: -0.01em;
}

.track-artist {
  font-size: 0.78rem;
  color: var(--primary-accent);
  font-weight: 500;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Animated Sound Visualizer Bars */
.sound-bars {
  display: flex;
  align-items: flex-end;
  gap: 2.5px;
  height: 14px;
}

.sound-bar {
  width: 2.5px;
  background: var(--primary-accent);
  border-radius: 2px;
  height: 4px;
}

.is-playing .sound-bar:nth-child(1) { animation: soundWave 0.5s ease-in-out infinite alternate; }
.is-playing .sound-bar:nth-child(2) { animation: soundWave 0.75s ease-in-out infinite alternate 0.15s; }
.is-playing .sound-bar:nth-child(3) { animation: soundWave 0.6s ease-in-out infinite alternate 0.3s; }
.is-playing .sound-bar:nth-child(4) { animation: soundWave 0.85s ease-in-out infinite alternate 0.1s; }

@keyframes soundWave {
  0% { height: 3px; }
  100% { height: 14px; }
}

/* Right Side: Player Controls */
.player-controls {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
}

.btn-ctrl {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.15rem;
  cursor: pointer;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  outline: none;
}

.btn-ctrl:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  transform: scale(1.1);
}

.btn-ctrl:active {
  transform: scale(0.94);
}

/* Distinct Solid White Play/Pause Button */
.btn-play-pause {
  background: #ffffff;
  color: #000000;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(255, 255, 255, 0.4);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease, background 0.2s ease;
  outline: none;
  margin: 0 0.15rem;
}

.btn-play-pause:hover {
  transform: scale(1.1);
  background: #ffffff;
  color: #000000;
  box-shadow: 0 6px 26px rgba(255, 255, 255, 0.6);
}

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

/* Mobile Adjustments */
@media (max-width: 640px) {
  .player-container {
    bottom: 17vh;
    padding: 0.85rem 1rem;
    gap: 0.85rem;
  }
  .track-artwork-cassette {
    width: 40px;
    height: 40px;
  }
  .btn-play-pause {
    width: 42px;
    height: 42px;
  }
}
