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

:root {
  --controls-padding-x: 0.75rem;
}

html, body {
  background: #0a0a0a;
  color: #e8e8e8;
  height: 100%;
  overflow: hidden;
}

body {
  display: flex;
  flex-direction: column;
}

#canvas {
  display: block;
  width: 100%;
  height: 100%;
  flex: 1 1 auto;
  min-height: 0;
  max-width: 100%;
}

#controls {
  flex: 0 0 auto;
  background: #141414;
  border-top: 1px solid #222;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 1rem var(--controls-padding-x);
}

.zone {
  display: flex;
  align-items: center;
}

.zone-left {
  flex-direction: column;
  gap: 0.5rem;
  justify-self: start;
}

.zone-center {
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  min-width: 200px;
  max-width: 240px;
  justify-self: center;
}

.zone-right {
  justify-self: end;
}

button {
  background: transparent;
  border: 1px solid #2a2a2a;
  border-radius: 2px;
  color: #e8e8e8;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  transition: border-color 100ms linear, color 100ms linear, background 100ms linear;
}

button:hover {
  border-color: #fff;
  color: #fff;
}

button svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
}

#play-pause {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #e8e8e8;
  border: none;
  color: #000;
}

#play-pause svg {
  width: 24px;
  height: 24px;
}

#play-pause:hover {
  background: #fff;
  color: #000;
  border-color: transparent;
}

.label {
  font-family: system-ui, sans-serif;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #666;
}

.mono {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: #666;
}

#gen-counter {
  position: fixed;
  top: 1.5rem;
  left: 2rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  pointer-events: none;
  z-index: 10;
  background-color: black;
}

.speed-labels {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#speed-label {
  color: #e8e8e8;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  background: #2a2a2a;
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 2px;
  background: #e8e8e8;
  cursor: pointer;
  transition: background 100ms linear;
}

input[type="range"]::-webkit-slider-thumb:hover {
  background: #fff;
}

input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 2px;
  background: #e8e8e8;
  border: none;
  cursor: pointer;
  transition: background 100ms linear;
}

input[type="range"]::-moz-range-thumb:hover {
  background: #fff;
}

input[type="range"]::-moz-range-track {
  background: #2a2a2a;
  height: 4px;
  border-radius: 2px;
}