/* PC sampla — faceplate styled after a '90s MPC: bone-grey chassis, charcoal pad
   bed, green LCD, red accent, silkscreen labels. */

* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bone: #d8d3c6;
  --bone-dark: #c4bfaf;
  --chassis: #35322e;
  --charcoal: #47443f;
  --silk: #6b655a;
  --red: #d43a22;
  --lcd-bg: #1c2b16;
  --lcd-green: #9fe24f;
  --pad-face: #55514b;
  --pad-hit: #ffb054;
}

body {
  background: #211f1c url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="4" height="4"><rect width="4" height="4" fill="%23211f1c"/><circle cx="1" cy="1" r=".5" fill="%23262421"/></svg>');
  font-family: 'Helvetica Neue', Arial, sans-serif;
  display: flex;
  justify-content: center;
  padding: 28px 14px;
  min-height: 100vh;
}

.unit {
  background: linear-gradient(178deg, #e2ddd0, var(--bone) 30%, var(--bone-dark));
  border-radius: 14px;
  border: 1px solid #8f897b;
  box-shadow: 0 22px 60px rgba(0,0,0,.6), inset 0 1px 0 #f4f0e6, inset 0 -3px 8px rgba(0,0,0,.18);
  max-width: 1180px;
  width: 100%;
  padding: 20px 26px 14px;
}

/* ---------- brand strip ---------- */
.brand {
  display: flex;
  align-items: baseline;
  gap: 18px;
  border-bottom: 2px solid #a49e8f;
  padding-bottom: 10px;
  margin-bottom: 16px;
}
.logo {
  font-size: 30px;
  font-weight: 800;
  font-style: italic;
  letter-spacing: -1px;
  color: var(--chassis);
}
.logo span {
  color: var(--red);
  font-weight: 900;
}
.tagline {
  font-size: 10px;
  letter-spacing: 2.5px;
  color: var(--silk);
  flex: 1;
}
.power {
  font-size: 9px;
  letter-spacing: 2px;
  color: var(--silk);
  display: flex;
  align-items: center;
  gap: 6px;
}
.led {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: #7d2013;
  display: inline-block;
  border: 1px solid #5a4f45;
}
.led.on { background: #ff5c39; box-shadow: 0 0 8px #ff5c39; }

/* ---------- layout ---------- */
.panel { display: flex; gap: 26px; }
.left { flex: 1.25; min-width: 0; }
.right { flex: 1; min-width: 320px; display: flex; flex-direction: column; }

/* ---------- LCD ---------- */
.lcd-bezel {
  background: var(--chassis);
  border-radius: 8px;
  padding: 10px 12px;
  box-shadow: inset 0 2px 6px rgba(0,0,0,.7), 0 1px 0 #f0ece1;
  margin-bottom: 16px;
}
.lcd {
  background: var(--lcd-bg);
  border: 1px solid #0d1509;
  border-radius: 3px;
  padding: 10px 14px;
  font-family: 'Menlo', 'Consolas', monospace;
  color: var(--lcd-green);
  text-shadow: 0 0 6px rgba(159,226,79,.55);
  position: relative;
  overflow: hidden;
}
.lcd::after {
  content: '';
  position: absolute; inset: 0;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,.14) 0 1px, transparent 1px 3px);
  pointer-events: none;
}
#lcd-line1 { font-size: 15px; letter-spacing: 1px; white-space: nowrap; }
#lcd-line2 { font-size: 12px; letter-spacing: 1px; opacity: .8; margin-top: 4px; white-space: nowrap; }

/* ---------- silkscreen + groups ---------- */
.silk {
  font-size: 9px;
  letter-spacing: 1.8px;
  color: var(--silk);
  font-weight: 700;
  margin-bottom: 5px;
}
.silk-dim { color: #99927f; font-weight: 400; letter-spacing: 1px; }
.row { display: flex; gap: 22px; flex-wrap: wrap; margin-bottom: 14px; align-items: flex-end; }
.group { display: flex; flex-direction: column; }
.btn-row { display: flex; gap: 6px; align-items: center; }

/* ---------- hardware buttons ---------- */
.hard-btn {
  background: linear-gradient(180deg, #f0ebe0, #cfc9ba);
  border: 1px solid #8f897b;
  border-bottom-width: 3px;
  border-radius: 5px;
  font: 700 11px 'Helvetica Neue', Arial, sans-serif;
  letter-spacing: 1px;
  color: var(--chassis);
  padding: 7px 12px;
  cursor: pointer;
  transition: transform .04s;
}
.hard-btn:active { transform: translateY(1px); border-bottom-width: 2px; }
.hard-btn.lit {
  background: linear-gradient(180deg, #ffd9a8, #f5a35c);
  border-color: #b06a2c;
  box-shadow: 0 0 10px rgba(245,163,92,.6);
}
.hard-btn.rec.lit, #rec.lit {
  background: linear-gradient(180deg, #ff8a70, #e04a2f);
  border-color: #8f2313;
  box-shadow: 0 0 10px rgba(224,74,47,.7);
  color: #fff;
}
.hard-btn.accent { color: var(--red); }
.hard-btn.wide { min-width: 74px; }
.hard-btn.tiny { padding: 4px 8px; font-size: 9px; }

#bpm {
  width: 58px;
  text-align: center;
  font: 700 14px 'Menlo', monospace;
  background: #efeadf;
  border: 1px solid #8f897b;
  border-radius: 4px;
  padding: 5px 2px;
  color: var(--chassis);
}

input[type=range] {
  -webkit-appearance: none;
  width: 130px;
  height: 22px;
  background: transparent;
}
input[type=range]::-webkit-slider-runnable-track {
  height: 5px;
  background: #8f897b;
  border-radius: 3px;
  box-shadow: inset 0 1px 2px rgba(0,0,0,.4);
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px; height: 22px;
  margin-top: -9px;
  background: linear-gradient(180deg, #5b5750, #35322e);
  border: 1px solid #23211e;
  border-radius: 3px;
  box-shadow: inset 0 1px 0 #7a756c;
  cursor: pointer;
}

/* ---------- step grid ---------- */
.step-section {
  background: var(--charcoal);
  border-radius: 8px;
  padding: 12px 14px;
  box-shadow: inset 0 2px 5px rgba(0,0,0,.55);
  margin-bottom: 14px;
}
.step-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.step-head .silk { color: #b6ae9d; margin: 0; }
.pages { display: flex; gap: 4px; }
.steps { display: flex; gap: 5px; align-items: center; }
.step-gap { width: 6px; }
.step {
  flex: 1;
  height: 34px;
  min-width: 0;
  background: #2c2a27;
  border: 1px solid #1d1c1a;
  border-radius: 4px;
  cursor: pointer;
  position: relative;
  box-shadow: inset 0 1px 3px rgba(0,0,0,.6);
}
.step::before {
  content: '';
  position: absolute;
  top: 4px; left: 50%;
  transform: translateX(-50%);
  width: 60%; height: 5px;
  border-radius: 2px;
  background: #4a2018;
}
.step.on::before { background: #ff4f2e; box-shadow: 0 0 7px #ff4f2e; }
.step.soft::before { background: #b04a30; box-shadow: 0 0 4px rgba(255,79,46,.5); }
.step.playhead { border-color: #ffd9a8; box-shadow: inset 0 0 0 1px #ffd9a8, inset 0 1px 3px rgba(0,0,0,.6); }
.hint { margin-top: 8px; font-size: 8px; }

/* ---------- pad edit ---------- */
.pad-edit {
  display: flex;
  gap: 18px;
  align-items: center;
  background: rgba(0,0,0,.05);
  border: 1px solid #b3ac9c;
  border-radius: 8px;
  padding: 8px 14px;
}
.pad-edit .silk { margin: 0; }
.pad-edit label {
  font-size: 9px;
  letter-spacing: 1.5px;
  color: var(--silk);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 7px;
}
.pad-edit input[type=range] { width: 90px; }

/* ---------- pads ---------- */
.pads-silk { margin-bottom: 8px; }
.pads {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 1fr;
  gap: 13px;
  background: var(--chassis);
  border-radius: 10px;
  padding: 16px;
  box-shadow: inset 0 3px 8px rgba(0,0,0,.6);
}
.pad {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 9px;
  border: 1px solid #26241f;
  background:
    radial-gradient(circle at 32% 26%, #64605a, var(--pad-face) 58%, #45423c);
  box-shadow: inset 0 2px 3px rgba(255,255,255,.09), inset 0 -4px 8px rgba(0,0,0,.45), 0 2px 4px rgba(0,0,0,.5);
  cursor: pointer;
  transition: box-shadow .1s;
}
.pad.selected { outline: 2px solid #ffd9a8; outline-offset: 2px; }
.pad.hit {
  background: radial-gradient(circle at 40% 35%, #ffd9a8, var(--pad-hit) 55%, #d97b28);
  box-shadow: 0 0 18px rgba(255,176,84,.75), inset 0 2px 3px rgba(255,255,255,.3);
}
.pad-num {
  position: absolute;
  top: 6px; left: 8px;
  font-size: 9px;
  color: #8f8a80;
  font-weight: 700;
}
.pad.hit .pad-num, .pad.hit .pad-name { color: #4a2508; }
.pad-name {
  position: absolute;
  bottom: 7px; left: 0; right: 0;
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #cfc9ba;
  text-shadow: 0 1px 1px rgba(0,0,0,.6);
}

/* ---------- footer ---------- */
.foot-silk {
  margin-top: 16px;
  border-top: 2px solid #a49e8f;
  padding-top: 8px;
  font-size: 8px;
  letter-spacing: 2px;
  color: #99927f;
  text-align: center;
}

@media (max-width: 900px) {
  .panel { flex-direction: column; }
  .right { min-width: 0; }
}
