#debug-panel {
  position: fixed;
  top: 56px; /* below header */
  right: 0;
  width: 33.333%;
  height: calc(100vh - 56px);
  background: transparent;
  overflow-y: auto;
  z-index: 200;
  padding: 20px;
  font-family: 'PPNeueBit', monospace;
  font-size: 12px;
  color: #fff;
  display: none;
  line-height: 1.8;
}

#debug-panel.active {
  display: block;
}

.debug-line {
  padding: 2px 0;
  cursor: pointer;
  user-select: none;
}

.debug-line:hover {
  background: rgba(255, 255, 255, 0.05);
}

.debug-line.indent-1 {
  padding-left: 15px;
}

.debug-line.indent-2 {
  padding-left: 30px;
}

.debug-line.indent-3 {
  padding-left: 45px;
}

.debug-key {
  color: #fff;
}

.debug-value {
  color: #4da3ff;
  margin-left: 8px;
  cursor: text;
  display: inline-block;
  min-width: 60px;
}

.debug-value:hover {
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 4px;
  border-radius: 2px;
}

.debug-value.editing {
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 4px;
  border-radius: 2px;
  outline: 1px solid #4da3ff;
}

.debug-value.color {
  color: #ff8c42;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.color-swatch {
  width: 16px;
  height: 16px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 2px;
  display: inline-block;
  cursor: pointer;
  flex-shrink: 0;
}

.color-picker-wrapper {
  position: relative;
  display: inline-block;
}

.color-picker-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.debug-value.number {
  color: #4da3ff;
}

.debug-value.boolean {
  color: #b8a9ff;
}

.debug-section-title {
  color: #888;
  margin-top: 15px;
  margin-bottom: 5px;
}

.debug-input {
  background: transparent;
  border: none;
  color: #4da3ff;
  font-family: 'PPNeueBit', monospace;
  font-size: 12px;
  outline: 1px solid #4da3ff;
  padding: 2px 4px;
  width: 80px;
}

.debug-slider {
  margin-bottom: 15px;
}

.debug-slider-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
  color: #ccc;
  font-size: 11px;
  text-transform: uppercase;
}

.debug-slider-value {
  color: #4da3ff;
  font-size: 11px;
}

.debug-slider-input {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 3px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.debug-slider-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  background: #fff;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s;
}

.debug-slider-input::-webkit-slider-thumb:hover {
  background: #4da3ff;
}

.debug-slider-input::-moz-range-thumb {
  width: 14px;
  height: 14px;
  background: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s;
}

.debug-slider-input::-moz-range-thumb:hover {
  background: #4da3ff;
}

body.debug-mode #viewer {
  width: 66.666%;
  right: 33.333%;
}

