
/* Basic page style */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  min-height: 100%;
  background: white;
  color: black;
  font-family: Helvetica, Arial, sans-serif;
  overflow-x: hidden;
}


/* Canvas area */
#canvasContainer {
  width: calc(100% - 40px);
  height: 80vh;
  margin: 0 20px;
  overflow: hidden;
}

canvas {
  display: block;
}


/* Controls area */
#controls {
  width: calc(100% - 40px);
  min-height: 20vh;
  margin: 0 20px;
  padding: 24px 20px;

  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 24px;

  border-top: 1px solid black;
  background: white;
}


/* Arrange each control */
.control-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  width: 100%;
}


/* Labels */
label {
  font-size: 12px;
  letter-spacing: 1px;
}


/* Text input */
input[type="text"] {
  width: 100%;
  max-width: 180px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid black;
  border-radius: 20px;
  background: white;
  color: black;
  font: inherit;
  outline: none;
}


/* Sliders */
input[type="range"] {
  display: block;
  width: 100%;
  max-width: 180px;
  height: 34px;
  margin: 0;
  padding: 0;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  cursor: pointer;
}


/* Slider lines */
input[type="range"]::-webkit-slider-runnable-track {
  height: 1px;
  background: black;
}

input[type="range"]::-moz-range-track {
  height: 2px;
  background: black;
}


/* Slider handles */
input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  margin-top: -6px;
  border: 1px solid black;
  border-radius: 50%;
  background: white;
}

input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: 1px solid black;
  border-radius: 50%;
  background: white;
}


/* Numbers next to sliders */
.control-group span {
  font-size: 12px;
}


/* Reset button */
button {
  height: 34px;
  padding: 0 20px;
  border: 1px solid black;
  border-radius: 20px;
  background: white;
  color: black;
  font: inherit;
  font-size: 12px;
  white-space: nowrap;
  cursor: pointer;
}


/* Project information */
#info {
  max-width: 800px;
  margin: 60px;
  line-height: 1.6;
}

h1 {
  margin-bottom: 12px;
  font-size: 32px;
  font-weight: normal;
}

h2 {
  margin-bottom: 24px;
  font-size: 20px;
  font-weight: normal;
}

#info p {
  margin-bottom: 16px;
}


/* Return arrow */
#return,
#return:visited {
  position: fixed;
  left: 0;
  bottom: 0;
  margin: 10px;
  padding: 4px 8px;
  color: black;
  font-size: 18px;
  text-decoration: none;
}


/* Smaller screens */
@media (max-width: 600px) {
  #controls {
    padding: 16px 8px;
    gap: 8px;
  }

  .control-group {
    gap: 8px;
  }

  label {
    font-size: 9px;
    letter-spacing: 0;
  }

  input[type="text"] {
    height: 30px;
    padding: 0 8px;
    font-size: 11px;
  }

  input[type="range"] {
    height: 30px;
  }

  .control-group span {
    font-size: 10px;
  }

  button {
    height: 30px;
    padding: 0 6px;
    font-size: 9px;
  }

  #info {
    margin: 30px 20px;
  }

  h1 {
    font-size: 24px;
  }

  h2 {
    font-size: 16px;
  }
}
