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

body {
  background: #0a0c10;
  color: #ccc;
  font-family: 'Courier New', monospace;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
}

#app {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 900px;
}

canvas {
  display: block;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
}

#controls {
  display: flex;
  align-items: flex-start;
  gap: 24px;
}

#transport-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
}

#transport-btn, #share-btn {
  padding: 8px 20px;
  background: #181b22;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #ddd;
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  border-radius: 4px;
  min-width: 72px;
  flex-shrink: 0;
  transition: background 0.1s;
}

#transport-btn:hover, #share-btn:hover {
  background: #21242e;
}

#osc-controls {
  display: flex;
  flex-direction: column;
  gap: 9px;
  flex: 1;
}

.osc-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.osc-toggle {
  font-size: 11px;
  min-width: 46px;
  font-weight: bold;
  letter-spacing: 0.04em;
  font-family: inherit;
  cursor: pointer;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 3px;
  padding: 2px 5px;
  opacity: 0.45;
  transition: background 0.1s, border-color 0.1s, opacity 0.1s;
}

.osc-row input[type=range] {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 3px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

.osc-row input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #4aaeff;
  cursor: pointer;
}

.osc-row input[type=range]::-moz-range-thumb {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #4aaeff;
  cursor: pointer;
  border: none;
}

.zoom-row {
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.zoom-row label {
  color: #888 !important;
}

.monitor-btn {
  font-size: 11px;
  min-width: 160px;
  color: #666;
  text-align: right;
  font-family: inherit;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  text-decoration: underline dotted rgba(255, 255, 255, 0.2);
  transition: color 0.1s;
}

.monitor-btn:hover {
  color: #aaa;
}

#legend {
  display: flex;
  gap: 22px;
  font-size: 10px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  opacity: 0.7;
}

.legend-item::before {
  content: '●';
  margin-right: 5px;
}

.legend-item.zero       { color: #55ccff; }
.legend-item.maximum    { color: #ff5555; }
.legend-item.minimum    { color: #ff9944; }
.legend-item.inflection { color: #55ff88; }
