body {
  padding: 0;
  margin: 0;
  background: black;
}

.container {
  position: absolute;
  height: 100%;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-around;
}

.ready .button {
  transition: background-color 200ms ease, transform 200ms ease;
}

.ready .timer,
.ready .instruction {
  transition: opacity 200ms, top 200ms;
}

.button {
  --progress: 0;

  width: min(80vh, 80vw);
  height: min(80vh, 80vw);
  appearance: none;
  border: 0;
  background-color: #333;
  border-radius: 50%;
  position: relative;
  overflow: hidden;
}

.button:after {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: rgba(255, 255, 255, 0.2);
  height: calc(100% * var(--progress));
  content: " ";
  display: block;
}

.button[data-state="idle"]:after {
  opacity: 0;
}

.button[data-state="active"] {
  background-color: #77ef3f;
  transform: scale(1.1);
}

.button[data-state="prep"] {
  background-color: #c5a400;
}

.timer,
.instruction {
  font-family: "Helvetica Neue";
  position: absolute;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  text-align: center;
  opacity: 1;
}

.timer {
  top: 45%;
  font-size: min(20vh, 20vw);
  font-weight: bold;
}

.instruction {
  top: 65%;
  font-size: min(8vh, 8vw);
  font-weight: normal;
}

.button[data-state="idle"] .timer {
  top: 30%;
  opacity: 0;
}

.button[data-state="idle"] .instruction {
  top: 50%;
}
