body {
  margin: 0;
  overflow: hidden;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  background: #000;
  color: #ccc;
}

#canvas {
  display: block;
  background: #000000;
  /* Cursor as a small white dot */
  cursor: crosshair;
}

/* UI container */
#uiContainer {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 280px;
  max-height: 90vh;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(4px);
  padding: 15px;
  border: 1px solid #333;
  border-radius: 2px;
  z-index: 100;
  overflow-y: auto;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
  font-size: 12px;
}

/* Scrollbar styling */
#uiContainer::-webkit-scrollbar {
  width: 6px;
}

#uiContainer::-webkit-scrollbar-track {
  background: #111;
}

#uiContainer::-webkit-scrollbar-thumb {
  background: #444;
  border-radius: 3px;
}

/* Title */
#uiContainer h2 {
  margin: 0 0 15px;
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-align: center;
  color: #fff;
}

details {
  margin-bottom: 10px;
  border-bottom: 1px solid #222;
  padding-bottom: 5px;
}

details:last-child {
  border-bottom: none;
}

summary {
  font-weight: 600;
  cursor: pointer;
  padding: 5px 0;
  color: #eee;
  outline: none;
  list-style: none;
  /* Hide default arrow */
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: '+';
  float: right;
  font-weight: normal;
  color: #777;
}

details[open] summary::after {
  content: '-';
}

/* Rows */
.ui-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 6px 0;
}

.ui-row label {
  flex: 0 0 40%;
  color: #aaa;
}

/* Inputs */
input[type="range"] {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background: transparent;
  margin: 0;
  width: 100%;
}

input[type="range"]::-webkit-slider-runnable-track {
  width: 100%;
  height: 2px;
  background: #444;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  height: 10px;
  width: 10px;
  border-radius: 50%;
  background: #888;
  margin-top: -4px;
  cursor: pointer;
  transition: background 0.2s;
}

input[type="range"]::-webkit-slider-thumb:hover {
  background: #fff;
}

input[type="color"] {
  border: none;
  width: 20px;
  height: 20px;
  padding: 0;
  background: none;
  cursor: pointer;
}

select {
  background: #222;
  color: #ccc;
  border: 1px solid #444;
  padding: 2px 5px;
  font-size: 11px;
  border-radius: 2px;
  outline: none;
}

input[type="checkbox"] {
  accent-color: #666;
}

/* Buttons */
button {
  background: #222;
  border: 1px solid #444;
  color: #ccc;
  padding: 6px 12px;
  font-size: 11px;
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.2s;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

button:hover {
  background: #333;
  color: #fff;
  border-color: #666;
}

#buttonLine {
  text-align: center;
  margin-top: 15px;
  display: flex;
  justify-content: space-between;
}

#buttonLine button {
  flex: 1;
  margin: 0 2px;
}

#showUIButton {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 200;
  display: none;
}

#console {
  position: fixed;
  bottom: 10px;
  left: 10px;
  color: #666;
  font-size: 10px;
  font-family: monospace;
  z-index: 150;
  pointer-events: none;
}

.sub-row {
  margin-left: 15px;
}
