/* ============================================
   MPK Mini MK3 Visualizer 
   VERBATIM COPY FROM mpk-mini-wireframe.html
   ============================================ */

:root {
    --akai-red: #ba1a21;
    --face-black: #121212;
    --text-grey: #8a8a8a;
    --text-white: #ffffff;
    --key-shadow: rgba(0,0,0,0.4);
}

/* ─────────────────────────────────────────
   VISUALIZER WRAPPER (Application UI)
   ───────────────────────────────────────── */
.visualizer-stage {
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #222;
    min-height: 700px;
    overflow-x: auto;
}

.visualizer-header {
    width: 100%;
    max-width: 1200px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 8px;
}

.viz-status { display: flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 12px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #666; }
.status-dot.success { background: #10b981; box-shadow: 0 0 8px #10b981; }
.status-dot.warning { background: #f59e0b; }
.status-dot.error { background: #ef4444; }
.viz-monitor { font-family: monospace; font-size: 12px; color: #ff6b00; background: rgba(0,0,0,0.3); padding: 8px 16px; border-radius: 4px; }
.device-selector { background: #333; color: #fff; border: 1px solid #444; border-radius: 4px; padding: 6px 12px; font-family: monospace; font-size: 12px; }
#activity-graph { background: rgba(0,0,0,0.3); border: 1px solid #333; border-radius: 4px; }

.viz-controls-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; width: 100%; max-width: 1200px; justify-content: center; flex-wrap: wrap; }
.viz-btn { background: #333; color: #999; border: 1px solid #444; border-radius: 4px; padding: 8px 16px; font-size: 12px; cursor: pointer; transition: all 0.2s; }
.viz-btn:hover { background: #444; border-color: #ff6b00; color: #fff; }
.viz-btn.active { background: rgba(255,107,0,0.2); border-color: #ff6b00; color: #ff6b00; }

.preset-dropdown { position: relative; }
.preset-menu { display: none; position: absolute; top: 100%; left: 0; background: #333; border: 1px solid #444; border-radius: 4px; padding: 8px; z-index: 100; min-width: 160px; }
.preset-dropdown:hover .preset-menu { display: block; }
.preset-item { display: flex; align-items: center; gap: 8px; padding: 6px 8px; cursor: pointer; border-radius: 4px; color: #ccc; }
.preset-item:hover { background: #444; }
.preset-colors { display: flex; gap: 2px; }
.preset-color-dot { width: 12px; height: 12px; border-radius: 50%; }

.octave-indicator { display: flex; flex-direction: column; align-items: center; background: #333; border: 1px solid #444; border-radius: 4px; padding: 4px 12px; }
.octave-label { font-size: 8px; color: #666; text-transform: uppercase; }
.octave-value { font-family: monospace; font-size: 16px; font-weight: 700; color: #0ff; }

.smart-hud { position: absolute; top: 20px; right: 20px; width: 260px; background: rgba(0,0,0,0.9); border: 1px solid #333; border-radius: 8px; padding: 16px; opacity: 0; transform: translateX(20px); transition: all 0.3s; pointer-events: none; z-index: 50; }
.smart-hud.visible { opacity: 1; transform: translateX(0); pointer-events: auto; }
.hud-header { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid #333; }
.hud-title { font-weight: 600; color: var(--akai-red); font-size: 12px; text-transform: uppercase; }
.hud-name { font-size: 16px; font-weight: 700; color: #fff; }
.hud-cc { font-family: monospace; font-size: 12px; color: #0ff; }
.hud-tip { font-size: 12px; color: #888; }

.chord-display { text-align: center; margin-bottom: 8px; }
.chord-root { font-size: 28px; font-weight: 900; color: #fff; }
.chord-quality { font-size: 18px; color: #ff6b00; }
.chord-notes { font-size: 12px; color: #666; margin-top: 4px; }

.keyboard-input-indicator { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #666; margin-bottom: 8px; }
.indicator-dot { width: 6px; height: 6px; border-radius: 50%; background: #10b981; }
.key-hint { background: #333; padding: 2px 6px; border-radius: 3px; border: 1px solid #444; }

.midi-log-panel { display: none; position: absolute; bottom: 20px; left: 20px; width: 300px; max-height: 200px; background: rgba(0,0,0,0.9); border: 1px solid #333; border-radius: 4px; font-family: monospace; font-size: 11px; z-index: 50; }
.midi-log-panel.visible { display: block; }
.log-header { display: flex; justify-content: space-between; padding: 8px 12px; border-bottom: 1px solid #333; color: #666; }
.log-clear { background: none; border: none; color: #ff6b00; cursor: pointer; }
.log-messages { max-height: 150px; overflow-y: auto; padding: 8px 12px; }
.log-messages div { color: #0f0; margin-bottom: 2px; }

.velocity-graph-container { display: none; position: absolute; bottom: 20px; right: 20px; background: rgba(0,0,0,0.8); border: 1px solid #333; border-radius: 4px; padding: 8px; }
.velocity-graph-container.visible { display: block; }
.velocity-graph-label { font-size: 10px; color: #666; margin-bottom: 4px; }

.color-picker-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.8); z-index: 1000; align-items: center; justify-content: center; }
.color-picker-overlay.visible { display: flex; }
.color-picker-modal { background: #222; border: 1px solid #444; border-radius: 8px; padding: 20px; min-width: 280px; }
.picker-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.picker-title { font-weight: 700; font-size: 16px; color: #fff; }
.picker-close { background: none; border: none; font-size: 24px; cursor: pointer; color: #666; }
.picker-preview { width: 100%; height: 60px; border-radius: 4px; display: flex; align-items: center; justify-content: center; font-weight: 700; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,0.5); margin-bottom: 16px; }
.picker-input-row { margin-bottom: 16px; }
.picker-input-row input[type="color"] { width: 100%; height: 40px; border: none; border-radius: 4px; cursor: pointer; }
.color-presets { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; margin-bottom: 16px; }
.color-preset { width: 28px; height: 28px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; transition: transform 0.1s; }
.color-preset:hover { transform: scale(1.15); }
.picker-actions { display: flex; gap: 8px; justify-content: flex-end; }
.picker-actions button { padding: 8px 16px; border-radius: 4px; cursor: pointer; font-weight: 600; }
.picker-actions #cancel-color { background: #444; border: 1px solid #555; color: #ccc; }
.picker-actions #apply-color { background: #ff6b00; border: none; color: #fff; }

.particle { position: absolute; width: 6px; height: 6px; border-radius: 50%; pointer-events: none; z-index: 100; }

/* ═══════════════════════════════════════════════════════════
   DIRECT COPY FROM mpk-mini-wireframe.html
   ═══════════════════════════════════════════════════════════ */

/* Physical Chassis Construction */
.mpk-shell {
    display: flex;
    width: 1180px;
    background-color: var(--akai-red);
    border-radius: 4px;
    box-shadow: 0 50px 100px rgba(0,0,0,0.9);
    padding-bottom: 15px;
}

.side-cheek { width: 15px; height: 100%; background: var(--akai-red); }

.faceplate {
    background-color: var(--face-black);
    flex-grow: 1;
    padding: 35px 35px 0 35px;
    display: flex;
    flex-direction: column;
    border-radius: 2px 2px 0 0;
}

/* TOP SECTION LAYOUT */
.upper-layout {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 5px;
}

/* LEFT: Joystick & Arp */
.left-block { width: 150px; }
.joy-well {
    width: 85px; height: 85px; background: #000; border-radius: 50%;
    margin: 0 auto 25px; position: relative; box-shadow: inset 0 5px 15px #000;
}
.joy-stick {
    position: absolute; top: 50%; left: 50%; width: 50px; height: 50px;
    background: radial-gradient(circle at 35% 35%, #ff4d4d, #b71c1c, #300);
    border-radius: 50%; transform: translate(-50%, -50%);
    box-shadow: 0 10px 20px rgba(0,0,0,0.8);
    cursor: grab;
}

/* ARP SECTION */
.arp-wrap { position: relative; padding-top: 12px; margin-bottom: 5px; }
.arp-bracket {
    position: absolute; top: 0; left: 0; width: 100%; height: 48px;
    border-left: 1.5px solid var(--akai-red); border-top: 1.5px solid var(--akai-red);
}
.arp-bracket::after {
    content: ""; position: absolute; bottom: 0; left: -1.5px; width: 100%; height: 1.5px; background: var(--akai-red);
}
.arp-text { color: var(--akai-red); font-size: 8.5px; font-weight: 900; position: absolute; top: -6px; left: 10px; background: var(--face-black); padding: 0 5px; }
.arp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin-top: 5px; position: relative; z-index: 5; }
.btn-hw { background: #0a0a0a; border: 1.5px solid #252525; border-radius: 1px; height: 36px; padding: 2px; cursor: pointer; }
.btn-print { border: 1.2px solid var(--akai-red); width: 100%; height: 100%; color: var(--akai-red); font-size: 7px; font-weight: 900; display: flex; align-items: center; justify-content: center; text-align: center; }

/* Global buttons below Arp */
.global-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin-top: 5px; }
.print-silver { border: 1.2px solid #333; width: 100%; height: 100%; color: var(--text-grey); font-size: 7px; font-weight: 900; display: flex; align-items: center; justify-content: center; text-align: center; }
.print-plain-red { width: 100%; height: 100%; color: var(--akai-red); font-size: 7px; font-weight: 900; display: flex; align-items: center; justify-content: center; text-align: center; }

/* CENTER: MPC Pads */
.center-block { display: flex; flex-direction: column; margin-left: 20px; padding-top: 15px; }
.pad-row { display: flex; gap: 15px; margin-bottom: 20px; }
.pad-u { position: relative; }
.pad-id { font-size: 7.5px; font-weight: 900; color: #fff; position: absolute; top: -16px; left: 0; width: 100%; text-align: center; opacity: 0.8; }
.pad-mid-id { font-size: 7.5px; font-weight: 900; color: #fff; position: absolute; bottom: -12px; left: 0; width: 100%; text-align: center; opacity: 0.8; }
.pad-phys { width: 85px; height: 85px; background: #181818; border: 1.5px solid #2a2a2a; border-radius: 4px; box-shadow: inset 0 0 20px #000; cursor: pointer; transition: all 0.1s; }
.row-btm .pad-phys { border: 1.5px solid var(--akai-red); }

.pad-phys.lit {
    background-color: var(--pad-color, #ff3d00) !important;
    box-shadow: 0 0 25px var(--pad-color, #ff3d00), inset 0 0 15px rgba(255,255,255,0.3) !important;
}

/* RIGHT: Screen & Knobs */
.right-block { flex-grow: 1; padding-left: 45px; }
.sys-line { display: flex; align-items: flex-end; gap: 15px; margin-bottom: 20px; }
.oled-display { width: 120px; height: 70px; background: #000; border: 2.5px solid #222; padding: 10px; font-family: monospace; display: flex; flex-direction: column; justify-content: space-between; }
.pad-ctrl-container { flex-grow: 1; display: flex; flex-direction: column; align-items: center; }
.pc-header { color: #888; font-size: 8.5px; font-weight: 900; margin-bottom: 6px; text-transform: uppercase; }
.pc-strip { display: flex; gap: 5px; width: 100%; }
.pc-btn { flex: 1; background: #0a0a0a; border: 1.5px solid #252525; height: 36px; padding: 2px; cursor: pointer; }

.knob-matrix { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 10px; }
.knob-u { display: flex; flex-direction: column; align-items: center; }
.knob-id-label { font-size: 8px; color: #888; font-weight: 900; align-self: flex-start; margin-bottom: 4px; }
.knob-phys { width: 58px; height: 58px; border-radius: 50%; border: 2.5px solid #000; background: radial-gradient(circle at 35% 35%, #3a3a3a, #050505); position: relative; box-shadow: 0 8px 12px rgba(0,0,0,0.7); cursor: grab; }
.knob-ptr { position: absolute; top: 6px; left: 50%; width: 2.5px; height: 10px; background: #fff; transform: translateX(-50%); }
.knob-pill { background: #252525; color: #eee; font-size: 6.5px; font-weight: 900; padding: 2.5px 10px; border-radius: 12px; margin-top: 8px; text-transform: uppercase; }

/* BRANDING */
.brand-strip { display: flex; align-items: baseline; gap: 10px; padding: 20px 0; }
.brand-akai-bold { color: #fff; font-size: 30px; font-weight: 900; letter-spacing: 1px; }
.brand-pro-vert { color: #fff; font-size: 8px; font-weight: 900; position: relative; top: -14px; }
.brand-mpk-bold { color: #fff; font-size: 48px; font-weight: 900; margin-left: 15px; }
.brand-mini-thin { color: #555; font-size: 48px; font-weight: 100; font-style: italic; letter-spacing: -1.5px;}

/* KEYBED & LABELS */
.keybed-wrapper { background: #000; position: relative; }
.annotations-bar {
    height: 35px; width: 100%; position: relative;
    padding: 0 10px; border-top: 2px solid #222;
}
.key-label { 
    position: absolute; font-size: 7.5px; font-weight: 900; 
    color: #666; transform: translateX(-50%); text-align: center; white-space: nowrap;
}
.key-label.red { color: var(--akai-red); }

/* Perfect center-mapping for 25 keys */
.l-w1 { left: 3.33%; } .l-b1 { left: 6.6%; } .l-w2 { left: 10%; } .l-b2 { left: 13.3%; } .l-w3 { left: 16.6%; }
.l-w4 { left: 23.3%; } .l-b3 { left: 26.6%; } .l-w5 { left: 30%; } .l-b4 { left: 33.3%; } .l-w6 { left: 36.6%; }
.l-b5 { left: 40%; } .l-w7 { left: 43.3%; } .l-w8 { left: 50%; } .l-b6 { left: 53.3%; } .l-w9 { left: 56.6%; }
.l-b7 { left: 60%; } .l-w10 { left: 63.3%; } .l-w11 { left: 70%; } .l-b8 { left: 73.3%; } .l-w12 { left: 76.6%; }
.l-b9 { left: 80%; } .l-w13 { left: 83.3%; } .l-b10 { left: 86.6%; } .l-w14 { left: 90%; } .l-w15 { left: 96.6%; }

.keys-flex { height: 260px; display: flex; position: relative; background: #000; padding: 0 5px; }
.white-key { flex: 1; border: 1px solid #999; border-top: none; border-radius: 0 0 5px 5px; background: linear-gradient(to bottom, #f0f0f0 0%, #fff 10%, #fff 90%, #bbb 100%); z-index: 1; cursor: pointer; transition: transform 0.05s; }
.white-key:active, .white-key.pressed { transform: translateY(3px); background: linear-gradient(to bottom, #ddd 0%, #eee 10%, #eee 90%, #aaa 100%); }
.black-key { position: absolute; width: 4.2%; height: 62%; background: #000; border-radius: 0 0 3px 3px; z-index: 2; box-shadow: 0 6px 12px rgba(0,0,0,0.6); border: 1.5px solid #111; cursor: pointer; transition: transform 0.05s; }
.black-key:active, .black-key.pressed { transform: translateY(3px); box-shadow: 0 2px 4px rgba(0,0,0,0.6); }

.pos1 { left: 4.5%; } .pos2 { left: 11.2%; } .pos3 { left: 24.6%; } .pos4 { left: 31.3%; } .pos5 { left: 38%; } .pos6 { left: 51.4%; } .pos7 { left: 58.1%; } .pos8 { left: 71.5%; } .pos9 { left: 78.2%; } .pos10 { left: 84.9%; }

/* Heatmap */
[data-note].has-heat::before { content: ''; position: absolute; inset: 0; background: rgba(255, 100, 0, calc(var(--heat) * 0.5)); pointer-events: none; border-radius: inherit; z-index: 5; }
