@import url('https://www.apple.com/wss/fonts?families=SF+Pro,v4&display=swap');

:root {
  --bg: #07070a;
  --bg-soft: #101014;
  --panel: rgba(28, 28, 33, .72);
  --panel-solid: #17171c;
  --line: rgba(255, 255, 255, .09);
  --line-strong: rgba(255, 255, 255, .16);
  --text: #f5f5f7;
  --muted: #a1a1aa;
  --dim: #6f6f79;
  --accent: #fa2b56;
  --accent-2: #ff7191;
  --accent-soft: rgba(250, 43, 86, .16);
  --hue: 340;
  --player-h: 92px;
  --sidebar-w: 250px;
  --radius: 16px;
  --shadow: 0 24px 70px rgba(0, 0, 0, .45);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, sans-serif;
  font-size: 14px;
  letter-spacing: -0.01em;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.muted { color: var(--muted); font-size: 12px; }
::selection { background: var(--accent); color: #fff; }

/* ---------------------------------------------------------------- backdrop */
.backdrop { position: fixed; inset: 0; z-index: 0; overflow: hidden; background: var(--bg); }
.backdrop-art {
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(60% 45% at 78% 2%, hsla(var(--hue), 78%, 42%, .34), transparent 72%),
    radial-gradient(48% 40% at 8% 18%, hsla(calc(var(--hue) + 75), 68%, 32%, .2), transparent 75%);
  filter: saturate(1.1) blur(24px);
  opacity: .85;
  transition: background .8s ease;
}
.backdrop-wash {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(7, 7, 10, .3) 0%, rgba(7, 7, 10, .72) 62%, var(--bg) 100%),
    linear-gradient(90deg, rgba(7, 7, 10, .78), transparent 45%);
}
.backdrop-orb {
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  right: -120px;
  bottom: -180px;
  background: hsla(var(--hue), 90%, 55%, .14);
  filter: blur(60px);
  transform: scale(calc(1 + var(--pulse, 0) * .16));
  opacity: calc(.45 + var(--pulse, 0) * .3);
  transition: transform .18s ease-out, opacity .18s ease-out;
}
.backdrop-noise {
  position: absolute;
  inset: 0;
  opacity: .16;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.22'/%3E%3C/svg%3E");
  pointer-events: none;
}

/* -------------------------------------------------------------------- shell */
.shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  gap: 14px;
  height: calc(100vh - var(--player-h));
  padding: 14px 14px 0;
}

.sidebar {
  display: flex;
  flex-direction: column;
  min-height: 0;
  gap: 18px;
  padding: 20px 14px 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(30, 30, 36, .78), rgba(17, 17, 21, .86));
  backdrop-filter: blur(30px) saturate(1.3);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.brand { display: flex; align-items: center; gap: 11px; padding: 0 8px 4px; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--accent), #ff8ba7);
  color: #fff;
  box-shadow: 0 8px 24px rgba(250, 43, 86, .35);
}
.brand-mark svg { width: 21px; height: 21px; }
.brand-text { font-size: 16px; font-weight: 600; letter-spacing: -.035em; white-space: nowrap; }
.brand-text b { color: var(--accent-2); font-weight: 750; }

.nav { display: flex; flex-direction: column; gap: 3px; }
.nav-label, .sidebar-label {
  margin: 8px 10px 5px;
  color: var(--dim);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--muted);
  font-weight: 550;
  text-align: left;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}
.nav-item svg { width: 19px; height: 19px; flex: none; }
.nav-item:hover { background: rgba(255, 255, 255, .055); color: var(--text); transform: translateX(2px); }
.nav-item.active { background: var(--accent-soft); color: #fff; }
.nav-item.active svg { color: var(--accent-2); }

.sidebar-section { display: flex; flex-direction: column; gap: 8px; }
.sidebar-actions { padding-top: 4px; border-top: 1px solid var(--line); }
.side-action {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, .035);
  color: var(--text);
  font-size: 12.5px;
  font-weight: 600;
  text-align: left;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}
.side-action:hover { border-color: var(--line-strong); background: rgba(255, 255, 255, .075); transform: translateY(-1px); }
.side-action svg { flex: none; }
.side-action.primary { border-color: rgba(250, 43, 86, .36); background: var(--accent-soft); }
.side-action.primary svg { color: var(--accent-2); }
.sidebar-grow { flex: 1; min-height: 0; }
.mini-queue { min-height: 0; overflow-y: auto; padding: 0 6px 6px; scrollbar-width: thin; }
.empty-hint { margin: 6px 8px; color: var(--dim); font-size: 12px; line-height: 1.5; }
.mini-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  padding: 7px 6px;
  border-radius: 9px;
  cursor: pointer;
  transition: background .16s ease;
}
.mini-row:hover { background: rgba(255, 255, 255, .06); }
.mini-row.active { background: rgba(250, 43, 86, .12); }
.mini-row img { width: 34px; height: 34px; object-fit: cover; border-radius: 7px; background: #222; }
.mini-row span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 11.5px; }
.mini-row.active span { color: var(--text); }
.mini-row .eq { color: var(--accent-2); font-size: 14px; }
.sidebar-foot { margin: 0 8px; color: var(--dim); font-size: 10px; text-align: center; }

/* --------------------------------------------------------------------- main */
.main {
  min-width: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 10px 30px 40px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(18, 18, 23, .58), rgba(9, 9, 12, .82));
  backdrop-filter: blur(30px);
  box-shadow: var(--shadow);
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, .16) transparent;
}
.topbar {
  position: sticky;
  top: -10px;
  z-index: 8;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 12px 0 16px;
  margin-bottom: 4px;
  background: linear-gradient(180deg, rgba(12, 12, 16, .95), rgba(12, 12, 16, .55) 75%, transparent);
  backdrop-filter: blur(18px);
}
.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(520px, 100%);
  padding: 0 14px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .075);
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
.search-box:focus-within { border-color: rgba(250, 43, 86, .55); background: rgba(255, 255, 255, .1); box-shadow: 0 0 0 3px var(--accent-soft); }
.search-box > svg { width: 17px; height: 17px; color: var(--muted); flex: none; }
.search-box input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--text); font-size: 13px; }
.search-box input::placeholder { color: var(--dim); }
.search-clear {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .1);
  color: var(--muted);
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s ease;
}
.search-clear.show { opacity: 1; pointer-events: auto; }
.search-clear svg { width: 13px; height: 13px; }
.top-lyrics.active { color: var(--accent-2); background: var(--accent-soft); }
.listen-pass { display: flex; align-items: center; gap: 8px; }
.credit-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(250, 43, 86, .36);
  border-radius: 999px;
  background: var(--accent-soft);
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color .16s ease, filter .16s ease;
}
.credit-pill:hover { border-color: var(--accent-2); filter: brightness(1.15); }
.credit-pill svg { width: 14px; height: 14px; color: var(--accent-2); }
.credit-pill.empty { border-color: var(--line-strong); background: rgba(255, 255, 255, .05); }
.account-btn.active { color: var(--accent-2); background: var(--accent-soft); }
.mobile-menu { display: none; }

.view { display: none; animation: viewIn .35s ease both; }
.view.active { display: block; }
/* Do not animate transform here: the lyrics scroller owns that property. */
@keyframes viewIn { from { opacity: 0; } to { opacity: 1; } }

/* --------------------------------------------------------------------- hero */
.hero {
  position: relative;
  margin: 6px 0 28px;
  padding: 42px 44px 38px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 24px;
  background:
    radial-gradient(100% 150% at 95% 0%, hsla(var(--hue), 85%, 48%, .3), transparent 65%),
    linear-gradient(125deg, rgba(40, 20, 30, .85), rgba(16, 16, 22, .78));
  overflow: hidden;
}
.hero::after {
  content: '';
  position: absolute;
  width: 280px;
  height: 280px;
  right: -70px;
  top: -110px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .14), transparent 70%);
  filter: blur(10px);
  pointer-events: none;
}
.hero.compact { padding: 30px 34px; }
.eyebrow { display: inline-flex; align-items: center; gap: 7px; color: #ffc2d1; font-size: 11px; font-weight: 750; letter-spacing: .15em; text-transform: uppercase; }
.eyebrow svg { width: 15px; height: 15px; }
.hero h1 { margin: 12px 0 10px; max-width: 760px; font-size: clamp(34px, 5.2vw, 62px); font-weight: 760; line-height: 1.02; letter-spacing: -.055em; }
.hero h1 em { font-style: normal; background: linear-gradient(100deg, #fff, #ff9db5 60%, #ff4f78); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { max-width: 640px; margin: 0; color: #d6d6dd; font-size: 14px; line-height: 1.65; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #111;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.hero-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(0, 0, 0, .35); }
.hero-btn.ghost { background: rgba(255, 255, 255, .1); color: #fff; border: 1px solid rgba(255, 255, 255, .18); }
.hero-btn svg { width: 16px; height: 16px; }

.suggestions { display: flex; flex-wrap: wrap; gap: 8px; margin: -8px 0 30px; }
.suggestions button {
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .045);
  color: var(--muted);
  font-size: 11.5px;
  cursor: pointer;
  transition: color .18s ease, border-color .18s ease, background .18s ease;
}
.suggestions button:hover { color: #fff; border-color: var(--line-strong); background: rgba(255, 255, 255, .09); }

.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin: 0 2px 16px; }
.section-head h2 { margin: 3px 0 0; font-size: 22px; font-weight: 720; letter-spacing: -.035em; }
.section-kicker { color: var(--accent-2); font-size: 10px; font-weight: 750; letter-spacing: .16em; text-transform: uppercase; }

/* -------------------------------------------------------------------- cards */
.track-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 16px; }
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 11px;
  min-width: 0;
  padding: 10px 10px 13px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .035);
  cursor: pointer;
  outline: 0;
  transition: background .2s ease, border-color .2s ease, transform .2s ease;
}
.card:hover, .card:focus-visible { background: rgba(255, 255, 255, .08); border-color: var(--line); transform: translateY(-3px); }
.card.current { background: var(--accent-soft); border-color: rgba(250, 43, 86, .3); }
.card-art {
  position: relative;
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(145deg, hsl(var(--hue) 35% 22%), #15151a);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .35);
}
.card-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-art::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, .4)); pointer-events: none; }
.card-play, .card-share, .card-fav {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  border-radius: 50%;
  transition: transform .18s ease, opacity .18s ease, background .18s ease;
}
.card-play {
  right: 10px;
  bottom: 10px;
  width: 40px;
  height: 40px;
  background: #fff;
  color: #111;
  box-shadow: 0 8px 18px rgba(0, 0, 0, .4);
  opacity: 0;
  transform: translateY(6px) scale(.9);
}
.card:hover .card-play, .card:focus-visible .card-play, .card.current .card-play { opacity: 1; transform: none; }
.card-play svg { width: 18px; height: 18px; }
.card-fav, .card-share {
  top: 9px;
  width: 30px;
  height: 30px;
  border: 0;
  background: rgba(10, 10, 12, .62);
  color: #fff;
  backdrop-filter: blur(8px);
  opacity: 0;
}
.card:hover .card-fav, .card:hover .card-share, .card:focus-visible .card-fav, .card:focus-visible .card-share { opacity: 1; }
.card-fav { right: 9px; }
.card-share { right: 45px; }
.card-fav svg, .card-share svg { width: 15px; height: 15px; }
.card-fav.on { opacity: 1; color: var(--accent-2); background: rgba(10, 10, 12, .8); }
.card-fav.on svg { fill: currentColor; stroke: none; }
.card-body { min-width: 0; }
.card-body h3 { margin: 0 0 4px; font-size: 13px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-body p { margin: 0; color: var(--muted); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-duration { position: absolute; left: 19px; bottom: 66px; z-index: 2; color: rgba(255, 255, 255, .82); font-size: 10px; font-variant-numeric: tabular-nums; text-shadow: 0 1px 8px #000; }
.loading-card { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; padding: 36px; color: var(--muted); }
.spinner { width: 16px; height: 16px; border: 2px solid rgba(255, 255, 255, .2); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------------ artists */
.artist-strip { margin: -8px 0 30px; }
.artist-strip[hidden] { display: none; }
.artist-strip .section-head { margin-bottom: 12px; }
.artist-row { display: flex; gap: 14px; overflow-x: auto; padding: 4px 2px 10px; scrollbar-width: thin; }
.artist-card {
  flex: 0 0 128px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  padding: 14px 10px 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, .04);
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
}
.artist-card:hover { border-color: var(--line-strong); background: rgba(255, 255, 255, .08); transform: translateY(-3px); }
.artist-avatar {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  overflow: hidden;
  border-radius: 50%;
  background: linear-gradient(145deg, hsl(var(--hue) 40% 26%), #15151a);
  box-shadow: 0 12px 28px rgba(0, 0, 0, .4);
  color: var(--accent-2);
}
.artist-avatar img { width: 100%; height: 100%; object-fit: cover; }
.artist-card strong { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; font-weight: 650; }
.artist-card span { color: var(--dim); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; }
.artist-hero { display: flex; align-items: flex-end; gap: 26px; margin: 4px 0 34px; padding: 26px 4px 8px; }
.artist-portrait {
  width: 168px;
  height: 168px;
  flex: none;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: #1a1a20 center / cover no-repeat;
  box-shadow: 0 26px 70px rgba(0, 0, 0, .55);
}
.artist-hero-meta { min-width: 0; }
.artist-hero h1 { margin: 8px 0 6px; font-size: clamp(38px, 6vw, 72px); font-weight: 780; line-height: 1; letter-spacing: -.06em; }
.artist-hero .hero-actions { margin-top: 18px; }
.artist-hero .hero-btn svg { width: 15px; height: 15px; }
.artist-more { display: flex; justify-content: center; padding: 24px 0 6px; }
.artist-more .primary-btn { max-width: 260px; }
.artist-more .primary-btn[hidden] { display: none; }

/* ------------------------------------------------------------------- lyrics */
.lyrics-view { height: 100%; min-height: 0; }
.lyrics-stage { display: flex; flex-direction: column; height: 100%; min-height: min(720px, calc(100vh - var(--player-h) - 90px)); }
.lyrics-head { display: flex; align-items: center; gap: 18px; padding: 10px 4px 24px; }
.now-art { width: 88px; height: 88px; flex: none; border-radius: 16px; background: #1a1a20 center / cover no-repeat; box-shadow: 0 16px 40px rgba(0, 0, 0, .45); }
.now-meta { min-width: 0; }
.now-kicker { color: var(--accent-2); font-size: 10px; font-weight: 750; letter-spacing: .16em; text-transform: uppercase; }
.now-meta h2 { margin: 5px 0 3px; font-size: clamp(22px, 3vw, 34px); font-weight: 740; letter-spacing: -.045em; }
.now-meta p { margin: 0; color: var(--muted); font-size: 13px; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.badge { padding: 4px 9px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255, 255, 255, .05); color: var(--muted); font-size: 10px; }
.badge.sync { border-color: rgba(250, 43, 86, .4); background: var(--accent-soft); color: #ffc2d1; }
.genius-link { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 11px; white-space: nowrap; }
.genius-link[hidden] { display: none; }
.genius-link:hover { color: #fff; border-color: var(--line-strong); }
.genius-link svg { width: 13px; height: 13px; }

.lyrics-scroll-wrap { position: relative; flex: 1 1 0; min-height: 0; overflow: hidden; mask-image: linear-gradient(180deg, transparent, #000 14%, #000 84%, transparent); }
/* Keep the whole song readable before playback starts. Padding is capped so
   short viewports never show a big blank block above the first line. */
.lyrics-inner { padding: min(16vh, 150px) 0 min(24vh, 230px); will-change: transform; }
.lyric-line {
  padding: 11px 18px;
  border-radius: 16px;
  opacity: .38;
  cursor: pointer;
  transition: opacity .25s ease, background .25s ease, transform .25s ease;
}
.lyric-line:hover { opacity: .72; }
.lyric-text { font-size: clamp(26px, 3.8vw, 46px); font-weight: 730; line-height: 1.16; letter-spacing: -.05em; }
.lyric-word { position: relative; display: inline; color: rgba(255, 255, 255, .4); }
.lyric-word .base { color: inherit; }
.lyric-word .fill {
  position: absolute;
  inset: 0;
  color: #fff;
  background: linear-gradient(100deg, #fff 0%, #ffe2ea 52%, #ff9db5 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  clip-path: inset(0 100% 0 0);
  filter: drop-shadow(0 0 14px hsla(var(--hue), 95%, 72%, calc(.28 + var(--pulse, 0) * .45)));
}
.lyric-line.active {
  opacity: 1;
  transform: scale(1.012);
  transform-origin: left center;
  background: linear-gradient(90deg, rgba(255, 255, 255, .055), transparent 72%);
}
.lyric-line.active .lyric-word { color: rgba(255, 255, 255, .82); }
.lyric-line.past { opacity: .52; }
.lyric-instrumental {
  display: inline-flex;
  align-items: center;
  color: rgba(255, 255, 255, .42);
}
.lyric-instrumental svg { width: .78em; height: .78em; }
.lyric-line.active .lyric-instrumental { color: var(--accent-2); }
.lyrics-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; min-height: 42vh; color: var(--dim); text-align: center; }
.lyrics-empty[hidden] { display: none; }
.lyrics-empty-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: radial-gradient(circle at 30% 24%, rgba(255, 255, 255, .16), rgba(255, 255, 255, .025) 70%);
  box-shadow: 0 20px 55px rgba(0, 0, 0, .45), inset 0 0 34px hsla(var(--hue), 80%, 60%, .16);
}
.lyrics-empty-icon::after {
  content: '';
  position: absolute;
  inset: -10px;
  border: 1px solid hsla(var(--hue), 90%, 70%, .22);
  border-radius: 50%;
  animation: lyricNote 3.4s ease-in-out infinite;
}
@keyframes lyricNote {
  0%, 100% { transform: scale(.94); opacity: .2; }
  50% { transform: scale(1.06); opacity: .65; }
}
.lyrics-empty-icon svg { width: 38px; height: 38px; color: var(--accent-2); opacity: .9; }
.lyrics-empty p { max-width: 380px; margin: 0; font-size: 14px; line-height: 1.6; }
.lyrics-retry { padding: 9px 15px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255, 255, 255, .06); cursor: pointer; }
.lyrics-retry[hidden] { display: none; }
.lyrics-foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 4px 0; color: var(--dim); font-size: 11px; }
.foot-right { display: flex; align-items: center; gap: 16px; }
.sync-controls { display: flex; align-items: center; gap: 7px; padding: 5px 9px; border: 1px solid var(--line); border-radius: 999px; }
.sync-controls[hidden] { display: none; }
.sync-controls button { width: 22px; height: 22px; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .08); cursor: pointer; }
.sync-controls .sync-reset { width: auto; padding: 0 7px; border-radius: 999px; font-size: 10px; }
.sync-legend i { display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: var(--accent); }

/* ------------------------------------------------------------------- lists */
.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 180px;
  margin: 0 0 28px;
  border: 1.5px dashed var(--line-strong);
  border-radius: 20px;
  background: rgba(255, 255, 255, .025);
  text-align: center;
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
}
.dropzone:hover, .dropzone.drag { border-color: var(--accent); background: var(--accent-soft); transform: translateY(-2px); }
.dropzone svg { width: 28px; height: 28px; color: var(--accent-2); }
.dropzone strong { font-size: 15px; }
.dropzone span { color: var(--muted); font-size: 11.5px; }
.queue-list { display: flex; flex-direction: column; gap: 4px; }
.queue-row {
  display: grid;
  grid-template-columns: 26px 42px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: 12px;
  cursor: pointer;
  transition: background .16s ease;
}
.queue-row:hover { background: rgba(255, 255, 255, .06); }
.queue-row.active { background: var(--accent-soft); }
.queue-index { color: var(--dim); font-size: 11px; font-variant-numeric: tabular-nums; text-align: center; }
.queue-row.active .queue-index { color: var(--accent-2); }
.queue-row img, .queue-row .player-art { width: 42px; height: 42px; border-radius: 8px; object-fit: cover; background: #202027 center / 60% no-repeat; }
.queue-info { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.queue-info strong { font-size: 12.5px; font-weight: 620; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.queue-info span { color: var(--muted); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.queue-time { color: var(--dim); font-size: 11px; font-variant-numeric: tabular-nums; }
.queue-remove { display: grid; place-items: center; width: 26px; height: 26px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; }
.queue-remove:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.queue-remove svg { width: 13px; height: 13px; }

/* ------------------------------------------------------------------- player */
.player {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(320px, 1.4fr) minmax(220px, 1fr);
  align-items: center;
  gap: 22px;
  height: var(--player-h);
  padding: 0 22px;
  border-top: 1px solid var(--line);
  background: rgba(15, 15, 19, .86);
  backdrop-filter: blur(30px) saturate(1.4);
  box-shadow: 0 -18px 50px rgba(0, 0, 0, .35);
}
.player-track { display: flex; align-items: center; gap: 12px; min-width: 0; }
.player-art {
  width: 54px;
  height: 54px;
  flex: none;
  border-radius: 10px;
  background: #24242a center / cover no-repeat;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .4);
}
.player-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.player-text strong { font-size: 12.5px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-text span { color: var(--muted); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icon-btn {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color .16s ease, background .16s ease, transform .16s ease;
}
.icon-btn:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.icon-btn.active { color: var(--accent-2); background: var(--accent-soft); }
.fav-btn { margin-left: 4px; }
.fav-btn.on { color: var(--accent-2); }
.fav-btn.on svg { fill: currentColor; stroke: none; }
.player-center { display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0; }
.controls { display: flex; align-items: center; gap: 6px; }
.play-btn {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: #111;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease;
}
.play-btn:hover { transform: scale(1.07); box-shadow: 0 8px 22px rgba(255, 255, 255, .22); }
.play-btn svg { width: 17px; height: 17px; }
.progress-row { display: grid; grid-template-columns: 38px minmax(0, 1fr) 38px; align-items: center; gap: 9px; width: min(520px, 100%); }
.time { color: var(--dim); font-size: 10px; font-variant-numeric: tabular-nums; text-align: center; }
.range {
  --fill: 0%;
  width: 100%;
  height: 4px;
  margin: 0;
  border-radius: 999px;
  outline: 0;
  background: linear-gradient(90deg, #fff var(--fill), rgba(255, 255, 255, .16) var(--fill));
  appearance: none;
  cursor: pointer;
}
.range::-webkit-slider-thumb { width: 11px; height: 11px; border: 0; border-radius: 50%; background: #fff; appearance: none; box-shadow: 0 1px 6px rgba(0, 0, 0, .5); opacity: 0; transition: opacity .15s ease; }
.range:hover::-webkit-slider-thumb, .range:focus-visible::-webkit-slider-thumb { opacity: 1; }
.range::-moz-range-thumb { width: 11px; height: 11px; border: 0; border-radius: 50%; background: #fff; opacity: 0; }
.range:hover::-moz-range-thumb { opacity: 1; }
.player-right { display: flex; align-items: center; justify-content: flex-end; gap: 5px; }
.volume { width: 92px; }

/* ------------------------------------------------------------------ modals */
.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(4, 4, 6, .7);
  backdrop-filter: blur(12px);
  animation: fadeIn .18s ease both;
}
.modal[hidden] { display: none; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-card {
  width: min(460px, 100%);
  padding: 24px;
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  background: linear-gradient(160deg, #232329, #131318);
  box-shadow: 0 30px 90px rgba(0, 0, 0, .6);
}
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.modal-head h2 { margin: 0; font-size: 20px; letter-spacing: -.035em; }
.modal-card p { color: var(--muted); font-size: 12px; line-height: 1.6; }
.modal-card label { display: flex; flex-direction: column; gap: 6px; margin: 14px 0; color: var(--muted); font-size: 11px; font-weight: 650; }
.modal-card input {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: 0;
  background: rgba(0, 0, 0, .28);
  color: var(--text);
  font-size: 12.5px;
}
.modal-card input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.primary-btn { width: 100%; margin-top: 8px; padding: 12px 16px; border: 0; border-radius: 11px; background: var(--accent); color: #fff; font-weight: 700; cursor: pointer; transition: transform .16s ease, filter .16s ease; }
.primary-btn:hover { transform: translateY(-1px); filter: brightness(1.1); }
.primary-btn:disabled { opacity: .55; cursor: wait; transform: none; filter: none; }
.link-reward {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
  padding: 11px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: rgba(255, 255, 255, .05);
  color: var(--text);
  font-size: 12.5px;
  font-weight: 650;
  text-decoration: none;
  transition: border-color .16s ease, background .16s ease;
}
.link-reward:hover { border-color: var(--accent-2); background: rgba(255, 255, 255, .09); }
.link-reward svg { width: 15px; height: 15px; color: var(--accent-2); }
.modal-status { min-height: 18px; margin: 4px 0 0 !important; color: var(--accent-2) !important; font-size: 11.5px !important; }
.ghost-btn { border: 1px solid var(--line-strong); background: rgba(255, 255, 255, .06); color: var(--text); }
.ghost-btn:hover { background: rgba(255, 255, 255, .11); }
.credit-balance {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, .04);
  color: var(--text);
  font-size: 12.5px;
  font-weight: 650;
}
.account-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 16px 0 4px;
}
.account-tab {
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, .04);
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}
.account-tab.active { border-color: rgba(250, 43, 86, .42); background: var(--accent-soft); color: #fff; }
.sync-note { padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255, 255, 255, .035); }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--player-h) + 20px);
  z-index: 70;
  max-width: min(520px, calc(100vw - 32px));
  padding: 11px 17px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(30, 30, 36, .94);
  color: #fff;
  font-size: 12px;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity .2s ease, transform .2s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* YouTube is only an audio/timing source. No visible player, chip, or controls. */
.yt-host {
  position: fixed;
  left: -10000px;
  top: -10000px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: -1;
}
.yt-host.idle, .yt-host.initializing { display: none; }
.yt-host iframe, .yt-host #ytPlayer { display: block; width: 1px; height: 1px; border: 0; }

/* ------------------------------------------------------------- responsive */
@media (max-width: 1100px) {
  .player { grid-template-columns: minmax(180px, 1fr) minmax(280px, 1.3fr) minmax(120px, .7fr); gap: 12px; }
  .volume { width: 62px; }
  .main { padding-inline: 22px; }
}
@media (max-width: 880px) {
  :root { --sidebar-w: 0px; }
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar {
    position: fixed;
    left: 12px;
    top: 12px;
    bottom: calc(var(--player-h) + 12px);
    z-index: 30;
    width: 250px;
    transform: translateX(-115%);
    transition: transform .25s ease;
  }
  .sidebar.open { transform: none; }
  .mobile-menu { display: grid; }
  .player { grid-template-columns: 1fr auto; }
  .player-center { grid-column: 1 / -1; grid-row: 1; }
  .player-track { grid-row: 2; }
  .player-right { grid-row: 2; }
  :root { --player-h: 124px; }
  .hero { padding: 30px 26px; }
}
@media (max-width: 600px) {
  .main { padding: 6px 12px 28px; }
  .topbar { gap: 8px; }
  .credit-pill { padding: 0 9px; font-size: 10.5px; }
  .credit-pill svg { display: none; }
  .hero h1 { font-size: 34px; }
  .track-grid { grid-template-columns: repeat(auto-fill, minmax(138px, 1fr)); gap: 10px; }
  .lyrics-head { flex-wrap: wrap; }
  .artist-hero { flex-direction: column; align-items: flex-start; gap: 18px; padding-top: 12px; }
  .artist-portrait { width: 116px; height: 116px; }
  .artist-hero h1 { font-size: 40px; }
  .now-art { width: 64px; height: 64px; }
  .genius-link { margin-left: 0; }
  .player { padding: 8px 12px; }
  .player-right .icon-btn { display: none; }
  .player-right #shareBtn, .player-right #lyricsBtn { display: grid; }
  .volume { display: none; }
  .lyrics-foot { flex-wrap: wrap; }
}
