:root {
  --correct: #7B7;
  --incorrect: #F77;
}

body {
  font-family: sans-serif;
  background: no-repeat center url('./img/loading.gif') fixed;
}

.center {
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn {
  display: inline-block;
  font-size: 2em;
  font-weight: bold;
  color: white;
  background-color: gray;
  border-radius: 30px;
  padding: 18px;
  margin: 5px;
}

.btn:hover {
  cursor: pointer;
}

.q {
  display: block;
  font-size: 2em;
  color: black;
  font-weight: bold;
  background-color: #FFF9;
  position: fixed;
  top: 0;
  left: 0;
  margin: 0;
  padding: 10px;
  visibility: hidden;
}

.started .q {
  visibility: visible;
}

@keyframes pos {
  0%{
    transform:scale(.1);
    opacity:1;
  }
  70%{
    transform:scale(2.5);
    opacity:0;
  }
  100%{
    opacity:0;
  }
}

.pos::before {
  position: absolute;
  content: '';
  height: 1em;
  width: 1em;
  background-color: transparent;
  border-radius: 50%;
  border: 3px solid red;
  animation: pos 2s infinite linear;
}

.pos {
  font-size: 3em;
  color: red;
  visibility: hidden;
}

.started .pos {
  visibility: visible;
}

@keyframes outcome {
  0% {
    opacity: 0;
    transform: scale(0);
  }
  40% {
    opacity: 1;
    transform: scale(1);
  }
  80% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(0);
  }
}

.outcome {
  font-weight: bold;
  font-size: 20em;
  visibility: hidden;
}

.started .outcome {
  visibility: visible;
}

.success::before {
  content: '✓';
}

.fail::before {
  content: '✗'
}

.success {
  color: #19ad19;
  animation: outcome 0.9s ease-out 0s 1 normal forwards;
}

.fail {
  color: #ad1919;
  animation: outcome 0.9s ease-out 0s 1 normal forwards;
}

.answers {
  display: flex;
  width: 100%;
  position: fixed;
  left: 0;
  bottom: 10px;
  justify-content: center;
  visibility: hidden;
  flex-wrap: wrap;
}

.started .answers {
  visibility: visible;
}

.answers.answered .btn:hover {
  cursor: default;
}

.answers span {
  border: 3px solid #0000;
}

.answers span.selected {
  border: 3px solid black;
}

.answers.answered span:not(.next) {
  background-color: var(--incorrect);
}

.answers.answered span.correct {
  background-color: var(--correct);
}

.progress {
  display: block;
  width: 100%;
  height: 5px;
  margin: 0;
  padding: 0;
  position: fixed;
  top: 0;
  left: 0;
}

.endscreen {
  font-weight: bold;
  background-color: #FFFB;
  flex-direction: column;
  visibility: hidden;
}

.endscreen .t {
  font-size: 2em;
  padding: 10px;
}