@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,400;0,500;0,600;0,700;0,800;1,500&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  --bg: #0a0912;
  --card: #161320;
  --card-hover: #1c1829;
  --violet: #241b3d;
  --border: rgba(255,255,255,0.08);
  --border-strong: rgba(255,255,255,0.14);
  --primary: #6935FF;
  --primary-fg: #ffffff;
  --secondary: #c1512f;
  --destructive: #ff6b52;
  --fg: #f6f1e6;
  --muted-fg: #9891a8;
  --select-bg: rgba(25,102,185,0.39);
  --coral-accent: #ee6464;
  --num-gray: #c5c5c5;
  --cream: #f0e6cf;
  --radius-lg: 18px;
  --radius: 14px;
  --radius-sm: 9px;

  /* Legacy aliases — many pages still reference the old variable names
     in inline styles; keep these mapped so nothing silently breaks. */
  --base: var(--bg);
  --panel: var(--card);
  --panel2: var(--card-hover);
  --line: var(--border);
  --amber: var(--primary);
  --gold: var(--primary);
  --rust: var(--secondary);
  --coral: var(--destructive);
  --ink: var(--fg);
  --mute: var(--muted-fg);
}

* { box-sizing: border-box; min-width: 0; } /* min-width:0 prevents grid/flex children from refusing to shrink below content width — the root cause of the text-overflow bug */

html { overflow-x: hidden; }
/* Note: overflow-x is intentionally NOT set on body — doing so breaks
   position:sticky on the header in most browsers. html's overflow-x
   alone is enough of a safety net against horizontal scroll, alongside
   the min-width:0 reset above which is the actual fix for the original bug. */

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: 'Montserrat', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

p { overflow-wrap: break-word; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { max-width: 1220px; margin: 0 auto; padding: 0 24px; width: 100%; }
@media (max-width: 480px) { .container { padding: 0 16px; } }

.display { font-family: 'Montserrat', sans-serif; font-weight: 700; }
.display em { font-style: italic; font-weight: 500; color: var(--coral-accent); }
.readout {
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.03em;
  font-variant-numeric: tabular-nums;
}

/* ============ SIGNATURE: groove line (recurring waveform divider/accent) ============ */
.groove { display: flex; align-items: center; gap: 2px; height: 14px; opacity: 0.55; }
.groove span { flex: 1; background: var(--cream); border-radius: 2px; min-width: 2px; }

/* ============ Nav ============ */
.navbar {
  position: sticky; top: 0; z-index: 30;
  background: rgba(10,9,18,0.85); backdrop-filter: blur(12px) saturate(140%);
  border-bottom: 1px solid var(--border);
}
.navbar .container { height: 92px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.logo { display: flex; align-items: center; height: 100%; }
.logo-img { height: 72px; width: auto; display: block; transition: opacity .15s ease, transform .15s ease; }
.logo-img:hover { opacity: 0.88; transform: scale(1.02); }
.nav-links { display: flex; gap: 28px; font-size: 14.5px; color: #ffffff; }
.nav-links a { transition: opacity .15s ease; }
.nav-links a:hover { opacity: 0.75; }

.navbar .btn-ghost { color: #ffffff; }
.navbar .btn-ghost:hover { color: #ffffff; opacity: 0.8; }

.nav-actions { display: flex; align-items: center; gap: 16px; }
.currency-form select { background: var(--card-hover); border: 1px solid var(--border); color: var(--muted-fg); border-radius: 999px; padding: 6px 10px; font-size: 13px; }
.cart-link { color: #ffffff; }
.nav-burger { display: none; background: none; border: none; color: #fff; cursor: pointer; padding: 6px; }
.mobile-menu { display: none; flex-direction: column; gap: 4px; padding: 16px 24px 20px; border-top: 1px solid var(--border); }
.mobile-menu.open { display: flex; }
.mobile-menu a:not(.btn) { padding: 10px 4px; color: var(--fg); font-size: 15px; border-bottom: 1px solid var(--border); }
.mobile-menu a.btn { display: block; }

@media (max-width: 860px) {
  .nav-links, .nav-actions { display: none; }
  .nav-burger { display: block; }
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 20px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600; cursor: pointer; border: 1px solid transparent;
  transition: transform .12s ease, filter .12s ease, background .12s ease, border-color .12s ease;
  line-height: 1;
}
.btn:active { transform: scale(0.98); }
.btn-amber { background: var(--primary); color: var(--primary-fg); }
.btn-amber:hover { filter: brightness(1.08); }
.btn-ghost { color: var(--muted-fg); background: var(--card); border-color: var(--border); }
.btn-ghost:hover { color: var(--fg); border-color: var(--border-strong); background: var(--card-hover); }
.btn-outline { background: transparent; border-color: var(--border-strong); color: var(--fg); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-white { background: #ffffff; color: #100d18; }
.btn-white:hover { filter: brightness(0.95); }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-icon { width: 38px; height: 38px; padding: 0; border-radius: 999px; }

/* ============ Hero ============ */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--border); }
.hero-video-bg { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.5; }
.hero-video-overlay {
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(180deg, rgba(10,9,18,0.55) 0%, rgba(10,9,18,0.88) 65%, var(--bg) 100%),
    radial-gradient(ellipse 70% 60% at 20% 20%, rgba(240,230,207,0.14), transparent);
}
.hero-grid {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: 1.15fr 1fr; gap: 48px; align-items: center;
  padding: 72px 0;
}
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; padding: 48px 0; } }
.hero p.eyebrow { color: var(--coral-accent); font-size: 13px; letter-spacing: 0.08em; font-weight: 600; text-transform: uppercase; margin: 0; }
.hero h1 { font-size: clamp(34px, 4.6vw, 58px); line-height: 1.06; margin: 16px 0; font-weight: 600; }
.hero p.sub { color: var(--muted-fg); max-width: 460px; font-size: 16.5px; line-height: 1.6; margin: 0; }
.search-bar {
  display: flex; gap: 8px; margin-top: 28px; max-width: 100%; flex-wrap: wrap;
  background: var(--card); border: 1px solid var(--border); border-radius: 999px; padding: 6px;
}
.search-bar input { flex: 1; min-width: 120px; background: transparent; border: none; outline: none; color: var(--fg); padding: 12px 18px; font-size: 15px; }
.search-bar select { background: var(--card-hover); border: none; color: var(--muted-fg); border-radius: 999px; padding: 0 14px; font-size: 13px; }

@media (max-width: 520px) {
  .search-bar { flex-direction: column; border-radius: 18px; padding: 10px; }
  .search-bar select { width: 100%; padding: 10px 14px; border-radius: 10px; }
  .search-bar input { width: 100%; min-width: 0; padding: 10px 14px; }
  .search-bar button { width: 100%; border-radius: 10px; }
}

/* The right-side visual: a real photo/video if the admin set one, or a
   generated fallback (radial glow + waveform ring) so the hero never
   looks like unfinished empty space before media is uploaded. */
.hero-visual {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  aspect-ratio: 4 / 5; background: var(--violet);
  border: 1px solid var(--border);
}
.hero-visual img, .hero-visual video { width: 100%; height: 100%; object-fit: cover; }
.hero-visual.fallback {
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(circle at 30% 25%, rgba(240,230,207,0.25), transparent 55%),
    radial-gradient(circle at 75% 75%, rgba(193,81,47,0.3), transparent 55%),
    var(--violet);
}
.hero-visual.fallback .ring { width: 62%; aspect-ratio: 1; border-radius: 999px; border: 1.5px solid rgba(246,241,230,0.18); display: flex; align-items: center; justify-content: center; }
.hero-visual.fallback .ring2 { width: 68%; height: 68%; border-radius: 999px; border: 1px solid rgba(246,241,230,0.12); display: flex; align-items: center; justify-content: center; }
.hero-visual.fallback .core { width: 34%; height: 34%; border-radius: 999px; background: var(--cream); }
@media (max-width: 900px) { .hero-visual { aspect-ratio: 16/9; } }

/* ============ Sections ============ */
section.block { padding: 56px 0; }
section.block.tight { padding: 40px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 24px; gap: 16px; flex-wrap: wrap; }
.section-head h2 { font-family: 'Montserrat', sans-serif; font-size: 28px; font-weight: 600; margin: 0; }
.section-head a { color: #ffffff; font-size: 13.5px; font-weight: 600; white-space: nowrap; }

.grid { display: grid; gap: 20px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .grid-4, .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid-4, .grid-3 { grid-template-columns: 1fr; } }

/* ============ Beat grid cards (BeatStars-style) ============ */
.beat-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 24px; }
@media (max-width: 1000px) { .beat-grid { grid-template-columns: repeat(3, minmax(0,1fr)); } }
@media (max-width: 720px) { .beat-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; } }
@media (max-width: 480px) {
  .bg-title { font-size: 14px; margin: 10px 0 3px; }
  .bg-tags { font-size: 12px; margin-bottom: 10px; }
  .bg-buy { padding: 10px; font-size: 13px; gap: 6px; }
  .bg-buy svg { width: 14px; height: 14px; }
}

.bg-card { display: flex; flex-direction: column; min-width: 0; }
.bg-art { position: relative; aspect-ratio: 1; border-radius: var(--radius); overflow: hidden; background: var(--violet); cursor: pointer; }
.bg-art img { width: 100%; height: 100%; object-fit: cover; }
.bg-art .waveform { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 0 20%; color: var(--muted-fg); }
.bg-art .row-play {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(10,9,18,0.35); border: none; color: #fff; font-size: 20px; cursor: pointer;
  opacity: 0; transition: opacity .15s ease;
}
.bg-art:hover .row-play, .bg-art .row-play.playing { opacity: 1; }
.bg-title { margin: 14px 0 4px; font-size: 16px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bg-tags { display: flex; justify-content: space-between; font-size: 13.5px; color: var(--muted-fg); margin-bottom: 14px; }
.bg-buy {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 13px; border-radius: var(--radius-sm); border: none; cursor: pointer;
  background: var(--primary); color: #fff; font-size: 15px; font-weight: 700;
  transition: filter .12s ease, transform .12s ease;
}
.bg-buy:hover { filter: brightness(1.1); }
.bg-buy:active { transform: scale(0.98); }
.bg-share { display: flex; justify-content: center; margin-top: 10px; }
.bg-share button { background: none; border: none; color: var(--cream); cursor: pointer; padding: 4px; opacity: 0.85; }
.bg-share button:hover { opacity: 1; }
.beat-rows { display: flex; flex-direction: column; }
.beat-row {
  display: grid; grid-template-columns: 56px 1fr auto auto auto; align-items: center; gap: 18px;
  padding: 14px 12px; border-bottom: 1px solid var(--border); transition: background .15s ease, border-radius .15s ease;
}
.beat-row:hover { background: var(--card); border-radius: var(--radius); }
.beat-row-art { width: 56px; height: 56px; border-radius: 10px; background: var(--violet); position: relative; overflow: hidden; flex-shrink: 0; cursor: pointer; }
.beat-row-art img { width: 100%; height: 100%; object-fit: cover; }
.beat-row-art .row-play {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(10,9,18,0.4); color: var(--fg); font-size: 14px; border: none; cursor: pointer;
  opacity: 0; transition: opacity .15s ease;
}
.beat-row-art:hover .row-play { opacity: 1; }
.beat-row-art .row-play.playing { opacity: 1; background: rgba(240,230,207,0.3); }
.beat-row-info h3 { margin: 0; font-size: 15.5px; font-weight: 600; }
.beat-row-info p { margin: 2px 0 0; color: var(--muted-fg); font-size: 13px; }
.beat-row-tags { display: none; gap: 8px; }
.beat-row-meta { color: var(--muted-fg); font-size: 12.5px; text-align: right; white-space: nowrap; }
.beat-row-price { font-size: 15px; color: var(--fg); white-space: nowrap; }
@media (min-width: 720px) { .beat-row-tags { display: flex; } }
@media (max-width: 640px) { .beat-row { grid-template-columns: 48px 1fr auto; } .beat-row-meta { display: none; } }

/* ============ Badges / chips ============ */
.chip { display: inline-flex; align-items: center; padding: 5px 13px; border-radius: 999px; border: 1px solid var(--border); font-size: 12.5px; color: var(--muted-fg); background: var(--card); }
.chip.active { background: var(--select-bg); color: #fff; border-color: var(--select-bg); }
.badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 6px; font-size: 11.5px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; }
.badge-basic { background: rgba(156,145,168,0.15); color: var(--muted-fg); }
.badge-premium { background: rgba(240,230,207,0.18); color: var(--cream); }
.badge-exclusive { background: rgba(193,81,47,0.18); color: #ff9270; }

/* ============ Cards ============ */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px; display: flex; flex-direction: column; gap: 10px; transition: border-color .15s ease, transform .15s ease; }
.card:hover { border-color: var(--border-strong); }
.card-art { aspect-ratio: 1; background: var(--violet); border-radius: var(--radius); position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden; cursor: pointer; }
.card-art .play-btn { position: absolute; bottom: 10px; right: 10px; width: 38px; height: 38px; border-radius: 999px; background: var(--cream); color: #100d18; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 14px; }
.card-art .play-btn.playing { background: var(--secondary); }
.card h3 { margin: 0; font-size: 15px; }
.card p.producer { margin: 0; color: var(--muted-fg); font-size: 13px; }
.card .meta { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted-fg); }
.card .price { color: var(--fg); }

/* ============ License pricing cards ============ */
.license-cards { display: flex; flex-direction: column; gap: 12px; }
.license-card {
  position: relative; text-align: left; width: 100%; border-radius: var(--radius); border: 1.5px solid var(--border);
  background: var(--card); padding: 16px 18px; cursor: pointer; transition: border-color .15s ease, background .15s ease;
  color: var(--fg); /* buttons don't auto-inherit text color like other elements — without this, unselected cards fall back to a dim browser default */
}
.license-card:hover { border-color: var(--border-strong); }
.license-card.selected { border-color: rgb(25,102,185); background: var(--select-bg); }
.license-card.selected .lc-name, .license-card.selected .lc-price, .license-card.selected .lc-terms { color: #fff; }
.license-card.selected .lc-radio { border-color: #fff; }
.license-card.selected .lc-radio::after { content: ''; position: absolute; inset: 3px; border-radius: 999px; background: #fff; }
.license-card .lc-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.license-card .lc-name { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 14.5px; }
.license-card .lc-radio { width: 18px; height: 18px; border-radius: 999px; border: 2px solid var(--border-strong); flex-shrink: 0; position: relative; }
.license-card .lc-price { font-family: 'JetBrains Mono', monospace; font-size: 16px; font-weight: 600; }
.license-card .lc-terms { color: var(--muted-fg); font-size: 13px; margin: 8px 0 0 28px; line-height: 1.5; }

/* ============ Filter bar (horizontal, BeatStars-style) ============ */
.filter-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 12px 0; margin-bottom: 28px; border-bottom: 1px solid var(--border);
}
.filter-bar .fb-group { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; flex: 1; min-width: 0; }
.fb-pill {
  position: relative; display: flex; align-items: center; flex-shrink: 0;
  background: var(--card); border: 1px solid var(--border); border-radius: 999px;
  transition: border-color .15s ease, background .15s ease;
}
.fb-pill:hover { border-color: var(--border-strong); background: var(--card-hover); }
.fb-pill:has(select:focus-visible), .fb-pill:has(input:focus-visible) { border-color: var(--primary); }
.fb-pill.active { border-color: var(--primary); background: var(--select-bg); }
.fb-pill select {
  appearance: none; -webkit-appearance: none; background: transparent; border: none; outline: none;
  color: var(--fg); font-size: 13.5px; font-weight: 500; padding: 10px 30px 10px 16px;
  cursor: pointer; max-width: 160px; flex-shrink: 0; white-space: nowrap;
}
.fb-pill.active select { color: #fff; }
.fb-pill::after {
  content: ''; position: absolute; right: 14px; top: 50%; width: 8px; height: 8px;
  border-right: 1.5px solid var(--muted-fg); border-bottom: 1.5px solid var(--muted-fg);
  transform: translateY(-60%) rotate(45deg); pointer-events: none;
}
.fb-pill.active::after { border-color: #fff; }
.fb-pill.fb-range { padding: 4px 6px 4px 16px; gap: 6px; }
.fb-pill.fb-range::after { display: none; }
.fb-pill.fb-range span { font-size: 12px; color: var(--muted-fg); }
.fb-pill.fb-range input {
  width: 58px; background: transparent; border: none; outline: none; color: var(--fg);
  font-size: 13.5px; padding: 8px 4px; text-align: center; -moz-appearance: textfield;
}
.fb-pill.fb-range input::-webkit-outer-spin-button, .fb-pill.fb-range input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.fb-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.fb-icon-btn {
  display: flex; align-items: center; justify-content: center; width: 38px; height: 38px;
  border-radius: 999px; border: 1px solid var(--border); background: var(--card); color: var(--muted-fg);
  cursor: pointer; transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.fb-icon-btn:hover { color: var(--fg); border-color: var(--border-strong); }
.fb-icon-btn.active { color: #fff; border-color: var(--primary); background: var(--select-bg); }
.fb-view-toggle { display: flex; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; }
.fb-view-toggle a {
  display: flex; align-items: center; justify-content: center; width: 38px; height: 38px;
  color: var(--muted-fg); background: var(--card); transition: color .15s ease, background .15s ease;
}
.fb-view-toggle a.active { color: #fff; background: var(--select-bg); }
.fb-view-toggle a:hover:not(.active) { color: var(--fg); background: var(--card-hover); }
.fb-clear { font-size: 13px; color: var(--muted-fg); white-space: nowrap; padding: 8px 4px; }
.fb-clear:hover { color: var(--fg); }
@media (max-width: 800px) {
  .filter-bar { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 14px; -webkit-overflow-scrolling: touch; }
  .filter-bar::-webkit-scrollbar { height: 0; }
  /* flex:1 on .fb-group (desktop) forces it to compress to fit the row —
     fine when the row can wrap, but here the row is nowrap+scrollable, so
     the group needs its natural (summed) content width instead, or every
     pill gets squeezed toward zero width and the select text disappears
     (only the chevron pseudo-element, which doesn't need content space,
     survives) — that's the bug seen on mobile. */
  .filter-bar .fb-group { flex: 0 0 auto; flex-wrap: nowrap; }
  .fb-pill select { max-width: 130px; }
  .fb-actions { flex-shrink: 0; }
}

/* ============ Waveform (CSS bar-code) ============ */
.waveform { display: flex; align-items: flex-end; gap: 2px; height: 40px; }
.waveform span { flex: 1; background: currentColor; border-radius: 2px; opacity: .6; min-width: 1px; }

/* ============ How It Works ============ */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
@media (max-width: 800px) { .steps { grid-template-columns: 1fr; } }
.step { min-width: 0; }
.step .num { font-family: 'Montserrat', sans-serif; font-size: 38px; color: var(--num-gray); font-weight: 600; line-height: 1; }
.step h3 { font-size: 18px; margin: 14px 0 8px; }
.step p { color: var(--muted-fg); font-size: 14.5px; line-height: 1.65; margin: 0; }

/* ============ Trust bar ============ */
.trust-bar { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 800px) { .trust-bar { grid-template-columns: repeat(2, minmax(0,1fr)); } }
.trust-item { min-width: 0; text-align: center; padding: 22px 16px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.trust-item .icon { font-size: 24px; margin-bottom: 10px; }
.trust-item h4 { font-size: 14.5px; margin: 0 0 6px; }
.trust-item p { color: var(--muted-fg); font-size: 12.5px; margin: 0; line-height: 1.5; }

/* ============ Spotlight (image background CTA) ============ */
.spotlight { position: relative; border-radius: var(--radius-lg); overflow: hidden; padding: 56px 40px; background: var(--violet); min-height: 260px; display: flex; align-items: flex-end; }
.spotlight-overlay { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(10,9,18,0.92) 10%, rgba(10,9,18,0.25) 80%); }
.spotlight-media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.spotlight-content { position: relative; z-index: 2; max-width: 520px; }
.spotlight-content h2 { font-family: 'Montserrat', sans-serif; font-size: 28px; margin: 0 0 12px; }
.spotlight-content p { color: var(--muted-fg); margin: 0 0 20px; }

/* ============ Dashboard shell (responsive sidebar) ============ */
.dash { display: grid; grid-template-columns: 232px minmax(0,1fr); gap: 28px; align-items: start; }
.dash-nav { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 14px; position: sticky; top: 88px; }
.dash-nav a {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--radius-sm);
  color: var(--muted-fg); font-size: 14px; margin-bottom: 2px; border-left: 2px solid transparent;
  transition: background .12s ease, color .12s ease, border-color .12s ease;
}
.dash-nav a.active { background: var(--select-bg); color: #fff; border-left-color: rgb(25,102,185); font-weight: 600; }
.dash-nav a:hover:not(.active) { background: var(--card-hover); color: var(--fg); }
@media (max-width: 860px) {
  .dash { grid-template-columns: 1fr; }
  .dash-nav { position: static; display: flex; flex-wrap: wrap; gap: 4px; }
  .dash-nav a { flex: 1 1 auto; justify-content: center; }
}

.stat-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; }
.stat-card .value { font-size: 26px; font-family: 'JetBrains Mono', monospace; font-weight: 600; }
.stat-card .label { color: var(--muted-fg); font-size: 12.5px; margin-top: 4px; }

table.data { width: 100%; border-collapse: collapse; }
table.data th, table.data td { text-align: left; padding: 12px; border-bottom: 1px solid var(--border); font-size: 14px; }
table.data th { color: var(--muted-fg); font-weight: 500; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; }
table.data tr:hover td { background: var(--card); }

/* ============ Upload wizard ============ */
.wizard-steps { display: flex; gap: 8px; margin-bottom: 28px; flex-wrap: wrap; }
.wizard-step-tab {
  flex: 1; min-width: 120px; display: flex; align-items: center; gap: 10px; padding: 12px 16px;
  border-radius: var(--radius); border: 1px solid var(--border); background: var(--card);
  cursor: pointer; transition: border-color .15s ease, background .15s ease;
}
.wizard-step-tab .wn { width: 24px; height: 24px; border-radius: 999px; background: var(--bg); border: 1px solid var(--border-strong); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; color: var(--muted-fg); flex-shrink: 0; }
.wizard-step-tab.active { border-color: rgb(25,102,185); background: var(--select-bg); }
.wizard-step-tab.active .wn { background: rgb(25,102,185); color: #fff; border-color: rgb(25,102,185); }
.wizard-step-tab.active span.label { color: #fff; }
.wizard-step-tab.done .wn { background: rgba(240,230,207,0.25); color: var(--cream); border-color: var(--cream); }
.wizard-step-tab span.label { font-size: 13.5px; font-weight: 600; color: var(--fg); }
.wizard-panel { display: none; }
.wizard-panel.active { display: block; animation: fadeIn .2s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.wizard-nav { display: flex; justify-content: space-between; margin-top: 20px; }

/* ============ Now-playing bar ============ */
.now-playing-bar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
  background: rgba(16,13,24,0.92); backdrop-filter: blur(14px);
  border-top: 1px solid var(--border);
  display: none; align-items: center; gap: 16px;
  padding: 14px 20px 12px;
}
.now-playing-bar.visible { display: flex; }
.np-seek {
  position: absolute; top: -1px; left: 0; right: 0; width: 100%; height: 3px;
  -webkit-appearance: none; appearance: none; background: var(--border); cursor: pointer; margin: 0; z-index: 2;
}
.np-seek::-webkit-slider-thumb { -webkit-appearance: none; width: 11px; height: 11px; border-radius: 999px; background: var(--cream); margin-top: -4px; opacity: 0; transition: opacity .12s ease; }
.np-seek:hover::-webkit-slider-thumb, .np-seek:active::-webkit-slider-thumb { opacity: 1; }
.np-seek::-moz-range-thumb { width: 11px; height: 11px; border-radius: 999px; background: var(--cream); border: none; opacity: 0; }
.np-seek:hover::-moz-range-thumb { opacity: 1; }
.np-seek::-webkit-slider-runnable-track { height: 3px; background: linear-gradient(to right, var(--cream) 0%, var(--cream) var(--fill, 0%), var(--border) var(--fill, 0%)); }
.now-playing-art { width: 44px; height: 44px; border-radius: 8px; background: var(--violet); flex-shrink: 0; overflow: hidden; }
.now-playing-art img { width: 100%; height: 100%; object-fit: cover; }
.now-playing-info { min-width: 0; flex-shrink: 1; }
.now-playing-info .title { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.now-playing-info .artist { font-size: 12px; color: var(--muted-fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.now-playing-wave { flex: 1; height: 28px; color: var(--cream); display: none; }
@media (min-width: 640px) { .now-playing-wave { display: flex; } }
.now-playing-toggle { width: 36px; height: 36px; border-radius: 999px; background: var(--primary); color: var(--primary-fg); border: none; cursor: pointer; flex-shrink: 0; font-size: 13px; }

/* ============ Legal pages ============ */
.legal-content { max-width: 760px; margin: 0 auto; padding: 48px 0 80px; }
.legal-content h1 { font-family: 'Montserrat', sans-serif; font-size: clamp(28px, 4vw, 38px); margin-bottom: 8px; }
.legal-content .legal-updated { color: var(--muted-fg); font-size: 13px; margin-bottom: 40px; }
.legal-content h2 { font-family: 'Montserrat', sans-serif; font-size: 22px; margin: 40px 0 14px; padding-top: 8px; border-top: 1px solid var(--border); }
.legal-content h2:first-of-type { border-top: none; padding-top: 0; }
.legal-content p { color: var(--muted-fg); line-height: 1.75; font-size: 15.5px; margin: 0 0 14px; }
.legal-content ul { color: var(--muted-fg); line-height: 1.9; font-size: 15.5px; padding-left: 22px; margin: 0 0 14px; }
.legal-content strong { color: var(--fg); }
.legal-content a { color: var(--primary); }
.form-card { max-width: 420px; margin: 60px auto; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 32px; }
.form-card h1 { font-family: 'Montserrat', sans-serif; font-size: 26px; margin-top: 0; }

/* ============ Social sign-in ============ */
.oauth-buttons { display: flex; flex-direction: column; gap: 10px; margin: 20px 0 4px; }
.btn-oauth { width: 100%; gap: 10px; background: var(--card-hover); border-color: var(--border-strong); font-weight: 600; }
.btn-oauth:hover { border-color: #ffffff; background: var(--bg); }
.oauth-divider { display: flex; align-items: center; gap: 12px; margin: 22px 0; color: var(--muted-fg); font-size: 12.5px; }
.oauth-divider::before, .oauth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; color: var(--muted-fg); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 10px 14px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: var(--bg); color: var(--fg); font-size: 14px;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--primary); outline-offset: 1px; }
.alert { padding: 12px 16px; border-radius: var(--radius-sm); font-size: 14px; margin-bottom: 16px; }
.alert-error { background: rgba(255,107,82,0.12); color: var(--destructive); }
.alert-success { background: rgba(240,230,207,0.12); color: var(--cream); }

/* ============ Footer ============ */
footer { border-top: 1px solid var(--border); padding: 48px 0 90px; color: var(--muted-fg); font-size: 13px; }
.newsletter-form { display: flex; gap: 8px; max-width: 420px; flex-wrap: wrap; }
.newsletter-form input { flex: 1; min-width: 160px; padding: 10px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--card); color: var(--fg); }

/* ============ Motion ============ */
@keyframes pulse_bar { 0%, 100% { transform: scaleY(0.3); } 50% { transform: scaleY(1); } }
.animate-pulse_bar { animation: pulse_bar 1s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .animate-pulse_bar, .groove span { animation: none !important; } }

::selection { background: var(--primary); color: var(--primary-fg); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
