:root {
  /* Colours matched to the plugin (mouseplugins-ui-pro Style.h). */
  --bg: #10161a;            /* backgroundTop */
  --bg-bottom: #050708;     /* backgroundBottom */
  --panel: #11161a;         /* metal panel base */
  --panel-2: #181d22;
  --line: #030506;          /* near-black panel edge */
  --text: #e7e9ee;
  --muted: #9aa0ad;
  --orange: #f67f2d;        /* plugin accent (color0), not the website orange */
  --orange-dim: #c75e12;
  --on: #f67f2d;
  --accent: #ffd6a8;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-bottom) 100%);
  color: var(--text);
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.demo {
  max-width: 1040px;
  margin: 0 auto;
  padding: 28px 20px 48px;
}

.demo-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}
.demo-head h1 {
  margin: 0;
  font-size: 40px;
  letter-spacing: 2px;
  font-weight: 800;
}
.tagline { margin: 4px 0 0; color: var(--muted); }

.buy {
  background: var(--orange);
  color: #1a1206;
  font-weight: 700;
  text-decoration: none;
  padding: 11px 18px;
  border-radius: 10px;
  white-space: nowrap;
  transition: background .15s, transform .05s;
}
.buy:hover { background: #ff8a3c; }
.buy:active { transform: translateY(1px); }

.transport {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 18px;
  margin-bottom: 16px;
}
.play {
  background: var(--orange);
  color: #1a1206;
  border: none;
  font-weight: 700;
  font-size: 16px;
  padding: 12px 22px;
  border-radius: 10px;
  cursor: pointer;
  min-width: 120px;
  transition: background .15s, transform .05s;
}
.play:hover { background: #ff8a3c; }
.play:active { transform: translateY(1px); }
.play.playing { background: var(--panel-2); color: var(--text); border: 1px solid var(--line); }

.bpm { display: flex; align-items: center; gap: 10px; }
.bpm label { color: var(--muted); font-weight: 600; }
.bpm output { min-width: 34px; font-variant-numeric: tabular-nums; font-weight: 700; }
.status { margin-left: auto; color: var(--muted); font-size: 13px; }

.sequencer {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 16px;
  overflow-x: auto;
}
.grid {
  display: grid;
  grid-template-columns: repeat(16, 1fr);
  gap: 6px;
  min-width: 720px;
}
.step {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 5px;
}
.step.playhead { box-shadow: 0 0 0 2px var(--accent) inset; }
.step-note {
  width: 100%;
  background: #14161d;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 4px 2px;
  font-size: 12px;
  text-align: center;
}
.step-toggle {
  border: 1px solid var(--line);
  background: #14161d;
  color: var(--muted);
  border-radius: 5px;
  padding: 5px 0;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: .5px;
  transition: background .1s, color .1s, border-color .1s;
}
.step-toggle.on { background: var(--on); color: #1a1206; border-color: var(--on); }
.step-toggle.acc.on { background: #facc15; border-color: #facc15; }
.step-toggle.sld.on { background: #38bdf8; border-color: #38bdf8; color: #06222e; }
.step-gate { font-size: 12px; }

.controls { display: flex; flex-wrap: wrap; gap: 14px; }
/* Metal panel matched to the plugin's drawMetalPanel (gradient + dark edge + bevel). */
.panel {
  background: linear-gradient(180deg, #1a2027 0%, var(--panel) 42%, #0f1317 78%, #0c1014 100%);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px 14px 14px;
  flex: 1 1 auto;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05), inset 0 -14px 26px rgba(0,0,0,.30);
}
.panel-title {
  font-size: 12px; font-weight: 800; letter-spacing: 1.6px;
  text-align: center; margin-bottom: 10px;
}
.panel-knobs { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.knob-cell { display: flex; flex-direction: column; align-items: center; width: 84px; }
.knob { cursor: ns-resize; touch-action: none; user-select: none; }
.knob-label {
  font-size: 10px; color: var(--muted); font-weight: 700; letter-spacing: .4px;
  margin-top: 4px; text-align: center; line-height: 1.15;
}
.knob-val { font-size: 12px; font-weight: 700; margin-top: 2px; font-variant-numeric: tabular-nums; }
.toggle-cell { justify-content: center; }
.glide-btn {
  width: 74px; height: 34px; border-radius: 9px;
  background: linear-gradient(180deg, #1c1f29, #0f1117);
  border: 1px solid var(--line); color: var(--muted);
  font-weight: 800; font-size: 13px; letter-spacing: 1.5px; cursor: pointer;
  box-shadow: inset 0 2px 4px rgba(0,0,0,.55), inset 0 -1px 0 rgba(255,255,255,.03);
  transition: color .15s, box-shadow .15s, border-color .15s, background .15s;
}
.glide-btn:hover { border-color: #3a3f4d; }
.glide-btn.on {
  color: #1a1206; border-color: transparent;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), inset 0 -2px 4px rgba(0,0,0,.25);
}

.apply-banner {
  margin: 0 0 16px; text-align: center; font-weight: 700; font-size: 13px;
  color: #1a1206; background: var(--orange); border-radius: 10px; padding: 9px 14px;
  animation: blink 1.05s ease-in-out infinite;
}
.apply-banner[hidden] { display: none; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .42; } }

input[type=range] { accent-color: var(--orange); }

.brandbar {
  display: inline-flex; align-items: center; gap: 9px;
  text-decoration: none; color: var(--text);
  margin-bottom: 18px; opacity: .92; transition: opacity .15s;
}
.brandbar:hover { opacity: 1; }
.brandbar span {
  font-weight: 900; font-size: 13px; letter-spacing: .08em; text-transform: uppercase;
}

.demo-foot {
  margin-top: 26px; color: var(--muted); font-size: 13px; text-align: center;
  display: flex; flex-direction: column; gap: 6px;
}
.demo-foot .copyright { font-size: 12px; }
.demo-foot a { color: var(--orange); text-decoration: none; }
.demo-foot a:hover { text-decoration: underline; }

/* Embed mode: drop our brand chrome so the demo sits cleanly inside the
   product page iframe (the host page provides logo / buy / copyright).
   Keep the "rendered by the real engine" note — it's the trust message. */
.embed .brandbar,
.embed .buy,
.embed .demo-foot .copyright { display: none; }
.embed .demo { padding: 8px 16px 16px; }
