/* =====================================================
   VYBE 3D: design tokens
   ===================================================== */
:root {
  --bg: #07021a;
  --panel: rgba(16, 7, 42, 0.62);
  --panel-solid: rgba(12, 4, 32, 0.92);
  --text: #ffffff;
  --text-soft: rgba(255, 255, 255, 0.82);
  --text-faint: rgba(255, 255, 255, 0.64);
  --line: rgba(255, 255, 255, 0.13);

  --pink: #ff2e93;
  --violet: #8b5cf6;
  --cyan: #22d3ee;
  --lime: #c6ff3d;
  --orange: #ff8a1f;
  --accent: var(--pink);
  --grad: linear-gradient(100deg, var(--pink), var(--violet) 45%, var(--cyan));
  --grad-hot: linear-gradient(100deg, var(--orange), var(--pink) 50%, var(--violet));

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --top-h: 68px;
  --side-w: 236px;
  --player-h: 76px;
  --gutter: clamp(16px, 3vw, 40px);
  --font-display: 'Unbounded', system-ui, sans-serif;
  --font: 'Space Grotesk', system-ui, sans-serif;
}
/* the accent colour follows the mood that is playing */
body[data-mood="focus"] { --accent: var(--cyan); }
body[data-mood="chill"] { --accent: var(--violet); }
body[data-mood="hype"]  { --accent: var(--pink); }
body[data-mood="night"] { --accent: var(--orange); }

* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--top-h) + 60px); }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; padding: 0; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--pink); color: #fff; }
:focus-visible { outline: 3px solid var(--lime); outline-offset: 3px; border-radius: 10px; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -9999px; top: 10px; z-index: 100; padding: 10px 16px; border-radius: 999px; background: var(--lime); color: var(--bg); font-weight: 700; }
.skip-link:focus { left: 10px; }

@keyframes shift { to { background-position: 200% 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

/* =====================================================
   BACKGROUND: 3D canvas, or the CSS fallback
   ===================================================== */
#scene { position: fixed; inset: 0; z-index: -1; width: 100%; height: 100%; transition: opacity 0.3s; }
.aurora { position: fixed; inset: 0; z-index: -2; overflow: hidden; pointer-events: none; }
.blob { position: absolute; width: 50vmax; height: 50vmax; border-radius: 50%; filter: blur(100px); opacity: 0.4; }
.b1 { background: var(--pink); top: -15%; right: -10%; animation: drift 24s ease-in-out infinite alternate; }
.b2 { background: var(--violet); bottom: -20%; left: -10%; animation: drift 30s ease-in-out infinite alternate-reverse; }
.b3 { background: var(--cyan); top: 40%; left: 40%; width: 30vmax; height: 30vmax; opacity: 0.25; animation: drift 20s ease-in-out infinite alternate; }
@keyframes drift { to { transform: translate(-15vw, 20vh) scale(1.2); } }
body.has-3d .aurora { opacity: 0.35; }   /* soft glow behind the 3D scene */
body.no-3d #scene { display: none; }

/* =====================================================
   BUTTONS
   ===================================================== */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 0.7em 1.4em; border-radius: 999px; font-weight: 700; font-size: 14px; white-space: nowrap; transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease); }
.btn-lime { background: var(--lime); color: var(--bg); box-shadow: 0 0 24px rgba(198, 255, 61, 0.35); }
.btn-lime:hover { transform: translateY(-2px); box-shadow: 0 0 36px rgba(198, 255, 61, 0.6); }
.btn-hot { background: var(--grad-hot); background-size: 200% 100%; color: #fff; animation: shift 5s linear infinite; box-shadow: 0 10px 30px rgba(255, 46, 147, 0.4); }
.btn-hot:hover { transform: translateY(-2px); }

/* =====================================================
   TOP BAR
   ===================================================== */
.topbar {
  position: fixed; inset: 0 0 auto; z-index: 40; height: var(--top-h);
  display: flex; align-items: center; gap: 20px; padding: 0 var(--gutter);
  transition: background-color 0.35s, border-color 0.35s;
  border-bottom: 1px solid transparent;
}
.topbar.scrolled { background: rgba(7, 2, 26, 0.82); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border-color: var(--line); }
.brand { display: flex; align-items: center; gap: 10px; width: calc(var(--side-w) - var(--gutter)); flex: none; }
.brand-logo {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; font-size: 18px;
  background: var(--grad); background-size: 200% 200%; animation: shift 4s linear infinite;
  box-shadow: 0 0 22px rgba(255, 46, 147, 0.5);
}
.brand-name { font-family: var(--font-display); font-weight: 900; font-size: 21px; letter-spacing: 0.06em; }

.search { position: relative; flex: 1; max-width: 520px; }
.search-icon { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--cyan); pointer-events: none; }
.search input {
  width: 100%; height: 46px; padding: 0 18px 0 46px; border-radius: 12px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.07); color: #fff; font: inherit; font-size: 15px;
  backdrop-filter: blur(10px); transition: border-color 0.3s, box-shadow 0.3s, background-color 0.3s;
}
.search input::placeholder { color: var(--text-faint); }
.search input:focus { outline: none; border-color: var(--cyan); background: rgba(255, 255, 255, 0.11); box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.18), 0 0 28px rgba(34, 211, 238, 0.3); }
#hero-play { margin-left: auto; }

/* =====================================================
   SIDEBAR
   ===================================================== */
.sidebar {
  position: fixed; z-index: 30; top: var(--top-h); left: 0; bottom: 0; width: var(--side-w);
  padding: 12px 12px calc(var(--player-h) + 24px);
  overflow-y: auto;
  background: linear-gradient(90deg, rgba(7, 2, 26, 0.8), rgba(7, 2, 26, 0));
}
.side-nav { display: grid; gap: 4px; }
.side-link {
  position: relative; display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 12px;
  font-weight: 600; color: var(--text-soft); transition: background-color 0.25s, color 0.25s;
}
.side-link span { width: 20px; text-align: center; font-size: 17px; }
.side-link:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.side-link.active { background: rgba(255, 255, 255, 0.1); color: #fff; }
.side-link.active::before { content: ''; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 3px; background: var(--accent); box-shadow: 0 0 12px var(--accent); }
.side-link b { margin-left: auto; min-width: 24px; padding: 1px 7px; border-radius: 999px; background: var(--pink); color: #fff; font-size: 12px; text-align: center; }
.side-mixes { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); display: grid; gap: 2px; }
.side-label { padding: 0 16px 8px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-faint); }
.side-mix { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-radius: 12px; text-align: left; font-size: 14px; color: var(--text-soft); transition: background-color 0.25s; }
.side-mix:hover { background: rgba(255, 255, 255, 0.07); color: #fff; }
.side-mix i { width: 28px; height: 28px; border-radius: 8px; flex: none; background: radial-gradient(circle at 30% 30%, #fff 0 8%, var(--c) 40%, #07021a 120%); box-shadow: 0 0 14px var(--c); }
.side-mix.active { color: #fff; background: rgba(255, 255, 255, 0.1); }
.side-mix.active i { animation: spin 3s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* =====================================================
   MAIN + HERO
   ===================================================== */
.main { margin-left: var(--side-w); padding: 0 var(--gutter); }

.hero {
  min-height: 92svh; padding: calc(var(--top-h) + 40px) 0 60px;
  display: flex; flex-direction: column; justify-content: center; max-width: 620px;
}
.pill {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 16px 8px 12px; border-radius: 999px;
  border: 1px solid rgba(198, 255, 61, 0.4); background: rgba(198, 255, 61, 0.08);
  font-size: 13px; font-weight: 500; color: var(--lime); backdrop-filter: blur(8px);
  animation: rise 0.8s var(--ease) both;
}
.pill-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 12px var(--lime); animation: blink 1.4s infinite; }
@keyframes blink { 50% { opacity: 0.25; transform: scale(0.7); } }

.hero h1 {
  margin-top: 22px; font-family: var(--font-display); font-weight: 900; text-transform: uppercase;
  font-size: clamp(2.5rem, 6vw, 5.4rem); line-height: 1; letter-spacing: -0.03em;
  perspective: 600px;
}
.hero h1 .line { display: block; transform-origin: 0 100%; animation: flip-in 1.1s var(--ease) both; }
.hero h1 .line:nth-child(2) { animation-delay: 0.12s; }
.hero h1 .line:nth-child(3) { animation-delay: 0.24s; }
@keyframes flip-in { from { opacity: 0; transform: rotateX(-80deg) translateY(30%); filter: blur(10px); } to { opacity: 1; transform: none; filter: none; } }
.grad {
  background: var(--grad); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shift 4s linear infinite; filter: drop-shadow(0 0 24px rgba(255, 46, 147, 0.5));
}
.outline { color: transparent; -webkit-text-stroke: 2px var(--cyan); text-shadow: 0 0 34px rgba(34, 211, 238, 0.55); }
.hero-sub { margin-top: 20px; max-width: 44ch; font-size: clamp(16px, 1.4vw, 18px); color: var(--text-soft); animation: rise 0.9s var(--ease) 0.35s both; }

.mood-buttons { margin-top: 30px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; max-width: 520px; animation: rise 0.9s var(--ease) 0.45s both; }
.mood-btn {
  display: flex; align-items: center; gap: 12px; padding: 8px 16px 8px 8px; text-align: left;
  border: 1.5px solid color-mix(in srgb, var(--c) 55%, transparent); border-radius: 18px;
  background: color-mix(in srgb, var(--c) 12%, rgba(7, 2, 26, 0.55)); backdrop-filter: blur(14px);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), background-color 0.3s;
}
.mood-btn:hover { transform: translateY(-4px) rotateX(8deg); box-shadow: 0 14px 34px color-mix(in srgb, var(--c) 45%, transparent); }
.mood-btn.active { background: color-mix(in srgb, var(--c) 34%, transparent); box-shadow: 0 0 36px color-mix(in srgb, var(--c) 70%, transparent); }
.mood-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; flex: none; background: var(--c); color: var(--bg); font-size: 13px; font-weight: 700; }
.mood-btn.active .mood-icon { animation: ring 1.4s infinite; }
@keyframes ring { from { box-shadow: 0 0 0 0 color-mix(in srgb, var(--c) 70%, transparent); } to { box-shadow: 0 0 0 14px transparent; } }
.mood-btn span:last-child { display: flex; flex-direction: column; font-size: 12px; line-height: 1.3; color: var(--text-faint); }
.mood-btn strong { font-family: var(--font-display); font-size: 14px; color: #fff; }

/* =====================================================
   MOOD CHIPS (sticky under the top bar)
   ===================================================== */
.chips {
  position: sticky; top: var(--top-h); z-index: 20;
  display: flex; gap: 10px; padding: 12px 0; overflow-x: auto; scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; min-height: 40px; padding: 0 18px; border-radius: 10px;
  border: 1px solid var(--line); background: rgba(16, 7, 42, 0.75); backdrop-filter: blur(12px);
  font-size: 14px; font-weight: 600; color: var(--text-soft);
  transition: background-color 0.25s, color 0.25s, transform 0.25s var(--ease);
}
.chip:hover { color: #fff; transform: translateY(-2px); background: rgba(255, 255, 255, 0.12); }
.chip[aria-pressed="true"] { background: #fff; color: var(--bg); border-color: #fff; box-shadow: 0 0 22px rgba(255, 255, 255, 0.3); }

/* =====================================================
   SHELVES
   ===================================================== */
.shelf { padding-top: clamp(40px, 6vw, 64px); }
.shelf-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.eyebrow { font-size: 13px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--accent); font-weight: 600; transition: color 0.5s; }
.shelf h2 { font-family: var(--font-display); font-weight: 900; font-size: clamp(1.6rem, 3.2vw, 2.5rem); letter-spacing: -0.02em; line-height: 1.1; }
.shelf-arrows { display: flex; gap: 8px; }
.arrow { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel); font-size: 24px; line-height: 1; transition: background-color 0.25s, transform 0.25s; }
.arrow:hover { background: rgba(255, 255, 255, 0.16); transform: scale(1.08); }
.empty { padding: 22px; border: 1.5px dashed rgba(255, 46, 147, 0.45); border-radius: 18px; color: var(--text-soft); background: rgba(255, 46, 147, 0.05); }
.empty[hidden] { display: none; }

/* Quick picks: song grid */
.quick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 6px 18px; }
.song {
  display: flex; align-items: center; border-radius: 14px; background: var(--panel); backdrop-filter: blur(12px);
  border: 1px solid transparent;
  transition: background-color 0.25s, border-color 0.25s, transform 0.3s var(--ease);
  animation: rise 0.6s var(--ease) both; animation-delay: calc(var(--i) * 30ms);
}
.song:hover { background: rgba(40, 18, 90, 0.75); border-color: var(--line); transform: translateX(4px); }
.song.current { border-color: color-mix(in srgb, var(--accent) 60%, transparent); background: color-mix(in srgb, var(--accent) 18%, var(--panel-solid)); }
.song-play { flex: 1; min-width: 0; display: flex; align-items: center; gap: 14px; padding: 8px 10px; text-align: left; border-radius: 14px; }
.song-art { position: relative; width: 52px; height: 52px; flex: none; border-radius: 10px; overflow: hidden; background: var(--grad); }
.song-art img { width: 100%; height: 100%; object-fit: cover; }
.song-icon { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0, 0, 0, 0.55); font-size: 15px; opacity: 0; transition: opacity 0.2s; }
.song-play:hover .song-icon, .song-play:focus-visible .song-icon, .song.current .song-icon { opacity: 1; }
.song-icon i { display: inline-block; width: 3px; height: 16px; margin: 0 1px; border-radius: 2px; background: var(--accent); transform-origin: bottom; animation: eq 0.8s ease-in-out infinite; }
.song-icon:has(i) { display: flex; align-items: center; justify-content: center; }
.song-icon i:nth-child(2) { animation-delay: -0.25s; }
.song-icon i:nth-child(3) { animation-delay: -0.5s; }
@keyframes eq { 0%, 100% { transform: scaleY(0.3); } 50% { transform: scaleY(1); } }
.song-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.song-text strong { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.song.current .song-text strong { color: var(--accent); }
.song-text span { font-size: 13px; color: var(--text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.song-time { font-size: 13px; color: var(--text-faint); font-variant-numeric: tabular-nums; }

.like { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 50%; font-size: 21px; color: var(--text-faint); transition: color 0.2s, transform 0.2s; }
.like:hover { color: var(--pink); transform: scale(1.15); }
.like[aria-pressed="true"] { color: var(--pink); text-shadow: 0 0 14px var(--pink); animation: pop 0.4s var(--ease); }
@keyframes pop { 50% { transform: scale(1.45); } }

/* Albums: horizontal 3D shelf */
.row {
  display: grid; grid-auto-flow: column; grid-auto-columns: clamp(170px, 19vw, 230px); gap: 20px;
  overflow-x: auto; scroll-snap-type: x mandatory; padding: 14px 4px 20px; margin: -14px -4px 0;
  scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
  perspective: 900px;
}
.album { scroll-snap-align: start; }
.album-art {
  --rx: 0deg; --ry: 0deg; --mx: 50%;
  position: relative; aspect-ratio: 1; border-radius: 16px; overflow: hidden; background: var(--grad);
  transform: rotateX(var(--rx)) rotateY(var(--ry)); transform-style: preserve-3d;
  transition: transform 0.25s ease-out, box-shadow 0.4s;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}
.album:hover .album-art { box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), 0 0 40px -6px var(--accent); }
.album.playing .album-art { box-shadow: 0 0 0 2px var(--accent), 0 0 46px -4px var(--accent); }
.album-art img { width: 100%; height: 100%; object-fit: cover; filter: saturate(1.25); transition: transform 0.6s var(--ease); }
.album:hover .album-art img { transform: scale(1.08); }
.album-shine { position: absolute; inset: 0; background: radial-gradient(circle at var(--mx) 0%, rgba(255, 255, 255, 0.35), transparent 55%); opacity: 0; transition: opacity 0.3s; pointer-events: none; }
.album:hover .album-shine { opacity: 1; }
.album-play {
  position: absolute; right: 10px; bottom: 10px; display: grid; place-items: center; width: 50px; height: 50px; border-radius: 50%;
  background: var(--lime); color: var(--bg); font-weight: 700; box-shadow: 0 0 24px rgba(198, 255, 61, 0.6);
  opacity: 0; transform: translateY(10px) translateZ(30px) scale(0.85); transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}
.album:hover .album-play, .album-play:focus-visible, .album.playing .album-play { opacity: 1; transform: translateZ(30px); }
.album h3 { margin-top: 12px; font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.album p { font-size: 13px; color: var(--text-faint); }

/* Artists */
.row-artists { grid-auto-columns: clamp(150px, 15vw, 190px); }
.artist { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px; text-align: center; border-radius: 18px; transition: transform 0.4s var(--ease); }
.artist:hover { transform: translateY(-6px); }
.artist img {
  width: 100%; aspect-ratio: 1; margin-bottom: 12px; border-radius: 50%; object-fit: cover;
  padding: 4px; background: var(--grad); background-size: 200% 200%; animation: shift 5s linear infinite;
  box-shadow: 0 0 40px -10px var(--pink); transition: transform 0.6s var(--ease), box-shadow 0.4s;
}
.artist:hover img { transform: rotateY(18deg) scale(1.04); box-shadow: 0 0 50px -4px var(--violet); }
.artist strong { font-weight: 700; }
.artist span { font-size: 13px; color: var(--text-faint); }

.footer { margin-top: 70px; padding: 26px 0 calc(var(--player-h) + 34px); border-top: 1px solid var(--line); display: grid; gap: 6px; font-size: 13px; color: var(--text-faint); }
.footer strong { color: var(--text-soft); }
.footer a { color: var(--cyan); text-decoration: underline; }

/* =====================================================
   PLAYER BAR
   ===================================================== */
.player {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; min-height: var(--player-h);
  display: flex; align-items: center; justify-content: center; padding: 8px var(--gutter);
  background: rgba(10, 3, 30, 0.95); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--line);
  transition: box-shadow 0.5s;
}
.player.on { box-shadow: 0 -10px 50px -12px var(--accent); }
.progress { position: absolute; left: 0; right: 0; top: -1px; height: 3px; background: rgba(255, 255, 255, 0.1); }
.progress span { display: block; height: 100%; width: 0; background: var(--grad); box-shadow: 0 0 12px var(--pink); transition: width 0.9s linear; }
.player-idle { font-size: 14px; color: var(--text-soft); }
.player-main { width: 100%; display: grid; grid-template-columns: 1fr 1.3fr 1fr; align-items: center; gap: 18px; }
.player-main[hidden] { display: none; }

.buttons { display: flex; align-items: center; gap: 6px; }
.ctrl { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; font-size: 16px; color: var(--text-soft); transition: background-color 0.2s, color 0.2s; }
.ctrl:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.ctrl-main { width: 50px; height: 50px; background: var(--grad); background-size: 200% 100%; animation: shift 4s linear infinite; color: #fff; font-size: 14px; font-weight: 700; letter-spacing: -2px; box-shadow: 0 0 22px rgba(255, 46, 147, 0.5); }
.ctrl-main:hover { color: #fff; transform: scale(1.07); }
.time { margin-left: 10px; font-size: 13px; color: var(--text-faint); font-variant-numeric: tabular-nums; white-space: nowrap; }

.now { display: flex; align-items: center; gap: 12px; min-width: 0; justify-content: center; }
.now img { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; flex: none; background: var(--grad); }
.player.on .now img { animation: glow 2.4s ease-in-out infinite; }
@keyframes glow { 50% { box-shadow: 0 0 24px var(--accent); } }
.now-text { display: flex; flex-direction: column; min-width: 0; }
.now-text strong, .now-text span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.now-text span { font-size: 13px; color: var(--text-faint); }

.extra { display: flex; align-items: center; justify-content: flex-end; gap: 14px; }
.extra > input { flex: 1; max-width: 220px; }
input[type="range"] { accent-color: var(--pink); cursor: pointer; height: 20px; }
.volume { display: flex; align-items: center; gap: 6px; }
.volume input { width: 90px; }

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 1000px) {
  :root { --side-w: 0px; }
  .sidebar { display: none; }
  .brand { width: auto; }
  .hero { min-height: 88svh; justify-content: flex-end; max-width: none; }
  .hero h1, .hero-sub { text-shadow: 0 2px 30px rgba(7, 2, 26, 0.8); }
}
@media (max-width: 760px) {
  :root { --player-h: 112px; --top-h: 62px; }
  .topbar { gap: 12px; }
  .brand-name { display: none; }
  #hero-play { display: none; }
  .search input { height: 42px; }
  .mood-buttons { grid-template-columns: 1fr 1fr; gap: 10px; }
  .mood-btn { padding-right: 10px; background: color-mix(in srgb, var(--c) 18%, rgba(7, 2, 26, 0.82)); }
  .hero-sub { background: rgba(7, 2, 26, 0.45); border-radius: 12px; padding: 4px 6px; margin-left: -6px; }
  .hero h1 { font-size: 2.6rem; }
  .shelf-arrows { display: none; }
  .row { grid-auto-columns: 46vw; gap: 14px; }
  .row-artists { grid-auto-columns: 36vw; }
  .album-play { opacity: 1; transform: none; width: 44px; height: 44px; }
  .player-main { grid-template-columns: 1fr auto; grid-template-rows: auto auto; gap: 4px 8px; }
  .now { grid-column: 1; grid-row: 1; justify-content: flex-start; }
  .now .like { display: none; }
  .buttons { grid-column: 2; grid-row: 1; }
  .time { display: none; }
  .extra { grid-column: 1 / -1; grid-row: 2; }
  .extra > input { max-width: none; }
  .volume { display: none; }
  .ctrl { width: 38px; height: 38px; }
  .ctrl-main { width: 46px; height: 46px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}


/* =====================================================
   CATEGORIES & GEN Z EXTRAS
   ===================================================== */
.hero h1 { font-size: clamp(2.6rem, 6.4vw, 5.8rem); }

/* vibe check */
.vibe-check { margin-top: 28px; animation: rise 0.9s var(--ease) 0.45s both; }
.vibe-q { font-family: var(--font-display); font-weight: 700; font-size: 15px; margin-bottom: 12px; }
.vibe-q span { font-family: var(--font); font-weight: 500; color: var(--text-faint); margin-left: 6px; }
.vibes { display: flex; flex-wrap: wrap; gap: 8px; max-width: 600px; }
.vibe {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px 7px 7px; border-radius: 999px;
  border: 1.5px solid color-mix(in srgb, var(--c) 55%, transparent);
  background: color-mix(in srgb, var(--c) 14%, rgba(7, 2, 26, 0.7)); backdrop-filter: blur(10px);
  font-size: 14px; font-weight: 600;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), background-color 0.3s;
}
.vibe-emoji { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: color-mix(in srgb, var(--c) 35%, transparent); font-size: 16px; transition: transform 0.4s var(--ease); }
.vibe:hover { transform: translateY(-3px) rotate(-2deg); box-shadow: 0 0 26px color-mix(in srgb, var(--c) 60%, transparent); }
.vibe:hover .vibe-emoji { transform: scale(1.25) rotate(-12deg); }
.vibe.active { background: color-mix(in srgb, var(--c) 40%, transparent); box-shadow: 0 0 30px color-mix(in srgb, var(--c) 75%, transparent); }
.vibe.active .vibe-emoji { animation: bounce 0.6s ease-in-out infinite alternate; }
@keyframes bounce { to { transform: translateY(-4px) scale(1.15); } }

/* marquee */
.marquee {
  margin: 10px calc(var(--gutter) * -1) 0; overflow: hidden; padding: 14px 0;
  background: var(--grad-hot); background-size: 200% 100%; animation: shift 8s linear infinite;
  transform: rotate(-1.5deg); box-shadow: 0 0 50px rgba(255, 46, 147, 0.4);
}
.marquee-track { display: flex; width: max-content; animation: scroll 30s linear infinite; }
.marquee span { font-family: var(--font-display); font-weight: 900; font-size: clamp(16px, 2vw, 24px); white-space: nowrap; letter-spacing: 0.02em; }
@keyframes scroll { to { transform: translateX(-50%); } }

/* moods & eras tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 14px; }
.tiles li { animation: rise 0.7s var(--ease) both; animation-delay: calc(var(--i) * 50ms); }
.tiles li[hidden] { display: none; }
.tile {
  position: relative; isolation: isolate; overflow: hidden; width: 100%; min-height: 150px;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; padding: 16px; text-align: left;
  border-radius: 20px; border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(135deg, var(--c1), var(--c2) 60%, var(--c3));
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.tile img { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; object-fit: cover; mix-blend-mode: luminosity; opacity: 0.45; transition: transform 0.7s var(--ease), opacity 0.4s; }
.tile::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(7, 2, 26, 0.85), rgba(7, 2, 26, 0.1) 70%); }
.tile:hover { transform: translateY(-6px) rotate(-1deg); box-shadow: 0 20px 44px -10px var(--c1); }
.tile:hover img { transform: scale(1.1) rotate(2deg); opacity: 0.6; }
.tile.active { box-shadow: 0 0 0 2px #fff, 0 0 44px -6px var(--c1); }
.tile-emoji { position: absolute; top: 12px; left: 14px; font-size: 34px; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.4)); transition: transform 0.5s var(--ease); }
.tile:hover .tile-emoji { transform: scale(1.2) rotate(-10deg); }
.tile-text strong { display: block; font-family: var(--font-display); font-size: 17px; font-weight: 900; letter-spacing: -0.01em; }
.tile-text span { font-size: 13px; color: rgba(255, 255, 255, 0.85); }
.tile-count { position: absolute; top: 14px; right: 14px; padding: 3px 10px; border-radius: 999px; background: rgba(7, 2, 26, 0.55); font-size: 12px; font-weight: 600; }
.tile-play { position: absolute; right: 14px; bottom: 14px; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: #fff; color: var(--bg); font-size: 13px; opacity: 0; transform: scale(0.7); transition: opacity 0.3s, transform 0.3s var(--ease); }
.tile:hover .tile-play, .tile:focus-visible .tile-play, .tile.active .tile-play { opacity: 1; transform: none; }

/* trending with big rank numbers */
.trending { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: 6px 18px; }
.trending .song { padding-left: 4px; }
.rank {
  width: 52px; flex: none; text-align: center; font-family: var(--font-display); font-weight: 900; font-size: 30px;
  color: transparent; -webkit-text-stroke: 1.5px var(--c); text-shadow: 0 0 18px color-mix(in srgb, var(--c) 50%, transparent);
}
.trending li:nth-child(-n+3) .rank { color: var(--c); -webkit-text-stroke: 0; }

/* album stickers */
.sticker {
  position: absolute; top: 10px; left: 10px; padding: 4px 10px; border-radius: 999px;
  background: var(--lime); color: var(--bg); font-size: 11px; font-weight: 700; text-transform: lowercase;
  transform: rotate(-6deg) translateZ(20px); box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}

/* one shelf per category */
.cat-shelf { scroll-margin-top: calc(var(--top-h) + 60px); }
.cat-shelf[hidden] { display: none; }
.cat-shelf .eyebrow { color: var(--c); }
.cat-shelf h2 span { display: inline-block; transition: transform 0.4s var(--ease); }
.cat-shelf:hover h2 span { transform: rotate(-12deg) scale(1.15); }
.cat-shelf.active h2 { text-shadow: 0 0 30px var(--c); }
.btn-cat { border: 1.5px solid var(--c); color: #fff; background: color-mix(in srgb, var(--c) 20%, transparent); }
.btn-cat:hover { transform: translateY(-2px); background: var(--c); box-shadow: 0 0 28px var(--c); }
.cat-body { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 24px; align-items: start; }
.cat-albums { grid-auto-columns: clamp(170px, 16vw, 210px); margin: -14px 0 0; }
.cat-songs { display: grid; gap: 6px; }
.cat-songs .song { background: color-mix(in srgb, var(--c) 8%, var(--panel)); }
.artist-count { margin-top: 2px; font-size: 12px; color: var(--accent) !important; font-weight: 600; }

@media (max-width: 1200px) { .cat-body { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .vibes { gap: 6px; }
  .vibe { font-size: 13px; padding-right: 12px; }
  .tiles { grid-template-columns: 1fr 1fr; gap: 10px; }
  .tile { min-height: 130px; padding: 12px; }
  .tile-text strong { font-size: 14px; }
  .tile-text span { display: none; }
  .tile-emoji { font-size: 28px; }
  .cat-albums { grid-auto-columns: 44vw; }
  .rank { width: 38px; font-size: 22px; }
  .trending .song-time { display: none; }
}

/* sticky chip bar gets its own frosted background */
.chips {
  margin: 0 calc(var(--gutter) * -1); padding: 12px var(--gutter);
  background: rgba(7, 2, 26, 0.86); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.search { min-width: 0; }

/* =====================================================
   GREETING, SPOTLIGHT, GLOW ARTISTS, NOW PLAYING
   ===================================================== */
.greet { flex: none; font-family: var(--font-display); font-weight: 700; font-size: 15px; white-space: nowrap; color: var(--text-soft); }
@media (max-width: 1280px) { .greet { display: none; } }

/* hero headline: tighter, bigger, with a beat-pulse on the outline word */
.hero h1 { font-size: clamp(2.8rem, 7vw, 6.2rem); line-height: 0.98; }
.outline { animation: beat 1.6s ease-in-out infinite; display: inline-block; }
@keyframes beat { 0%, 100% { transform: scale(1); } 12% { transform: scale(1.04); } 24% { transform: scale(1); } 36% { transform: scale(1.025); } }

/* Album of the week banner */
.spotlight {
  position: relative; isolation: isolate; overflow: hidden; margin-top: clamp(40px, 6vw, 64px);
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); align-items: center; gap: 24px;
  min-height: 320px; padding: clamp(24px, 4vw, 44px); border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: linear-gradient(110deg, rgba(10, 3, 30, 0.92) 30%, rgba(10, 3, 30, 0.35));
  box-shadow: 0 30px 80px -30px rgba(244, 114, 182, 0.6);
}
.spot-bg { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; object-fit: cover; filter: saturate(1.4) hue-rotate(-15deg); animation: zoom 20s ease-in-out infinite alternate; }
@keyframes zoom { to { transform: scale(1.12); } }
.spotlight::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(110deg, rgba(10, 3, 30, 0.95) 25%, rgba(139, 92, 246, 0.35) 70%, rgba(244, 114, 182, 0.35)); }
.spot-text .eyebrow { color: var(--lime); }
.spot-text h2 { margin: 8px 0 4px; font-family: var(--font-display); font-weight: 900; text-transform: uppercase; font-size: clamp(1.9rem, 4.4vw, 3.6rem); line-height: 1; letter-spacing: -0.02em; }
.spot-sub { color: var(--text-soft); font-weight: 500; }
.spot-quote { margin-top: 12px; max-width: 42ch; font-size: 15px; color: var(--text-faint); font-style: italic; }
.spot-actions { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 12px; }
.spot-actions .btn-light { background: #fff; color: var(--bg); box-shadow: 0 10px 30px rgba(255, 255, 255, 0.25); }
.btn-ghost { border: 1.5px solid rgba(255, 255, 255, 0.5); background: rgba(255, 255, 255, 0.06); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.16); transform: translateY(-2px); }

/* 3D album + record coming out of the sleeve */
.spot-stage { position: relative; height: 260px; perspective: 900px; }
.spot-cover, .spot-disc { position: absolute; top: 50%; width: 230px; aspect-ratio: 1; }
.spot-cover {
  right: 34%; transform: translateY(-50%) rotateY(-24deg) rotateX(6deg); border-radius: 18px; overflow: hidden;
  background: var(--grad); box-shadow: -20px 30px 60px rgba(0, 0, 0, 0.6); transition: transform 0.6s var(--ease);
}
.spot-cover img { width: 100%; height: 100%; object-fit: cover; }
.spot-disc {
  right: 6%; border-radius: 50%; transform: translateY(-50%);
  background: repeating-radial-gradient(circle, #111 0 2px, #1e1e1e 2px 4px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 60px -10px var(--pink);
  display: grid; place-items: center; animation: spin 7s linear infinite; transition: right 0.6s var(--ease);
}
.spot-disc img { width: 36%; aspect-ratio: 1; border-radius: 50%; object-fit: cover; border: 4px solid #0b0320; background: var(--grad); }
.spotlight:hover .spot-disc { right: -2%; }
.spotlight:hover .spot-cover { transform: translateY(-50%) rotateY(-8deg) rotateX(2deg) scale(1.03); }

/* Artists: rounded squares with a coloured glow underneath */
.row-artists { grid-auto-columns: clamp(160px, 15vw, 200px); padding-bottom: 44px; }
.artist img {
  border-radius: 24px; padding: 0; background: var(--g, var(--pink)); animation: none;
  box-shadow: 0 22px 46px -14px var(--g, var(--pink)), 0 0 0 1px rgba(255, 255, 255, 0.1);
}
.artist:hover img { transform: translateY(-6px) rotateX(10deg) scale(1.03); box-shadow: 0 34px 60px -12px var(--g, var(--pink)); }
.artist-count { color: var(--g, var(--accent)) !important; }

/* Player: clickable "now playing" opens the full view */
.now-open { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 4px 8px 4px 4px; border-radius: 14px; text-align: left; transition: background-color 0.25s; }
.now-open:hover { background: rgba(255, 255, 255, 0.08); }
.now-expand { font-size: 18px; color: var(--text-faint); transition: color 0.2s, transform 0.3s var(--ease); }
.now-open:hover .now-expand { color: #fff; transform: scale(1.2); }

/* ---------- Full-screen Now Playing ---------- */
body.np-open { overflow: hidden; }
.np {
  --c: var(--pink); --c2: var(--violet);
  position: fixed; inset: 0; z-index: 80; overflow: hidden; isolation: isolate;
  background: radial-gradient(ellipse at 50% 20%, color-mix(in srgb, var(--c) 45%, #000), #050008 70%);
  animation: np-in 0.55s var(--ease) both;
}
.np[hidden] { display: none; }
@keyframes np-in { from { opacity: 0; transform: translateY(40px) scale(0.98); } to { opacity: 1; transform: none; } }
.np-bg { position: absolute; inset: -10%; z-index: -1; width: 120%; height: 120%; object-fit: cover; filter: blur(60px) saturate(1.6); opacity: 0.35; }
.np-close {
  position: fixed; top: 18px; right: 18px; z-index: 82; width: 48px; height: 48px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.1); font-size: 26px; line-height: 1; transition: background-color 0.2s, transform 0.3s var(--ease);
}
.np-close:hover { background: rgba(255, 255, 255, 0.2); transform: rotate(180deg); }
.np-inner { height: 100%; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: clamp(20px, 4vw, 60px); padding: 40px clamp(20px, 5vw, 80px); }

/* 3D stage: big spinning disc with album cards fanned behind it */
.np-stage { position: relative; height: min(60vh, 520px); transform-style: preserve-3d; transition: transform 0.4s ease-out; }
.np-card {
  position: absolute; top: 50%; left: 50%; width: min(26vw, 280px); aspect-ratio: 1; border-radius: 20px; overflow: hidden;
  background: var(--grad); opacity: 0.55; filter: saturate(0.8) brightness(0.7);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
}
.np-card img { width: 100%; height: 100%; object-fit: cover; }
.np-card-l { transform: translate(-105%, -50%) rotateY(35deg) translateZ(-120px) rotate(-6deg); }
.np-card-r { transform: translate(5%, -50%) rotateY(-35deg) translateZ(-120px) rotate(6deg); }
.np-disc {
  position: absolute; top: 50%; left: 50%; width: min(32vw, 360px); aspect-ratio: 1; border-radius: 50%; overflow: hidden;
  background: conic-gradient(from 0deg, var(--c), var(--c2), var(--cyan), var(--c));
  transform: translate(-50%, -50%) translateZ(60px);
  box-shadow: 0 0 0 10px rgba(0, 0, 0, 0.55), 0 0 0 11px rgba(255, 255, 255, 0.12), 0 40px 90px rgba(0, 0, 0, 0.7), 0 0 120px -10px var(--c);
}
.np-disc img { width: 100%; height: 100%; object-fit: cover; background: var(--grad); animation: spin 14s linear infinite; animation-play-state: paused; }
.np.playing .np-disc img { animation-play-state: running; }
.np-hole { position: absolute; top: 50%; left: 50%; width: 9%; aspect-ratio: 1; border-radius: 50%; transform: translate(-50%, -50%); background: #ddd; box-shadow: 0 0 0 6px rgba(0, 0, 0, 0.5), inset 0 0 6px rgba(0, 0, 0, 0.6); }

.np-info { display: flex; flex-direction: column; min-width: 0; max-height: 86vh; }
.np-info h2 { font-family: var(--font-display); font-weight: 900; font-size: clamp(1.8rem, 3.6vw, 3rem); line-height: 1.05; letter-spacing: -0.02em; }
#np-meta { margin-top: 6px; color: var(--text-soft); }
.np-tabs { margin: 22px 0 14px; display: inline-flex; align-self: flex-start; gap: 4px; padding: 4px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); }
.np-tab { padding: 8px 18px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--text-soft); transition: background-color 0.25s, color 0.25s; }
.np-tab[aria-selected="true"] { background: #fff; color: var(--bg); }
.np-panel {
  flex: 1; min-height: 160px; max-height: 38vh; overflow-y: auto; padding: 6px 4px 6px 0;
  mask-image: linear-gradient(transparent, #000 15%, #000 85%, transparent); -webkit-mask-image: linear-gradient(transparent, #000 15%, #000 85%, transparent);
}
.lyrics { display: grid; gap: 10px; padding: 16vh 0; }
.lyrics li { font-family: var(--font-display); font-weight: 700; font-size: clamp(16px, 1.7vw, 22px); line-height: 1.3; color: rgba(255, 255, 255, 0.35); transition: color 0.4s, transform 0.4s var(--ease), text-shadow 0.4s; transform-origin: left center; }
.lyrics li.past { color: rgba(255, 255, 255, 0.55); }
.lyrics li.on { color: #fff; transform: scale(1.06); text-shadow: 0 0 24px var(--c); }
.lyrics-note { font-size: 12px; color: var(--text-faint); padding-bottom: 20px; }
.np-next { display: grid; gap: 6px; }
.np-next button { width: 100%; display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 12px; text-align: left; transition: background-color 0.2s; }
.np-next button:hover { background: rgba(255, 255, 255, 0.08); }
.np-next img { width: 46px; height: 46px; border-radius: 8px; object-fit: cover; background: var(--grad); }
.np-next span { flex: 1; display: flex; flex-direction: column; font-size: 13px; color: var(--text-faint); }
.np-next strong { font-size: 15px; color: #fff; }
.np-next em { font-style: normal; font-size: 13px; color: var(--text-faint); }
.np-about { display: flex; gap: 16px; align-items: flex-start; padding: 10px 0; }
.np-about img { width: 90px; height: 90px; border-radius: 20px; object-fit: cover; flex: none; background: var(--grad); box-shadow: 0 16px 34px -10px var(--c); }
.np-about strong { display: block; font-family: var(--font-display); font-size: 18px; }
.np-about span { font-size: 13px; color: var(--c); font-weight: 600; }
.np-about p { margin-top: 8px; color: var(--text-soft); }
.np-controls { margin-top: 18px; display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--text-faint); font-variant-numeric: tabular-nums; }
.np-bar { flex: 1; height: 5px; border-radius: 5px; background: rgba(255, 255, 255, 0.15); overflow: hidden; }
.np-bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--c), var(--c2)); box-shadow: 0 0 14px var(--c); transition: width 0.9s linear; }
.np-buttons { margin-top: 14px; display: flex; align-items: center; gap: 10px; }
.np-buttons .ctrl-main { width: 60px; height: 60px; font-size: 16px; background: var(--c); animation: none; box-shadow: 0 0 30px var(--c); }

@media (max-width: 900px) {
  .spotlight { grid-template-columns: 1fr; }
  .spot-stage { height: 200px; order: -1; }
  .spot-cover, .spot-disc { width: 170px; }
  .spot-cover { right: auto; left: 8%; }
  .spot-disc { right: 12%; }
  .np-inner { grid-template-columns: 1fr; align-content: start; overflow-y: auto; padding-top: 70px; }
  .np-stage { height: 280px; }
  .np-disc { width: 230px; }
  .np-card { width: 170px; }
  .np-info { max-height: none; }
  .np-panel { max-height: 34vh; }
}

/* artist photo frame (keeps the glow even if a photo fails to load) */
.artist-pic {
  display: block; width: 100%; aspect-ratio: 1; margin-bottom: 12px; border-radius: 24px; overflow: hidden;
  background: linear-gradient(135deg, var(--g, var(--pink)), #1a0b3d);
  box-shadow: 0 22px 46px -14px var(--g, var(--pink)), 0 0 0 1px rgba(255, 255, 255, 0.1);
  transition: transform 0.6s var(--ease), box-shadow 0.4s;
}
.artist .artist-pic img { width: 100%; height: 100%; margin: 0; border-radius: 0; object-fit: cover; box-shadow: none; background: none; transform: none; }
.artist:hover .artist-pic { transform: translateY(-6px) rotateX(10deg) scale(1.03); box-shadow: 0 34px 60px -12px var(--g, var(--pink)); }

/* =====================================================
   SETTINGS, EQUALIZER, UPLOADS, BACKUP
   ===================================================== */
.icon-btn {
  display: grid; place-items: center; width: 46px; height: 46px; flex: none; margin-left: auto;
  border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.07); color: var(--text-soft);
  transition: background-color 0.25s, color 0.25s, transform 0.3s var(--ease);
}
.icon-btn:hover { background: rgba(255, 255, 255, 0.14); color: #fff; transform: rotate(-8deg); }
#hero-play { margin-left: 0; }

.ctrl-sm { width: 36px; height: 36px; font-size: 14px; opacity: 0.6; }
.ctrl-sm[aria-pressed="true"], #repeat:not(.off) { opacity: 1; color: var(--lime); }
#repeat.off { opacity: 0.5; color: var(--text-faint); }
.eq-btn { flex: none; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line); font-size: 12px; font-weight: 700; letter-spacing: 0.06em; color: var(--text-soft); }
.eq-btn:hover { color: #fff; border-color: var(--accent); }

/* upload area */
.dropzone {
  position: relative; display: flex; align-items: center; gap: 18px; padding: 22px; margin-bottom: 14px; cursor: pointer;
  border: 2px dashed rgba(34, 211, 238, 0.5); border-radius: 22px; background: rgba(34, 211, 238, 0.06);
  transition: background-color 0.25s, border-color 0.25s, transform 0.3s var(--ease);
}
.dropzone:hover, .dropzone.over { background: rgba(34, 211, 238, 0.14); border-color: var(--cyan); transform: scale(1.01); }
.dropzone:focus-within { outline: 3px solid var(--lime); outline-offset: 3px; }
.dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop-icon { display: grid; place-items: center; width: 54px; height: 54px; flex: none; border-radius: 16px; background: var(--grad); font-size: 24px; font-weight: 700; box-shadow: 0 0 24px rgba(34, 211, 238, 0.4); }
.drop-text { display: flex; flex-direction: column; font-size: 14px; color: var(--text-faint); }
.drop-text strong { font-family: var(--font-display); font-size: 16px; color: #fff; }
.like.del { font-size: 15px; }
.like.del:hover { color: #ff6b6b; }

.notice { margin-bottom: 12px; padding: 12px 16px; border-radius: 14px; background: rgba(250, 204, 21, 0.12); border: 1px solid rgba(250, 204, 21, 0.4); font-size: 14px; }
.notice[hidden] { display: none; }
.link-btn { text-decoration: underline; color: var(--lime); font-weight: 600; }
.np-empty { padding: 30px 0; color: var(--text-soft); font-size: 16px; }

/* drawer */
.drawer-backdrop { position: fixed; inset: 0; z-index: 89; background: rgba(5, 0, 15, 0.55); backdrop-filter: blur(4px); }
.drawer-backdrop[hidden], .drawer[hidden] { display: none; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 90; width: min(440px, 100%); overflow-y: auto;
  padding: 22px 22px 40px; background: rgba(14, 5, 38, 0.97); border-left: 1px solid var(--line);
  box-shadow: -30px 0 80px rgba(0, 0, 0, 0.5); animation: drawer-in 0.45s var(--ease) both;
}
@keyframes drawer-in { from { transform: translateX(100%); } to { transform: none; } }
.drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.drawer-head h2 { font-family: var(--font-display); font-weight: 900; font-size: 24px; }
.drawer-close { position: static !important; width: 42px !important; height: 42px !important; font-size: 18px !important; }
.set { padding: 20px 0; border-bottom: 1px solid var(--line); }
.set h3 { font-family: var(--font-display); font-size: 15px; font-weight: 700; margin-bottom: 14px; }
.set-note { margin-top: 10px; font-size: 13px; color: var(--text-faint); }
.set-stat { margin-top: 8px; font-size: 13px; font-weight: 600; color: var(--lime); }
.set-buttons { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.set-buttons .btn { font-size: 13px; padding: 0.6em 1.1em; }
.file-btn { position: relative; cursor: pointer; }
.file-btn input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.file-btn:focus-within { outline: 3px solid var(--lime); outline-offset: 3px; }

.presets { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.preset { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--text-soft); transition: background-color 0.2s; }
.preset:hover { background: rgba(255, 255, 255, 0.1); }
.preset[aria-pressed="true"] { background: var(--grad); color: #fff; border-color: transparent; }

.eq { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; padding: 14px 8px; border-radius: 16px; background: rgba(255, 255, 255, 0.04); }
.eq-band { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.eq-band input {
  writing-mode: vertical-lr; direction: rtl; width: 28px; height: 130px; accent-color: var(--cyan);
}
.eq-val { font-size: 11px; font-weight: 700; color: var(--cyan); font-variant-numeric: tabular-nums; }
.eq-lab { display: flex; flex-direction: column; align-items: center; font-size: 11px; color: var(--text-soft); text-align: center; line-height: 1.2; }
.eq-lab small { color: var(--text-faint); }

.toggle { margin-top: 14px; display: flex; align-items: center; gap: 10px; font-size: 14px; cursor: pointer; }
.toggle input { width: 20px; height: 20px; accent-color: var(--pink); }

.seg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 4px; border-radius: 14px; background: rgba(255, 255, 255, 0.06); }
.seg label { position: relative; cursor: pointer; }
.seg input { position: absolute; opacity: 0; }
.seg span { display: block; padding: 9px 4px; border-radius: 10px; text-align: center; font-size: 13px; font-weight: 600; color: var(--text-soft); transition: background-color 0.2s, color 0.2s; }
.seg input:checked + span { background: #fff; color: var(--bg); }
.seg input:focus-visible + span { outline: 3px solid var(--lime); outline-offset: 2px; }

@media (max-width: 760px) {
  .icon-btn { width: 42px; height: 42px; }
  .eq-btn { display: none; }
  .ctrl-sm { display: none; }
  .dropzone { padding: 16px; gap: 12px; }
  .drop-icon { width: 44px; height: 44px; }
}

/* Around the world */
.lede { margin-top: 8px; max-width: 70ch; color: var(--text-faint); font-size: 15px; }
.world-tiles .tile { min-height: 170px; }
.world-tiles .tile img { mix-blend-mode: normal; opacity: 0.55; }
.world-tiles .tile-emoji { font-size: 40px; }
.world-note { margin-top: 14px; font-size: 14px; color: var(--text-faint); }
.world-note a { color: var(--cyan); text-decoration: underline; }

/* =====================================================
   MULTI-PAGE LAYOUT, ACCOUNT, AUTH, PROFILE
   ===================================================== */
.page[hidden] { display: none; }
.page { animation: page-in 0.5s var(--ease) both; }
@keyframes page-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.page-head { padding-top: calc(var(--top-h) + 40px); }
.page-title {
  font-family: var(--font-display); font-weight: 900; text-transform: uppercase;
  font-size: clamp(2rem, 5vw, 3.8rem); line-height: 1; letter-spacing: -0.02em; margin-top: 6px;
}
.page-title:focus { outline: none; }
.page[data-page="world"] > .shelf:first-child, .page[data-page="artists"] > .shelf:first-child { padding-top: calc(var(--top-h) + 40px); }
.page[data-page="explore"] .chips { margin-top: 18px; }
/* the 3D orb steps back on inner pages so text stays readable */
body:not([data-page="home"]) #scene { opacity: 0.32 !important; }

.hero-actions { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 10px; animation: rise 0.9s var(--ease) 0.55s both; }

/* account area in the top bar */
.account { display: flex; align-items: center; gap: 8px; flex: none; }
.btn-sm { padding: 0.55em 1.05em; font-size: 13px; }
.me-chip { display: flex; align-items: center; gap: 8px; padding: 4px 14px 4px 4px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.07); font-weight: 600; font-size: 14px; transition: background-color 0.25s; }
.me-chip:hover { background: rgba(255, 255, 255, 0.15); }
.me-avatar { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--grad); font-size: 19px; }
.me-name { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.side-link[aria-current="page"] { background: rgba(255, 255, 255, 0.1); color: #fff; }

/* grids used on artist / search pages */
.artist-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr)); gap: 22px 18px; padding-bottom: 20px; }
.artist { text-decoration: none; }
.album-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr)); gap: 20px; perspective: 900px; }

.artist-hero, .profile-hero { display: flex; align-items: flex-end; gap: clamp(20px, 4vw, 44px); padding-top: calc(var(--top-h) + 40px); flex-wrap: wrap; }
.artist-pic.big { width: clamp(160px, 22vw, 240px); flex: none; margin: 0; }
.artist-meta { margin-top: 10px; color: var(--text-soft); }
.artist-note { margin-top: 4px; font-size: 13px; color: var(--text-faint); }

/* ---------- auth pages ---------- */
.auth { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 40px; align-items: center; padding-top: calc(var(--top-h) + 30px); }
.auth-center { grid-template-columns: 1fr; justify-items: center; }
.auth-card {
  width: 100%; max-width: 620px; padding: clamp(22px, 4vw, 40px); border-radius: 28px;
  background: rgba(14, 5, 38, 0.82); border: 1px solid var(--line); backdrop-filter: blur(18px);
  box-shadow: 0 30px 80px -30px rgba(139, 92, 246, 0.6);
}
.auth-card.wide { max-width: 860px; text-align: center; }
.auth-card .page-title { font-size: clamp(1.8rem, 4vw, 2.8rem); }
.auth-note { margin: 14px 0 22px; padding: 12px 14px; border-radius: 14px; background: rgba(198, 255, 61, 0.08); border: 1px solid rgba(198, 255, 61, 0.3); font-size: 14px; color: var(--text-soft); }
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; border: 0; padding: 0; min-width: 0; }
.field > label, .field legend { font-weight: 700; font-size: 14px; margin-bottom: 8px; }
.opt { font-weight: 400; color: var(--text-faint); }
.field input[type="text"], .field input:not([type]) , #su-name {
  height: 50px; padding: 0 16px; border-radius: 14px; border: 1.5px solid var(--line); background: rgba(255, 255, 255, 0.06);
  color: #fff; font: inherit; font-size: 16px; transition: border-color 0.25s, box-shadow 0.25s;
}
#su-name:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.2); }
#su-name[aria-invalid="true"] { border-color: #ff6b6b; }
.field small { font-size: 12px; color: var(--text-faint); }
.field-err { color: #ff8a8a !important; font-weight: 600; min-height: 1em; }

.avatars { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.avatar-opt { position: relative; cursor: pointer; }
.avatar-opt input { position: absolute; opacity: 0; }
.avatar-opt span[aria-hidden] { display: grid; place-items: center; aspect-ratio: 1; border-radius: 16px; font-size: 26px; background: rgba(255, 255, 255, 0.06); border: 2px solid transparent; transition: transform 0.25s var(--ease), border-color 0.2s, background-color 0.2s; }
.avatar-opt:hover span[aria-hidden] { transform: translateY(-3px) rotate(-6deg); }
.avatar-opt input:checked + span { border-color: var(--lime); background: rgba(198, 255, 61, 0.14); transform: scale(1.06); }
.avatar-opt input:focus-visible + span { outline: 3px solid var(--lime); outline-offset: 2px; }
.pick { display: flex; flex-wrap: wrap; gap: 8px; }
.pick-opt { position: relative; cursor: pointer; --c: var(--violet); }
.pick-opt input { position: absolute; opacity: 0; }
.pick-opt span { display: inline-block; padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--line); font-size: 13px; font-weight: 600; transition: background-color 0.2s, border-color 0.2s; }
.pick-opt input:checked + span { background: color-mix(in srgb, var(--c) 35%, transparent); border-color: var(--c); box-shadow: 0 0 18px color-mix(in srgb, var(--c) 50%, transparent); }
.pick-opt input:focus-visible + span { outline: 3px solid var(--lime); outline-offset: 2px; }
.btn-big { width: 100%; justify-content: center; padding: 0.95em 1.4em; font-size: 16px; }
.auth-switch { margin-top: 16px; text-align: center; font-size: 14px; color: var(--text-faint); }
.auth-switch a, .auth-card a:not(.btn) { color: var(--cyan); text-decoration: underline; }
.auth-switch[hidden] { display: none; }

/* live preview: a spinning record with your avatar */
.auth-art { --c: var(--pink); --c2: var(--violet); display: flex; flex-direction: column; align-items: center; gap: 18px; }
.auth-disc {
  width: min(320px, 70%); aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle, var(--c) 0 22%, #0b0320 22.5% 24%, transparent 24.5%), repeating-radial-gradient(circle, #111 0 2px, #1e1e1e 2px 4px);
  box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.05), 0 40px 90px rgba(0, 0, 0, 0.6), 0 0 120px -10px var(--c);
  animation: spin 8s linear infinite; transition: box-shadow 0.5s;
}
.auth-disc span { font-size: clamp(40px, 6vw, 64px); animation: spin 8s linear infinite reverse; }
.auth-preview { display: flex; flex-direction: column; align-items: center; text-align: center; }
.auth-preview strong { font-family: var(--font-display); font-size: 22px; }
.auth-preview span { color: var(--text-soft); }

/* who's listening */
.profile-picker { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; margin: 10px 0 24px; }
.profile-tile { --c: var(--pink); display: flex; flex-direction: column; align-items: center; gap: 4px; width: 140px; padding: 14px 8px; border-radius: 22px; transition: transform 0.3s var(--ease), background-color 0.25s; }
.profile-tile:hover { transform: translateY(-6px); background: rgba(255, 255, 255, 0.06); }
.profile-tile strong { font-size: 15px; }
.profile-tile span:last-child { font-size: 12px; color: var(--text-faint); }
.profile-tile.is-me .profile-avatar { box-shadow: 0 0 0 3px var(--lime), 0 18px 40px -10px var(--c); }
.profile-avatar {
  display: grid; place-items: center; width: 96px; height: 96px; border-radius: 28px; font-size: 46px; margin-bottom: 8px;
  background: linear-gradient(135deg, var(--c), #1a0b3d); box-shadow: 0 18px 40px -10px var(--c);
}
.profile-avatar.big { width: clamp(130px, 18vw, 190px); height: clamp(130px, 18vw, 190px); font-size: clamp(60px, 8vw, 96px); border-radius: 40px; background: linear-gradient(135deg, var(--c), var(--c2)); }
.auth-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

.stats-grid { margin-top: 30px; display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.stats-grid li { padding: 18px; border-radius: 20px; background: var(--panel); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.stats-grid strong { font-family: var(--font-display); font-size: 30px; }
.stats-grid span { font-size: 13px; color: var(--text-faint); }
.shelf.danger { border-top: 1px solid var(--line); margin-top: 40px; }

/* ---------- mobile tab bar ---------- */
.tabbar { display: none; }
@media (max-width: 1000px) {
  :root { --tab-h: 62px; }
  .tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 51; height: var(--tab-h);
    display: grid; grid-template-columns: repeat(5, 1fr);
    background: rgba(7, 2, 26, 0.97); border-top: 1px solid var(--line); backdrop-filter: blur(16px);
  }
  .tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 11px; font-weight: 600; color: var(--text-faint); }
  .tabbar a span { font-size: 19px; line-height: 1; }
  .tabbar a.active { color: #fff; }
  .tabbar a.active span { text-shadow: 0 0 14px var(--accent); transform: scale(1.12); }
  .player { bottom: var(--tab-h); }
  .footer { padding-bottom: calc(var(--player-h) + var(--tab-h) + 30px); }
  .hero { padding-bottom: calc(var(--tab-h) + 70px); }
  .greet { display: none; }
  .auth { grid-template-columns: 1fr; }
  .auth-art { order: -1; }
  .auth-disc { width: 160px; }
}
@media (max-width: 760px) {
  .account .btn-ghost { display: none; }
  .me-name { display: none; }
  .me-chip { padding: 3px; }
  .avatars { grid-template-columns: repeat(4, 1fr); }
  .artist-grid { grid-template-columns: 1fr 1fr; gap: 16px 12px; }
  .album-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .page-head, .artist-hero, .profile-hero, .page[data-page="world"] > .shelf:first-child, .page[data-page="artists"] > .shelf:first-child { padding-top: calc(var(--top-h) + 24px); }
}

@media (max-width: 1000px) {
  body:not(.has-song) .player { display: none; }
  .auth-art { flex-direction: row; justify-content: center; gap: 16px; }
  .auth-disc { width: 96px; }
  .auth-disc span { font-size: 34px; }
  .auth-preview { align-items: flex-start; text-align: left; }
  .auth-preview strong { font-size: 18px; }
}

.set-sub { margin-top: 20px; }
.seg-2 { grid-template-columns: 1fr 1fr; }
