.music-player-container {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-white-100);
  padding: 1.5rem 0;
  box-shadow: 0 -9px 15px rgba(0, 0, 0, 0.05),
    inset 0 -1px 0 0px var(--bg-primary-100);
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 19;
}

.music-player-container.active {
  transform: translateY(0);
  position: sticky;
}

.player-wrapper {
  max-width: var(--width-container);
  padding: 0 var(--gutter-x);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 2rem;
  position: relative;
}

/* Thumbnail */
.player-thumbnail {
  width: 6rem;
  height: 6rem;
  border-radius: 1rem;
  overflow: hidden;
  flex-shrink: 0;
  background: #333;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.player-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Track info */
.player-info {
  flex: 0 0 20rem;
  min-width: 0;
  padding-left: 1rem;
}

.track-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-artist {
  font-size: 1.3rem;
  opacity: 0.7;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Player controls */
.player-controls {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  direction: ltr;
}

.control-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.8rem;
  border-radius: 50%;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.control-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

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

.control-btn.play-pause {
  width: 6rem;
  height: 6rem;
  background: var(--c-primary);
  color: var(--c-white);
  box-shadow: 0 0.2rem 0.8rem rgba(255, 255, 255, 0.2);
  font-size: 2.2rem;
  transition: var(--anim);
}

.control-btn.play-pause:active,
.desktop .control-btn.play-pause:hover {
  background: var(--c-accent);
  transform: scale(0.95);
}

.control-btn svg {
  width: 3rem;
  height: 3rem;
  pointer-events: none;
  transition: var(--anim);
}

.prev-btn:hover svg,
.next-btn:hover svg {
  fill: var(--c-accent);
}

.control-btn.play-pause svg {
  width: 2.4rem;
  height: 2.4rem;
}

.control-btn.loop-btn {
  width: 4rem;
  font-size: 2.4rem;
  color: var(--text-neutral-600);
  flex: none;
  margin-left: 0.8rem;
  height: 4rem;
}

.control-btn.loop-btn:active,
.desktop .control-btn.loop-btn:hover {
  color: var(--c-accent);
}

.control-btn.loop-btn.active {
  color: #1db954;
  background: rgba(29, 185, 84, 0.2);
}

/* Volume button states */
.control-btn.volume-btn {
  position: relative;
}

.control-btn.volume-btn i {
  font-size: 2rem;
  transition: opacity 0.2s;
}

/* Progress Container */
.progress-container {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 1.2rem;
  direction: ltr;
}

.progress-bar {
  flex: 1;
  height: 0.4rem;
  background: var(--bg-neutral-500);
  border-radius: 2rem;
  cursor: pointer;
  position: relative;
  overflow: visible;
  /* Add touch-action for better mobile support */
  touch-action: none;
}

.progress-bar:hover {
  height: 0.6rem;
}

.progress-fill {
  height: 100%;
  background: var(--c-primary);
  border-radius: 2rem;
  width: 0%;
  position: relative;
  transition: width 0.1s linear;
}

.volume-handle,
.progress-handle {
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 1.2rem;
  height: 1.2rem;
  background: var(--bg-white-200);
  border: 0.15rem solid var(--c-primary);
  border-radius: 50%;
  cursor: grab;
  opacity: 0;
  transition: opacity 0.2s;
  box-shadow: 0 0.2rem 0.4rem rgba(0, 0, 0, 0.3);
}

.volume-slider:hover .volume-handle,
.progress-bar:hover .progress-handle {
  opacity: 1;
}

.volume-handle:active,
.progress-handle:active {
  cursor: grabbing;
  transform: translate(-50%, -50%) scale(1.2);
}

.time-display {
  font-size: 1.2rem;
  opacity: 0.7;
  min-width: 4rem;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

/* Volume Control */
.volume-container {
  display: flex;
  align-items: center;
  direction: ltr;
}

.volume-slider {
  width: 8rem;
  height: 0.4rem;
  background: var(--bg-neutral-500);
  border-radius: 2rem;
  cursor: pointer;
  position: relative;
  /* Add touch-action for better mobile support */
  touch-action: none;
}

.volume-slider:hover {
  height: 0.6rem;
}

.volume-fill {
  height: 100%;
  background: var(--c-primary);
  border-radius: 2rem;
  width: 70%;
  transition: width 0.1s linear;
  position: relative;
}

/* Wishlist Container */
.wishlist-container {
  margin-right: 1rem;
  flex: none;
}

.wishlist-container .wishlist-item {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.8rem;
  border-radius: 50%;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 2.4rem;
  width: 4rem;
  height: 4rem;
  color: var(--text-neutral-600);
}

.wishlist-container .wishlist-item:hover {
  color: var(--c-primary);
}

.wishlist-container .wishlist-item.wished {
  color: var(--c-primary);
}

.wishlist-container .wishlist-item.wished:hover {
  opacity: 0.5;
}

.wishlist-container .wishlist-item.disable {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Loading State */
.player-loading {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  backdrop-filter: blur(0.5rem);
  box-shadow: 0 -9px 15px rgba(0, 0, 0, 0.05),
    inset 0 -1px 0 0px var(--c-primary-100);
}

.time-display {}

/* Online play button on cards */
.play-online-btn {}

.play-online-btn:hover {}

.play-online-btn svg {
  width: 1.6rem;
  height: 1.6rem;
}

/* Album tracks list */
.album-tracks-list {
  margin: 2rem 0;
}

.album-track-item {
  display: flex;
  align-items: center;
  padding: 1.2rem 1.5rem;
  border-radius: 0.8rem;
  transition: background 0.2s;
  cursor: pointer;
}

.playlist-track-play,
.album-track-play {
  transition: all 0.2s;
  flex-shrink: 0;
}

.playlist-track-play.playing,
.play-online-btn.playing,
.album-track-play.playing {
  background: var(--c-accent);
  animation: pulse 2s infinite;
  pointer-events: none;
  color: var(--c-white);
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(29, 185, 84, 0.7);
  }

  70% {
    box-shadow: 0 0 0 1rem rgba(29, 185, 84, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(29, 185, 84, 0);
  }
}

.track-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
}

.track-number {
  color: #999;
  font-size: 1.4rem;
  min-width: 2.5rem;
}

.track-name {
  font-size: 1.5rem;
  color: #333;
}

/* Mobile touch indicators */
/* @media (hover: none) and (pointer: coarse) { */
/* Show handle on mobile */
.mobile .volume-handle,
.mobile .progress-handle {
  opacity: 1;
  width: 1.6rem;
  height: 1.6rem;
}

.mobile .progress-bar,
.mobile .volume-slider {
  height: 0.8rem;
}

.mobile .progress-bar:active,
.mobile .volume-slider:active {
  height: 1rem;
}

/* } */

/* Responsive Design */

.mobile .player-wrapper {
  gap: 1.5rem;
}

.mobile .volume-container {
  display: none;
}

.icon-speaker-mute {
  position: relative;
}

.icon-speaker-mute::before {
  content: "\e929";
}

.icon-speaker-mute::after {
  content: "";
  width: 0.3rem;
  height: 3rem;
  background: var(--c-neutral-750);
  position: absolute;
  transform: rotate(-45deg);
  top: -0.6rem;
  left: 0.7rem;
  border: 0.1rem solid var(--c-primary);
  border-radius: 0.4rem;
}

.mobile .progress-container {
  position: absolute;
  top: -3rem;
  left: 0;
  right: 0;
  padding: 0 2rem;
}

.mobile .music-player-container {
  padding: 5rem 0 1.5rem;
}

.mobile .music-player-container.active {
  bottom: 8.3rem;
}

.mobile .wishlist-item:active,
.mobile .play-online-btn:active {
  transform: scale(0.9);
}

.mobile .player-thumbnail {
  width: 4.5rem;
  height: 4.5rem;
}

.mobile .player-info {
  flex: 1;
  padding-left: 0;
}

.mobile .control-btn {
  padding: 0.6rem;
}

.mobile .control-btn.play-pause {
  width: 5rem;
  height: 5rem;
  font-size: 1.8rem;
}