/* ============= Songs Library main wrapper ============= */
.songs-lib-wrapper {
  max-width: 1200px;
  margin: 40px auto 70px;
  padding: 0 20px;
}

/* ============= Hero banner ============= */
.songs-lib-hero {
  margin-bottom: 28px;
}

.songs-lib-hero__image {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  min-height: 160px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}

.songs-lib-hero__image > img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

.songs-lib-hero__fallback {
  width: 100%;
  height: 180px;
  background: radial-gradient(circle at 0 0, #1d4ed8, #020617);
}

.songs-lib-hero__text {
  position: absolute;
  inset: 24px 32px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  pointer-events: none;
}

.songs-lib-hero__text h1 {
  font-size: 26px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 4px;
}

.songs-lib-hero__text p {
  margin: 0;
  color: rgba(226, 232, 240, 0.9);
  font-size: 14px;
}

/* ============= Layout: left (tracks) + right (lyrics) ============= */
.songs-lib-layout {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2.1fr);
  gap: 24px;
}

@media (max-width: 1024px) {
  .songs-lib-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ============= Generic card ============= */
.songs-lib-card {
  background: radial-gradient(circle at 0 0, rgba(56, 189, 248, 0.18), rgba(15, 23, 42, 0.96));
  border-radius: 26px;
  padding: 18px 20px 20px;
  box-shadow: 0 22px 50px rgba(15, 23, 42, 0.9);
  position: relative;
}

.songs-lib-left > .songs-lib-card + .songs-lib-card {
  margin-top: 18px;
}

.songs-lib-card__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 12px;
}

.songs-lib-card__header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.songs-lib-card__header h2 {
  margin: 0;
  font-size: 18px;
  color: #e5e7eb;
}

.songs-lib-card__hint {
  font-size: 11px;
  color: rgba(148, 163, 184, 0.85);
}

/* small dark scrollbars shared */
.songs-lib-scroll::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
.songs-lib-scroll::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.9);
}
.songs-lib-scroll::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.8);
  border-radius: 999px;
}

/* ============= Latest tracks slider ============= */
.songs-lib-latest__inner {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 4px 4px 8px;
}

.songs-lib-latest__nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.songs-lib-latest__nav-btn {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: none;
  background: rgba(15, 23, 42, 0.9);
  color: #e5e7eb;
  font-size: 13px;
  cursor: pointer;
}

.songs-lib-latest-card {
  min-width: 190px;
  max-width: 220px;
  padding: 10px 12px;
  border-radius: 22px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: radial-gradient(circle at 0 0, rgba(56, 189, 248, 0.17), rgba(15, 23, 42, 0.95));
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
  color: #e5e7eb;
}
.songs-lib-latest-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.75);
  border-color: rgba(250, 204, 21, 0.8);
}
.songs-lib-latest-card.is-active {
  border-color: rgba(234, 179, 8, 0.95);
  box-shadow: 0 0 30px rgba(250, 204, 21, 0.35);
  background: radial-gradient(circle at 0 0, rgba(250, 204, 21, 0.15), rgba(15, 23, 42, 0.98));
}

.songs-lib-latest-card__thumb img {
  width: 54px;
  height: 54px;
  border-radius: 999px;
  object-fit: cover;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.7);
}

.songs-lib-latest-card__info {
  flex: 1;
  min-width: 0;
}

.songs-lib-latest-card__title {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #f9fafb;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.songs-lib-latest-card__artist {
  display: block;
  font-size: 11px;
  color: rgba(156, 163, 175, 0.95);
}

.songs-lib-latest-card__play {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #facc15;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: #111827;
  box-shadow: 0 0 18px rgba(250, 204, 21, 0.7);
}

/* ============= All tracks list ============= */
.songs-lib-all__list {
  max-height: 360px;
  overflow-y: auto;
  padding-right: 4px;
}

.songs-lib-row {
  display: flex;
  align-items: center;
  padding: 8px 8px;
  border-radius: 18px;
  cursor: pointer;
  position: relative;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}
.songs-lib-row:hover {
  background: radial-gradient(circle at 0 0, rgba(56, 189, 248, 0.18), rgba(15, 23, 42, 0.9));
}

/* base "selected row" look */
.songs-lib-row.is-active {
  background: radial-gradient(circle at 0 0, rgba(250, 204, 21, 0.10), rgba(15, 23, 42, 0.95));
  box-shadow: 0 0 12px rgba(250, 204, 21, 0.20);
}

.songs-lib-row + .songs-lib-row {
  margin-top: 4px;
}

.songs-lib-row__thumb img {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  object-fit: cover;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.7);
}

.songs-lib-row__meta {
  flex: 1;
  margin-left: 10px;
  min-width: 0;
}

.songs-lib-row__title {
  font-size: 13px;
  font-weight: 600;
  color: #f9fafb;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.songs-lib-row__artist {
  font-size: 11px;
  color: rgba(156, 163, 175, 0.9);
}

.songs-lib-row__play {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: none;
  outline: none;
  background: rgba(15, 23, 42, 0.85);
  color: #e5e7eb;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.08s ease;
}
.songs-lib-row__play:hover {
  background: #facc15;
  color: #111827;
  transform: translateY(-1px);
}

/* ============= Lyrics panel ============= */
.songs-lib-right {
  min-width: 0;
}

.songs-lib-card__header--lyrics {
  margin-bottom: 10px;
}

.songs-lib-lyrics__cover {
  border-radius: 20px;
  overflow: hidden;
  height: 220px; /* medium, modern */
  background: radial-gradient(circle at 0 0, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 1));
  margin-bottom: 12px;
}

.songs-lib-lyrics__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.songs-lib-lyrics__text {
  margin-top: 4px;
  padding-right: 4px;
  max-height: 220px;
  overflow-y: auto;
  font-size: 13px;
  color: #e5e7eb;
  line-height: 1.55;
}
.songs-lib-lyrics__text p {
  margin: 0 0 6px;
}

/* ============= Neon inline player ============= */
.songs-lib-lyrics__player {
  margin-top: 16px;
  padding: 12px 16px 10px;
  border-radius: 24px;
  background: radial-gradient(circle at top left, rgba(30, 64, 175, 0.98), rgba(15, 23, 42, 1));
  box-shadow:
    0 0 40px rgba(56, 189, 248, 0.6),
    0 0 70px rgba(15, 23, 42, 0.9);
}

.songs-lib-lyrics__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.songs-lib-lyrics__now {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.songs-lib-lyrics__track {
  font-size: 14px;
  font-weight: 600;
  color: #f9fafb;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.songs-lib-lyrics__artist {
  font-size: 12px;
  color: rgba(156, 163, 175, 0.92);
}

/* controls */
.songs-lib-lyrics__controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.songs-lib-lyrics-btn {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  background: rgba(15, 23, 42, 0.9);
  color: #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: background 0.15s ease, transform 0.08s ease;
}
.songs-lib-lyrics-btn--main {
  width: 40px;
  height: 40px;
  font-size: 18px;
  background: #facc15;
  color: #111827;
  box-shadow: 0 0 18px rgba(250, 204, 21, 0.65);
}
.songs-lib-lyrics-btn:hover {
  transform: translateY(-1px);
}
.songs-lib-lyrics-btn--main:hover {
  background: #fbbf24;
}

/* timeline */
.songs-lib-lyrics__timeline {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 40px;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 11px;
  color: rgba(148, 163, 184, 0.95);
}

#songs-lib-seek {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background: rgba(30, 64, 175, 0.7);
  outline: none;
}
#songs-lib-seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #facc15;
  box-shadow: 0 0 10px rgba(250, 204, 21, 0.8);
  cursor: pointer;
}
#songs-lib-seek::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #facc15;
  cursor: pointer;
}

/* hide white scrollbars (but keep scrolling) */
.songs-lib-latest__inner::-webkit-scrollbar,
.songs-lib-all__list::-webkit-scrollbar,
.songs-lib-lyrics__text::-webkit-scrollbar {
  display: block !important; /* visible but darkened later */
}
.songs-lib-latest__inner,
.songs-lib-all__list,
.songs-lib-lyrics__text {
  scrollbar-width: thin !important;
}

/* small screens */
@media (max-width: 768px) {
  .songs-lib-card {
    padding: 14px 14px 16px;
  }
  .songs-lib-hero__text h1 {
    font-size: 22px;
  }
}

/* Reduce cover image height */
.songs-lib-lyrics__cover {
  height: 160px !important;
}

/* Increase lyrics box height */
.songs-lib-lyrics__text {
  max-height: 260px !important;
}

/* Reorder lyrics elements */
.songs-lib-lyrics {
  display: flex;
  flex-direction: column;
}

/* DARK SCROLLBARS (GLOBAL FIX) */
.songs-lib-scroll::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
.songs-lib-scroll::-webkit-scrollbar-track {
  background: rgba(10, 20, 40, 0.85);
}
.songs-lib-scroll::-webkit-scrollbar-thumb {
  background: rgba(120, 140, 170, 0.65);
  border-radius: 10px;
}
.songs-lib-scroll {
  scrollbar-width: thin;
  scrollbar-color: rgba(120, 140, 170, 0.65) rgba(10, 20, 40, 0.85);
}

/* Latest tracks scroll padding fix */
.songs-lib-latest__inner {
  padding: 6px 4px 16px !important;
}

/* Move scrollbar slightly downward and darken */
.songs-lib-latest__inner::-webkit-scrollbar {
  height: 8px;
}
.songs-lib-latest__inner::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.9) !important;
  border-radius: 10px;
}
.songs-lib-latest__inner::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.6) !important;
  border-radius: 10px;
}

/* FULL-WIDTH Sticky Player Bar */
#jch-sticky-player {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100vw !important;
  height: auto;
  background: rgba(0,0,0,0.0);
  display: flex;
  justify-content: center;
  padding: 25px 0;
  pointer-events: none;
  z-index: 999999;
}
#jch-sticky-player .jch-sp__inner {
  pointer-events: auto;
  width: 650px;
  max-width: 90%;
}

/* NOW PLAYING pill */
.songs-lib-row.is-active {
  position: relative;
}

.songs-lib-row.is-active::after {
  content: "NOW PLAYING";
  position: absolute;
  left: 85px;                 /* Perfect alignment under thumbnail */
  top: 50%;
  transform: translateY(-50%);
  padding: 4px 12px;
  background: #facc15;
  color: #111827;
  font-size: 11px;
  font-weight: 600;
  border-radius: 999px;
  white-space: nowrap;
  box-shadow: 0 4px 10px rgba(250,204,21,0.35);
  z-index: 3;
}
/* FINAL FIX — perfect spacing for title in active row */
.songs-lib-row.is-active .songs-lib-row__meta {
  margin-left: 150px !important;
}
