/* ═══════════════════════════════════════════════════
   LOCKTONE — Premium Tesla Lock Sound Gallery
   Rich warm gold palette · Tesla landscape optimized
═══════════════════════════════════════════════════ */

/* ── DESIGN TOKENS ─────────────────────────────── */
:root {
  /* Backgrounds – deep navy-black */
  --bg:           #08080e;
  --bg-1:         #0d0d16;
  --bg-2:         #12121e;
  --bg-3:         #1a1a28;

  /* Surfaces */
  --surface:      rgba(255,255,255,0.04);
  --surface-h:    rgba(255,255,255,0.07);
  --surface-2:    rgba(255,255,255,0.10);

  /* Borders */
  --border:       rgba(255,255,255,0.09);
  --border-h:     rgba(255,255,255,0.18);

  /* Gold accent – warm, rich */
  --gold:         #d4a84b;
  --gold-bright:  #f0c96a;
  --gold-dim:     rgba(212,168,75,0.15);
  --gold-glow:    rgba(212,168,75,0.25);

  /* Text */
  --text-1:       #f2f2f8;
  --text-2:       #9090a8;
  --text-3:       #505068;

  /* Status */
  --success:      #34d399;
  --success-dim:  rgba(52,211,153,0.12);
  --danger:       #f87171;

  /* Category colors */
  --cat-ambient:   #7eb8f7;
  --cat-cinematic: #c084fc;
  --cat-futuristic:#38bdf8;
  --cat-minimal:   #94a3b8;
  --cat-nature:    #4ade80;
  --cat-retro:     #fb923c;
  --cat-custom:    var(--gold);

  /* Layout */
  --sidebar-w:    212px;
  --topbar-h:     60px;
  --radius-sm:    10px;
  --radius-md:    16px;
  --radius-lg:    22px;
  --font:         'Inter', system-ui, -apple-system, sans-serif;
  --shadow-card:  0 4px 32px rgba(0,0,0,0.55), 0 1px 6px rgba(0,0,0,0.35);
  --shadow-gold:  0 8px 32px rgba(212,168,75,0.2);
  --shadow-modal: 0 32px 96px rgba(0,0,0,0.75), 0 4px 24px rgba(0,0,0,0.5);
  --transition:   0.2s cubic-bezier(0.4,0,0.2,1);
}

/* ── LIGHT MODE ────────────────────────────────── */
[data-theme="light"] {
  --bg:           #f8f9fa;
  --bg-1:         #ffffff;
  --bg-2:         #f1f3f5;
  --bg-3:         #e9ecef;

  --surface:      rgba(0,0,0,0.03);
  --surface-h:    rgba(0,0,0,0.06);
  --surface-2:    rgba(0,0,0,0.08);

  --border:       rgba(0,0,0,0.10);
  --border-h:     rgba(0,0,0,0.20);

  --gold:         #c79430;
  --gold-bright:  #d4a84b;
  --gold-dim:     rgba(199,148,48,0.12);
  --gold-glow:    rgba(199,148,48,0.20);

  --text-1:       #0a0a0a;
  --text-2:       #1a1a1a;
  --text-3:       #6c757d;

  --success:      #2da679;
  --success-dim:  rgba(45,166,121,0.12);
  --danger:       #e03f3f;

  --shadow-card:  0 2px 16px rgba(0,0,0,0.08), 0 1px 4px rgba(0,0,0,0.04);
  --shadow-gold:  0 4px 24px rgba(199,148,48,0.15);
  --shadow-modal: 0 24px 64px rgba(0,0,0,0.18), 0 4px 16px rgba(0,0,0,0.08);
}

[data-theme="light"] .nav-item {
  color: #111111;
  font-weight: 600;
}
[data-theme="light"] .nav-item:hover {
  color: #000000;
  background: rgba(0,0,0,0.06);
}
[data-theme="light"] .nav-item.active {
  color: var(--gold);
  background: var(--gold-dim);
}
[data-theme="light"] .sidebar-badge,
[data-theme="light"] .sidebar-sub {
  color: #333333;
}

/* ── RESET ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-tap-highlight-color: transparent; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-1);
  height: 100dvh;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; color: inherit; }
input, textarea { font-family: inherit; color: inherit; }

/* ── SCROLLBAR ──────────────────────────────────── */
::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 99px; }

/* ── HIDDEN UTILITY ─────────────────────────────── */
.hidden { display: none !important; }

/* ══════════════════════════════════════════════════
   APP SHELL
══════════════════════════════════════════════════ */
#app {
  display: flex;
  height: 100dvh;
  overflow: hidden;
}

/* ══════════════════════════════════════════════════
   SIDEBAR
══════════════════════════════════════════════════ */
#sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg-1);
  border-right: 1px solid var(--border);
  padding: 0 0 16px;
  z-index: 20;
  overflow: hidden;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  border-bottom: 1px solid var(--border);
  margin-bottom: 10px;
  flex-shrink: 0;
  padding: 20px 24px 16px;
}

.sidebar-logo-img {
  display: block;
  width: 100%;
  max-width: 140px;
  height: auto;
  object-fit: contain;
  mix-blend-mode: normal;
  filter: brightness(1.15);
}
[data-theme="light"] .sidebar-logo-img {
  filter: none;
}

/* Collapsed sidebar (tablet) */
@media (max-width: 860px) {
  .sidebar-logo {
    padding: 14px 16px 12px;
  }
  .sidebar-logo-img {
    max-width: 110px;
  }
}

.nav-links {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 10px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  transition: all var(--transition);
  white-space: nowrap;
}

.nav-item i {
  font-size: 14px;
  width: 18px;
  text-align: center;
  flex-shrink: 0;
}

.nav-item:hover {
  background: var(--surface-h);
  color: var(--text-1);
}

.nav-item.active {
  background: var(--gold-dim);
  color: var(--gold-bright);
}

.nav-item.active i { color: var(--gold); }

/* Favorites badge on nav */
.fav-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  border-radius: 99px;
  background: var(--gold);
  color: #0d0d16;
  font-size: 10px;
  font-weight: 700;
  padding: 0 5px;
  margin-left: auto;
  flex-shrink: 0;
}

.sidebar-footer {
  padding: 14px 16px 0;
  border-top: 1px solid var(--border);
  margin-top: 10px;
}

.sidebar-badge {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--gold);
  background: var(--gold-dim);
  border: 1px solid rgba(212,168,75,0.28);
  border-radius: 99px;
  padding: 4px 10px;
}

.sidebar-sub {
  font-size: 10px;
  color: var(--text-3);
  margin-top: 5px;
}

/* ══════════════════════════════════════════════════
   RIGHT PANEL (topbar + scrollable content)
══════════════════════════════════════════════════ */
#right-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

/* ══════════════════════════════════════════════════
   STICKY TOPBAR
══════════════════════════════════════════════════ */
#topbar {
  flex-shrink: 0;
  height: var(--topbar-h);
  background: rgba(8,8,14,0.88);
  border-bottom: 1px solid var(--border);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  padding: 0 28px;
  gap: 16px;
  z-index: 15;
}
[data-theme="light"] #topbar {
  background: rgba(255,255,255,0.95);
  border-bottom: 1px solid rgba(0,0,0,0.12);
}

.topbar-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-1);
  white-space: nowrap;
  min-width: 90px;
}
[data-theme="light"] .topbar-title {
  color: #000000;
}

.topbar-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  flex: 1;
  scrollbar-width: none;
  transition: opacity 0.2s ease;
}
.topbar-pills::-webkit-scrollbar { display: none; }

.pill {
  flex-shrink: 0;
  padding: 7px 15px;
  border-radius: 99px;
  font-size: 12.5px;
  font-weight: 500;
  border: 1px solid var(--border);
  color: var(--text-2);
  background: transparent;
  transition: all var(--transition);
  white-space: nowrap;
  min-height: 34px;
  cursor: pointer;
}
[data-theme="light"] .pill {
  color: #111111;
  font-weight: 600;
  border-color: rgba(0,0,0,0.15);
}
[data-theme="light"] .pill:hover {
  background: rgba(0,0,0,0.06);
  color: #000000;
  border-color: rgba(0,0,0,0.25);
}

.pill:hover {
  border-color: var(--border-h);
  color: var(--text-1);
  background: var(--surface-h);
}

.pill.active {
  border-color: rgba(212,168,75,0.5);
  color: var(--gold-bright);
  background: var(--gold-dim);
}

/* Trending pill — fire accent */
.pill-trending {
  border-color: rgba(251,146,60,0.35);
  color: #fb923c;
}
.pill-trending.active {
  background: rgba(251,146,60,0.15);
  border-color: rgba(251,146,60,0.55);
  color: #fb923c;
}
.pill-trending i { font-size: 11px; }

/* ══════════════════════════════════════════════════
   MAIN CONTENT (scrollable)
══════════════════════════════════════════════════ */
#main-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
}

.section {
  display: none;
  padding: 28px 28px 56px;
  animation: fadeUp 0.28s ease;
}

.section.active { display: block; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Section intro (below topbar) */
.section-intro {
  margin-bottom: 24px;
}

.section-intro h1 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text-1);
}

.section-intro p {
  font-size: 13.5px;
  color: var(--text-2);
  margin-top: 4px;
  line-height: 1.5;
}

/* ══════════════════════════════════════════════════
   SOUND GRID
══════════════════════════════════════════════════ */
.sound-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

/* ══════════════════════════════════════════════════
   SOUND CARD
══════════════════════════════════════════════════ */
.sound-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 18px 14px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 0;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
  user-select: none;
}

/* Subtle gradient overlay */
.sound-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(ellipse at 60% 0%, rgba(212,168,75,0.07) 0%, transparent 65%);
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--transition);
}

.sound-card:hover {
  border-color: rgba(212,168,75,0.3);
  box-shadow: var(--shadow-card);
  transform: translateY(-2px);
}

.sound-card:hover::after { opacity: 1; }

.sound-card.playing {
  border-color: rgba(212,168,75,0.55);
  box-shadow: 0 0 0 2px rgba(212,168,75,0.12), var(--shadow-gold);
}

.sound-card.playing::after { opacity: 1; }

.sound-card.featured-card {
  border-color: rgba(212,168,75,0.28);
  background: linear-gradient(160deg, rgba(212,168,75,0.07) 0%, var(--bg-2) 55%);
}

/* Hover state */
.sound-card:hover .card-wave-wrap { opacity: 1; }
.card-wave-wrap { opacity: 0.82; transition: opacity 0.2s ease; }

/* "tap to preview" hover hint — now a real div, not ::after */
.wave-play-hint {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: rgba(255,255,255,0.5);
  opacity: 0;
  transition: opacity 0.18s ease;
  pointer-events: none;
  background: rgba(8,8,14,0.45);
  border-radius: 8px;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.sound-card:hover .wave-play-hint { opacity: 1; }
.sound-card.playing .wave-play-hint { display: none; }

/* Card header row */
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  gap: 8px;
}

.card-header-badges {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.card-category {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  flex-shrink: 0;
}

/* Category color coding */
.cat-Ambient    { color: var(--cat-ambient); }
.cat-Cinematic  { color: var(--cat-cinematic); }
.cat-Futuristic { color: var(--cat-futuristic); }
.cat-Minimal    { color: var(--cat-minimal); }
.cat-Nature     { color: var(--cat-nature); }
.cat-Retro      { color: var(--cat-retro); }
.cat-Custom     { color: var(--cat-custom); }

/* Title */
.card-title {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--text-1);
  line-height: 1.2;
  margin-bottom: 5px;
}

/* Description */
.card-desc {
  font-size: 12px;
  color: var(--text-3);
  line-height: 1.5;
  margin-bottom: 12px;
}

/* ── WAVEFORM ON CARD ──────────────────────────── */
.card-wave-wrap {
  position: relative;
  width: 100%;
  height: 52px;
  margin-bottom: 12px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-3);
  cursor: pointer;
  flex-shrink: 0;
}

.card-waveform {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* Playing progress overlay */
.card-wave-progress {
  position: absolute;
  left: 0;
  top: 0;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, rgba(212,168,75,0.14) 0%, transparent 100%);
  pointer-events: none;
  /* no CSS transition — JS drives this at 60fps */
}

/* Pulsing ring on the play icon when active */
@keyframes ringPulse {
  0%   { box-shadow: 0 0 0 0 rgba(212,168,75,0.5); }
  70%  { box-shadow: 0 0 0 10px rgba(212,168,75,0); }
  100% { box-shadow: 0 0 0 0 rgba(212,168,75,0); }
}

/* ── META ROW ──────────────────────────────────── */
.card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  color: var(--text-3);
  margin-bottom: 10px;
}

.meta-dot {
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: var(--text-3);
  opacity: 0.5;
}

/* ── ACTION ROW ────────────────────────────────── */
.card-actions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.card-actions-left {
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Generic icon button (vote / bookmark / details) */
.icon-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-3);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 6px 8px;
  min-height: 32px;
  transition: all var(--transition);
  flex-shrink: 0;
}

.icon-btn:hover {
  color: var(--text-1);
  background: var(--surface-h);
  border-color: var(--border);
}

/* Vote */
.vote-btn.icon-btn.voted {
  color: var(--gold-bright);
}
.vote-btn.icon-btn:hover {
  color: var(--gold-bright);
  background: var(--gold-dim);
  border-color: rgba(212,168,75,0.3);
}

/* Bookmark */
.bookmark-btn.icon-btn.bookmarked {
  color: var(--gold-bright);
}
.bookmark-btn.icon-btn:hover {
  color: var(--gold-bright);
  background: var(--gold-dim);
  border-color: rgba(212,168,75,0.3);
}

/* CTA download/buy button */
.card-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
}

.card-cta-btn.cta-free {
  color: var(--success);
  background: var(--success-dim);
  border: 1px solid rgba(52,211,153,0.3);
}
.card-cta-btn.cta-free:hover {
  background: rgba(52,211,153,0.2);
  transform: translateY(-1px);
}

.card-cta-btn.cta-paid {
  color: #0d0d16;
  background: linear-gradient(135deg, var(--gold-bright), var(--gold));
  border: none;
  box-shadow: 0 2px 8px rgba(212,168,75,0.3);
}
.card-cta-btn.cta-paid:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(212,168,75,0.45);
}

/* Featured badge — now inside card-header-badges, not absolute */
.featured-badge {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--gold);
  background: var(--gold-dim);
  border: 1px solid rgba(212,168,75,0.3);
  border-radius: 99px;
  padding: 3px 9px;
  white-space: nowrap;
}

/* ══════════════════════════════════════════════════
   LEADERBOARD
══════════════════════════════════════════════════ */
.leaderboard {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lb-row {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  cursor: pointer;
  transition: all var(--transition);
}

.lb-row:hover {
  background: var(--bg-3);
  border-color: var(--border-h);
  transform: translateX(3px);
}

.lb-row.rank-1 { border-left: 3px solid var(--gold); }
.lb-row.rank-2 { border-left: 3px solid #888899; }
.lb-row.rank-3 { border-left: 3px solid #b47e4a; }

.lb-rank {
  font-size: 20px;
  min-width: 32px;
  text-align: center;
}

.lb-info { flex: 1; min-width: 0; }
.lb-title { font-size: 15px; font-weight: 600; color: var(--text-1); }
.lb-cat   { font-size: 11px; color: var(--text-3); margin-top: 2px; }

.lb-votes {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-2);
  min-width: 60px;
}

.lb-votes i { color: var(--gold); font-size: 11px; }

.lb-bar-wrap {
  width: 72px;
  height: 4px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
}

.lb-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-bright), var(--gold));
  border-radius: 99px;
}

.lb-price {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-3);
  min-width: 42px;
  text-align: right;
}

/* ══════════════════════════════════════════════════
   CUSTOM SECTION
══════════════════════════════════════════════════ */
.custom-grid {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.tier-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 12px;
}

.tier-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  transition: all var(--transition);
}

.tier-card:hover {
  border-color: rgba(212,168,75,0.3);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

.featured-tier {
  border-color: rgba(212,168,75,0.4);
  background: linear-gradient(160deg, rgba(212,168,75,0.07) 0%, var(--bg-2) 70%);
}

.tier-badge {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--gold-bright);
  border-radius: 99px;
  padding: 3px 12px;
}

.tier-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-3);
}

.tier-price {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -1.5px;
  color: var(--text-1);
}

.tier-features {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.tier-features li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-2);
}

.tier-features i { font-size: 10px; color: var(--success); width: 14px; text-align: center; }
.tier-features i.fa-xmark { color: var(--text-3); }

.btn-tier {
  width: 100%;
  padding: 10px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-1);
  background: var(--surface-h);
  border: 1px solid var(--border-h);
  transition: all var(--transition);
  min-height: 40px;
}

.btn-tier:hover,
.featured-tier .btn-tier {
  background: var(--gold-dim);
  border-color: rgba(212,168,75,0.5);
  color: var(--gold-bright);
}

/* ── FORM ───────────────────────────────────────── */
.form-card {
  max-width: 580px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.form-title {
  font-size: 19px;
  font-weight: 700;
  color: var(--text-1);
  margin-bottom: 4px;
}

.form-sub {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.55;
  margin-bottom: 22px;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 14px;
}

.form-row label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-3);
  letter-spacing: 0.3px;
}

.form-row input,
.form-row textarea {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  font-size: 14px;
  color: var(--text-1);
  outline: none;
  resize: vertical;
  transition: border-color var(--transition);
  min-height: 44px;
}

.form-row input::placeholder,
.form-row textarea::placeholder { color: var(--text-3); }

.form-row input:focus,
.form-row textarea:focus {
  border-color: rgba(212,168,75,0.5);
}

.form-legal {
  font-size: 10.5px;
  color: var(--text-3);
  margin-top: 10px;
  line-height: 1.5;
}

.form-success {
  text-align: center;
  padding: 20px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.form-success i { font-size: 42px; color: var(--success); }
.form-success h3 { font-size: 18px; font-weight: 700; }
.form-success p { font-size: 13px; color: var(--text-2); }

/* ══════════════════════════════════════════════════
   INSTALL SECTION
══════════════════════════════════════════════════ */
.install-steps {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.step-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
}

.step-num {
  font-size: 26px;
  font-weight: 800;
  color: var(--gold);
  opacity: 0.35;
  line-height: 1;
  flex-shrink: 0;
}

.step-body h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-1);
  margin-bottom: 5px;
}

.step-body p {
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.6;
}

code {
  font-family: 'SF Mono', 'Fira Code', monospace;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 11px;
  color: var(--gold-bright);
}

.install-notice {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--bg-2);
  border: 1px solid rgba(52,211,153,0.2);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
}

.install-notice > i {
  font-size: 20px;
  color: var(--success);
  flex-shrink: 0;
  margin-top: 1px;
}

.install-notice strong {
  font-size: 13.5px;
  color: var(--text-1);
  display: block;
  margin-bottom: 3px;
}

.install-notice p {
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.5;
}

/* ══════════════════════════════════════════════════
   BUTTONS
══════════════════════════════════════════════════ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  color: #0d0d16;
  background: linear-gradient(135deg, var(--gold-bright) 0%, var(--gold) 100%);
  border: none;
  min-height: 44px;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: 0 2px 12px rgba(212,168,75,0.3);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(212,168,75,0.4);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-1);
  background: var(--surface-h);
  border: 1px solid var(--border-h);
  min-height: 44px;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-secondary:hover {
  background: var(--surface-2);
  transform: translateY(-1px);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  background: transparent;
  border: 1px solid var(--border);
  min-height: 38px;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-ghost:hover {
  border-color: var(--border-h);
  color: var(--text-1);
}

.btn-full { width: 100%; }

/* ══════════════════════════════════════════════════
   MODAL — Checkout only (no waveform repeat)
══════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.modal-overlay.hidden { display: none; }

.modal {
  width: 100%;
  max-width: 420px;
  max-height: 90dvh;
  overflow-y: auto;
  background: var(--bg-2);
  border: 1px solid var(--border-h);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-modal);
  padding: 28px 24px 24px;
  position: relative;
  animation: modalIn 0.22s cubic-bezier(0.34,1.56,0.64,1);
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.93) translateY(14px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface-h);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--text-2);
  transition: all var(--transition);
  z-index: 2;
}
.modal-close:hover { color: var(--text-1); border-color: var(--border-h); }

/* ── Identity header ──────────────────────────── */
.checkout-identity {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 18px;
  padding-right: 28px;
}

.checkout-cat-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 5px;
  box-shadow: 0 0 0 3px rgba(255,255,255,0.06);
}

.checkout-identity-text { flex: 1; min-width: 0; }

.checkout-cat {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.modal-type-tag {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.9;
}
.modal-type-tag i { font-size: 8px; }

.checkout-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.4px;
  color: var(--text-1);
  line-height: 1.15;
  margin-bottom: 6px;
}

.checkout-desc {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.55;
}

/* ── Price block ──────────────────────────────── */
.checkout-price-block {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 18px;
}

.checkout-price-tag {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -1px;
  color: var(--text-1);
}

.checkout-price-note {
  font-size: 11.5px;
  color: var(--text-3);
}

/* ── Social row (vote + bookmark) ─────────────── */
.checkout-social-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
}

.vote-btn-lg {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 99px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-2);
  background: var(--surface-h);
  border: 1px solid var(--border);
  min-height: 40px;
  transition: all var(--transition);
}
.vote-btn-lg:hover {
  color: var(--gold-bright);
  border-color: rgba(212,168,75,0.4);
  background: var(--gold-dim);
}
.vote-btn-lg.voted {
  color: var(--gold-bright);
  border-color: rgba(212,168,75,0.45);
  background: var(--gold-dim);
}

.bookmark-btn-lg {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 99px;
  font-size: 15px;
  color: var(--text-2);
  background: var(--surface-h);
  border: 1px solid var(--border);
  transition: all var(--transition);
  flex-shrink: 0;
}
.bookmark-btn-lg:hover {
  color: var(--gold-bright);
  border-color: rgba(212,168,75,0.4);
  background: var(--gold-dim);
}
.bookmark-btn-lg.bookmarked {
  color: var(--gold-bright);
  border-color: rgba(212,168,75,0.45);
  background: var(--gold-dim);
}

.vote-label { font-size: 11.5px; color: var(--text-3); margin-left: 2px; }

/* ── Divider ──────────────────────────────────── */
.checkout-divider {
  height: 1px;
  background: var(--border);
  margin-bottom: 18px;
}

/* ── Email row (paid checkout) ────────────────── */
.checkout-email-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}
.checkout-email-row.hidden { display: none; }

.checkout-email-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-2);
  letter-spacing: 0.02em;
}

.checkout-email-label i { color: var(--gold, #d4a84b); }

.checkout-email-input {
  width: 100%;
  padding: 11px 14px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text-1);
  background: var(--bg-2, rgba(255,255,255,0.04));
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}

.checkout-email-input::placeholder { color: var(--text-3); }

.checkout-email-input:focus {
  border-color: var(--gold, #d4a84b);
  background: var(--bg-1, rgba(255,255,255,0.06));
}

/* ── CTA button ───────────────────────────────── */
.checkout-cta { margin-bottom: 12px; }

.checkout-btn {
  width: 100%;
  padding: 14px 20px;
  font-size: 15px;
  font-weight: 700;
  border-radius: var(--radius-md);
}

/* ── QR / Send to phone ───────────────────────── */
.checkout-qr-section { margin-bottom: 16px; }

.checkout-qr-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: all var(--transition);
}
.checkout-qr-toggle:hover {
  color: var(--text-1);
  border-color: var(--border-h);
  background: var(--surface-h);
}
.checkout-qr-toggle i:last-child {
  margin-left: auto;
  font-size: 10px;
  transition: transform 0.2s ease;
}

.qr-panel {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
  text-align: center;
  margin-top: 6px;
}

.qr-hint {
  font-size: 12px;
  color: var(--text-2);
  margin-bottom: 14px;
  line-height: 1.5;
}

#qr-code-display {
  display: flex;
  justify-content: center;
  margin-bottom: 10px;
}

#qr-code-display canvas,
#qr-code-display img {
  border-radius: var(--radius-sm);
  background: white;
  padding: 8px;
}

.qr-url {
  font-size: 10.5px;
  color: var(--text-3);
  word-break: break-all;
  margin-bottom: 4px;
}

/* ── Legal badges ─────────────────────────────── */
.modal-legal-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.modal-legal-badges span {
  font-size: 10px;
  color: var(--text-3);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 3px 8px;
  white-space: nowrap;
}

/* ══════════════════════════════════════════════════
   TOAST
══════════════════════════════════════════════════ */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: var(--bg-3);
  border: 1px solid var(--border-h);
  border-radius: 99px;
  padding: 11px 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-1);
  box-shadow: var(--shadow-modal);
  z-index: 300;
  white-space: nowrap;
  opacity: 0;
  transition: all 0.28s cubic-bezier(0.4,0,0.2,1);
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ══════════════════════════════════════════════════
   EMPTY STATE / SKELETON
══════════════════════════════════════════════════ */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-3);
  grid-column: 1 / -1;
}

.empty-state i { font-size: 32px; margin-bottom: 12px; display: block; opacity: 0.35; }
.empty-state p { font-size: 13.5px; }

.skeleton {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  height: 200px;
  animation: shimmer 1.6s ease-in-out infinite;
}

@keyframes shimmer {
  0%, 100% { opacity: 0.4; }
  50%       { opacity: 0.8; }
}

/* ══════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════ */

/* Tablet (sidebar collapses) */
@media (max-width: 860px) {
  :root { --sidebar-w: 60px; }

  .logo-text,
  .nav-item span,
  .sidebar-footer { display: none; }

  .nav-item {
    justify-content: center;
    padding: 13px;
  }

  #sidebar { align-items: center; }

  .section { padding: 20px 18px 40px; }

  .sound-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
}

/* Mobile (bottom nav) */
@media (max-width: 560px) {
  #app { flex-direction: column; }

  #sidebar {
    width: 100%;
    order: 2;
    flex-direction: row;
    padding: 0;
    border-right: none;
    border-top: 1px solid var(--border);
    height: 54px;
    overflow: hidden;
    flex-shrink: 0;
  }

  .sidebar-logo { display: none; }
  .sidebar-footer { display: none; }

  .nav-links {
    flex-direction: row;
    padding: 0;
    gap: 0;
    justify-content: space-around;
    width: 100%;
  }

  .nav-item {
    flex-direction: column;
    gap: 3px;
    padding: 8px;
    font-size: 10px;
    border-radius: 0;
  }

  .nav-item span { display: block; font-size: 10px; }
  .nav-item i { font-size: 17px; width: auto; }
  .nav-item.active { background: transparent; color: var(--gold); }

  #right-panel { order: 1; }
  #main-content { overflow-y: auto; }

  .section { padding: 16px 14px 28px; }

  .sound-grid { grid-template-columns: 1fr; }

  .modal { border-radius: var(--radius-lg) var(--radius-lg) 0 0; max-width: 100%; }
  .modal-overlay { align-items: flex-end; padding: 0; }

  .checkout-social-row { flex-wrap: wrap; }

  .tier-cards { grid-template-columns: 1fr 1fr; }
}

/* Tesla large landscape */
@media (min-width: 1100px) {
  .sound-grid { grid-template-columns: repeat(3, 1fr); }
  .trending-hero { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1400px) {
  .sound-grid { grid-template-columns: repeat(4, 1fr); }
  .trending-hero { grid-template-columns: repeat(3, 1fr); }
}

/* ══════════════════════════════════════════════════
   TRENDING HERO CARDS
══════════════════════════════════════════════════ */
.trending-hero {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  margin-bottom: 32px;
}

/* Medal badge on hero card */
.trending-card { position: relative; }

.trending-medal {
  position: absolute;
  top: -10px;
  left: 14px;
  font-size: 22px;
  line-height: 1;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.5));
  pointer-events: none;
  z-index: 3;
}

/* Rank badge for cards in Trending filter mode */
.sound-card.has-rank { padding-top: 24px; }

.trending-rank-num {
  position: absolute;
  top: 10px;
  left: 14px;
  font-size: 11px;
  font-weight: 800;
  color: var(--text-3);
  letter-spacing: 0.5px;
  line-height: 1;
  z-index: 3;
}

/* Vote progress bar inside hero card */
.trending-vote-bar {
  position: relative;
  height: 22px;
  background: var(--bg-3);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 10px;
  margin-top: 4px;
}

.trending-vote-fill {
  position: absolute;
  top: 0; left: 0;
  height: 100%;
  border-radius: 6px;
  transition: width 0.6s cubic-bezier(0.4,0,0.2,1);
}

.trending-vote-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-2);
  gap: 5px;
}

.trending-vote-label i { color: var(--gold); font-size: 10px; }

/* Ranked list header */
.trending-list-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.trending-list-header span {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-3);
}

/* ══════════════════════════════════════════════════
   REFERRAL & GIFT SECTION
══════════════════════════════════════════════════ */
.referral-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.ref-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.gift-card {
  border-color: rgba(212,168,75,0.2);
  background: linear-gradient(160deg, rgba(212,168,75,0.05) 0%, var(--bg-2) 60%);
}

.ref-card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--bg-3);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--text-2);
}

.gift-icon {
  background: var(--gold-dim);
  border-color: rgba(212,168,75,0.3);
  color: var(--gold);
}

.ref-card-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-1);
  letter-spacing: -0.3px;
  margin-bottom: -8px;
}

.ref-card-sub {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.6;
  margin-bottom: -4px;
}

/* Code display block */
.ref-code-block {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
}

.ref-code-display {
  flex: 1;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 6px;
  color: var(--gold-bright);
  font-family: 'SF Mono', 'Fira Code', monospace;
}

.ref-copy-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--surface-h);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--text-2);
  flex-shrink: 0;
  transition: all var(--transition);
}

.ref-copy-btn:hover {
  color: var(--gold-bright);
  background: var(--gold-dim);
  border-color: rgba(212,168,75,0.4);
}

/* Share row */
.ref-share-row {
  display: flex;
  gap: 8px;
}

.ref-share-btn {
  flex: 1;
  font-size: 13px;
  padding: 9px 12px;
  min-height: 40px;
}

/* Stats */
.ref-stats {
  display: flex;
  gap: 20px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.ref-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ref-stat-val {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-1);
  letter-spacing: -0.5px;
}

.ref-stat-label {
  font-size: 11px;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

/* Gift sound selector */
.gift-sound-select {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  min-height: 58px;
  display: flex;
  align-items: center;
}

.gift-select-placeholder {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-3);
  font-size: 12.5px;
  line-height: 1.5;
}

.gift-select-placeholder i:first-child {
  font-size: 18px;
  flex-shrink: 0;
  opacity: 0.4;
}

.gift-selected-sound {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.gift-sound-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.gift-sound-info { flex: 1; min-width: 0; }

.gift-sound-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gift-sound-cat {
  font-size: 11px;
  color: var(--text-3);
  margin-top: 2px;
}

.gift-sound-price {
  font-size: 14px;
  font-weight: 700;
  color: var(--gold-bright);
  flex-shrink: 0;
}

.gift-clear-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface-h);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--text-3);
  flex-shrink: 0;
  transition: all var(--transition);
}

.gift-clear-btn:hover {
  background: rgba(248,113,113,0.15);
  border-color: rgba(248,113,113,0.3);
  color: var(--danger);
}

/* Gift btn on card */
.gift-btn.icon-btn:hover {
  color: var(--gold-bright);
  background: var(--gold-dim);
  border-color: rgba(212,168,75,0.3);
}

/* Referral QR panel */
.ref-qr-panel {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  margin-top: -8px;
}

/* Responsive */
@media (max-width: 560px) {
  .referral-grid { grid-template-columns: 1fr; }
  .trending-hero { grid-template-columns: 1fr; }
  .ref-share-row { flex-direction: column; }
}

/* ══════════════════════════════════════════════════
   SOUND TYPE BADGE (card header)
══════════════════════════════════════════════════ */
.type-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 7px;
  border-radius: 99px;
  border: 1px solid color-mix(in srgb, var(--type-color, #d4a84b) 40%, transparent);
  color: var(--type-color, #d4a84b);
  background: color-mix(in srgb, var(--type-color, #d4a84b) 12%, transparent);
  white-space: nowrap;
}
.type-badge i { font-size: 8px; }

/* ══════════════════════════════════════════════════
   TOPBAR PILL VARIANTS — type-specific
══════════════════════════════════════════════════ */
.pill-divider {
  width: 1px;
  height: 20px;
  background: var(--border);
  flex-shrink: 0;
  align-self: center;
  margin: 0 2px;
}

/* Lock Chime pill — gold */
.pill-lockchime { --pill-active-color: #d4a84b; --pill-active-bg: rgba(212,168,75,0.15); --pill-active-border: rgba(212,168,75,0.4); }
/* Horn pill — red */
.pill-horn      { --pill-active-color: #f87171; --pill-active-bg: rgba(248,113,113,0.12); --pill-active-border: rgba(248,113,113,0.4); }
/* AVAS pill — green */
.pill-avas      { --pill-active-color: #34d399; --pill-active-bg: rgba(52,211,153,0.12);  --pill-active-border: rgba(52,211,153,0.4); }
/* Summon pill — indigo */
.pill-summon    { --pill-active-color: #818cf8; --pill-active-bg: rgba(129,140,248,0.12); --pill-active-border: rgba(129,140,248,0.4); }

.pill-type:hover {
  color: var(--pill-active-color);
  background: var(--pill-active-bg);
  border-color: var(--pill-active-border);
}
.pill-type.active {
  color: var(--pill-active-color) !important;
  background: var(--pill-active-bg) !important;
  border-color: var(--pill-active-border) !important;
}

/* ══════════════════════════════════════════════════
   INSTALL — Type overview grid
══════════════════════════════════════════════════ */
.install-type-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 32px;
}
.install-type-card {
  background: var(--bg-2);
  border: 1px solid color-mix(in srgb, var(--type-col, #d4a84b) 30%, var(--border));
  border-radius: var(--radius-lg);
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: var(--transition);
}
.install-type-card:hover {
  border-color: color-mix(in srgb, var(--type-col, #d4a84b) 60%, transparent);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px color-mix(in srgb, var(--type-col, #d4a84b) 15%, transparent);
}
.install-type-card > i {
  font-size: 22px;
  color: var(--type-col, #d4a84b);
}
.install-type-card h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-1);
  margin: 0;
}
.install-type-card p {
  font-size: 11.5px;
  color: var(--text-3);
  line-height: 1.5;
  margin: 0;
}
.install-type-card code {
  display: inline-block;
  font-size: 10.5px;
  color: var(--type-col, #d4a84b);
  background: color-mix(in srgb, var(--type-col, #d4a84b) 10%, transparent);
  padding: 2px 7px;
  border-radius: 5px;
  margin-top: 4px;
  border: 1px solid color-mix(in srgb, var(--type-col, #d4a84b) 25%, transparent);
  font-family: monospace;
}

/* ══════════════════════════════════════════════════
   SEASONAL FILTER BAR
══════════════════════════════════════════════════ */
#season-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 20px 10px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-1);
  flex-shrink: 0;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
#season-bar::-webkit-scrollbar { display: none; }

.season-bar-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-3);
  white-space: nowrap;
  flex-shrink: 0;
}

.season-pills {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

/* Seasonal pill — .spill */
.spill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 13px;
  font-size: 12px;
  font-weight: 500;
  font-family: var(--font);
  border-radius: 99px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  min-height: 30px;
}
.spill:hover {
  border-color: var(--border-h);
  color: var(--text-1);
  background: var(--surface);
}
.spill.active {
  background: var(--surface-h);
  border-color: var(--border-h);
  color: var(--text-1);
}

/* Halloween 🎃 */
.spill-halloween { --sc: #fb923c; }
/* Christmas 🎄 */
.spill-christmas { --sc: #4ade80; }
/* New Year 🎆 */
.spill-newyear   { --sc: #818cf8; }
/* Summer ☀️ */
.spill-summer    { --sc: #fbbf24; }
/* Spring 🌸 */
.spill-spring    { --sc: #f9a8d4; }
/* Winter ❄️ */
.spill-winter    { --sc: #7dd3fc; }

.spill-halloween:hover, .spill-christmas:hover,
.spill-newyear:hover,   .spill-summer:hover,
.spill-spring:hover,    .spill-winter:hover {
  border-color: color-mix(in srgb, var(--sc) 50%, transparent);
  color: var(--sc);
  background: color-mix(in srgb, var(--sc) 10%, transparent);
}
.spill-halloween.active, .spill-christmas.active,
.spill-newyear.active,   .spill-summer.active,
.spill-spring.active,    .spill-winter.active {
  border-color: color-mix(in srgb, var(--sc) 60%, transparent);
  color: var(--sc);
  background: color-mix(in srgb, var(--sc) 14%, transparent);
}

/* Seasonal badge on sound card (reuses type-badge style) */
.season-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 99px;
  border: 1px solid color-mix(in srgb, var(--sc, #fbbf24) 40%, transparent);
  color: var(--sc, #fbbf24);
  background: color-mix(in srgb, var(--sc, #fbbf24) 12%, transparent);
  white-space: nowrap;
}

/* ══════════════════════════════════════════════════
   THEME SWITCHER
══════════════════════════════════════════════════ */
.theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  font-size: 14px;
  flex-shrink: 0;
}
.theme-toggle:hover {
  background: var(--surface-h);
  border-color: var(--border-h);
  color: var(--gold-bright);
  transform: scale(1.05);
}
.theme-toggle i { pointer-events: none; }

/* Mobile: season bar below topbar, full scroll */
@media (max-width: 560px) {
  #season-bar { padding: 6px 12px 8px; }
  .season-bar-label { display: none; }
}

/* ══════════════════════════════════════════════════
   HOW TO INSTALL — new layout
══════════════════════════════════════════════════ */

/* Two-system grid */
.install-systems-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}
@media (max-width: 720px) {
  .install-systems-grid { grid-template-columns: 1fr; }
}

.install-system-card {
  background: var(--bg-2);
  border: 1px solid color-mix(in srgb, var(--sys-col,#d4a84b) 35%, var(--border));
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.isc-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: color-mix(in srgb, var(--sys-col,#d4a84b) 10%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--sys-col,#d4a84b) 20%, var(--border));
}
.isc-header i {
  font-size: 22px;
  color: var(--sys-col,#d4a84b);
  flex-shrink: 0;
}
.isc-header h3 { font-size: 15px; font-weight: 700; color: var(--text-1); margin: 0; }
.isc-sub { font-size: 11px; color: var(--text-3); }
.isc-specs { padding: 12px 0; }
.isc-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 7px 20px;
  border-bottom: 1px solid var(--border);
  font-size: 12.5px;
}
.isc-row:last-child { border-bottom: none; }
.isc-label {
  flex-shrink: 0;
  width: 110px;
  color: var(--text-3);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.isc-val { color: var(--text-1); font-size: 12.5px; }
.isc-val.isc-important {
  color: var(--sys-col, #d4a84b);
  font-weight: 700;
  font-family: monospace;
  font-size: 13px;
}
.isc-warn-row {
  color: var(--warn, #fbbf24);
  font-size: 11.5px;
  gap: 8px;
  align-items: flex-start;
  border-bottom: none !important;
  background: rgba(251,191,36,0.06);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}
.isc-warn-row i { flex-shrink: 0; margin-top: 2px; }

/* Warning banner */
.install-warning {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 20px;
  background: rgba(248,113,113,0.08);
  border: 1px solid rgba(248,113,113,0.3);
  border-radius: var(--radius-md);
  margin-bottom: 32px;
}
.install-warning > i {
  font-size: 20px;
  color: var(--danger);
  flex-shrink: 0;
  margin-top: 2px;
}
.install-warning strong { color: var(--danger); font-size: 13.5px; display: block; margin-bottom: 4px; }
.install-warning p { font-size: 12.5px; color: var(--text-2); margin: 0; line-height: 1.55; }

/* Section sub-title */
.install-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--tc, #d4a84b);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 32px 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

/* Step cards — colour override */
.step-card .step-num {
  color: var(--sc, #d4a84b);
  border-color: color-mix(in srgb, var(--sc, #d4a84b) 30%, transparent);
  background: color-mix(in srgb, var(--sc, #d4a84b) 8%, transparent);
}

/* ── CONVERTER CARD ─────────────────────────── */
.converter-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 28px;
}
.converter-drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 40px 24px;
  cursor: pointer;
  transition: var(--transition);
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  margin: 12px;
  text-align: center;
}
.converter-drop.drag-over {
  border-color: var(--gold);
  background: var(--gold-dim);
}
.converter-drop i {
  font-size: 36px;
  color: var(--text-3);
}
.converter-drop p {
  font-size: 14px;
  color: var(--text-2);
  margin: 0;
}
.converter-drop span {
  font-size: 11px;
  color: var(--text-3);
}
.converter-browse-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 99px;
  background: var(--gold-dim);
  border: 1px solid rgba(212,168,75,0.4);
  color: var(--gold-bright);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.converter-browse-btn:hover { background: rgba(212,168,75,0.25); }
.converter-browse-btn input[type="file"] { display: none; }
.converter-formats { font-size: 11px; color: var(--text-3); margin: 0; }

/* Converter settings panel */
.converter-settings { padding: 20px 24px 24px; }
.conv-file-info {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg-3);
  border-radius: var(--radius-sm);
  margin-bottom: 18px;
  font-size: 12.5px;
  color: var(--text-2);
}
.conv-file-info i { color: var(--gold); font-size: 16px; }
.conv-file-info strong { color: var(--text-1); }
.conv-options { display: flex; flex-direction: column; gap: 16px; margin-bottom: 18px; }
.conv-option-group { display: flex; flex-direction: column; gap: 7px; }
.conv-option-group > label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-3);
}
.conv-radios { display: flex; gap: 10px; flex-wrap: wrap; }
.conv-radio {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-3);
  cursor: pointer;
  transition: var(--transition);
  min-width: 140px;
}
.conv-radio:has(input:checked) {
  border-color: rgba(212,168,75,0.5);
  background: var(--gold-dim);
}
.conv-radio input[type="radio"] { display: none; }
.conv-radio span { font-size: 13px; font-weight: 600; color: var(--text-1); }
.conv-radio small { font-size: 10.5px; color: var(--text-3); font-family: monospace; }
.conv-input-wrap { display: flex; align-items: center; gap: 6px; }
.conv-input {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-1);
  padding: 8px 12px;
  font-size: 13px;
  width: 200px;
  transition: var(--transition);
}
.conv-input:focus { border-color: rgba(212,168,75,0.5); outline: none; background: var(--bg-2); }
.conv-input-ext { font-size: 13px; color: var(--text-3); font-family: monospace; }
.conv-waveform-wrap {
  background: var(--bg-3);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 16px;
  display: none;
}
.conv-waveform-wrap.visible { display: block; }
#conv-waveform { width: 100%; display: block; }
.btn-convert {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 24px;
  border-radius: 99px;
  background: linear-gradient(135deg, var(--gold), var(--gold-bright));
  color: #0a0a12;
  font-size: 14px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-gold);
}
.btn-convert:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn-convert:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.conv-progress {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.conv-progress-bar-wrap {
  height: 4px;
  background: var(--bg-3);
  border-radius: 99px;
  overflow: hidden;
}
.conv-progress-bar {
  height: 4px;
  background: linear-gradient(90deg, var(--gold), var(--gold-bright));
  border-radius: 99px;
  width: 0%;
  transition: width 0.2s ease;
}
span#conv-progress-label { font-size: 12px; color: var(--text-3); }
.conv-success {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  font-size: 13px;
  color: var(--success);
  font-weight: 600;
}
.conv-success i { font-size: 16px; }

/* ══════════════════════════════════════════════════
   BRIDGE — main.js card HTML compatibility
══════════════════════════════════════════════════ */
.card-type {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 6px;
}
.card-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-1);
  margin-bottom: 8px;
  line-height: 1.2;
}
.card-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.tag {
  background: var(--bg-3);
  color: var(--text-3);
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
}
.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}
.card-price {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-1);
}
.card-price.free { color: var(--success); }

.add-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--gold-bright), var(--gold));
  color: #0d0d16;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font);
}
.add-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(212,168,75,0.45); }
.add-btn.added {
  background: var(--success-dim);
  color: var(--success);
  border: 1px solid rgba(52,211,153,0.3);
}

.loading {
  color: var(--text-3);
  text-align: center;
  padding: 48px;
  grid-column: 1 / -1;
  font-size: 13.5px;
}

/* ── Cart side-panel ──────────────────────────── */
#cart-modal {
  position: fixed !important;
  right: 0;
  top: 0;
  height: 100vh;
  width: 400px;
  max-width: 90vw;
  background: var(--bg-2);
  border-left: 1px solid var(--border-h);
  z-index: 200;
  display: flex !important;
  flex-direction: column;
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
  border-radius: 0;
  box-shadow: var(--shadow-modal);
  overflow: hidden;
  max-height: unset;
  padding: 0;
  animation: none !important;
}
#cart-modal.hidden { transform: translateX(100%); }

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.modal-header h2 { font-size: 1.2rem; font-weight: 700; color: var(--text-1); }
.modal-header button {
  background: var(--surface-h);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--text-2);
  cursor: pointer;
  transition: var(--transition);
}
.modal-header button:hover { color: var(--text-1); border-color: var(--border-h); }

#cart-items { flex: 1; overflow-y: auto; padding: 16px 24px; }
.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.cart-item-name { font-size: 0.9rem; color: var(--text-1); }
.cart-item-price { font-size: 0.9rem; font-weight: 600; color: var(--text-1); }
.cart-item-remove {
  background: none;
  border: none;
  color: var(--text-3);
  cursor: pointer;
  font-size: 1rem;
  margin-left: 12px;
  transition: color var(--transition);
}
.cart-item-remove:hover { color: var(--danger); }
.cart-empty { color: var(--text-3); text-align: center; padding: 48px 0; font-size: 13.5px; }

.cart-footer {
  padding: 20px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex-shrink: 0;
}
.cart-total { font-size: 1.1rem; font-weight: 700; color: var(--text-1); }
#checkout-email {
  background: var(--bg-3);
  border: 1px solid var(--border);
  color: var(--text-1);
  padding: 12px;
  border-radius: 8px;
  font-size: 0.9rem;
  width: 100%;
  transition: border-color var(--transition);
}
#checkout-email:focus { outline: none; border-color: var(--gold); }
.checkout-btn {
  background: linear-gradient(135deg, var(--gold-bright), var(--gold));
  color: #0d0d16;
  border: none;
  padding: 14px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 700;
  width: 100%;
  transition: all var(--transition);
  font-family: var(--font);
}
.checkout-btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-gold); }

/* Overlay */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  z-index: 150;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.overlay.hidden { display: none; }

/* Filter buttons (main.js) styled as pills */
.filter-btn {
  flex-shrink: 0;
  padding: 7px 15px;
  border-radius: 99px;
  font-size: 12.5px;
  font-weight: 500;
  border: 1px solid var(--border);
  color: var(--text-2);
  background: transparent;
  transition: all var(--transition);
  white-space: nowrap;
  min-height: 34px;
  cursor: pointer;
  font-family: var(--font);
}
.filter-btn:hover {
  border-color: var(--border-h);
  color: var(--text-1);
  background: var(--surface-h);
}
.filter-btn.active {
  border-color: rgba(212,168,75,0.5);
  color: var(--gold-bright);
  background: var(--gold-dim);
}

/* Cart button in topbar */
.cart-btn {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 99px;
  background: var(--gold-dim);
  border: 1px solid rgba(212,168,75,0.4);
  color: var(--gold-bright);
  font-size: 12.5px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}
.cart-btn:hover { background: rgba(212,168,75,0.25); }

#cart-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  border-radius: 99px;
  background: var(--gold);
  color: #0d0d16;
  font-size: 10px;
  font-weight: 800;
}

/* ═══════════════════════════════════════════════════════════════════
   TESLA NEUMORPHISM THEMES — Dark + Light
   Inspired by Tesla mobile app · soft dual-shadow surfaces
═══════════════════════════════════════════════════════════════════ */

/* ── Tesla Dark tokens ─────────────────────────────────────────── */
[data-theme="tesla-dark"] {
  --bg:           #24272C;
  --bg-1:         #24272C;
  --bg-2:         #24272C;
  --bg-3:         #2A2D33;

  --surface:      #24272C;
  --surface-h:    #2A2D33;
  --surface-2:    #2F3239;

  --border:       rgba(255,255,255,0.04);
  --border-h:     rgba(255,255,255,0.08);

  /* Alias gold → cyan gradient stops so all existing var(--gold*)
     references automatically pick up the Tesla accent. */
  --gold:         #2FB8FF;
  --gold-bright:  #9EECD9;
  --gold-dim:     rgba(47,184,255,0.12);
  --gold-glow:    rgba(47,184,255,0.30);

  --text-1:       #E5E7EB;
  --text-2:       #B0B5C2;
  --text-3:       #7F8493;

  --accent-gradient: linear-gradient(135deg, #2FB8FF 0%, #9EECD9 100%);

  /* Neumorphic dual shadows */
  --neu-light:    rgba(255,255,255,0.04);
  --neu-dark:     rgba(0,0,0,0.55);
  --shadow-raised-sm:  -2px -2px 4px  rgba(255,255,255,0.04),  2px  2px 4px  rgba(0,0,0,0.50);
  --shadow-raised-md:  -6px -6px 12px rgba(255,255,255,0.04),  6px  6px 12px rgba(0,0,0,0.55);
  --shadow-raised-lg:  -10px -10px 20px rgba(255,255,255,0.04), 10px 10px 20px rgba(0,0,0,0.60);
  --shadow-raised-xl:  -18px -18px 36px rgba(255,255,255,0.04), 18px 18px 36px rgba(0,0,0,0.60);
  --shadow-pressed-sm: inset 2px 2px 4px rgba(0,0,0,0.55), inset -2px -2px 4px rgba(255,255,255,0.04);
  --shadow-pressed-md: inset 4px 4px 10px rgba(0,0,0,0.60), inset -4px -4px 10px rgba(255,255,255,0.05);

  --shadow-card:  var(--shadow-raised-lg);
  --shadow-modal: var(--shadow-raised-xl);
  --shadow-gold:  0 8px 32px rgba(47,184,255,0.20);
}

/* ── Tesla Light tokens ────────────────────────────────────────── */
[data-theme="tesla-light"] {
  --bg:           #E9EAF0;
  --bg-1:         #E9EAF0;
  --bg-2:         #E9EAF0;
  --bg-3:         #E0E5EC;

  --surface:      #E9EAF0;
  --surface-h:    #DFE2EA;
  --surface-2:    #D5D9E2;

  --border:       rgba(163,177,198,0.18);
  --border-h:     rgba(163,177,198,0.32);

  --gold:         #2FB8FF;
  --gold-bright:  #29A8E8;
  --gold-dim:     rgba(47,184,255,0.10);
  --gold-glow:    rgba(47,184,255,0.20);

  --text-1:       #1F2937;
  --text-2:       #475569;
  --text-3:       #757E95;

  --accent-gradient: linear-gradient(135deg, #2FB8FF 0%, #9EECD9 100%);

  --neu-light:    rgba(255,255,255,0.90);
  --neu-dark:     rgba(163,177,198,0.55);
  --shadow-raised-sm:  -2px -2px 4px  rgba(255,255,255,0.90),  2px  2px 4px  rgba(163,177,198,0.40);
  --shadow-raised-md:  -6px -6px 12px rgba(255,255,255,0.85),  6px  6px 12px rgba(163,177,198,0.50);
  --shadow-raised-lg:  -10px -10px 20px rgba(255,255,255,0.85), 10px 10px 20px rgba(163,177,198,0.55);
  --shadow-raised-xl:  -18px -18px 36px rgba(255,255,255,0.85), 18px 18px 36px rgba(163,177,198,0.55);
  --shadow-pressed-sm: inset 2px 2px 4px rgba(163,177,198,0.50), inset -2px -2px 4px rgba(255,255,255,0.85);
  --shadow-pressed-md: inset 4px 4px 10px rgba(163,177,198,0.55), inset -4px -4px 10px rgba(255,255,255,0.90);

  --shadow-card:  var(--shadow-raised-lg);
  --shadow-modal: var(--shadow-raised-xl);
  --shadow-gold:  0 8px 32px rgba(47,184,255,0.18);
}

/* ── Shared neumorphic component overrides ─────────────────────── */
[data-theme="tesla-dark"] body,
[data-theme="tesla-light"] body { background: var(--bg); }

[data-theme="tesla-dark"]  #sidebar,
[data-theme="tesla-light"] #sidebar {
  background: var(--bg);
  border-right: none;
  box-shadow: var(--shadow-raised-md);
}

[data-theme="tesla-dark"]  .sidebar-logo,
[data-theme="tesla-light"] .sidebar-logo { border-bottom: none; }
[data-theme="tesla-light"] .sidebar-logo-img { filter: none; }

[data-theme="tesla-dark"]  .sidebar-footer,
[data-theme="tesla-light"] .sidebar-footer { border-top: none; }

[data-theme="tesla-dark"]  .nav-item,
[data-theme="tesla-light"] .nav-item {
  color: var(--text-2);
  background: transparent;
}
[data-theme="tesla-dark"]  .nav-item:hover,
[data-theme="tesla-light"] .nav-item:hover {
  background: transparent;
  color: var(--text-1);
  box-shadow: var(--shadow-raised-sm);
}
[data-theme="tesla-dark"]  .nav-item.active,
[data-theme="tesla-light"] .nav-item.active {
  background: var(--bg);
  color: var(--text-1);
  box-shadow: var(--shadow-pressed-sm);
}
[data-theme="tesla-dark"]  .nav-item.active i,
[data-theme="tesla-light"] .nav-item.active i {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
[data-theme="tesla-light"] .nav-item { color: var(--text-2); font-weight: 500; }

[data-theme="tesla-dark"]  .fav-badge,
[data-theme="tesla-light"] .fav-badge {
  background: var(--accent-gradient);
  color: #0a0e14;
}

[data-theme="tesla-dark"]  #topbar {
  background: var(--bg);
  border-bottom: none;
  box-shadow: var(--shadow-raised-sm);
}
[data-theme="tesla-light"] #topbar {
  background: var(--bg);
  border-bottom: none;
  box-shadow: var(--shadow-raised-sm);
}
[data-theme="tesla-light"] .topbar-title { color: var(--text-1); }

[data-theme="tesla-dark"]  #season-bar,
[data-theme="tesla-light"] #season-bar {
  background: var(--bg);
  border-bottom: none;
}

/* Pills — raised, pressed when active */
[data-theme="tesla-dark"]  .pill,
[data-theme="tesla-light"] .pill {
  background: var(--bg);
  border: none;
  box-shadow: var(--shadow-raised-sm);
  color: var(--text-2);
}
[data-theme="tesla-dark"]  .pill:hover,
[data-theme="tesla-light"] .pill:hover {
  background: var(--bg);
  color: var(--text-1);
  box-shadow: var(--shadow-raised-md);
}
[data-theme="tesla-dark"]  .pill.active,
[data-theme="tesla-light"] .pill.active {
  background: var(--bg);
  box-shadow: var(--shadow-pressed-sm);
  color: var(--text-1);
}
[data-theme="tesla-dark"]  .pill-trending.active,
[data-theme="tesla-light"] .pill-trending.active {
  background: var(--accent-gradient);
  color: #0a0e14;
  box-shadow: var(--shadow-raised-sm), 0 0 18px rgba(47,184,255,0.35);
}
[data-theme="tesla-dark"]  .pill-type.active,
[data-theme="tesla-light"] .pill-type.active {
  box-shadow: var(--shadow-pressed-sm);
}
[data-theme="tesla-dark"]  .spill,
[data-theme="tesla-light"] .spill {
  background: var(--bg);
  border: none;
  box-shadow: var(--shadow-raised-sm);
  color: var(--text-2);
}
[data-theme="tesla-dark"]  .spill.active,
[data-theme="tesla-light"] .spill.active {
  background: var(--bg);
  box-shadow: var(--shadow-pressed-sm);
  color: var(--text-1);
}

/* Sound cards — raised neumorphic */
[data-theme="tesla-dark"]  .sound-card,
[data-theme="tesla-light"] .sound-card {
  background: var(--bg);
  border: none;
  box-shadow: var(--shadow-raised-md);
}
[data-theme="tesla-dark"]  .sound-card::after,
[data-theme="tesla-light"] .sound-card::after {
  background: radial-gradient(ellipse at 60% 0%, rgba(47,184,255,0.10) 0%, transparent 65%);
}
[data-theme="tesla-dark"]  .sound-card:hover,
[data-theme="tesla-light"] .sound-card:hover {
  border-color: transparent;
  box-shadow: var(--shadow-raised-lg);
  transform: translateY(-2px);
}
[data-theme="tesla-dark"]  .sound-card.playing,
[data-theme="tesla-light"] .sound-card.playing {
  border-color: transparent;
  box-shadow: var(--shadow-pressed-sm), 0 0 24px rgba(47,184,255,0.25);
}
[data-theme="tesla-dark"]  .sound-card.featured-card,
[data-theme="tesla-light"] .sound-card.featured-card {
  background: var(--bg);
  border-color: transparent;
}

/* Buttons — raised neumorphic with cyan gradient */
[data-theme="tesla-dark"]  .btn-primary,
[data-theme="tesla-light"] .btn-primary {
  background: var(--accent-gradient);
  color: #0a0e14;
  box-shadow: var(--shadow-raised-sm), 0 4px 18px rgba(47,184,255,0.30);
}
[data-theme="tesla-dark"]  .btn-primary:hover,
[data-theme="tesla-light"] .btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-raised-md), 0 6px 24px rgba(47,184,255,0.45);
}
[data-theme="tesla-dark"]  .btn-primary:active,
[data-theme="tesla-light"] .btn-primary:active {
  transform: translateY(0);
  box-shadow: var(--shadow-pressed-sm);
}

[data-theme="tesla-dark"]  .btn-secondary,
[data-theme="tesla-light"] .btn-secondary {
  background: var(--bg);
  border: none;
  color: var(--text-1);
  box-shadow: var(--shadow-raised-sm);
}
[data-theme="tesla-dark"]  .btn-secondary:hover,
[data-theme="tesla-light"] .btn-secondary:hover {
  background: var(--bg);
  box-shadow: var(--shadow-raised-md);
  transform: translateY(-1px);
}
[data-theme="tesla-dark"]  .btn-secondary:active,
[data-theme="tesla-light"] .btn-secondary:active {
  box-shadow: var(--shadow-pressed-sm);
}

[data-theme="tesla-dark"]  .btn-ghost,
[data-theme="tesla-light"] .btn-ghost {
  background: var(--bg);
  border: none;
  box-shadow: var(--shadow-raised-sm);
  color: var(--text-2);
}
[data-theme="tesla-dark"]  .btn-ghost:hover,
[data-theme="tesla-light"] .btn-ghost:hover {
  color: var(--text-1);
  box-shadow: var(--shadow-raised-md);
}

/* Card CTA buttons */
[data-theme="tesla-dark"]  .card-cta-btn.cta-paid,
[data-theme="tesla-light"] .card-cta-btn.cta-paid {
  background: var(--accent-gradient);
  color: #0a0e14;
  box-shadow: var(--shadow-raised-sm), 0 2px 8px rgba(47,184,255,0.30);
}
[data-theme="tesla-dark"]  .card-cta-btn.cta-paid:hover,
[data-theme="tesla-light"] .card-cta-btn.cta-paid:hover {
  box-shadow: var(--shadow-raised-md), 0 4px 16px rgba(47,184,255,0.45);
  transform: translateY(-1px);
}
[data-theme="tesla-dark"]  .card-cta-btn.cta-free,
[data-theme="tesla-light"] .card-cta-btn.cta-free {
  background: var(--bg);
  border: none;
  color: var(--success);
  box-shadow: var(--shadow-raised-sm);
}
[data-theme="tesla-dark"]  .card-cta-btn.cta-free:hover,
[data-theme="tesla-light"] .card-cta-btn.cta-free:hover {
  box-shadow: var(--shadow-raised-md);
  transform: translateY(-1px);
}

/* Icon buttons — flat with raised hover */
[data-theme="tesla-dark"]  .icon-btn:hover,
[data-theme="tesla-light"] .icon-btn:hover {
  background: var(--bg);
  border-color: transparent;
  box-shadow: var(--shadow-raised-sm);
  color: var(--text-1);
}
[data-theme="tesla-dark"]  .vote-btn.icon-btn.voted,
[data-theme="tesla-light"] .vote-btn.icon-btn.voted,
[data-theme="tesla-dark"]  .bookmark-btn.icon-btn.bookmarked,
[data-theme="tesla-light"] .bookmark-btn.icon-btn.bookmarked {
  color: transparent;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Theme toggle — circular raised */
[data-theme="tesla-dark"]  .theme-toggle,
[data-theme="tesla-light"] .theme-toggle {
  background: var(--bg);
  border: none;
  box-shadow: var(--shadow-raised-sm);
  color: var(--text-2);
}
[data-theme="tesla-dark"]  .theme-toggle:hover,
[data-theme="tesla-light"] .theme-toggle:hover {
  background: var(--bg);
  box-shadow: var(--shadow-raised-md);
  color: transparent;
  background-image: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
[data-theme="tesla-dark"]  .theme-toggle:hover { background: var(--bg); }
[data-theme="tesla-light"] .theme-toggle:hover { background: var(--bg); }

/* Modal — raised neumorphic panel, no border */
[data-theme="tesla-dark"]  .modal,
[data-theme="tesla-light"] .modal {
  background: var(--bg);
  border: none;
  box-shadow: var(--shadow-raised-xl);
}
[data-theme="tesla-light"] .modal-overlay { background: rgba(120,130,150,0.45); }

/* Inputs — sunken/inset */
[data-theme="tesla-dark"]  input[type="text"],
[data-theme="tesla-dark"]  input[type="email"],
[data-theme="tesla-dark"]  input[type="search"],
[data-theme="tesla-dark"]  input[type="number"],
[data-theme="tesla-dark"]  textarea,
[data-theme="tesla-light"] input[type="text"],
[data-theme="tesla-light"] input[type="email"],
[data-theme="tesla-light"] input[type="search"],
[data-theme="tesla-light"] input[type="number"],
[data-theme="tesla-light"] textarea {
  background: var(--bg);
  border: none;
  box-shadow: var(--shadow-pressed-sm);
  color: var(--text-1);
}
[data-theme="tesla-dark"]  input:focus,
[data-theme="tesla-light"] input:focus,
[data-theme="tesla-dark"]  textarea:focus,
[data-theme="tesla-light"] textarea:focus {
  outline: none;
  box-shadow: var(--shadow-pressed-sm), 0 0 0 2px rgba(47,184,255,0.35);
}

/* Sidebar badge */
[data-theme="tesla-dark"]  .sidebar-badge,
[data-theme="tesla-light"] .sidebar-badge {
  background: var(--bg);
  box-shadow: var(--shadow-raised-sm);
  color: var(--text-2);
  border: none;
}
[data-theme="tesla-light"] .sidebar-sub { color: var(--text-3); }

/* Featured / category badges keep their hue but lose hard borders */
[data-theme="tesla-dark"]  .featured-badge,
[data-theme="tesla-light"] .featured-badge {
  border-color: transparent;
  background: var(--bg);
  box-shadow: var(--shadow-raised-sm);
  color: transparent;
  background-image: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Wave gradients — keep, but featured-card highlight uses cyan */
[data-theme="tesla-dark"]  .sound-card.featured-card,
[data-theme="tesla-light"] .sound-card.featured-card {
  background: linear-gradient(160deg, rgba(47,184,255,0.06) 0%, var(--bg) 55%);
}

/* Tesla Light: scrollbars + small contrast tweaks */
[data-theme="tesla-light"] .nav-item.active i,
[data-theme="tesla-light"] .featured-badge { -webkit-text-fill-color: transparent; }
[data-theme="tesla-light"] body { color: var(--text-1); }
