.player-left {
  display: grid;
  align-content: start;
  gap: 0.95rem;
  padding: 0.2rem;
}

.player-cover-frame {
  overflow: hidden;
  width: 100%;
  height: clamp(180px, 28vh, 258px);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 22px 42px rgba(0, 0, 0, 0.26);
}

.player-cover-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.player-meta {
  display: grid;
  gap: 0.3rem;
}

.player-kicker {
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.track-title-wrapper {
  overflow: hidden;
}

.track-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2rem, 4vw, 2.9rem);
  font-weight: 700;
  line-height: 0.96;
}

.track-title.track-title--compact {
  font-size: clamp(1.8rem, 3.4vw, 2.45rem);
}

.track-title.track-title--dense {
  font-size: clamp(1.58rem, 2.9vw, 2.02rem);
  line-height: 1.02;
}

.track-title.marquee {
  display: inline-block;
  min-width: 100%;
  white-space: nowrap;
  animation: track-marquee 10s linear infinite;
}

.player-artist {
  color: rgba(255, 255, 255, 0.92);
  font-size: 1.18rem;
  font-weight: 600;
}

.player-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: center;
}

.player-album,
.player-plays {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.92rem;
}

.player-progress-panel {
  display: grid;
  gap: 0.7rem;
}

.player-progress {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.85rem;
}

.time-label {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.82rem;
}

#progress-bar,
#volume-slider {
  width: 100%;
  appearance: none;
  background: transparent;
}

#progress-bar::-webkit-slider-runnable-track,
#volume-slider::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
}

#progress-bar::-webkit-slider-thumb,
#volume-slider::-webkit-slider-thumb {
  width: 16px;
  height: 16px;
  margin-top: -5px;
  appearance: none;
  border: 0;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(255, 91, 180, 0.18);
  cursor: pointer;
}

.player-controls-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
}

.control-btn {
  width: 52px;
  height: 52px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    transform 0.22s ease,
    background 0.22s ease,
    border-color 0.22s ease,
    box-shadow 0.22s ease;
}

.control-btn:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.11);
  border-color: rgba(255, 255, 255, 0.22);
}

.control-btn--primary {
  width: 70px;
  height: 70px;
  border-color: rgba(255, 255, 255, 0.9);
  background: linear-gradient(135deg, #ffffff, #f6e0b7);
  color: #6b3e02;
  box-shadow: 0 20px 34px rgba(0, 0, 0, 0.24);
}

.control-btn--primary:hover {
  background: linear-gradient(135deg, #ffffff, #ffeabf);
}

.control-btn--ghost.is-active,
.control-btn--ghost[data-mode="track"],
.control-btn--ghost[data-mode="album"] {
  color: #ffb9df;
  border-color: rgba(255, 173, 221, 0.4);
  background: rgba(255, 122, 193, 0.12);
}

.player-volume {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.volume-slider-shell {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 0.7rem);
  z-index: 8;
  width: 56px;
  height: 0;
  opacity: 0;
  overflow: visible;
  pointer-events: none;
  transform: translateX(-50%) translateY(0.4rem) scale(0.96);
  transform-origin: bottom center;
  transition:
    height 0.24s ease,
    opacity 0.24s ease,
    transform 0.24s ease;
}

.player-volume:hover .volume-slider-shell,
.player-volume:focus-within .volume-slider-shell {
  height: 154px;
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0) scale(1);
}

.volume-slider-container {
  position: relative;
  width: 56px;
  height: 154px;
  padding: 0.85rem 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(17, 11, 24, 0.9);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
}

.volume-slider-container::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -7px;
  width: 12px;
  height: 12px;
  border-right: 1px solid rgba(255, 255, 255, 0.14);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(17, 11, 24, 0.9);
  transform: translateX(-50%) rotate(45deg);
}

.volume-slider-container #volume-slider {
  width: 114px;
  max-width: none;
  transform: rotate(-90deg);
}

.player-utility {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0.4rem;
  margin-top: 0.15rem;
}

.utility-btn {
  min-height: 0;
  padding: 0.2rem 0.28rem;
  border: 0;
  border-radius: 0;
  color: rgba(255, 255, 255, 0.9);
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.34rem;
  cursor: pointer;
  transition:
    transform 0.22s ease,
    color 0.22s ease,
    opacity 0.22s ease;
}

.utility-btn:hover {
  transform: translateY(-1px);
  color: #ffffff;
}

.utility-btn:disabled {
  color: rgba(255, 255, 255, 0.34);
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.utility-btn:disabled:hover {
  color: rgba(255, 255, 255, 0.34);
  transform: none;
}

.utility-btn--like,
.utility-btn--like .utility-count {
  color: #ffd2e7;
}

.utility-btn--like.liked {
  color: #ffb5da;
  transform: translateY(-1px) scale(1.04);
}

.utility-count {
  min-width: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1;
}

.utility-btn i {
  font-size: 0.95rem;
}

.utility-btn--icon {
  color: rgba(255, 255, 255, 0.76);
}

.utility-btn--icon:hover {
  color: rgba(255, 255, 255, 0.96);
}

@keyframes track-marquee {
  0%,
  12% {
    transform: translateX(0);
  }
  88%,
  100% {
    transform: translateX(calc(-100% + 15rem));
  }
}

@media (max-width: 767px) {
  .player-cover-frame {
    height: auto;
    aspect-ratio: 1 / 1;
  }

  .track-title {
    font-size: clamp(1.8rem, 8vw, 2.35rem);
  }

  .player-progress {
    grid-template-columns: 1fr;
  }

  .time-label:last-child {
    justify-self: end;
  }

  .player-controls-row {
    justify-content: space-between;
    gap: 0.45rem;
  }

  .control-btn {
    width: 44px;
    height: 44px;
  }

  .control-btn--primary {
    width: 60px;
    height: 60px;
  }

  .player-utility {
    gap: 0.35rem;
  }
}

@media (max-width: 420px) {
  .player-left {
    gap: 0.72rem;
    padding: 0;
  }

  .player-cover-frame {
    height: clamp(150px, 56vw, 210px);
    border-radius: 18px;
  }

  .player-meta {
    gap: 0.22rem;
  }

  .player-kicker {
    font-size: 0.68rem;
    letter-spacing: 0.14em;
  }

  .track-title,
  .track-title.track-title--compact {
    font-size: clamp(1.38rem, 8.8vw, 1.9rem);
    line-height: 0.98;
  }

  .track-title.track-title--dense {
    font-size: clamp(1.14rem, 7.5vw, 1.56rem);
  }

  .player-artist {
    font-size: 0.98rem;
  }

  .player-meta-row {
    gap: 0.28rem 0.7rem;
  }

  .player-album,
  .player-plays {
    font-size: 0.8rem;
  }

  .player-utility {
    gap: 0.28rem;
    margin-top: 0.05rem;
  }

  .utility-btn {
    padding: 0.1rem 0.16rem;
  }

  .utility-btn i {
    font-size: 0.84rem;
  }

  .utility-count {
    font-size: 0.74rem;
  }

  .player-progress-panel {
    gap: 0.45rem;
  }

  .player-progress {
    gap: 0.52rem;
  }

  .time-label {
    font-size: 0.72rem;
  }

  .player-controls-row {
    gap: 0.3rem;
  }

  .control-btn {
    width: 40px;
    height: 40px;
  }

  .control-btn i {
    font-size: 0.82rem;
  }

  .control-btn--primary {
    width: 54px;
    height: 54px;
  }

  .control-btn--primary i {
    font-size: 1rem;
  }

}

@media (max-width: 340px) {
  .player-cover-frame {
    height: clamp(138px, 58vw, 180px);
    border-radius: 16px;
  }

  .track-title,
  .track-title.track-title--compact {
    font-size: clamp(1.16rem, 8vw, 1.52rem);
  }

  .track-title.track-title--dense {
    font-size: clamp(1rem, 7vw, 1.28rem);
  }

  .player-artist {
    font-size: 0.9rem;
  }

  .player-album,
  .player-plays {
    font-size: 0.74rem;
  }

  .player-progress {
    gap: 0.42rem;
  }

  .control-btn {
    width: 36px;
    height: 36px;
  }

  .control-btn i {
    font-size: 0.74rem;
  }

  .control-btn--primary {
    width: 48px;
    height: 48px;
  }

  .control-btn--primary i {
    font-size: 0.92rem;
  }

  .player-controls-row {
    gap: 0.22rem;
  }

}

@media (hover: none) and (pointer: coarse) {
  .player-volume {
    display: none;
  }
}
