/* ============================================
   PLAYER VIEW
   ============================================ */

.player {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: var(--gap);
  gap: var(--gap);
}

.player__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: var(--gap);
  border-bottom: 1px solid var(--c-border);
  flex-shrink: 0;
}
.player__header-title {
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--c-text-dim);
  text-transform: uppercase;
}

.player__artwork {
  width: 120px;
  height: 120px;
  margin: 0 auto;
  border-radius: var(--radius2);
  border: 1px solid var(--c-border);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--c-surface);
  overflow: hidden;
  flex-shrink: 0;
  transition:
    border-color var(--transition),
    box-shadow var(--transition);
}
.player__artwork img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.player__artwork-default {
  font-size: 42px;
  color: var(--c-text-dim);
}
.player__artwork.playing {
  border-color: var(--c-accent);
  box-shadow: 0 0 20px rgba(0, 255, 65, 0.2);
}
@keyframes rotate {
  to {
    transform: rotate(360deg);
  }
}
.player__artwork.playing .player__artwork-default {
  animation: rotate 4s linear infinite;
}

.player__info {
  text-align: center;
  flex-shrink: 0;
}
.player__title {
  font-size: 15px;
  color: var(--c-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 3px;
}
.player__artist {
  font-size: 11px;
  color: var(--c-text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player__progress {
  flex-shrink: 0;
}
.player__time {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--c-text-dim);
  margin-top: 4px;
}

.player__controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-shrink: 0;
  flex-wrap: wrap;
}
.ctrl-btn {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--c-border);
  font-size: 15px;
  color: var(--c-text-dim);
  transition: var(--transition);
  background: none;
  cursor: pointer;
}
.ctrl-btn:hover,
.ctrl-btn.active {
  border-color: var(--c-accent);
  color: var(--c-accent);
}
.ctrl-btn.play-btn {
  width: 50px;
  height: 50px;
  font-size: 18px;
  border-color: var(--c-accent);
  color: var(--c-accent);
}
.ctrl-btn.play-btn:hover {
  background: var(--c-accent);
  color: #000;
}
.ctrl-btn.liked {
  color: var(--c-liked);
  border-color: var(--c-liked);
}

.player__volume {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.volume-icon {
  font-size: 13px;
  color: var(--c-text-dim);
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  height: 3px;
  background: var(--c-border);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
  border: none;
  padding: 0;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--c-accent);
  cursor: pointer;
}
input[type="range"]::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--c-accent);
  cursor: pointer;
  border: none;
}

.track-list {
  flex: 1;
  overflow-y: auto;
  border-top: 1px solid var(--c-border);
  padding-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.track-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
}
.track-item:hover {
  background: var(--c-surface);
  border-color: var(--c-border);
}
.track-item.active {
  background: var(--c-surface);
  border-color: var(--c-accent);
}
.track-item__index {
  width: 18px;
  font-size: 10px;
  color: var(--c-text-dim);
  text-align: right;
  flex-shrink: 0;
}
.track-item__thumb {
  width: 34px;
  height: 34px;
  border-radius: var(--radius);
  background: var(--c-surface2);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  font-size: 16px;
}
.track-item__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.track-item__info {
  flex: 1;
  min-width: 0;
}
.track-item__name {
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--c-text);
}
.track-item.active .track-item__name {
  color: var(--c-accent);
}
.track-item__artist {
  font-size: 10px;
  color: var(--c-text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.track-item__duration {
  font-size: 10px;
  color: var(--c-text-dim);
  flex-shrink: 0;
}
.track-item__like {
  font-size: 13px;
  flex-shrink: 0;
  padding: 4px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--c-text-dim);
  transition: var(--transition);
}
.track-item__like.liked {
  color: var(--c-liked);
}
.track-item__like:hover {
  color: var(--c-liked);
}

.playing-bars {
  display: flex;
  gap: 2px;
  align-items: flex-end;
  height: 14px;
}
.playing-bars span {
  display: block;
  width: 3px;
  background: var(--c-accent);
  border-radius: 1px;
  animation: bar 0.8s ease-in-out infinite;
}
.playing-bars span:nth-child(1) {
  height: 8px;
  animation-delay: 0s;
}
.playing-bars span:nth-child(2) {
  height: 14px;
  animation-delay: 0.2s;
}
.playing-bars span:nth-child(3) {
  height: 6px;
  animation-delay: 0.4s;
}
@keyframes bar {
  0%,
  100% {
    transform: scaleY(0.5);
  }
  50% {
    transform: scaleY(1);
  }
}
