#debug-panel {
  position: fixed;
  top: 12px;
  right: 12px;
  width: 260px;
  background: rgba(0,0,0,0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  color: #ccc;
  font: 11px/1.5 'SF Mono', 'Menlo', 'Consolas', monospace;
  z-index: 9999;
  user-select: none;
  transition: opacity 0.2s;
}
#debug-panel.hidden { opacity: 0; pointer-events: none; }
#debug-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  cursor: move;
}
#debug-header span { color: #fff; font-weight: 600; letter-spacing: 0.5px; font-size: 10px; text-transform: uppercase; }
#debug-body { padding: 6px 0; max-height: 70vh; overflow-y: auto; }
.ctrl-group {
  padding: 4px 12px 8px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.ctrl-group:last-child { border-bottom: none; }
.ctrl-group-title {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #666;
  margin-bottom: 4px;
}
.ctrl-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 22px;
}
.ctrl-row label { flex: 0 0 auto; margin-right: 8px; color: #999; }
.ctrl-row input[type="range"] {
  flex: 1;
  height: 3px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255,255,255,0.12);
  border-radius: 2px;
  outline: none;
}
.ctrl-row input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
}
.ctrl-row .val {
  flex: 0 0 36px;
  text-align: right;
  color: #777;
  font-size: 10px;
}
.ctrl-row input[type="checkbox"] {
  width: 12px; height: 12px; accent-color: #888;
}
.ctrl-row select {
  flex: 1;
  background: #222;
  color: #ccc;
  border: 1px solid #333;
  border-radius: 3px;
  font: inherit;
  padding: 1px 4px;
}
#debug-toggle {
  position: fixed;
  top: 12px;
  right: 12px;
  width: 28px;
  height: 28px;
  background: rgba(0,0,0,0.5);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  color: #888;
  font-size: 14px;
  cursor: pointer;
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
#debug-toggle:hover { color: #fff; }
#debug-body::-webkit-scrollbar { width: 3px; }
#debug-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }
