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

body {
  background: #000;
  overflow: hidden;
  font-family: 'Press Start 2P', monospace;
  cursor: crosshair;
}

#canvas {
  display: block;
  width: 100vw;
  height: 100vh;
}

#controls {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 100;
}

#controls-toggle {
  width: 36px;
  height: 36px;
  background: rgba(0,0,0,0.6);
  border: 1px solid rgba(255,170,0,0.4);
  color: #fa0;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 4px;
  margin-left: auto;
  transition: all 0.3s;
  user-select: none;
}

#controls-toggle:hover {
  background: rgba(255,170,0,0.15);
  border-color: #fa0;
}

#controls-panel {
  display: none;
  background: rgba(0,0,0,0.8);
  border: 1px solid rgba(255,170,0,0.3);
  border-radius: 4px;
  padding: 12px;
  margin-top: 6px;
  min-width: 180px;
}

#controls-panel.open {
  display: block;
}

#controls-panel label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #fa0;
  font-size: 7px;
  margin-bottom: 8px;
  letter-spacing: 1px;
}

#controls-panel label:last-child {
  margin-bottom: 0;
}

#controls-panel input[type="range"] {
  width: 100px;
  accent-color: #fa0;
  height: 4px;
  cursor: pointer;
}

#palette-btn {
  font-family: 'Press Start 2P', monospace;
  font-size: 6px;
  background: rgba(255,170,0,0.15);
  border: 1px solid #fa0;
  color: #fa0;
  padding: 4px 8px;
  cursor: pointer;
  border-radius: 2px;
  letter-spacing: 1px;
  transition: background 0.2s;
}

#palette-btn:hover {
  background: rgba(255,170,0,0.3);
}

#fps-counter {
  position: fixed;
  bottom: 40px;
  right: 12px;
  color: rgba(255,170,0,0.5);
  font-family: 'Press Start 2P', monospace;
  font-size: 7px;
  z-index: 100;
  letter-spacing: 1px;
}

#remix-link {
  position: fixed;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,170,0,0.35);
  font-family: 'Press Start 2P', monospace;
  font-size: 7px;
  text-decoration: none;
  z-index: 100;
  letter-spacing: 2px;
  transition: color 0.3s;
}

#remix-link:hover {
  color: #fa0;
}

@media (max-width: 600px) {
  #controls-panel {
    min-width: 160px;
  }
  #controls-panel input[type="range"] {
    width: 80px;
  }
}