/* MetalZone demo — real MT-2 photo with interactive overlay knobs */

:root {
  --panel-bg: #1e1e1e;
  --panel-text: #e0e0e0;
  --accent: #ff6a00;
  --led-red: #ff2020;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, sans-serif;
  background: #000000;
  color: var(--panel-text);
  min-height: 100vh;
}

.stage {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  padding: 32px;
  align-items: flex-start;
  justify-content: center;
}

/* ==================== PEDAL (image-backed) ==================== */
.pedal {
  position: relative;
  width: 380px;           /* scale factor = 380/593 ≈ 0.64 */
  flex-shrink: 0;
  filter: drop-shadow(0 12px 32px rgba(0,0,0,0.65));
  user-select: none;
}

.pedal-img {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none; /* clicks pass through to knob overlays */
}

/* Knob wrapper positions a knob (or concentric stack) centered on a coordinate */
.knob-wrap {
  position: absolute;
  transform: translate(-50%, -50%);
}

/* ==================== KNOBS ==================== */
.knob {
  position: relative;
  width: 55px; height: 55px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 28%, #3a3a3a, #080808 80%);
  box-shadow:
    0 0 0 1px #1e1e1e,
    0 0 0 2px #9a9a9a,
    0 0 0 3px #404040,
    inset 0 2px 3px rgba(255,255,255,0.18),
    0 3px 6px rgba(0,0,0,0.6);
  cursor: grab;
  touch-action: none;
}
.knob:active { cursor: grabbing; }

/* White indicator line */
.knob::after {
  content: '';
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 2.5px;
  height: 22px;
  background: #f5f5f5;
  border-radius: 1px;
  box-shadow: 0 0 2px rgba(0,0,0,0.8);
}

/* Concentric: outer ring + smaller inner cap */
.concentric {
  position: relative;
  width: 78px; height: 78px;
}
.concentric .outer {
  width: 78px; height: 78px;
}
.concentric .outer::after {
  top: 4px; height: 18px;
}
.concentric .inner {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 43px; height: 43px;
  z-index: 2;
  box-shadow:
    0 0 0 1px #1a1a1a,
    0 0 0 2px #b0b0b0,
    0 0 0 3px #404040,
    inset 0 1px 2px rgba(255,255,255,0.2),
    0 2px 4px rgba(0,0,0,0.7);
}
.concentric .inner::after {
  top: 3px; height: 16px; width: 2px;
}

/* ==================== LED & FOOTSWITCH OVERLAYS ==================== */
.led-overlay {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 11px; height: 11px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #ff8080, var(--led-red) 65%);
  box-shadow: 0 0 0 1px #000, 0 0 6px rgba(255,50,50,0.5);
  transition: box-shadow 0.12s, background 0.12s;
  pointer-events: none;
}
.led-overlay.active {
  background: radial-gradient(circle at 40% 35%, #ffe0e0, #ff5050 60%);
  box-shadow: 0 0 0 1px #000, 0 0 16px rgba(255,60,60,0.95), 0 0 32px rgba(255,40,40,0.5);
}

.footswitch-overlay {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 130px; height: 130px;
  border-radius: 50%;
  cursor: pointer;
  background: transparent; /* invisible hotspot over the real footswitch plate */
}
.footswitch-overlay:active {
  background: radial-gradient(circle, rgba(255,255,255,0.06), transparent 70%);
}

/* ==================== CONTROLS PANEL ==================== */
.controls-panel {
  width: 340px;
  background: var(--panel-bg);
  border-radius: 10px;
  padding: 24px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}
.controls-panel h2 {
  margin: 0 0 14px;
  font-size: 16px;
  color: var(--accent);
  letter-spacing: 1px;
  text-transform: uppercase;
}
.controls-panel h3 {
  margin: 24px 0 10px;
  font-size: 13px;
  color: var(--accent);
  letter-spacing: 1px;
  text-transform: uppercase;
}
.source-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.source-controls button,
.file-label {
  padding: 8px 14px;
  background: #303030;
  color: var(--panel-text);
  border: 1px solid #505050;
  border-radius: 4px;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s;
}
.source-controls button:hover:not(:disabled),
.file-label:hover {
  background: #404040;
}
.source-controls button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.file-label input[type="file"] { display: none; }
.loop-toggle {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--panel-text);
  cursor: pointer;
}
.status {
  margin-top: 14px;
  padding: 10px 12px;
  background: #0a0a0a;
  border-left: 3px solid var(--accent);
  font-size: 12px;
  color: #b0b0b0;
  line-height: 1.5;
}
.readout {
  font-family: "SF Mono", Monaco, Consolas, monospace;
  font-size: 12px;
  background: #0a0a0a;
  padding: 10px 12px;
  border-radius: 4px;
  color: #d0d0d0;
  line-height: 1.6;
  white-space: pre;
}
.notes {
  margin-top: 18px;
  font-size: 11px;
  color: #808080;
  line-height: 1.5;
}
