@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Space+Grotesk:wght@500;600;700&display=swap');

/* ============================================================
   Menacing Soundz — design system
   Dark, premium, cinematic, minimal. Hand-written, no frameworks.
   ============================================================ */

:root {
  --bg: #0a0a0c;
  --surface: #141417;
  --surface-2: #1a1a1f;
  --border: #232328;
  --text: #f2f2f3;
  --muted: #a1a1aa;
  --platinum: #e8e8ec;
  --accent: #c2263a;
  --danger: #e5484d;
  --success: #46c08a;

  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;

  --radius: 10px;
  --radius-sm: 6px;
  --max-width: 1180px;
  --player-height: 92px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ---- Immersive logo wallpaper: fixed emblem behind everything ---- */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: url("/images/logo.jpg") center 12% / min(1100px, 160vw) auto no-repeat;
  opacity: 0.9;
  z-index: 0;
  pointer-events: none;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 45% 35% at 50% 32%, rgba(194, 38, 58, 0.14), transparent 70%),
    radial-gradient(ellipse 90% 70% at 50% 30%, transparent 30%, rgba(10,10,12,0.5) 72%, var(--bg) 100%),
    linear-gradient(to bottom, rgba(10,10,12,0.15), rgba(10,10,12,0.68) 85%);
  z-index: 0;
  pointer-events: none;
}
main, header.site-header, footer.site-footer { position: relative; z-index: 1; }

/* ---- Floating 3D depth: glass panels + lifted type ---- */
.card, .beat-card, .plan-card, .panel, .auth-card {
  background: rgba(20, 20, 24, 0.68) !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), 0 2px 8px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.07);
}
h1, h2, .hero-title {
  text-shadow: 0 2px 24px rgba(0,0,0,0.9), 0 1px 3px rgba(0,0,0,0.8);
}

/* Room for the fixed player bar when it is visible */
body.has-player { padding-bottom: var(--player-height); }

img { max-width: 100%; display: block; }

a { color: var(--platinum); text-decoration: none; }
a:hover { color: var(--accent); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: -0.01em;
  line-height: 1.1;
  margin: 0 0 0.6em;
}

p { margin: 0 0 1em; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 88px 0; }
.section-sm { padding: 48px 0; }

.eyebrow {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 16px;
}

.lede { color: var(--muted); font-size: 18px; max-width: 640px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------------- Header / nav ---------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 900;
  background: rgba(10, 10, 12, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 68px;
}

.brand {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-size: 18px;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.brand:hover { color: var(--text); }
.brand-mark {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  object-fit: cover;
  display: block;
  box-shadow: 0 4px 18px rgba(0,0,0,0.6);
}

.site-nav { display: flex; align-items: center; gap: 28px; }

.site-nav a {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.site-nav a:hover, .site-nav a.is-active { color: var(--text); }

.header-actions { display: flex; align-items: center; gap: 12px; }

/* ---------------- Hero ---------------- */

.hero {
  padding: 110px 0 96px;
  position: relative;
  overflow: hidden;
}
.hero > * { position: relative; }

.hero-title {
  font-size: clamp(2.6rem, 7.5vw, 5.4rem);
  font-weight: 700;
  max-width: 16ch;
  margin-bottom: 24px;
}

.hero-body { color: var(--muted); font-size: 19px; max-width: 620px; margin-bottom: 36px; }

.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; }

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  margin-top: 64px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}
.hero-stats .stat b {
  display: block;
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
}
.hero-stats .stat span { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: 0.1em; }

/* ---------------- Buttons ---------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: var(--platinum);
  color: #0a0a0c;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn:hover { background: #ffffff; color: #0a0a0c; }

.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 8px 28px rgba(194, 38, 58, 0.35); }
.btn-primary:hover { background: #d4314a; color: #fff; box-shadow: 0 8px 36px rgba(194, 38, 58, 0.5); }

.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: #d4314a; color: #fff; }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover { border-color: var(--platinum); color: var(--text); }

.btn-sm { padding: 9px 18px; font-size: 12px; }
.btn-lg { padding: 17px 36px; font-size: 15px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }

/* ---------------- Beat cards ---------------- */

.beats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 28px;
}

.beat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.beat-card:hover { border-color: #3a3a42; transform: translateY(-2px); }

.beat-artwork {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--surface-2);
}
.beat-artwork img { width: 100%; height: 100%; object-fit: cover; }
.beat-artwork .artwork-fallback {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 40px; font-weight: 700; color: var(--border);
  text-transform: uppercase;
}

/* Card play button — circular overlay on artwork */
.beat-artwork .js-play {
  position: absolute;
  right: 12px; bottom: 12px;
  width: 52px; height: 52px;
  border-radius: 50%;
  border: none;
  background: var(--platinum);
  color: #0a0a0c;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.15s ease, transform 0.15s ease, background 0.15s ease;
}
.beat-card:hover .js-play,
.beat-artwork .js-play.is-current,
.beat-artwork .js-play:focus-visible { opacity: 1; transform: none; }
.beat-artwork .js-play:hover { background: #ffffff; }
.beat-artwork .js-play.is-playing { opacity: 1; transform: none; background: var(--accent); }
.beat-artwork .js-play svg { width: 20px; height: 20px; }

.beat-info { padding: 16px 16px 18px; }
.beat-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  margin: 0 0 6px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.beat-title a { color: var(--text); }
.beat-title a:hover { color: var(--accent); }
.beat-meta { color: var(--muted); font-size: 13px; }
.beat-meta .dot { margin: 0 6px; opacity: 0.5; }

/* ---------------- Filter bar ---------------- */

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 32px;
}
.filter-field { display: flex; flex-direction: column; gap: 6px; }
.filter-field label {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted);
}
.filter-bar input[type="text"],
.filter-bar input[type="number"],
.filter-bar select {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 14px;
  font-family: var(--font-body);
  min-width: 140px;
}
.filter-bar input:focus, .filter-bar select:focus {
  outline: none; border-color: var(--accent);
}
.filter-actions { display: flex; gap: 10px; margin-left: auto; }

/* ---------------- Beat detail ---------------- */

.beat-detail {
  display: grid;
  grid-template-columns: minmax(280px, 420px) 1fr;
  gap: 56px;
  align-items: start;
}
.beat-detail .beat-artwork { border-radius: var(--radius); border: 1px solid var(--border); overflow: hidden; }

.beat-detail h1 { font-size: clamp(1.8rem, 4vw, 3rem); text-transform: none; }

.beat-facts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 28px 0;
}
.beat-facts .fact { background: var(--surface); padding: 16px; }
.beat-facts .fact b {
  display: block; font-family: var(--font-display); font-size: 20px; font-weight: 700;
}
.beat-facts .fact span { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; }

.tag-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0; }
.tag {
  font-size: 12px; color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 12px;
}
.tag:hover { color: var(--text); border-color: var(--platinum); }

.beat-detail .detail-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0; }

/* ---------------- Pricing ---------------- */

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px;
  max-width: 860px;
  margin: 0 auto;
}
.plan-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 36px;
}
.plan-card.featured { border-color: var(--accent); }
.plan-badge {
  position: absolute;
  top: -13px; left: 36px;
  background: var(--accent);
  color: #0a0a0c;
  font-family: var(--font-display);
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 999px;
}
.plan-name {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 15px;
  color: var(--muted);
  margin-bottom: 12px;
}
.plan-price { font-family: var(--font-display); font-size: 52px; font-weight: 700; line-height: 1; }
.plan-price small { font-size: 16px; font-weight: 500; color: var(--muted); }
.plan-save { color: var(--accent); font-size: 14px; font-weight: 600; margin: 8px 0 24px; }
.plan-features { list-style: none; margin: 0 0 32px; padding: 0; }
.plan-features li { padding: 8px 0; border-top: 1px solid var(--border); font-size: 15px; }
.plan-features li::before { content: "— "; color: var(--muted); }

/* ---------------- FAQ ---------------- */

.faq { max-width: 760px; margin: 0 auto; }
details.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  margin-bottom: 12px;
  overflow: hidden;
}
details.faq-item summary {
  cursor: pointer;
  padding: 18px 22px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
details.faq-item summary::-webkit-details-marker { display: none; }
details.faq-item summary::after {
  content: "+";
  font-size: 22px;
  font-weight: 400;
  color: var(--muted);
  flex-shrink: 0;
  transition: transform 0.15s ease;
}
details.faq-item[open] summary::after { transform: rotate(45deg); color: var(--accent); }
details.faq-item .faq-body { padding: 0 22px 22px; color: var(--muted); }
details.faq-item .faq-body p:last-child { margin-bottom: 0; }

/* ---------------- Forms ---------------- */

.form { max-width: 520px; }
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--muted); margin-bottom: 8px;
}
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 15px;
  font-family: var(--font-body);
}
.form-group textarea { min-height: 130px; resize: vertical; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none; border-color: var(--accent);
}
.form-hint { font-size: 13px; color: var(--muted); margin-top: 6px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ---------------- Tables (admin) ---------------- */

.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
table.table { width: 100%; border-collapse: collapse; font-size: 14px; background: var(--surface); }
table.table th, table.table td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--border); }
table.table th {
  font-family: var(--font-display);
  font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted); font-weight: 600;
  background: var(--surface-2);
  white-space: nowrap;
}
table.table tr:last-child td { border-bottom: none; }
table.table tr:hover td { background: rgba(255, 255, 255, 0.015); }
.table-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.pill {
  display: inline-block;
  font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 3px 10px; border-radius: 999px;
  border: 1px solid var(--border); color: var(--muted);
}
.pill.on { color: var(--success); border-color: var(--success); }
.pill.off { color: var(--muted); }

/* ---------------- Flash messages ---------------- */

.flash {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  margin-bottom: 24px;
  font-size: 15px;
}
.flash-success { border-color: var(--success); color: var(--success); }
.flash-error { border-color: var(--danger); color: #ff9a9e; }

/* ---------------- Footer ---------------- */

.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 96px;
  padding: 56px 0 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-grid h4 { font-size: 12px; letter-spacing: 0.14em; color: var(--muted); margin-bottom: 16px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 10px; }
.footer-grid a { color: var(--muted); font-size: 14px; }
.footer-grid a:hover { color: var(--text); }
.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

/* ---------------- Pagination ---------------- */

.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 48px; flex-wrap: wrap; }
.pagination a, .pagination span {
  min-width: 42px; height: 42px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 14px; color: var(--muted); padding: 0 12px;
}
.pagination a:hover { border-color: var(--platinum); color: var(--text); }
.pagination .current { background: var(--platinum); color: #0a0a0c; border-color: var(--platinum); font-weight: 600; }

/* ---------------- Value props / misc sections ---------------- */

.value-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 28px;
}
.value-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
}
.value-card h3 { font-size: 16px; margin-bottom: 10px; }
.value-card p { color: var(--muted); font-size: 15px; margin: 0; }

.callout {
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 40px;
  text-align: center;
  background: var(--surface);
}
.callout h2 { margin-bottom: 12px; }
.callout p { color: var(--muted); max-width: 560px; margin: 0 auto 28px; }

/* ============================================================
   Persistent player bar
   ============================================================ */

#ms-player {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 1000;
  background: var(--surface);
  border-top: 1px solid var(--border);
  transform: translateY(102%);
  transition: transform 0.25s ease;
}
#ms-player.visible { transform: none; }

.ms-bar {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 10px 20px 2px;
  max-width: 1400px;
  margin: 0 auto;
}

#ms-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  min-width: 0;
  flex: 0 1 280px;
}

.ms-transport { display: flex; align-items: center; gap: 6px; }

.icon-btn {
  background: transparent;
  border: none;
  color: var(--platinum);
  width: 38px; height: 38px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
  position: relative;
}
.icon-btn:hover { background: var(--surface-2); color: #fff; }
.icon-btn svg { width: 18px; height: 18px; fill: currentColor; }

#ms-playpause {
  width: 46px; height: 46px;
  background: var(--platinum);
  color: #0a0a0c;
}
#ms-playpause:hover { background: #fff; color: #0a0a0c; }
#ms-playpause svg { width: 20px; height: 20px; }

#ms-shuffle.active, #ms-repeat.active { color: var(--accent); }
/* "1" badge on repeat-one mode */
#ms-repeat[data-mode="one"]::after {
  content: "1";
  position: absolute;
  bottom: 2px; right: 2px;
  font-size: 9px; font-weight: 700;
  background: var(--accent); color: #0a0a0c;
  width: 14px; height: 14px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-body);
}

.ms-seekrow {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 2px 20px 10px;
  max-width: 1400px;
  margin: 0 auto;
}
#ms-time { font-size: 12px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }

.ms-volume { display: flex; align-items: center; gap: 8px; margin-left: auto; }
#ms-vol { width: 96px; }
#ms-mute.is-muted { color: var(--muted); }

.ms-tools { display: flex; align-items: center; gap: 2px; }

/* Range sliders */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
  padding: 0;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--platinum);
  border: none;
  cursor: pointer;
}
input[type="range"]::-moz-range-thumb {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--platinum);
  border: none;
  cursor: pointer;
}
#ms-seek { flex: 1; min-width: 0; }

/* Queue slide-up panel */
#ms-queue {
  position: absolute;
  bottom: 100%; right: 16px;
  width: min(420px, calc(100% - 32px));
  max-height: 42vh;
  overflow-y: auto;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: var(--radius) var(--radius) 0 0;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}
#ms-queue.open { opacity: 1; transform: none; pointer-events: auto; }

.ms-queue-list { list-style: none; margin: 0; padding: 8px; }
.ms-queue-item { border-radius: var(--radius-sm); }
.ms-queue-item.is-current { background: rgba(122, 162, 255, 0.1); }
.ms-queue-track {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: transparent; border: none; color: var(--text);
  padding: 10px 12px; cursor: pointer; text-align: left;
  border-radius: var(--radius-sm);
  font-family: var(--font-body); font-size: 14px;
}
.ms-queue-track:hover { background: rgba(255, 255, 255, 0.04); }
.ms-queue-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ms-queue-item.is-current .ms-queue-title { color: var(--accent); font-weight: 600; }
.ms-queue-meta { color: var(--muted); font-size: 12px; white-space: nowrap; }

/* ---------------- Responsive ---------------- */

@media (max-width: 900px) {
  .beat-detail { grid-template-columns: 1fr; gap: 32px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .section { padding: 56px 0; }
  .hero { padding: 72px 0 56px; }
  .site-nav { display: none; } /* views render a mobile nav if needed */
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }

  /* Player compacts on small screens */
  .ms-volume { display: none; } /* hide volume slider */
  .ms-bar { gap: 10px; padding: 8px 12px 0; }
  #ms-title { font-size: 13px; flex-basis: 120px; }
  #ms-playpause { width: 42px; height: 42px; }
  .icon-btn { width: 34px; height: 34px; }
  .ms-seekrow { padding: 0 12px 8px; }
  #ms-queue { right: 8px; width: calc(100% - 16px); }
}

/* ---- SEO copy section ---- */
.seo-copy { padding: 64px 0; border-top: 1px solid var(--border); position: relative; z-index: 1; }
.seo-copy p { color: var(--muted); max-width: 780px; }
.seo-copy strong { color: var(--text); font-weight: 600; }

/* ============================================================
   MARKUP ALIGNMENT PASS (2026-10-10)
   Rules for the classes/ids the EJS views actually render.
   Same brand language as the design system above:
   logo wallpaper, frosted-glass panels, blood-red #c2263a,
   glowing red CTAs, dark premium aesthetic. Mobile-first.
   ============================================================ */

/* ---------------- Page scaffolding ---------------- */

.page-main { min-height: 55vh; }

.page-hero { padding: 72px 0 40px; }
.page-title { font-size: clamp(2rem, 5vw, 3.4rem); margin-bottom: 12px; }
.page-sub { color: var(--muted); font-size: 18px; max-width: 640px; margin-bottom: 0; }

.container.narrow { max-width: 620px; }

.section-title { font-size: clamp(1.4rem, 3vw, 2rem); margin-bottom: 28px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.section-head .section-title { margin-bottom: 0; }
.section-link { color: var(--accent); font-size: 14px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; white-space: nowrap; }
.section-link:hover { color: #d4314a; }
.section-sub { color: var(--muted); margin: -12px 0 28px; }

.cta-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; }

.empty-state {
  text-align: center;
  padding: 64px 24px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  color: var(--muted);
}
.empty-state p { margin-bottom: 4px; }
.empty-state .btn { margin-top: 16px; }

.error-status {
  font-family: var(--font-display);
  font-size: clamp(4rem, 12vw, 8rem);
  font-weight: 700;
  line-height: 1;
  color: var(--border);
  margin-bottom: 8px;
}

/* ---------------- Header / nav (markup uses .main-nav, not .site-nav) ---------------- */

.main-nav { display: flex; align-items: center; gap: 28px; }
.main-nav a {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  position: relative;
}
.main-nav a:hover { color: var(--text); }
.main-nav a.active { color: var(--text); }
.main-nav a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
}

.nav-link {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.nav-link:hover { color: var(--text); }

.inline-form { display: inline; margin: 0; }

.link-button {
  background: none;
  border: none;
  padding: 0;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
}
.link-button:hover { color: var(--text); }

/* ---------------- Hero (markup: .hero-kicker / .hero-headline / .hero-ctas) ---------------- */

.hero-kicker {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 18px;
}
.hero-headline {
  font-size: clamp(2.6rem, 7.5vw, 5.4rem);
  font-weight: 700;
  max-width: 16ch;
  margin-bottom: 24px;
  text-wrap: balance;
}
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------------- Beat cards (markup: .beat-grid / .beat-art) ---------------- */

.beat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 20px;
}

.beat-art {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--surface-2);
  overflow: hidden;
}
.beat-art img { width: 100%; height: 100%; object-fit: cover; display: block; }

.art-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 44px; font-weight: 700; text-transform: uppercase;
  color: #3a3a42;
  background:
    radial-gradient(circle at 50% 35%, rgba(194, 38, 58, 0.18), transparent 70%),
    var(--surface-2);
}
.art-placeholder-lg { font-size: 120px; }

/* Card play button — always-visible >=48px touch target overlaid on artwork */
.btn-play {
  position: absolute;
  right: 12px; bottom: 12px;
  width: 52px; height: 52px;
  border-radius: 50%;
  border: none;
  background: var(--platinum);
  color: #0a0a0c;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  z-index: 2;
}
.btn-play:hover { background: #ffffff; transform: scale(1.06); }
.btn-play.is-current, .btn-play.is-playing {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 8px 28px rgba(194, 38, 58, 0.5);
}
.btn-play svg { width: 22px; height: 22px; }
.btn-play-lg { width: 68px; height: 68px; right: 16px; bottom: 16px; }
.btn-play-lg svg { width: 28px; height: 28px; }

.meta-sep { margin: 0 6px; opacity: 0.5; }

/* ---------------- Filters (beats page) ---------------- */

.catalog { padding: 8px 0 88px; }

.filters {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  background: rgba(20, 20, 24, 0.68);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), 0 2px 8px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255,255,255,0.06);
  border-radius: var(--radius);
  margin-bottom: 32px;
}
.filter-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.filter-input {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 14px;
  font-family: var(--font-body);
  min-width: 140px;
}
input[type="search"].filter-input { min-width: 200px; flex: 1 1 200px; }
.filter-bpm { max-width: 130px; min-width: 110px; }
.filter-input:focus { outline: none; border-color: var(--accent); }
.filter-input::placeholder { color: var(--muted); opacity: 0.7; }

.page-link {
  min-width: 42px; height: 42px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 14px; color: var(--muted); padding: 0 12px;
}
a.page-link:hover { border-color: var(--platinum); color: var(--text); }
.page-ellipsis { color: var(--muted); padding: 0 4px; }

/* ---------------- Beat detail (markup: .beat-detail-inner et al.) ---------------- */

.beat-detail { display: block; padding: 56px 0 88px; }
.beat-detail-inner {
  display: grid;
  grid-template-columns: minmax(280px, 400px) minmax(0, 1fr);
  gap: 56px;
  align-items: start;
}
.beat-detail-art {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface-2);
}
.beat-detail-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.beat-detail-info { min-width: 0; }

.detail-kicker {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 14px;
}
.detail-title { font-size: clamp(1.9rem, 4vw, 3rem); text-transform: none; margin-bottom: 20px; }

.spec-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 0 0 24px;
}
.spec { background: rgba(20, 20, 24, 0.68); padding: 14px 16px; margin: 0; }
.spec dt { font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.spec dd { margin: 4px 0 0; font-family: var(--font-display); font-size: 20px; font-weight: 700; }

.detail-desc { color: var(--muted); }
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0; }
.detail-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 16px; }
.detail-note { font-size: 13px; color: var(--muted); }

.related { padding: 0 0 88px; }

/* ---------------- Pricing (markup: .plan-grid / .plan-card-featured) ---------------- */

.plans { padding: 24px 0 88px; }
.plan-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  max-width: 880px;
  margin: 0 auto;
  align-items: stretch;
}
.plan-card-featured {
  border-color: var(--accent);
  box-shadow:
    0 0 0 1px var(--accent),
    0 24px 60px rgba(0, 0, 0, 0.55),
    0 8px 40px rgba(194, 38, 58, 0.28);
}
.plan-desc { color: var(--muted); margin: 8px 0 28px; font-size: 15px; }
.plan-per { font-size: 16px; font-weight: 500; color: var(--muted); }
.plan-unavailable { color: var(--muted); font-size: 14px; }

/* Homepage pricing teaser */
.pricing-teaser { padding: 88px 0; text-align: center; }
.pricing-teaser-sub { color: var(--muted); margin-bottom: 32px; }
.plan-teasers { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; margin-bottom: 36px; }
.plan-teaser {
  background: rgba(20, 20, 24, 0.68);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), 0 2px 8px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255,255,255,0.06);
  border-radius: var(--radius);
  padding: 28px 36px;
  min-width: 220px;
}
.plan-teaser-annual { border-color: var(--accent); }
.plan-teaser .plan-badge { position: static; display: inline-block; margin-top: 12px; }
.pricing-teaser .cta-row { justify-content: center; }

/* Membership page sections */
.membership-benefits { padding: 72px 0; }
.licensing-summary { padding: 72px 0; border-top: 1px solid var(--border); }
.licensing-summary p { color: var(--muted); max-width: 720px; }

/* ---------------- Content sections (index / licensing) ---------------- */

.value-props { padding: 72px 0; }
.featured { padding: 8px 0 72px; }
.latest { padding: 8px 0 72px; }

.benefit-list {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.benefit-item {
  position: relative;
  background: rgba(20, 20, 24, 0.68);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), 0 2px 8px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255,255,255,0.06);
  border-radius: var(--radius);
  padding: 20px 22px 20px 52px;
  font-size: 15px;
}
.benefit-item::before {
  content: "\2713";
  position: absolute;
  left: 20px; top: 20px;
  color: var(--accent);
  font-weight: 700;
}

.licensing-terms { padding: 24px 0 72px; }
.license-text { font-size: 18px; line-height: 1.7; max-width: 720px; }
.disclaimer { font-size: 13px; color: var(--muted); margin-top: 32px; max-width: 640px; }
.faq-list { max-width: 760px; }

/* ---------------- Auth forms (login / signup / forgot / reset) ---------------- */

.auth { padding: 72px 0 88px; }
.auth-form { display: flex; flex-direction: column; margin-top: 32px; }
.field { display: block; margin-bottom: 20px; }
.field-label {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 8px;
}
.field .filter-input { width: 100%; padding: 12px 14px; font-size: 15px; }
.auth-links { margin-top: 24px; text-align: center; color: var(--muted); font-size: 14px; }
.auth-links a { color: var(--platinum); }
.auth-links a:hover { color: var(--accent); }

/* ---------------- Account page ---------------- */

.account { padding: 24px 0 88px; }
.sub-card {
  background: rgba(20, 20, 24, 0.68);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), 0 2px 8px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255,255,255,0.06);
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 48px;
  max-width: 640px;
}
.sub-card .plan-name { margin-bottom: 8px; }
.sub-status { font-size: 14px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; }
.status-active { color: var(--success); }
.status-trialing { color: var(--accent); }
.status-past_due, .status-unpaid, .status-incomplete { color: var(--danger); }
.status-canceled, .status-incomplete_expired { color: var(--muted); }
.sub-note { color: var(--muted); margin: 12px 0 24px; }
.sub-renew { color: var(--muted); font-size: 14px; margin: 8px 0 24px; }
.download-list { list-style: none; margin: 0 0 48px; padding: 0; max-width: 720px; }
.download-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 14px 4px;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
}
.download-date { color: var(--muted); font-size: 13px; white-space: nowrap; }

/* ---------------- Footer (markup: .footer-inner / .footer-nav / .footer-social) ---------------- */

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 40px;
}
.footer-brand { flex: 1 1 240px; }
.footer-brand .brand { margin-bottom: 4px; }
.footer-tag { color: var(--muted); font-size: 14px; margin: 12px 0 0; }
.footer-nav { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-nav a { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; }
.footer-nav a:hover { color: var(--text); }
.footer-social { display: flex; gap: 16px; flex-wrap: wrap; }
.footer-social a { color: var(--muted); font-size: 13px; }
.footer-social a:hover { color: var(--accent); }

/* ============================================================
   Persistent player — rebuilt for the actual markup
   (#ms-player > .player-track / .player-center / .player-extra)
   ============================================================ */

/* Critical: JS toggles .visible but never removes the `hidden`
   attribute, so .visible must override it or the bar never shows. */
#ms-player.visible { display: block; transform: none; }

#ms-player {
  background: rgba(16, 16, 20, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.6);
}
#ms-player.visible {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 20px;
}

.player-track { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 0 1 300px; }
.player-art {
  width: 54px; height: 54px;
  flex-shrink: 0;
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 35%, rgba(194, 38, 58, 0.25), transparent 70%),
    var(--surface-2);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: 700; font-size: 22px;
  color: var(--accent);
  overflow: hidden;
}
.player-art img { width: 100%; height: 100%; object-fit: cover; }
.player-meta { min-width: 0; }
.player-title { min-width: 0; }
.player-subtitle { font-size: 12px; color: var(--muted); white-space: nowrap; }

.player-center { display: flex; align-items: center; gap: 12px; flex: 1 1 auto; min-width: 0; }
.player-controls { display: flex; align-items: center; gap: 2px; flex-shrink: 0; }

.player-btn {
  background: transparent;
  border: none;
  color: var(--platinum);
  width: 38px; height: 38px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease, transform 0.12s ease;
}
.player-btn:hover { background: var(--surface-2); color: #ffffff; }
.player-btn svg { width: 18px; height: 18px; }
.player-btn.active { color: var(--accent); }

.player-btn-main {
  width: 48px; height: 48px;
  background: var(--platinum);
  color: #0a0a0c;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.5);
}
.player-btn-main:hover { background: #ffffff; color: #0a0a0c; transform: scale(1.05); }
.player-btn-main svg { width: 22px; height: 22px; }
.player-btn-main.is-playing { background: var(--accent); color: #ffffff; box-shadow: 0 4px 22px rgba(194, 38, 58, 0.5); }

.player-seek { flex: 1 1 auto; min-width: 0; }

.player-extra { display: flex; align-items: center; gap: 6px; margin-left: auto; flex-shrink: 0; }
.player-vol { width: 90px; }

/* Queue panel: same `hidden`-attribute override as the player bar */
#ms-queue.open { display: block; }
.queue-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 8px;
}
.queue-title {
  font-family: var(--font-display);
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--muted);
}
.queue-list { list-style: none; margin: 0; padding: 8px; }

/* ============================================================
   Mobile corrections
   ============================================================ */

@media (max-width: 900px) {
  .beat-detail-inner { grid-template-columns: 1fr; gap: 32px; }
  .beat-detail-art { max-width: 440px; }
}

@media (max-width: 640px) {
  /* Retarget: markup uses .main-nav (the old .site-nav rule matched nothing) */
  .main-nav { display: none; }

  /* Keep the header compact with the CTA visible */
  .site-header .container { gap: 12px; min-height: 60px; }
  .brand-mark { width: 40px; height: 40px; }
  .brand span { display: none; } /* emblem mark carries the brand on phones */
  .brand { font-size: 15px; }
  .header-actions { gap: 8px; margin-left: auto; }
  .header-actions .btn { padding: 10px 16px; font-size: 12px; white-space: nowrap; }
  .nav-link { font-size: 12px; }

  .page-hero { padding: 52px 0 32px; }
  .beat-detail { padding: 40px 0 64px; }

  .filters { padding: 16px; }
  input[type="search"].filter-input { flex-basis: 100%; }

  .plan-grid { grid-template-columns: 1fr; }
  .plans { padding-bottom: 64px; }

  .beat-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
  .beat-info { padding: 12px 12px 14px; }

  .footer-inner { flex-direction: column; gap: 24px; }

  /* Player compacts: track row, then full-width seek row */
  #ms-player.visible { flex-wrap: wrap; gap: 8px; padding: 8px 12px; }
  .player-track { flex: 1 1 auto; }
  .player-art { width: 44px; height: 44px; font-size: 18px; }
  .player-center { order: 3; flex: 1 1 100%; gap: 8px; }
  .player-extra { margin-left: 0; }
  .player-vol, #ms-vol { display: none; } /* volume slider hidden on phones */
  .player-btn { width: 40px; height: 40px; }
  .player-btn-main { width: 48px; height: 48px; }
  #ms-title { font-size: 13px; }
}

/* Trust line under pricing */
.plan-trust { text-align: center; color: #9aa0a6; font-size: 14px; margin: 18px 0 4px; letter-spacing: .02em; }
