*, *::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;
}


.search-hero {
  display: flex;
  justify-content: center;
  padding: 64px 48px 40px;
}
.search-bar-wrap {
  display: flex; align-items: center; gap: 14px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  padding: 10px 16px;
  width: 100%; max-width: 600px;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.search-bar-wrap:focus-within {
  border-color: rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.08);
  box-shadow: 0 0 0 4px rgba(255,255,255,0.04);
}
.search-bar-wrap svg { width: 18px; height: 18px; flex-shrink: 0; opacity: 0.4; }
.search-bar-wrap input {
  flex: 1; background: none; border: none; outline: none;
  font-family: 'Space Mono', monospace; font-size: 14px;
  color: #fff; letter-spacing: 0.04em;
}
.search-bar-wrap input::placeholder { color: rgba(255,255,255,0.25); }
.search-clear {
  background: none; border: none; cursor: pointer; padding: 2px;
  opacity: 0; pointer-events: none; transition: opacity 0.15s;
  color: rgba(255,255,255,0.5);
}
.search-clear.visible { opacity: 1; pointer-events: all; }
.search-clear svg { width: 16px; height: 16px; display: block; }

.content-area {
  padding: 0 48px 80px;
  flex: 1;
}

.section-label {
  font-family: 'Unbounded', sans-serif;
  font-size: 10px; font-weight: 600;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  margin-bottom: 24px;
}

.playlist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
}

.pl-card {
  cursor: pointer;
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.18s;
  user-select: none;
}
.pl-card:hover { transform: translateY(-4px); }
.pl-card:active { transform: scale(0.97); }

.pl-card-thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.07);
}
.pl-card-thumb > img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.pl-card-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 40px; opacity: 0.15;
}

.pl-collage {
  width: 100%; height: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
}
.pl-collage-cell { overflow: hidden; }
.pl-collage-cell img { width: 100%; height: 100%; object-fit: cover; display: block; }

.pl-card-overlay {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.4);
  opacity: 0;
  transition: opacity 0.18s;
}
.pl-card:hover .pl-card-overlay { opacity: 1; }
.pl-card-overlay svg { width: 48px; height: 48px; filter: drop-shadow(0 2px 10px rgba(0,0,0,0.7)); }

.pl-card-info {
  padding: 12px 4px 0;
}
.pl-card-title {
  font-family: 'Unbounded', sans-serif;
  font-size: 12px; font-weight: 600;
  color: #fff; letter-spacing: 0.02em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: 4px;
}
.pl-card-count {
  font-family: 'Space Mono', monospace;
  font-size: 11px; color: rgba(255,255,255,0.35);
  letter-spacing: 0.04em;
}

.playlist-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 28px;
}
.back-btn {
  display: inline-flex; align-items: center; gap: 8px;
  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.7);
  font-family: 'Space Mono', monospace;
  font-size: 12px; letter-spacing: 0.06em;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  flex-shrink: 0;
}
.back-btn:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
  border-color: rgba(255,255,255,0.2);
}
.back-btn svg { width: 14px; height: 14px; }

.playlist-meta { min-width: 0; }
.playlist-view-title {
  font-family: 'Unbounded', sans-serif;
  font-size: 22px; font-weight: 600; color: #fff;
  letter-spacing: 0.02em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.playlist-view-count {
  font-family: 'Space Mono', monospace;
  font-size: 12px; color: rgba(255,255,255,0.35);
  margin-top: 4px;
}

.search-track-list {
  display: grid;
  grid-template-columns: 36px 48px minmax(0, 1.2fr) minmax(0, 1fr) auto;
  column-gap: 16px;
  align-content: start;
}

.search-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);
}
.search-track-row:last-child { border-bottom: none; }
.search-track-row:hover { background: rgba(255,255,255,0.06); }
.search-track-row:active { background: rgba(255,255,255,0.1); }
.search-track-row.active-track { background: rgba(255,255,255,0.14); }
.search-track-row.active-track .search-track-num { color: #fff; }
.search-track-row.active-track .search-track-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; }
.search-track-row.active-track.playing-track .search-track-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; }

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

.search-track-num {
  font-family: 'Space Mono', monospace;
  font-size: 12px; color: rgba(255,255,255,0.25);
  text-align: right; user-select: none;
}
.search-track-thumb {
  width: 48px; height: 48px;
  border-radius: 6px; overflow: hidden;
  flex-shrink: 0;
  background: rgba(255,255,255,0.07);
  position: relative;
}
.search-track-thumb img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.search-track-thumb-ph {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; opacity: 0.2;
}
.search-track-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;
}
.search-track-row:hover .search-track-thumb::after { opacity: 1; }

.search-track-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  justify-content: center;
}
.search-track-title {
  font-family: 'Unbounded', sans-serif;
  font-size: 13px; font-weight: 400; color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.search-track-main .search-track-artist,
.search-track-main .search-track-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;
}
.search-track-mid {
  min-width: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 4px;
  justify-content: center;
  align-items: flex-start;
  text-align: left;
}
.search-track-character,
.search-track-artist-name,
.search-track-visual-artist {
  width: 100%;
  max-width: 100%;
}
.search-track-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;
}
.search-track-artist-name,
.search-track-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-credit-link {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.2s;
}
.track-credit-link:hover { opacity: 1; text-decoration: underline; }
.search-track-mid .track-credit-link { color: rgba(255,255,255,0.5); }
.search-track-mid .track-credit-link:hover { color: rgba(255,255,255,0.72); }
.search-track-main .track-credit-link { color: rgba(255,255,255,0.5); }
.search-track-main .track-credit-link:hover { color: rgba(255,255,255,0.72); }

.no-results {
  font-family: 'Space Mono', monospace;
  font-size: 12px; letter-spacing: 0.1em; opacity: 0.3;
  padding: 32px 0; text-transform: uppercase;
}

.search-virtual-wrap {
  position: relative;
}
.search-spacer {

  width: 100%;
  pointer-events: none;
}
.search-virtual-wrap .search-track-list {
  position: absolute;
  top: 0; left: 0; right: 0;
}
