.player-right {
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 0.75rem;
  padding: 0.2rem 0.2rem 0.2rem 0;
}

.player-library__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.player-library__eyebrow,
.playlist-eyebrow {
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.player-library__title,
.playlist-header h3 {
  margin-top: 0.35rem;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
}

.album-strip-shell {
  position: relative;
  overflow: hidden;
  padding-bottom: 0.05rem;
}

.album-strip-shell::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 78px;
  height: 100%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.22s ease;
  background: linear-gradient(90deg, rgba(36, 17, 42, 0), rgba(36, 17, 42, 0.72) 58%, rgba(36, 17, 42, 0.96) 100%);
}

.album-strip-shell.has-overflow::after {
  opacity: 1;
}

.album-strip-shell.is-end::after {
  opacity: 0;
}

.album-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(128px, calc((100% - 2.55rem) / 4));
  gap: 0.7rem;
  overflow-x: auto;
  padding-right: 1.15rem;
  padding-bottom: 0.25rem;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}

.album-strip::-webkit-scrollbar,
.playlist-list::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.album-card {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  padding: 0.35rem;
  display: grid;
  gap: 0.32rem;
  text-align: left;
  cursor: pointer;
  scroll-snap-align: start;
  transition:
    transform 0.22s ease,
    background 0.22s ease,
    border-color 0.22s ease,
    box-shadow 0.22s ease;
}

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

.album-card.is-active {
  border-color: rgba(255, 174, 232, 0.5);
  background: rgba(255, 89, 182, 0.18);
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.2);
}

.album-card__image {
  overflow: hidden;
  border-radius: 14px;
  aspect-ratio: 1.24 / 0.78;
  background: rgba(255, 255, 255, 0.08);
}

.album-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.album-card__title {
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.2;
}

.album-card__meta {
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.72rem;
}

.playlist-panel {
  min-height: 0;
  padding-top: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0.55rem;
}

.playlist-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.playlist-count {
  color: rgba(255, 255, 255, 0.56);
  font-size: 0.9rem;
}

.playlist-list {
  min-height: 0;
  height: 100%;
  list-style: none;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 0.42rem;
  overflow-y: auto;
  padding-top: 0;
  padding-right: 0.4rem;
}

.playlist-row {
  list-style: none;
}

.playlist-item {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  padding: 0.82rem 0.95rem;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.9rem;
  text-align: left;
  cursor: pointer;
  transition:
    transform 0.22s ease,
    background 0.22s ease,
    border-color 0.22s ease,
    box-shadow 0.22s ease;
}

.playlist-item:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.18);
}

.playlist-item.is-active {
  border-color: rgba(255, 185, 230, 0.48);
  background: rgba(255, 94, 186, 0.16);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.16);
}

.playlist-item__index {
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.8rem;
  font-weight: 600;
}

.playlist-item__meta {
  min-width: 0;
}

.playlist-item__title {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.96rem;
  font-weight: 600;
}

.playlist-item__subtitle {
  display: block;
  margin-top: 0.18rem;
  color: rgba(255, 255, 255, 0.54);
  font-size: 0.8rem;
}

.playlist-item__duration {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.84rem;
  font-weight: 600;
}

@media (max-width: 1080px) {
  .player-right {
    padding: 0.2rem;
  }

  .playlist-list {
    max-height: 400px;
    height: auto;
  }
}

@media (max-width: 767px) {
  .player-library__head,
  .playlist-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .album-strip {
    grid-auto-columns: minmax(132px, 48%);
    padding-right: 1rem;
  }

  .album-strip-shell::after {
    width: 56px;
  }

  .playlist-list {
    max-height: 320px;
    height: auto;
  }

  .playlist-item {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .playlist-item__duration {
    grid-column: 2;
    justify-self: end;
  }
}

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

  .player-library__eyebrow,
  .playlist-eyebrow {
    font-size: 0.66rem;
  }

  .player-library__title,
  .playlist-header h3 {
    margin-top: 0.2rem;
    font-size: 1.02rem;
  }

  .album-strip {
    grid-auto-columns: minmax(104px, 72%);
    gap: 0.52rem;
    padding-right: 0.7rem;
    padding-bottom: 0.18rem;
  }

  .album-strip-shell::after {
    width: 44px;
  }

  .album-card {
    padding: 0.26rem;
    border-radius: 14px;
    gap: 0.24rem;
  }

  .album-card__image {
    border-radius: 10px;
  }

  .album-card__title {
    font-size: 0.74rem;
  }

  .album-card__meta {
    font-size: 0.64rem;
  }

  .playlist-panel {
    gap: 0.42rem;
  }

  .playlist-count {
    font-size: 0.78rem;
  }

  .playlist-list {
    max-height: 246px;
    gap: 0.34rem;
    padding-right: 0.2rem;
  }

  .playlist-item {
    padding: 0.62rem 0.66rem;
    gap: 0.5rem;
    border-radius: 12px;
  }

  .playlist-item__index {
    font-size: 0.68rem;
  }

  .playlist-item__title {
    font-size: 0.82rem;
  }

  .playlist-item__subtitle {
    font-size: 0.7rem;
  }

  .playlist-item__duration {
    font-size: 0.72rem;
  }
}

@media (max-width: 340px) {
  .player-library__title,
  .playlist-header h3 {
    font-size: 0.92rem;
  }

  .playlist-count {
    font-size: 0.72rem;
  }

  .album-strip {
    grid-auto-columns: minmax(92px, 78%);
    gap: 0.45rem;
  }

  .album-card {
    padding: 0.22rem;
  }

  .album-card__title {
    font-size: 0.68rem;
  }

  .album-card__meta {
    font-size: 0.58rem;
  }

  .playlist-list {
    max-height: 220px;
  }

  .playlist-item {
    padding: 0.54rem 0.56rem;
    gap: 0.42rem;
  }

  .playlist-item__title {
    font-size: 0.74rem;
  }

  .playlist-item__subtitle {
    font-size: 0.64rem;
  }

  .playlist-item__duration {
    font-size: 0.66rem;
  }
}
