:root {
  --bg: #0e0a16; --panel: #171022; --accent: #7a3cff;
  --accent-dark: #3a1a66; --text: #f2eefc; --muted: #a89bc4;
  --topbar-height: 72px; --player-height: 96px;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: 'Segoe UI', system-ui, sans-serif;
  padding-bottom: calc(var(--player-height) + 16px);
}
.hidden { display: none !important; }

/* ---------- Topbar (identical on every page) ---------- */
.topbar {
  display: flex; align-items: center; gap: 16px;
  height: var(--topbar-height); padding: 0 24px;
  background: linear-gradient(90deg, #2a1550, #150a28);
}
.topbar h1 {
  font-size: 1.3rem; line-height: 1; margin: 0;
  font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.icon-btn {
  flex-shrink: 0; background: var(--panel); border: none; color: var(--text);
  width: 40px; height: 40px; border-radius: 50%; font-size: 1.2rem; cursor: pointer;
}
.icon-btn:hover { background: var(--accent-dark); }

main { padding: 24px; max-width: 1200px; margin: 0 auto; }
.release-section h2 { font-weight: 600; margin: 32px 0 16px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 20px; }

/* ---------- Release cards with hover play button ---------- */
.release-card { cursor: pointer; }
.release-card .cover-wrap {
  position: relative; width: 100%; aspect-ratio: 1;
  border-radius: 10px; overflow: hidden; background: var(--panel);
}
.release-card .cover-wrap img {
  width: 100%; height: 100%; object-fit: cover;
  display: block; transition: filter 0.15s ease;
}
.release-card:hover .cover-wrap img { filter: brightness(0.45); }
.release-card .cover-wrap .card-play-btn {
  position: absolute; inset: 0; margin: auto; width: 48px; height: 48px;
  border-radius: 50%; background: var(--accent); color: #fff; border: none;
  font-size: 1.2rem; display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: scale(0.85); transition: opacity 0.15s ease, transform 0.15s ease;
  cursor: pointer;
}
.release-card:hover .cover-wrap .card-play-btn { opacity: 1; transform: scale(1); }
.release-card .cover-wrap .card-play-btn:hover { background: #9257ff; }
.release-card .r-title { font-weight: 600; margin-top: 8px; }
.release-card .r-artist { color: var(--muted); font-size: 0.9rem; }

.album-header { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; margin-bottom: 24px; }
.cover-art { width: 180px; height: 180px; object-fit: cover; border-radius: 10px; cursor: zoom-in; background: var(--panel); }
.round-btn { width: 56px; height: 56px; border-radius: 50%; background: var(--accent); color: #fff; border: none; font-size: 1.4rem; cursor: pointer; }
.round-btn:hover { background: #9257ff; }
.album-meta h2 { margin: 0 0 4px; font-size: 2rem; }
.album-meta p { margin: 0; color: var(--muted); }

.song-list { list-style: none; padding: 0; margin: 0; }
.song-row { display: flex; align-items: center; gap: 16px; padding: 10px 12px; border-radius: 8px; }
.song-row:hover { background: var(--panel); }
.song-index { width: 24px; text-align: center; color: var(--muted); }
.song-index .play-icon { display: none; cursor: pointer; }
.song-row:hover .song-index .track-number { display: none; }
.song-row:hover .song-index .play-icon { display: inline; }
.song-info { flex: 1; min-width: 0; }
.song-info .s-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.song-info .s-artist { color: var(--muted); font-size: 0.85rem; }
.song-download {
  color: var(--text); text-decoration: none; font-size: 1.2rem;
  width: 36px; height: 36px; border-radius: 50%; background: var(--accent-dark);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.song-download:hover { background: var(--accent); }

.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,0.75); backdrop-filter: blur(12px); display: flex; align-items: center; justify-content: center; z-index: 100; }
.lightbox img { max-width: 80vw; max-height: 80vh; border-radius: 12px; }

/* ---------- Player bar ---------- */
#player-bar {
  position: fixed; left: 0; right: 0; bottom: 0; height: var(--player-height);
  background: #120a20; border-top: 1px solid #2a1a44;
  display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: center; gap: 24px; padding: 0 24px; z-index: 50;
}
.player-left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.player-cover {
  width: 56px; height: 56px; border-radius: 8px; object-fit: cover;
  background: var(--panel); flex-shrink: 0;
}
.player-track { display: flex; flex-direction: column; min-width: 0; }
.player-track strong {
  font-size: 0.95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.player-track span { color: var(--muted); font-size: 0.8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.player-center { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; max-width: 640px; }
.player-controls { display: flex; align-items: center; gap: 18px; }
.player-controls .icon-btn { background: transparent; width: 32px; height: 32px; font-size: 1.1rem; }
.player-controls .icon-btn:hover { background: var(--accent-dark); }
#play-pause-btn {
  width: 44px; height: 44px; border-radius: 50%; background: var(--accent);
  color: #fff; font-size: 1.1rem; display: flex; align-items: center; justify-content: center;
}
#play-pause-btn:hover { background: #9257ff; }
.player-progress { display: flex; align-items: center; gap: 10px; width: 100%; color: var(--muted); font-size: 0.75rem; }
.player-progress span { width: 36px; flex-shrink: 0; }
.player-progress span:last-child { text-align: right; }

.player-right { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.player-right .vol-icon { color: var(--muted); font-size: 1.1rem; flex-shrink: 0; }

/* ---------- Sliders: wider track, bigger hitbox ---------- */
input[type=range] {
  -webkit-appearance: none; appearance: none;
  height: 20px; /* bigger hitbox, track itself drawn thinner via track pseudo-el */
  background: transparent; outline: none; cursor: pointer;
}
input[type=range]::-webkit-slider-runnable-track {
  height: 6px; border-radius: 3px; background: #2a1e44;
}
input[type=range]::-moz-range-track {
  height: 6px; border-radius: 3px; background: #2a1e44;
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; margin-top: -7px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent); cursor: pointer; transition: transform 0.1s;
}
input[type=range]::-webkit-slider-thumb:hover { transform: scale(1.2); }
input[type=range]::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%; background: var(--accent); border: none; cursor: pointer;
}
#seek { flex: 1; min-width: 200px; }
#volume { width: 140px; }

@media (max-width: 720px) {
  #player-bar { grid-template-columns: 1fr; height: auto; padding: 10px 16px; row-gap: 8px; }
  .player-right { justify-content: center; }
  .player-center { max-width: 100%; }
}
