/* ============================================
   RADIAL DRUM SEQUENCER - STYLES
   ============================================ */

/* ==========================================
   GLOBAL RESET & BASE STYLES
   ========================================== */

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

body {
  background: #000000;
  color: #ffffff;
  font-family: 'Courier New', monospace;
  overflow: hidden;
  height: 100vh;
}

/* ==========================================
   MAIN CONTAINER
   ========================================== */

#main-container {
  width: 100%;
  height: 100vh;
  display: flex;
  overflow: hidden;
}

/* ==========================================
   CANVAS CONTAINER
   ========================================== */

#canvas-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

canvas {
  display: block;
  cursor: crosshair;
}

/* ==========================================
   SIDE CONTROL PANEL
   ========================================== */

#side-panel {
  position: fixed;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  background: #0a0a0a;
  border: 1px solid #1a1a1a;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  padding: 15px;
  gap: 15px;
  flex-shrink: 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  z-index: 100;
}

#side-panel.pinned {
  cursor: default;
}

/* ==========================================
   DRAG GRIP HANDLE
   ========================================== */

.panel-grip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 0;
  cursor: move;
  margin: -8px -5px 0 -5px;
}

.panel-grip:hover .grip-line {
  background: #666;
}

.grip-line {
  width: 32px;
  height: 2px;
  background: #333;
  border-radius: 1px;
  transition: background 0.15s;
}

/* ==========================================
   PANEL TOP CONTROLS (Play & BPM)
   ========================================== */

.panel-controls {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.panel-controls #playBtn {
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  color: #666;
  padding: 8px 12px;
  font-size: 10px;
  font-weight: bold;
  cursor: pointer;
  font-family: 'Courier New', monospace;
  border-radius: 3px;
  transition: all 0.15s;
  text-align: center;
}

.panel-controls #playBtn:hover {
  background: #2a2a2a;
  color: #999;
  border-color: #3a3a3a;
}

.panel-controls #playBtn:active {
  transform: scale(0.95);
}

.panel-controls #playBtn.playing {
  background: #9ef01a;
  color: #000000;
  border-color: #9ef01a;
} 

.bpm-control {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
}

.bpm-control #bpmSlider {
  width: 100%;
  height: 4px;
  background: #1a1a1a;
  outline: none;
  -webkit-appearance: none;
  border-radius: 2px;
  border: 1px solid #2a2a2a;
}

.bpm-control #bpmSlider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  background: #ffffff;
  cursor: pointer;
  border-radius: 50%;
}

.bpm-control #bpmSlider::-moz-range-thumb {
  width: 12px;
  height: 12px;
  background: #ffffff;
  cursor: pointer;
  border-radius: 50%;
  border: none;
}

.bpm-control #bpm-value {
  color: #888;
  font-size: 14px;
  font-weight: bold;
  text-align: center;
  min-width: 32px;
}

.panel-separator {
  width: 100%;
  height: 1px;
  background: #1a1a1a;
  margin: 5px 0;
}

/* ==========================================
   CHANNEL STRIPS
   ========================================== */

.channel-strips-container {
  display: flex;
  gap: 18px;
}

.channel-strip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  flex: 1;
}

/* Division display (editable number) */
.division-display {
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 4px;
  color: #888;
  font-size: 12px;
  font-weight: bold;
  text-align: center;
  min-width: 32px;
  padding: 4px 8px;
  min-height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: text;
  transition: all 0.2s;
  user-select: text;
}

.division-display:hover {
  border-color: #3a3a3a;
  color: #aaa;
}

.division-display:focus {
  outline: none;
  border-color: #00ffff;
  color: #00ffff;
  background: #1a1a1a;
}

/* ==========================================
   VERTICAL VOLUME SLIDERS
   ========================================== */

.slider-wrapper {
  height: 180px;
  width: 24px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.volume-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 180px;
  height: 4px;
  background: #1a1a1a;
  outline: none;
  cursor: pointer;
  border-radius: 2px;
  border: 1px solid #2a2a2a;
  transform: rotate(-90deg);
  transform-origin: center;
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  background: #ffffff;
  cursor: pointer;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.volume-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  background: #ffffff;
  cursor: pointer;
  border-radius: 50%;
  border: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.master-slider::-webkit-slider-thumb {
  background: #ffffff !important;
}

.master-slider::-moz-range-thumb {
  background: #ffffff !important;
}

/* ==========================================
   MINI BUTTONS (Reset, Mute)
   ========================================== */

.button-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
}

.mini-btn {
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  color: #666;
  padding: 8px 12px;
  font-size: 10px;
  cursor: pointer;
  font-family: 'Courier New', monospace;
  border-radius: 3px;
  transition: all 0.15s;
  font-weight: bold;
  text-align: center;
}

.mini-btn:hover {
  background: #2a2a2a;
  color: #999;
  border-color: #3a3a3a;
}

.mini-btn:active {
  transform: scale(0.95);
}

.mini-btn.active {
  background: #ff0000;
  color: #ffffff;
  border-color: #ff0000;
}

/* ==========================================
   SAMPLE MANAGER PANEL
   ========================================== */

#sample-manager {
  position: fixed;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  background: #0a0a0a;
  border: 1px solid #1a1a1a;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  padding: 15px;
  gap: 12px;
  width: 200px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  z-index: 100;
}

#sample-manager.pinned {
  cursor: default;
}

.sample-manager-grip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 0;
  cursor: move;
  margin: -8px -5px 0 -5px;
}

.sample-manager-grip:hover .grip-line {
  background: #666;
}

.sample-manager-title {
  color: #888;
  font-size: 14px;
  font-weight: bold;
  text-align: center;
  letter-spacing: 1px;
  padding-bottom: 8px;
  border-bottom: 1px solid #1a1a1a;
}

.sample-ring-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 0;
  border-bottom: 1px solid #1a1a1a;
}

.sample-ring-section:last-child {
  border-bottom: none;
}

.sample-display {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sample-label {
  color: #666;
  font-size: 10px;
  font-weight: bold;
}

.sample-name {
  color: #888;
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sample-buttons {
  display: flex;
  gap: 4px;
}

.sample-load-btn,
.sample-clear-btn {
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  color: #666;
  padding: 6px 10px;
  font-size: 9px;
  cursor: pointer;
  font-family: 'Courier New', monospace;
  border-radius: 3px;
  transition: all 0.15s;
  font-weight: bold;
  text-align: center;
  flex: 1;
}

.sample-load-btn:hover,
.sample-clear-btn:hover {
  background: #2a2a2a;
  color: #999;
  border-color: #3a3a3a;
}

.sample-load-btn:active,
.sample-clear-btn:active {
  transform: scale(0.95);
}

.sample-clear-btn {
  flex: 0;
  padding: 6px 8px;
}
