#game {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

#riddle > p {
  font-size: 5em;
  margin-block: 1rem;
}

#answers {
  display: flex;
  gap: 2em;
  flex-wrap: wrap;
  padding: 2em;
  justify-content: space-evenly;
}

.answer {
  transition: ease-out color 250ms;
}

/* highlight answer if hovering and no answer has been selected already */
@media (hover: hover) and (pointer: fine) {
  #answers:not(:has(.answer.selected)) .answer:hover {
    color: #aaf;
  }
}

#answers:has(.answer.answer.selected) .answer:not(.selected) {
  opacity: 0.6;
  transition: opacity ease-in-out 500ms;
}

.answer > p {
  font-size: 4em;
}

.answer.selected {
  transition:
    color ease-out 500ms,
    scale ease-out 600ms;
  scale: 1.2
}

.answer.correct {
  color: #0f0;
}

.answer.incorrect {
  color: #f00;
}

#game > .instruction {
  text-shadow: none;
}

.progressbar {
  content: var(--progress);
  text-align: center;
  height: 1.2em;
  width: 100%;
  box-sizing: border-box;
  border-radius: 1em;
  border: 1px white solid;
  background-color: none;
  position: relative;
  /* position: absolute;
  bottom: 0; */
}

.progressbar::before {
  content: '';
  position: absolute;
  left: 0;
  z-index: -1;
  border-radius: 1em;
  width: clamp(0%, var(--progress), 100%);
  height: 100%;
  background-color: green;
}

#gameprogress::before {
  transition: width ease-in-out 5s;
}

#timeoutbar {
  margin-bottom: 1em;
  --progress: 100%;
  --countdown: 0s;
}

#timeoutbar.countdown {
  --progress: 0%;
}

#timeoutbar.countdown::before {
  transition: width linear var(--countdown);
}
