:root { --bg: #111; --panel: #222; --accent: #ff8c00; --on: #00ff66; }
* { box-sizing: border-box; }
body { background: var(--bg); color: #fff; font-family: sans-serif; margin: 0; display: flex; justify-content: center; overflow-x: hidden; }

#app { width: 100%; max-width: 450px; padding: 10px; }
header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; background: var(--panel); padding: 10px; border-radius: 8px; border-bottom: 2px solid var(--accent); }
.logo { font-weight: bold; font-size: 14px; }
.ver { font-size: 10px; color: var(--accent); }

.master-controls { display: flex; gap: 8px; }
.bpm-box { background: #000; padding: 2px 8px; border-radius: 4px; display: flex; flex-direction: column; align-items: center; }
.bpm-box label { font-size: 8px; color: var(--accent); }
.bpm-box input { background: transparent; color: #fff; border: none; width: 40px; text-align: center; font-size: 14px; font-family: monospace; }

.instrument-panel { background: var(--panel); padding: 15px; border-radius: 12px; }
.file-row { display: flex; align-items: center; gap: 10px; margin-bottom: 15px; background: #000; padding: 5px; border-radius: 6px; }
.btn-load { background: #444; padding: 6px 12px; border-radius: 4px; cursor: pointer; font-size: 12px; }
#audio-loader { display: none; }
#file-name { font-size: 10px; color: #aaa; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.octave-row { display: flex; justify-content: center; align-items: center; gap: 20px; margin-bottom: 10px; }
.octave-row button { width: 60px; padding: 5px; background: #444; color: #fff; border: none; border-radius: 4px; cursor: pointer; }
.oct-display-box { font-weight: bold; color: var(--accent); min-width: 50px; text-align: center; }

.keyboard-grid { display: flex; flex-direction: column; gap: 4px; margin-bottom: 15px; }
.kb-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.key { height: 45px; border: none; border-radius: 4px; font-weight: bold; cursor: pointer; font-size: 12px; transition: 0.1s; }
.key.white { background: #eee; color: #333; }
.key.black { background: #444; color: #fff; }
.key:active { transform: scale(0.95); background: var(--accent); }

.seq-label { font-size: 10px; color: #666; margin-bottom: 5px; text-align: center; letter-spacing: 2px; }
.step-grid { 
    display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; 
    margin-bottom: 20px; padding: 8px; background: #000; border-radius: 8px;
    max-height: 200px; overflow-y: auto;
}
.step { 
    height: 40px; background: #333; border-radius: 4px; cursor: pointer;
    display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 9px;
}
.step span { color: #777; font-size: 8px; }
.step.active { background: var(--accent); color: #000; font-weight: bold; }
.step.current { border: 2px solid var(--on); box-shadow: 0 0 10px var(--on); }

.params { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.p-box { background: #000; padding: 8px; border-radius: 6px; }
.p-box label { font-size: 9px; color: #888; display: block; margin-bottom: 5px; text-align: center; }
.p-box input { width: 100%; cursor: pointer; }

button.btn-glow { background: var(--accent); border: none; padding: 8px 15px; border-radius: 4px; font-weight: bold; cursor: pointer; }
button.btn-export { background: #0288d1; color: #fff; border: none; padding: 8px 15px; border-radius: 4px; font-weight: bold; cursor: pointer; }
