/* ==========================================================================
   MemeSoundPad.com — Production Hybrid Design System
   DNA: MSP-01 MPC Hardware Launchpad + MSP-03 High-Density Creator Sound Index
   Target: US / UK YouTube Editors, CapCut, OBS Streamers, Discord & Viral Memes
   ========================================================================== */

:root {
  --bg: #0D0F14;
  --chassis: #151922;
  --pad-bg: #1E2330;
  --row-bg: #121620;
  --border: rgba(255, 255, 255, 0.09);
  --border-hi: rgba(255, 255, 255, 0.22);
  --text: #F8FAFC;
  --muted: #94A3B8;
  --volt: #CCFF00;
  --crimson: #FF3358;
  --cyan: #00E5FF;
  --amber: #FFAA00;
  --violet: #A855F7;
  --green: #1EE87A;
  --font-display: 'Syne', system-ui, sans-serif;
  --font-sans: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; color-scheme: dark; }

body {
  min-height: 100dvh;
  background:
    radial-gradient(880px circle at 15% -5%, rgba(204, 255, 0, 0.08), transparent 55%),
    radial-gradient(820px circle at 88% 5%, rgba(0, 229, 255, 0.07), transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.5;
  overflow-x: hidden;
  padding-bottom: max(3.5rem, env(safe-area-inset-bottom, 0px));
}

a { color: inherit; }
button, input, select { font-family: inherit; }
:focus-visible { outline: 2px solid var(--volt); outline-offset: 2px; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

.container { width: min(1260px, 100% - 2rem); margin-inline: auto; }

/* ================= HEADER ================= */
.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  backdrop-filter: blur(18px);
  background: rgba(13, 15, 20, 0.86);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  min-height: 66px;
  padding: 0.6rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-pads {
  width: 36px;
  height: 36px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  padding: 4px;
  border-radius: 10px;
  background: var(--chassis);
  border: 1px solid var(--border-hi);
}
.brand-pads span { border-radius: 3px; }
.brand-pads span:nth-child(1) { background: var(--volt); }
.brand-pads span:nth-child(2) { background: var(--crimson); }
.brand-pads span:nth-child(3) { background: var(--cyan); }
.brand-pads span:nth-child(4) { background: var(--amber); }

.brand-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
}
.brand-title em { font-style: normal; color: var(--volt); }
.brand-sub {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--muted);
  letter-spacing: 0.08em;
  margin-top: 2px;
}

.nav-links { display: flex; gap: 0.25rem; align-items: center; }
.nav-links a {
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  padding: 0.48rem 0.82rem;
  border-radius: 10px;
  white-space: nowrap;
  transition: all 0.16s ease;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); background: rgba(255,255,255,0.06); }
.nav-links a.active { color: var(--volt); }
.nav-links a.bounty-nav { color: var(--amber); border: 1px solid rgba(255,170,0,0.3); background: rgba(255,170,0,0.08); }

.hud-controls { display: flex; align-items: center; gap: 0.45rem; }

.combo-led {
  padding: 0.35rem 0.7rem;
  border-radius: 9px;
  background: #090B0F;
  border: 1px solid rgba(204,255,0,0.3);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--volt);
}

.btn-hud {
  min-height: 38px;
  padding: 0.38rem 0.8rem;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--chassis);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
}
.btn-hud:hover { border-color: var(--border-hi); }
.btn-hud.active { border-color: var(--volt); color: var(--volt); background: rgba(204,255,0,0.1); }
.btn-hud.danger { border-color: rgba(255,51,88,0.4); color: #FF7A92; }

.mobile-nav {
  display: none;
  border-top: 1px solid var(--border);
  padding: 0.45rem 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.mobile-nav::-webkit-scrollbar { display: none; }
.mobile-nav .container { display: flex; gap: 0.4rem; }
.mobile-nav a {
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.4rem 0.78rem;
  border-radius: 99px;
  border: 1px solid var(--border);
  background: var(--chassis);
  color: var(--muted);
  white-space: nowrap;
}
.mobile-nav a.active { border-color: var(--volt); color: var(--volt); }

/* ================= HERO + MPC HARDWARE CHASSIS (MSP-01) ================= */
.hero-header {
  padding: clamp(1.6rem, 3.5vw, 2.5rem) 0 1.2rem;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--volt);
  margin-bottom: 0.5rem;
}

.hero-header h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.2vw, 3.35rem);
  font-weight: 800;
  line-height: 1.0;
  letter-spacing: -0.03em;
}

.hero-header p {
  color: var(--muted);
  max-width: 60ch;
  font-size: 0.95rem;
  margin-top: 0.45rem;
}

.creator-badges {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.c-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.34rem 0.68rem;
  border-radius: 8px;
  background: var(--chassis);
  border: 1px solid var(--border);
  color: #CBD5E1;
}

/* MPC Hardware Frame */
.mpc-chassis {
  position: relative;
  background: linear-gradient(180deg, #1A1F2B 0%, #12151E 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 26px;
  padding: 16px;
  box-shadow: 0 28px 65px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.mpc-top-bar {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 12px;
  margin-bottom: 14px;
  align-items: center;
}

.oled-spectrum {
  background: #07090D;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.oled-telemetry {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--volt);
}

#fftCanvas {
  width: 100%;
  height: 58px;
  display: block;
}

.mpc-deck-controls {
  background: #0C0F16;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pitch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.pitch-group {
  display: inline-flex;
  background: var(--chassis);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2px;
  gap: 2px;
}

.pitch-btn {
  min-height: 32px;
  padding: 0.25rem 0.65rem;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
}
.pitch-btn.active { background: var(--volt); color: #090B0F; }

.gain-wrap {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
}

.gain-wrap input[type="range"] {
  flex: 1;
  accent-color: var(--volt);
  cursor: pointer;
}

/* 4x4 Hardware 3D Physical Depress Pads */
.pad-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.mpc-pad {
  position: relative;
  border: none;
  border-radius: 15px;
  background: linear-gradient(180deg, #272E3F 0%, #1C212E 100%);
  color: var(--text);
  padding: 12px;
  min-height: 112px;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    0 6px 0 #090B10,
    0 0 0 2px var(--pad-color, #CCFF00),
    0 12px 24px rgba(0, 0, 0, 0.42);
  transition: transform 0.08s ease, box-shadow 0.08s ease, background 0.12s ease;
  user-select: none;
}

.mpc-pad:hover {
  background: linear-gradient(180deg, #2E364A 0%, #212737 100%);
}

.mpc-pad:active,
.mpc-pad.pressed {
  transform: translateY(5px);
  box-shadow:
    0 1px 0 #090B10,
    0 0 0 2px var(--pad-color, #CCFF00),
    0 0 28px var(--pad-glow, rgba(204, 255, 0, 0.45));
}

.pad-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.pad-key {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(9, 11, 16, 0.72);
  color: var(--pad-color, var(--volt));
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.pad-dur {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--muted);
}

.pad-name {
  font-family: var(--font-display);
  font-size: 0.96rem;
  font-weight: 800;
  line-height: 1.15;
}

.pad-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 4px;
  width: 100%;
}

.pad-tag {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  color: var(--muted);
}

.pad-mini-dl {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border: 1px solid var(--border);
  cursor: pointer;
}
.pad-mini-dl:hover { background: var(--volt); color: #090B0F; }

/* ================= MSP-03 HIGH-DENSITY SEO SOUND INDEX ================= */
.section {
  padding: clamp(2.2rem, 4.5vw, 3.4rem) 0;
  border-top: 1px solid var(--border);
  margin-top: 2.2rem;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.8vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.025em;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.search-input {
  flex: 1;
  min-width: 240px;
  max-width: 440px;
  min-height: 44px;
  padding: 0.55rem 0.95rem;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: var(--chassis);
  color: var(--text);
  font-size: 0.92rem;
}

.filter-row { display: flex; gap: 0.4rem; flex-wrap: wrap; }

.chip {
  min-height: 38px;
  padding: 0.38rem 0.85rem;
  border-radius: 99px;
  border: 1px solid var(--border);
  background: var(--chassis);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}
.chip.active { background: var(--volt); color: #090B0F; border-color: var(--volt); }

.density-switch {
  display: inline-flex;
  background: var(--chassis);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 3px;
}
.density-switch button {
  min-height: 34px;
  padding: 0.25rem 0.7rem;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
}
.density-switch button.active { background: var(--text); color: #090B0F; }

.sound-index-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}
.sound-index-grid.one-col { grid-template-columns: 1fr; }

.sound-slot {
  container-type: inline-size;
  container-name: sfx-row;
}

.sound-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.78rem 0.95rem;
  border-radius: 14px;
  background: var(--row-bg);
  border: 1px solid var(--border);
  transition: border-color 0.16s ease, background 0.16s ease;
}

.sound-row:hover { border-color: var(--border-hi); background: #161B27; }
.sound-row.active-row { border-color: var(--volt); }

.row-play-btn {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--border-hi);
  background: var(--pad-bg);
  color: var(--volt);
  font-size: 1rem;
  cursor: pointer;
  flex-shrink: 0;
  display: grid;
  place-items: center;
}
.sound-row.active-row .row-play-btn { background: var(--volt); color: #090B0F; }

.row-main { min-width: 0; flex: 1; }
.row-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.94rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.row-meta {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
  margin-top: 2px;
}

.row-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

.btn {
  min-height: 42px;
  padding: 0.55rem 1.1rem;
  border-radius: 11px;
  font-weight: 700;
  font-size: 0.86rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn-volt { background: var(--volt); color: #090B0F; }
.btn-volt:hover { background: #DCFF4D; }
.btn-dark { background: var(--pad-bg); color: var(--text); border-color: var(--border); }
.btn-dark:hover { border-color: var(--border-hi); }
.btn-green { background: var(--green); color: #06110B; }
.btn-xs { min-height: 36px; padding: 0.35rem 0.7rem; font-size: 0.76rem; border-radius: 9px; }

@container sfx-row (max-width: 470px) {
  .sound-row { flex-direction: column; align-items: stretch; }
  .row-title { white-space: normal; }
  .row-actions { width: 100%; border-top: 1px solid var(--border); padding-top: 0.55rem; }
  .row-actions .btn { flex: 1; }
}

/* ================= MONETIZATION CARDS (PRO PACKS, AFFILIATES & BOUNTIES) ================= */
.cards-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.pro-card {
  background: var(--chassis);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.85rem;
}
.pro-card.highlight {
  border-color: rgba(204, 255, 0, 0.42);
  background: linear-gradient(145deg, rgba(204, 255, 0, 0.08), var(--chassis) 62%);
}
.pro-card.bounty {
  border-color: rgba(255, 170, 0, 0.45);
  background: linear-gradient(145deg, rgba(255, 170, 0, 0.09), var(--chassis) 62%);
}
.pro-card.sv-bridge {
  border-color: rgba(30, 232, 122, 0.38);
  background: linear-gradient(145deg, rgba(30, 232, 122, 0.09), var(--chassis) 62%);
}

.pro-card h3 { font-family: var(--font-display); font-size: 1.25rem; line-height: 1.15; }
.pro-card p { color: var(--muted); font-size: 0.88rem; }

.form-box {
  background: var(--chassis);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 1.4rem;
  display: grid;
  gap: 0.85rem;
}

.field { display: flex; flex-direction: column; gap: 0.35rem; }
.field label { font-size: 0.8rem; font-weight: 700; color: var(--muted); }
.field input, .field select {
  min-height: 44px;
  padding: 0.55rem 0.9rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 0.9rem;
}

.status-banner {
  padding: 0.7rem 0.9rem;
  border-radius: 10px;
  font-size: 0.84rem;
  display: none;
}
.status-banner.ok { display: block; background: rgba(30,232,122,0.14); border: 1px solid rgba(30,232,122,0.35); color: var(--green); }
.status-banner.err { display: block; background: rgba(255,51,88,0.14); border: 1px solid rgba(255,51,88,0.35); color: #FF8AA0; }

.toast {
  position: fixed;
  right: 16px;
  bottom: 18px;
  z-index: 120;
  background: #171D28;
  border: 1px solid var(--volt);
  color: var(--text);
  padding: 0.65rem 1rem;
  border-radius: 12px;
  font-size: 0.84rem;
  font-weight: 700;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: all 0.2s ease;
}
.toast.show { opacity: 1; transform: translateY(0); }

footer.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 2.5rem;
  padding: 1.8rem 0 1rem;
  color: var(--muted);
  font-size: 0.82rem;
}

@media (max-width: 960px) {
  .nav-links { display: none; }
  .mobile-nav { display: block; }
  .mpc-top-bar { grid-template-columns: 1fr; }
  .pad-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sound-index-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .container { width: calc(100% - 1.2rem); }
  input, select { font-size: 16px !important; }
  .density-switch { display: none; }
  .mpc-pad { min-height: 98px; padding: 10px; }
}

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