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

body {
  background: #07060d;
  overflow: hidden;
  cursor: none;
  width: 100vw;
  height: 100vh;
}

#c {
  display: block;
  width: 100%;
  height: 100%;
  position: fixed;
  top: 0;
  left: 0;
}

#toggle {
  position: fixed;
  top: 12px;
  right: 12px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(8, 7, 18, 0.82);
  border: 0.5px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1;
  transition: background 0.12s, border-color 0.12s;
}

#toggle:hover {
  background: rgba(40, 35, 60, 0.95);
  border-color: rgba(255, 255, 255, 0.45);
}

.panel {
  position: fixed;
  top: 48px;
  right: 12px;
  width: 260px;
  background: rgba(8, 7, 18, 0.9);
  border: 0.5px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  font-family: monospace;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.7);
  overflow: hidden;
  cursor: default;
  transition: opacity 0.15s, transform 0.15s;
  transform-origin: top right;
  z-index: 19;
}

.panel.hidden {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.94);
}

.phead {
  padding: 8px 12px 7px;
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.07);
}

.phead span {
  font-size: 10px;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.25);
  text-transform: uppercase;
}

.pbody {
  padding: 10px 12px 12px;
  width: 100%;
}

.row {
  display: flex;
  align-items: center;
  margin-bottom: 7px;
  gap: 4px;
  width: 100%;
}

.row label {
  flex-shrink: 0;
  width: 78px;
  color: rgba(255, 255, 255, 0.4);
  font-size: 10px;
}

.row input[type=range] {
  flex: 1;
  min-width: 0;
  height: 2px;
  accent-color: #7b8fff;
  cursor: pointer;
}

.row .val {
  flex-shrink: 0;
  width: 32px;
  text-align: right;
  color: rgba(255, 255, 255, 0.82);
  font-size: 10px;
}

.row select {
  flex: 1;
  min-width: 0;
  background: rgba(255, 255, 255, 0.06);
  border: 0.5px solid rgba(255, 255, 255, 0.13);
  border-radius: 4px;
  color: rgba(255, 255, 255, 0.78);
  font-family: monospace;
  font-size: 10px;
  padding: 2px 4px;
  cursor: pointer;
}

.sep {
  border: none;
  border-top: 0.5px solid rgba(255, 255, 255, 0.07);
  margin: 7px 0;
}

#btnChaos {
  width: 100%;
  margin-top: 8px;
  border-radius: 5px;
  font-family: monospace;
  font-size: 11px;
  padding: 6px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.05);
  border: 0.5px solid rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.6);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

#btnChaos.on {
  background: rgba(180, 80, 255, 0.18);
  border-color: rgba(180, 80, 255, 0.5);
  color: rgba(220, 160, 255, 0.95);
}

#hud {
  position: fixed;
  bottom: 10px;
  left: 12px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.15);
  font-family: monospace;
  pointer-events: none;
}