:root {
  --controls-height: 64px;
  --border-color: #ffffff;
}

html, body {
  height: 100%;
  margin: 0;
  background: #111;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  color: white;
}

.app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  box-sizing: border-box;
  padding: 12px;
  gap: 8px;
}

.canvas-wrap {
  flex: 1 1 auto;
  min-height: 0;
  display: block;
  border: 1px solid var(--border-color);
  background: black;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}

canvas#mainCanvas {
  display: block;
  width: 100%;
  height: 100%;
  background: black;
}

.controls {
  height: var(--controls-height);
  flex: 0 0 var(--controls-height);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 8px;
  box-sizing: border-box;
}

.controls .btn {
  appearance: none;
  background: transparent;
  color: white;
  border: 1px solid rgba(255,255,255,0.14);
  padding: 10px 14px;
  font-size: 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: transform 120ms ease, background 120ms ease, border-color 120ms ease;
  user-select: none;
}

.controls .btn:hover {
  transform: translateY(-2px);
  border-color: rgba(255,255,255,0.28);
}

.controls .btn:active {
  transform: translateY(0);
}

.btn.primary {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.22);
}

.slider {
  -webkit-appearance: none;
  width: 150px;
  height: 6px;
  border-radius: 4px;
  background: rgba(255,255,255,0.2);
  outline: none;
  cursor: pointer;
  transition: background 0.2s ease;
}
.slider-label {
  font-size: 14px;
  color: rgba(255,255,255,0.8);
  margin-right: 6px;
  user-select: none;
}

.slider:hover {
  background: rgba(255,255,255,0.3);
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: white;
  cursor: pointer;
  transition: transform 0.1s ease;
}

.slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: white;
  cursor: pointer;
}

.slider-value {
  min-width: 28px;
  text-align: center;
  font-size: 14px;
  margin-left: 6px;
  color: rgba(255,255,255,0.8);
}

@media (max-width: 480px) {
  :root { --controls-height: 72px; }
  .controls { gap: 8px; flex-wrap: wrap; padding: 6px; }
  .controls .btn { flex: 1 1 auto; min-width: 44%; }
}

