html, body {
  margin: 0; padding: 0;
  width: 100%; height: 100%;
  background: #ffffff; font-family: sans-serif;
  overflow: hidden;
}

.controls {
  position: absolute;
  top: 10px; left: 10px;
  background: #fff; padding: 10px;
  border-radius: 5px;
  box-shadow: 0 0 5px rgba(0,0,0,0.2);
  font-size: 14px;
  z-index: 1000;
}

.controls > div {
  margin-bottom: 10px;
}

.controls label {
  display: block; margin-bottom: 5px; font-weight: bold;
}
.controls select, .controls input[type="number"], .controls input[type="range"] {
  width: 100%;
}

.dial-container {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  position: relative;
}

.dial {
  position: relative;
  border-radius: 50%;
  background: #000000;
  width: 4px;
  height: 4px;
  display: flex; align-items: center; justify-content: center;
}

.spinner-wrapper {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  /* Hardware acceleration hint */
  will-change: transform;
}

/* The spinner is placed on the radius and will be rotated by the wrapper */
.spinner {
  width: 6vh;
  aspect-ratio: 1/1;
  border-radius: 50%;
  background: hsl(0,70%,50%);
  will-change: background-color, transform;
  
  transform: translateX(20vmin); /* Move it outward from center */
  /* Change this value for adjusting the spinning radius */
}

/* Keyframe animation for rotation */
@keyframes spin {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Keyframe for hue rotation (if enabled) */
@keyframes hue-rotate {
  from { filter: hue-rotate(0deg); }
  to { filter: hue-rotate(360deg); }
}

/* The spinner-wrapper will handle rotation duration */
.spinner-wrapper {
  /* Use a custom property for duration. Will be updated by JS. */
  animation-name: spin;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  animation-duration: var(--rotation-duration, 1s);
}

/* When hue rotation is enabled, apply the hue-rotate filter to spinner */
.spinner.hue-enabled {
  animation-name: hue-rotate;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  animation-duration: var(--rotation-duration, 1s);
  animation-play-state: running;
  /* Use filter on the spinner */
  filter: hue-rotate(0deg);
}