*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  width: 100%; min-height: 100vh;
  background: #090909;
  font-family: 'Space Mono', monospace;
  color: rgba(255,255,255,0.9);
  overflow-x: hidden;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

.pl-hero {
  display: flex;
  align-items: flex-end;
  gap: 36px;
  padding: 56px 48px 40px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.06) 0%, transparent 100%);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.pl-hero-cover {
  width: 200px; height: 200px;
  flex-shrink: 0;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255,255,255,0.07);
  box-shadow: 0 16px 48px rgba(0,0,0,0.6);
}
.pl-hero-cover img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.hero-cover-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 56px; opacity: 0.15;
}
.hero-collage {
  width: 100%; height: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
}
.hero-collage-cell { overflow: hidden; }
.hero-collage-cell img { width: 100%; height: 100%; object-fit: cover; display: block; }

.pl-hero-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  padding-bottom: 4px;
}
.pl-hero-label {
  font-family: 'Space Mono', monospace;
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: rgba(255,255,255,0.4);
}
.pl-hero-title {
  font-family: 'Unbounded', sans-serif;
  font-size: 36px; font-weight: 600; color: #fff;
  line-height: 1.15;
}
.pl-hero-count {
  font-family: 'Space Mono', monospace;
  font-size: 12px; color: rgba(255,255,255,0.35);
}
.pl-hero-back {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 16px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 9px 16px;
  color: rgba(255,255,255,0.65);
  font-family: 'Space Mono', monospace;
  font-size: 12px; letter-spacing: 0.04em;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  align-self: flex-start;
}
.pl-hero-back:hover { background: rgba(255,255,255,0.1); color: #fff; }
.pl-hero-back svg { width: 14px; height: 14px; }

.playlist-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  height: 100vh;
  overflow: hidden;
}

.track-list-wrap {
  padding: 8px 32px 80px;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.track-list {
  display: grid;
  grid-template-columns: 36px 52px minmax(0, 1.2fr) minmax(0, 1fr) auto;
  column-gap: 16px;
  align-content: start;
  height: 100%;
  overflow-y: auto;
  padding-right: 12px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.2) transparent;
}
.track-list::-webkit-scrollbar {
  width: 8px;
}
.track-list::-webkit-scrollbar-track {
  background: transparent;
}
.track-list::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.15);
  border-radius: 999px;
}

.track-row {
  display: grid;
  grid-template-columns: subgrid;
  grid-column: 1 / -1;
  align-items: center;
  padding: 8px 16px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.track-row:last-child { border-bottom: none; }
.track-row:hover { background: rgba(255,255,255,0.06); }
.track-row:active { background: rgba(255,255,255,0.1); }
.track-row.active-track { background: rgba(255,255,255,0.14); }
.track-row.active-track .track-row-num { color: #fff; }
.track-row.active-track .track-row-thumb::after { opacity: 1; background: rgba(0,0,0,0.55) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='rgba(255,255,255,0.95)'%3E%3Cpolygon points='6,3 20,12 6,21'/%3E%3C/svg%3E") center/22px no-repeat; }
.track-row.active-track.playing-track .track-row-thumb::after { background: rgba(0,0,0,0.55) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='rgba(255,255,255,0.95)'%3E%3Crect x='6' y='4' width='4' height='16' rx='1'/%3E%3Crect x='14' y='4' width='4' height='16' rx='1'/%3E%3C/svg%3E") center/22px no-repeat; }

.track-row-num {
  font-family: 'Space Mono', monospace;
  font-size: 12px; color: rgba(255,255,255,0.25);
  text-align: right;
  user-select: none;
}
.track-row:hover .track-row-num {
  color: rgba(255,255,255,0.6);

}
.track-row.active-track:hover .track-row-num {
  color: #fff;
}

.track-row-thumb {
  width: 48px; height: 48px;
  border-radius: 6px; overflow: hidden;
  flex-shrink: 0;
  background: rgba(255,255,255,0.07);
  position: relative;
}
.track-row-thumb img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.track-row-thumb-ph {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; opacity: 0.2;
}

.track-row-thumb::after {
  content: '';
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.45) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='rgba(255,255,255,0.9)'%3E%3Cpolygon points='6,3 20,12 6,21'/%3E%3C/svg%3E") center/22px no-repeat;
  opacity: 0;
  transition: opacity 0.15s;
  border-radius: 6px;
}
.track-row:hover .track-row-thumb::after { opacity: 1; }

.track-row-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  justify-content: center;
}
.track-row-title {
  font-family: 'Unbounded', sans-serif;
  font-size: 13px; font-weight: 400; color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.track-row-main .track-row-artist,
.track-row-main .track-row-musician {
  font-family: 'Space Mono', monospace;
  font-size: 11px; color: rgba(255,255,255,0.44);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  letter-spacing: 0.04em;
}

.track-credit-link {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.2s;
}
.track-credit-link:hover { opacity: 1; text-decoration: underline; }

.track-row-mid {
  min-width: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 4px;
  justify-content: center;
  align-items: flex-start;
  text-align: left;
}
.track-row-character,
.track-row-artist-name,
.track-row-visual-artist {
  width: 100%;
  max-width: 100%;
}
.track-row-character {
  font-family: 'Unbounded', sans-serif;
  font-size: 12px; font-weight: 400; color: rgba(255,255,255,0.88);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.track-row-artist-name,
.track-row-visual-artist {
  font-family: 'Space Mono', monospace;
  font-size: 11px; color: rgba(255,255,255,0.36);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  letter-spacing: 0.04em;
}
.track-row-mid .track-credit-link { color: rgba(255,255,255,0.5); }
.track-row-mid .track-credit-link:hover { color: rgba(255,255,255,0.72); }
.track-row-main .track-credit-link { color: rgba(255,255,255,0.5); }
.track-row-main .track-credit-link:hover { color: rgba(255,255,255,0.72); }

.track-row-extra {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-shrink: 0;
  min-width: 0;
}
.track-row-duration {
  font-family: 'Space Mono', monospace;
  font-size: 11px; color: rgba(255,255,255,0.45);
  white-space: nowrap;
  flex-shrink: 0;
}
.track-row-like-wrap {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.track-row-like-wrap .track-heart-btn {
  width: 28px;
  height: 28px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 0;
  background: none;
  cursor: pointer;
}
.track-row-like-wrap .track-heart-btn:hover,
.track-row-like-wrap .track-heart-btn:active {
  background: none !important;
  transform: none;
}
.track-row-like-wrap .track-heart-btn img,
.track-row-like-wrap .track-heart-btn .heart-svg {
  display: block;
  max-width: 26px;
  max-height: 26px;
  width: 26px !important;
  height: 26px !important;
}
