/* ==========================================================================
   AUDINZA — Design System
   Concept: a night stage — deep near-black backdrops lit by warm magenta
   and amber stage-light gradients, with the playing track glowing like the
   performer under the spotlight. Light mode = daytime studio: warm paper
   white, ink text, the same two accent lights turned down to a glow.
   Type: Sora (display, geometric/technical) + Manrope (body, warm/legible).
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;500;600;700;800&family=Manrope:wght@400;500;600;700&display=swap');

:root {
  /* ---- Stage palette (dark, default) ---- */
  --bg: #0E0B14;
  --bg-raised: #171220;
  --bg-elevated: #1E1826;
  --bg-hover: #271F31;
  --border: #2C2436;

  --text: #F5F1FA;
  --text-dim: #A79FB5;
  --text-faint: #6E6680;

  --accent: #FF3D6E;          /* stage magenta — primary CTA / playing state */
  --accent-ink: #ffffff;
  --amber: #FFB84D;           /* stage amber — secondary accent */
  --mint: #3DDC97;            /* verified + positive trend, dark mode */
  --blue: #4DA8FF;

  --verified-color: var(--mint);

  --gradient-stage: radial-gradient(circle at 30% 20%, rgba(255,61,110,.35), transparent 60%),
                     radial-gradient(circle at 80% 0%, rgba(255,184,77,.25), transparent 55%);
  --gradient-accent: linear-gradient(135deg, #FF3D6E 0%, #FF7A4D 100%);

  --shadow-lg: 0 24px 48px -12px rgba(0,0,0,.55);
  --shadow-card: 0 8px 24px -8px rgba(0,0,0,.45);

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-pill: 999px;

  --font-display: 'Sora', system-ui, sans-serif;
  --font-body: 'Manrope', system-ui, sans-serif;

  --player-h: 84px;
  --mobile-nav-h: 64px;
  --topbar-h: 72px;
  --sidebar-w: 260px;

  --ease: cubic-bezier(.2,.8,.2,1);
}

[data-theme="light"] {
  --bg: #FBF9F6;
  --bg-raised: #FFFFFF;
  --bg-elevated: #F3EEE7;
  --bg-hover: #ECE6DC;
  --border: #E6DFD4;

  --text: #1C1620;
  --text-dim: #6B6577;
  --text-faint: #948DA0;

  --accent: #E63368;
  --amber: #E09A2E;
  --mint: #1FA968;
  --blue: #2F6FED;

  --verified-color: var(--blue);

  --gradient-stage: radial-gradient(circle at 30% 10%, rgba(230,51,104,.10), transparent 60%),
                     radial-gradient(circle at 80% 0%, rgba(224,154,46,.10), transparent 55%);

  --shadow-lg: 0 24px 48px -16px rgba(28,22,32,.18);
  --shadow-card: 0 8px 20px -10px rgba(28,22,32,.16);
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { overflow-x: hidden; max-width: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  transition: background .35s var(--ease), color .35s var(--ease);
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; }
::selection { background: var(--accent); color: #fff; }

/* Flex/grid items default to min-width:auto, which lets a wide descendant
   (the horizontally-scrolling rails below) force this whole ancestor chain
   wider than the viewport instead of scrolling within its own rail. Pinning
   min-width:0 here is what makes overflow-x:auto on .rail/.genre-rail
   actually contain their content instead of blowing out the page. */
.app-shell, .main-col, .content, .topbar, .search-shell { min-width: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

h1, h2, h3, h4 { font-family: var(--font-display); margin: 0; letter-spacing: -.01em; }
p { margin: 0; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---- Icons ---- */
.icon { width: 20px; height: 20px; flex-shrink: 0; }
.icon-sm { width: 16px; height: 16px; }
.icon-lg { width: 28px; height: 28px; }

/* ---- Layout shell ---- */
.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
}

.sidebar {
  background: var(--bg-raised);
  border-right: 1px solid var(--border);
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand { display: flex; align-items: center; gap: 10px; padding: 0 6px; }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; background: var(--gradient-accent); display: grid; place-items: center; color: #fff; flex-shrink: 0; }
.brand-mark svg { width: 20px; height: 20px; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 20px; }

.nav-group { display: flex; flex-direction: column; gap: 2px; }
.nav-label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-faint); padding: 0 12px; margin-bottom: 6px; }
.nav-link {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 12px; margin: 0 -1px; border-radius: var(--radius-sm);
  color: var(--text-dim); font-weight: 600; font-size: 14.5px;
  border-left: 2px solid transparent;
  transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.nav-link:hover { background: var(--bg-hover); color: var(--text); }
.nav-link.active { background: var(--bg-elevated); color: var(--text); border-left-color: var(--accent); }
.nav-link.active .icon { color: var(--accent); }

.genre-chip-list { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.genre-chip { display: flex; align-items: center; gap: 10px; padding: 7px 12px; border-radius: var(--radius-sm); font-size: 13.5px; color: var(--text-dim); }
.genre-chip:hover { color: var(--text); }
.genre-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

.sidebar-footer { margin-top: auto; }

.main-col { display: flex; flex-direction: column; min-height: 100vh; }

/* ---- Topbar ---- */
.topbar {
  height: var(--topbar-h);
  display: flex; align-items: center; gap: 16px;
  padding: 0 28px;
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
}
.topbar.scrolled { border-bottom-color: var(--border); }

.nav-arrows { display: flex; gap: 8px; }
.icon-btn {
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--bg-elevated); border: none; color: var(--text);
  transition: transform .15s var(--ease), background .15s;
}
.icon-btn:hover { background: var(--bg-hover); transform: scale(1.03); }

.search-shell { position: relative; flex: 1; max-width: 420px; }
.search-input {
  width: 100%; padding: 11px 16px 11px 42px;
  background: var(--bg-elevated); border: 1px solid transparent;
  border-radius: var(--radius-pill); color: var(--text); font-size: 14px;
  transition: border-color .2s, background .2s;
}
.search-input:focus { border-color: var(--accent); outline: none; background: var(--bg-raised); }
.search-shell .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-faint); }
.search-clear { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); background: none; border: none; color: var(--text-faint); display: none; }

.search-suggest {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0;
  background: var(--bg-raised); border: 1px solid var(--border);
  border-radius: var(--radius-md); box-shadow: var(--shadow-lg);
  overflow: hidden; z-index: 60; display: none;
}
.search-suggest.open { display: block; }
.suggest-item { display: flex; align-items: center; gap: 12px; padding: 10px 14px; }
.suggest-item:hover { background: var(--bg-hover); }
.suggest-thumb { width: 36px; height: 36px; border-radius: var(--radius-sm); object-fit: cover; background: var(--bg-elevated); flex-shrink: 0; }
.suggest-meta { flex: 1; min-width: 0; }
.suggest-title { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.suggest-sub { font-size: 12px; color: var(--text-faint); }
.suggest-type { font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-faint); }

.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; position: relative; }

.theme-toggle {
  width: 52px; height: 30px; border-radius: var(--radius-pill);
  background: var(--bg-elevated); border: 1px solid var(--border);
  position: relative; padding: 3px; flex-shrink: 0;
}
.theme-toggle-thumb { width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; transition: transform .3s var(--ease); }
.theme-toggle-thumb .icon { width: 13px; height: 13px; }
[data-theme="light"] .theme-toggle-thumb { transform: translateX(22px); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px; border-radius: var(--radius-pill); border: none;
  font-weight: 700; font-size: 14px; font-family: var(--font-display);
  transition: transform .15s var(--ease), background .15s, box-shadow .15s;
  white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--gradient-accent); color: #fff; box-shadow: 0 8px 20px -8px rgba(255,61,110,.55); }
.btn-primary:hover { box-shadow: 0 10px 24px -6px rgba(255,61,110,.7); }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--text-dim); }
.btn-ghost { background: var(--bg-elevated); color: var(--text); }
.btn-ghost:hover { background: var(--bg-hover); }
.btn-sm { padding: 7px 14px; font-size: 12.5px; }
.btn-block { width: 100%; }
.btn-danger { background: #E5484D; color: #fff; }

.avatar { border-radius: 50%; object-fit: cover; background: var(--bg-elevated); }

.ad-slot { max-width: 100%; overflow: hidden; text-align: center; }
.ad-slot-header { padding: 10px 20px; background: var(--bg-elevated); border-bottom: 1px solid var(--border); }
.ad-slot-sidebar { padding: 12px; background: var(--bg-elevated); border-radius: var(--radius-sm); margin-top: 10px; }
.ad-slot-infeed { padding: 16px; background: var(--bg-elevated); border-radius: var(--radius-md); margin: 32px 0; }

.account-toggle { border: none; background: none; padding: 0; display: flex; border-radius: 50%; flex-shrink: 0; }

.account-menu {
  position: absolute; top: calc(100% + 10px); right: 20px; width: 240px;
  background: var(--bg-raised); border: 1px solid var(--border); border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg); z-index: 100; overflow: hidden; display: none;
}
.account-menu.open { display: block; }
.account-menu-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.account-menu-name { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.account-menu-sub { font-size: 12px; color: var(--text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.account-menu-link {
  display: flex; align-items: center; gap: 10px; padding: 11px 16px;
  font-size: 13.5px; font-weight: 600; color: var(--text);
}
.account-menu-link:hover { background: var(--bg-hover); }
.account-menu-link.danger { color: #E5484D; border-top: 1px solid var(--border); }

/* ---- Content area ---- */
.content { padding: 8px 28px 140px; flex: 1; }
.content-narrow { max-width: 720px; margin: 0 auto; padding: 32px 24px 140px; }

/* ---- Hero (featured, "under the spotlight") ---- */
.hero {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  padding: 40px;
  margin: 16px 0 36px;
  background: var(--bg-raised);
  isolation: isolate;
}
.hero::before {
  content: ''; position: absolute; inset: 0; background: var(--gradient-stage);
  z-index: -1;
}
.hero-grid { display: grid; grid-template-columns: 220px 1fr; gap: 36px; align-items: center; }
.hero-grid-compact { grid-template-columns: 200px 1fr; }
.hero-art-wrap { position: relative; width: 220px; height: 220px; }
.hero-art-wrap-compact { width: 200px; height: 200px; }
.hero-art {
  width: 220px; height: 220px; border-radius: var(--radius-md);
  object-fit: cover; box-shadow: var(--shadow-lg); position: relative; z-index: 2;
}
.hero-art-compact { width: 200px; height: 200px; }
.hero-art-glow {
  position: absolute; inset: -18px; border-radius: var(--radius-lg);
  background: var(--gradient-accent); filter: blur(32px);
  animation: pulse-glow 4.2s ease-in-out infinite;
  z-index: 1;
}
@keyframes pulse-glow {
  0%, 100% { opacity: .28; transform: scale(.98); }
  50% { opacity: .48; transform: scale(1.02); }
}
.hero-eyebrow { font-size: 13px; color: var(--amber); font-weight: 700; margin-bottom: 10px; }
.hero-title { font-size: 40px; font-weight: 800; line-height: 1.05; margin-bottom: 10px; }
.hero-sub { color: var(--text-dim); font-size: 15px; margin-bottom: 20px; max-width: 46ch; }
.hero-actions { display: flex; align-items: center; gap: 14px; }
.hero-play-btn {
  width: 56px; height: 56px; border-radius: 50%; background: var(--gradient-accent);
  color: #fff; display: grid; place-items: center; border: none; flex-shrink: 0;
  box-shadow: 0 10px 26px -8px rgba(255,61,110,.6);
}
.hero-play-btn .icon { width: 24px; height: 24px; }
.hero-play-btn:hover { transform: scale(1.03); }

.hero-wave { display: flex; align-items: flex-end; gap: 3px; height: 24px; }
.hero-wave span { width: 3px; background: var(--accent); border-radius: 2px; animation: wave-bounce 1.1s ease-in-out infinite; }

@keyframes wave-bounce {
  0%, 100% { height: 4px; }
  50% { height: 22px; }
}

/* ---- Section headers ---- */
.section { margin-bottom: 40px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 16px; }
.section-title { font-size: 21px; font-weight: 700; }
.section-link { font-size: 13px; font-weight: 700; color: var(--text-dim); display: flex; align-items: center; gap: 4px; }
.section-link:hover { color: var(--text); }

.rail { display: flex; gap: 18px; overflow-x: auto; padding-bottom: 6px; scroll-behavior: smooth; }
.rail::-webkit-scrollbar { height: 6px; }
.rail::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

.genre-rail { display: grid; grid-auto-flow: column; grid-auto-columns: 168px; gap: 16px; overflow-x: auto; padding-bottom: 6px; }
.genre-card {
  height: 92px; border-radius: var(--radius-md); position: relative; overflow: hidden;
  display: flex; align-items: flex-end; padding: 14px; font-weight: 700; font-size: 15px;
  color: #fff; isolation: isolate;
}
.genre-card::before { content:''; position:absolute; inset:0; z-index:-1; opacity: .88; }
.genre-card::after { content:''; position:absolute; inset:0; z-index:-1; background: linear-gradient(180deg, transparent 30%, rgba(0,0,0,.45)); }

/* ---- Cards ---- */
.song-card {
  display: block; width: 172px; flex-shrink: 0; padding: 12px; border-radius: var(--radius-md);
  background: var(--bg-raised); border: 1px solid transparent; transition: background .2s var(--ease), border-color .2s var(--ease);
  position: relative;
}
.song-card:hover { background: var(--bg-elevated); border-color: var(--border); }
.song-card-art-wrap { position: relative; margin-bottom: 12px; }
.song-card-art { width: 100%; aspect-ratio: 1; border-radius: var(--radius-sm); object-fit: cover; background: var(--bg-elevated); }
.song-card-play {
  position: absolute; right: 8px; bottom: 8px; width: 40px; height: 40px; border-radius: 50%;
  background: var(--gradient-accent); color: #fff; display: grid; place-items: center; border: none;
  opacity: 0; transform: translateY(6px); transition: opacity .2s var(--ease), transform .2s var(--ease);
  box-shadow: 0 8px 18px -6px rgba(0,0,0,.5);
}
.song-card:hover .song-card-play { opacity: 1; transform: translateY(0); }
.song-card-title { font-weight: 700; font-size: 14px; margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.song-card-artist { font-size: 12.5px; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trend-badge {
  position: absolute; top: 8px; left: 8px; display: flex; align-items: center; gap: 4px;
  background: rgba(14,11,20,.72); backdrop-filter: blur(6px); color: var(--mint);
  padding: 4px 8px; border-radius: var(--radius-pill); font-size: 10.5px; font-weight: 700;
}
.trend-badge .icon { width: 12px; height: 12px; }

.artist-card { display: block; width: 148px; flex-shrink: 0; text-align: center; padding: 14px 10px; border-radius: var(--radius-md); }
.artist-card:hover { background: var(--bg-raised); }
.artist-card-avatar { width: 108px; height: 108px; border-radius: 50%; margin: 0 auto 12px; object-fit: cover; background: var(--bg-elevated); }
.artist-card-name { font-weight: 700; font-size: 14px; display: flex; align-items: center; justify-content: center; gap: 5px; }
.artist-card-role { font-size: 12px; color: var(--text-faint); margin-top: 2px; }

.album-card { display: block; width: 184px; flex-shrink: 0; padding: 12px; border-radius: var(--radius-md); }
.album-card:hover { background: var(--bg-raised); }
.album-stack { position: relative; margin-bottom: 12px; }
.album-stack::before, .album-stack::after {
  content: ''; position: absolute; inset: 0; background: var(--bg-elevated);
  border-radius: var(--radius-sm); z-index: -1;
}
.album-stack::before { transform: translate(4px, 4px); opacity: .6; }
.album-stack::after { transform: translate(8px, 8px); opacity: .35; }
.album-art { width: 100%; aspect-ratio: 1; border-radius: var(--radius-sm); object-fit: cover; background: var(--bg-elevated); position: relative; z-index: 1; }

.verified-badge { color: var(--verified-color); width: 15px; height: 15px; flex-shrink: 0; }

/* ---- Skeleton loading (initial "curtain rising" animation) ---- */
.skeleton { position: relative; overflow: hidden; background: var(--bg-elevated); border-radius: var(--radius-sm); }
.skeleton::after {
  content: ''; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.08), transparent);
  animation: shimmer 1.5s infinite;
}
[data-theme="light"] .skeleton::after { background: linear-gradient(90deg, transparent, rgba(0,0,0,.05), transparent); }
@keyframes shimmer { 100% { transform: translateX(100%); } }

#load-curtain {
  position: fixed; inset: 0; z-index: 999; background: var(--bg);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  transition: opacity .5s var(--ease), visibility .5s;
}
#load-curtain.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-logo { display: flex; align-items: center; gap: 10px; }
.loader-bars { display: flex; align-items: flex-end; gap: 5px; height: 34px; }
.loader-bars span {
  width: 5px; border-radius: 3px; background: var(--gradient-accent);
  animation: loader-bounce 1s ease-in-out infinite;
}
.loader-bars span:nth-child(1) { animation-delay: 0s; }
.loader-bars span:nth-child(2) { animation-delay: .12s; }
.loader-bars span:nth-child(3) { animation-delay: .24s; }
.loader-bars span:nth-child(4) { animation-delay: .36s; }
.loader-bars span:nth-child(5) { animation-delay: .48s; }
@keyframes loader-bounce { 0%, 100% { height: 8px; } 50% { height: 34px; } }
.loader-text { font-family: var(--font-display); font-weight: 700; font-size: 14px; color: var(--text-dim); letter-spacing: .02em; }

/* ---- Player bar ---- */
.player-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 80;
  height: var(--player-h); background: var(--bg-raised); border-top: 1px solid var(--border);
  display: grid; grid-template-columns: 280px 1fr 280px; align-items: center; gap: 20px;
  padding: 0 20px;
  transform: translateY(0); transition: transform .3s var(--ease);
}
.player-bar.is-empty { transform: translateY(100%); }

.player-track { display: flex; align-items: center; gap: 12px; min-width: 0; }
.player-art-wrap { position: relative; width: 52px; height: 52px; flex-shrink: 0; }
.player-art { width: 52px; height: 52px; border-radius: var(--radius-sm); object-fit: cover; background: var(--bg-elevated); }
.player-art-glow { position: absolute; inset: -8px; border-radius: var(--radius-md); background: var(--gradient-accent); filter: blur(16px); z-index: -1; animation: pulse-glow 4.2s ease-in-out infinite; }
.player-meta { min-width: 0; }
.player-title { font-size: 13.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-artist { font-size: 12px; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-side-actions { display: flex; align-items: center; gap: 14px; color: var(--text-dim); flex-shrink: 0; }
.player-side-actions button { background: none; border: none; color: inherit; display: flex; }
.player-side-actions .active { color: var(--accent); }

.player-center { display: flex; flex-direction: column; align-items: center; gap: 8px; max-width: 640px; margin: 0 auto; width: 100%; }
.player-controls { display: flex; align-items: center; gap: 20px; }
.player-controls button { background: none; border: none; color: var(--text-dim); display: flex; }
.player-controls button:hover { color: var(--text); }
.player-play-btn {
  width: 38px; height: 38px; border-radius: 50%; background: var(--text) !important;
  color: var(--bg) !important; display: grid; place-items: center;
}
.player-play-btn:hover { transform: scale(1.03); }
.player-toggle.active { color: var(--accent) !important; }

.player-progress { display: flex; align-items: center; gap: 10px; width: 100%; }
.player-time { font-size: 11px; color: var(--text-faint); width: 34px; flex-shrink: 0; font-variant-numeric: tabular-nums; }
.player-time.end { text-align: right; }
.waveform-track { flex: 1; height: 28px; position: relative; cursor: pointer; }
.waveform-bars { display: flex; align-items: center; gap: 2px; height: 100%; width: 100%; }
.waveform-bars span { flex: 1; background: var(--border); border-radius: 2px; min-width: 2px; transition: background .1s; }
.waveform-bars span.played { background: var(--accent); }

.player-right { display: flex; align-items: center; justify-content: flex-end; gap: 14px; color: var(--text-dim); }
.volume-shell { display: flex; align-items: center; gap: 8px; width: 110px; }
.volume-track { flex: 1; height: 4px; background: var(--border); border-radius: 2px; position: relative; cursor: pointer; }
.volume-fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--text); border-radius: 2px; }

/* ---- Lyrics panel ---- */
.lyrics-panel {
  position: fixed; right: 20px; bottom: calc(var(--player-h) + 20px); width: 340px; max-height: 60vh;
  background: var(--bg-raised); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); z-index: 70; overflow: hidden; display: none; flex-direction: column;
}
.lyrics-panel.open { display: flex; }
.lyrics-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--border); }
.lyrics-head-title { font-weight: 700; font-family: var(--font-display); font-size: 14px; }
.lyrics-body { padding: 18px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.lyrics-line { color: var(--text-faint); font-size: 15px; font-weight: 600; transition: color .25s, transform .25s; transform-origin: left; }
.lyrics-line.current { color: var(--text); font-size: 17px; transform: scale(1.03); }
.lyrics-line.current .lyrics-accent { color: var(--accent); }

/* ---- Badges / pills ---- */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: var(--radius-pill); font-size: 12px; font-weight: 700; background: var(--bg-elevated); color: var(--text-dim); }
.pill-live { background: rgba(255,61,110,.15); color: var(--accent); }
.pill-mint { background: rgba(61,220,151,.15); color: var(--mint); }
.pill-amber { background: rgba(255,184,77,.18); color: var(--amber); }

/* ---- Forms ---- */
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 7px; color: var(--text-dim); }
.field input[type=text], .field input[type=email], .field input[type=password], .field input[type=file],
.field textarea, .field select {
  width: 100%; padding: 12px 14px; background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text); font-size: 14px;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--accent); }
.field-hint { font-size: 12px; color: var(--text-faint); margin-top: 6px; }
.auth-card { max-width: 420px; margin: 60px auto; background: var(--bg-raised); border-radius: var(--radius-lg); padding: 40px; box-shadow: var(--shadow-card); }
.auth-card h1 { font-size: 24px; margin-bottom: 6px; }
.auth-card .sub { color: var(--text-dim); font-size: 14px; margin-bottom: 28px; }

/* ---- Rich text editor toolbar (upload pages) ---- */
.editor-shell { border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.editor-toolbar { display: flex; gap: 4px; padding: 8px; background: var(--bg-elevated); border-bottom: 1px solid var(--border); }
.editor-toolbar button { width: 30px; height: 30px; border-radius: var(--radius-sm); background: none; border: none; color: var(--text-dim); font-weight: 700; font-size: 13px; }
.editor-toolbar button:hover { background: var(--bg-hover); color: var(--text); }
.editor-area { min-height: 140px; padding: 14px; background: var(--bg-raised); font-size: 14px; }
.editor-area:focus { outline: none; }

/* ---- Tables (admin) ---- */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-faint); padding: 10px 14px; border-bottom: 1px solid var(--border); }
.data-table td { padding: 14px; border-bottom: 1px solid var(--border); font-size: 14px; }
.data-table tr:hover td { background: var(--bg-elevated); }

.stat-card { background: var(--bg-raised); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 20px; }
.stat-card .stat-value { font-family: var(--font-display); font-size: 28px; font-weight: 800; }
.stat-card .stat-label { color: var(--text-dim); font-size: 13px; margin-top: 4px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 32px; }

.doc-preview-card { display: flex; align-items: center; gap: 12px; padding: 14px; background: var(--bg-elevated); border-radius: var(--radius-sm); border: 1px solid var(--border); }

/* ---- Admin nav ---- */
.admin-topbar { gap: 20px; }
.admin-hamburger { display: none; }
.admin-nav { display: flex; align-items: center; gap: 2px; overflow-x: auto; flex: 1; }
.admin-nav .nav-link { padding: 8px 12px; white-space: nowrap; flex-shrink: 0; }
.admin-name-label { white-space: nowrap; }

.admin-drawer-backdrop {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 150;
}
.admin-drawer-backdrop.open { display: block; }
.admin-drawer {
  position: fixed; top: 0; left: 0; bottom: 0; width: 264px; background: var(--bg-raised);
  border-right: 1px solid var(--border); z-index: 160; transform: translateX(-100%);
  transition: transform .25s var(--ease); display: flex; flex-direction: column; padding: 8px;
  overflow-y: auto;
}
.admin-drawer.open { transform: translateX(0); }
.admin-drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 12px; }
.admin-drawer-link {
  display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: var(--radius-md);
  font-weight: 600; font-size: 14px; color: var(--text-dim);
}
.admin-drawer-link:hover, .admin-drawer-link.active { background: var(--bg-elevated); color: var(--text); }

@media (max-width: 860px) {
  .admin-hamburger { display: flex; }
  .admin-nav { display: none; }
  .admin-name-label { display: none; }
}

/* ---- Mobile bottom nav (mobile only) ---- */
.mobile-nav {
  display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  height: var(--mobile-nav-h); background: var(--bg-raised); border-top: 1px solid var(--border);
  align-items: center; justify-content: space-around;
}
.mobile-nav-link { display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--text-faint); font-size: 10.5px; font-weight: 700; }
.mobile-nav-link.active { color: var(--accent); }
.mobile-nav-link .icon { width: 22px; height: 22px; }

.mobile-topbar { display: none; }

/* ---- Responsive ---- */
@media (max-width: 980px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero-art-wrap { margin: 0 auto; }
  .hero-actions { justify-content: center; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  :root { --player-h: 64px; }
  .topbar { padding: 0 12px; height: 60px; gap: 10px; }
  .nav-arrows { display: none; }
  .content { padding: 8px 16px 190px; }
  .mobile-nav { display: flex; }
  .player-bar { grid-template-columns: 1fr auto; height: var(--player-h); bottom: var(--mobile-nav-h); padding: 8px 12px; }
  .player-center { display: none; }
  .player-right { display: none; }
  .player-side-actions { display: none; }
  .player-track { flex: 1; }
  .mobile-mini-controls { display: flex !important; align-items: center; gap: 4px; }
  .lyrics-panel { left: 12px; right: 12px; width: auto; bottom: calc(var(--player-h) + var(--mobile-nav-h) + 12px); }
  .hero { padding: 24px; }
  .hero-title { font-size: 28px; }
  .hero-art, .hero-art-wrap { width: 160px; height: 160px; }
  .auth-card { margin: 24px auto; padding: 28px 22px; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .search-shell { max-width: none; }
}

.mobile-mini-controls { display: none; }

/* ---- Utility ---- */
.flex { display: flex; }
.items-center { align-items: center; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.text-dim { color: var(--text-dim); }
.text-faint { color: var(--text-faint); }
.mt-0 { margin-top: 0; }
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-dim); }
.empty-state .icon { width: 40px; height: 40px; margin: 0 auto 14px; color: var(--text-faint); }

.site-footer { padding: 32px 28px 160px; border-top: 1px solid var(--border); margin-top: 20px; }
.site-footer-links { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 14px; }
.site-footer-links a { font-size: 13px; color: var(--text-dim); font-weight: 600; }
.site-footer-links a:hover { color: var(--text); }
.site-footer-copy { font-size: 12px; color: var(--text-faint); }
@media (max-width: 640px) { .site-footer { padding: 28px 16px 200px; } }
