@import url("https://fonts.googleapis.com/css?family=Voltaire");
body {
  margin: 0;
}
#world {
  position: absolute;
  width: 100%;
  height: 100%;
  background-color: #dbe6e6;
  overflow: hidden;
}

#gameoverInstructions {
  position: absolute;
  font-family: "Voltaire", sans-serif;
  font-weight: bold;
  text-transform: uppercase;
  font-size: 120px;
  text-align: center;
  color: #ffc5a2;
  opacity: 0;
  left: 50%;
  top: 50%;
  width: 100%;
  transform: translate(-50%, -100%);
  -webkit-user-select: none;
     -moz-user-select: none;
      -ms-user-select: none;
          user-select: none;
  transition: all 500ms ease-in-out;
}
#gameoverInstructions.show {
  opacity: 1;
  transform: translate(-50%, -50%);
  transition: all 500ms ease-in-out;
}

#dist {
  position: absolute;
  left: 50%;
  top: 50px;
  transform: translate(-50%, 0%);
  -webkit-user-select: none;
     -moz-user-select: none;
      -ms-user-select: none;
          user-select: none;
}

.label {
  position: relative;
  font-family: "Voltaire", sans-serif;
  text-transform: uppercase;
  color: #ffa873;
  font-size: 12px;
  letter-spacing: 2px;
  text-align: center;
  margin-bottom: 5px;
}

#distValue {
  position: relative;
  text-transform: uppercase;
  color: #dc5f45;
  font-size: 40px;
  font-family: "Voltaire";
  text-align: center;
}

#credits {
  position: absolute;
  width: 100%;
  margin: auto;
  bottom: 0;
  margin-bottom: 20px;
  font-family: "Voltaire", sans-serif;
  color: #544027;
  font-size: 12px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  text-align: center;
  -webkit-user-select: none;
     -moz-user-select: none;
      -ms-user-select: none;
          user-select: none;
}

#credits a {
  color: #544027;
}

#credits a:hover {
  color: #dc5f45;
}

#instructions {
  position: absolute;
  width: 100%;
  bottom: 0;
  margin: auto;
  margin-bottom: 50px;
  font-family: "Voltaire", sans-serif;
  color: #dc5f45;
  font-size: 16px;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-align: center;
  -webkit-user-select: none;
     -moz-user-select: none;
      -ms-user-select: none;
          user-select: none;
}

.lightInstructions {
  color: #5f9042;
}

#pre-game-modal {
  font-family: voltaire, sans-serif;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.8);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    z-index: 100;
    width: 88%;
    max-width: 500px;
}

#pre-game-modal button {
    margin: 5px;
}

.model-buttons {
  display: flex;
  justify-content: center ;
    gap: 10px;
    align-items: center;
    margin-top: 20px;
    button {  
      padding: .875em 1em;
      background: none;
      cursor: pointer;
      border-radius: 12px;
      border-width: 2px;
      &:hover, &:focus, &:active {
        outline: none;
        box-shadow: none;
        border-color: #208de0;
        color: #208de0;
      }
    }
}

.on-off {
  font-size: 0.35em;
  appearance: none;
  background: #000;
  width: 23em;
  height: 12.5em;
  border-radius: 2.5em;
  box-shadow:
    inset 0 -0.3em 0.4em -0.2em #fff2,
    inset 0 0.25em 0.5em #0001,
    inset 0 0.5em 0.5em #0001,
    inset 0 0 0 1.25em #beb190;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.875em;
  position: relative;
  cursor: pointer;
  transform: scale(.8);
  margin: 0 auto;
  
  &::before, &::after {
    --base:
      radial-gradient(at 20% 20%, #0000, #0003) 0 40% / 110% 120% padding-box,
      linear-gradient(#44444a, #28282f) 0 40% / 110% 120% padding-box,
      linear-gradient(#5b5b61, #28282f 50%, #202028) 0 40% / 110% 120% border-box;
    content: "";
    height: 81%;
    border-radius: 1em;
    aspect-ratio: 1;
    border: 0.25em solid #0000;
    box-sizing: border-box;
    transition: transform 0.125s, box-shadow 0.125s;
  }
  
  &::before {
    background:
      radial-gradient(circle, #0000 25%, #fff8 26% 32%, #0000 33%),
      radial-gradient(farthest-side, #f006, #f000) 105% 50% / 5% 80% no-repeat,
      var(--base);
    transform: perspective(50em) translateZ(2em);
    box-shadow: 
      inset 0 0 3em #0002,
      0 0 0 #0005,
      1em 1em 4em #000c,
        1em 3em 3em #0006;
    z-index: 1;
  }
  
  &::after {
    background: 
      radial-gradient(circle at 50% 35%, #e6503c 0.6em, #0000 0),
      radial-gradient(circle at 50% 65%, #e6503c 0.6em, #0000 0),
      linear-gradient(#e6503c 0 0) 50% 50% / 1.2em 30% no-repeat,
      radial-gradient(50% 140%, #f004, #f000 20%),
      var(--base);
    transform: perspective(50em) translateZ(0em);
    box-shadow: 
      inset 0 0 5em #0004,
      0 0 0 #0000,
      0 0 0 #0000,
      0.5em 0.5em 2em #0005;
  }
  
  &:checked {
    &::before {
      background:
        radial-gradient(circle, #0000 25%, #fffc 26.5% 31.5%, #0000 33%),
        radial-gradient(circle, #0000 15%, #fff1 29%, #0000 38%),
       var(--base);
      transform: perspective(50em) translateZ(0em);
      box-shadow:
        inset 0 0 5em #0004,
        0 0 0 #0000,
        0 0 0 #0000,
        0.5em 0.5em 2em #0005;
    }

    &::after {
      background:
        radial-gradient(circle at 50% 35%, #aa281a 0.6em, #0000 0),
        radial-gradient(circle at 50% 65%, #aa281a 0.6em, #0000 0),
        linear-gradient(#aa281a 0 0) 50% 50% / 1.2em 30% no-repeat,
        radial-gradient(farthest-side, #fff7, #fff0) -5% 50% / 5% 80% no-repeat,
        var(--base);
      transform: perspective(50em) translateZ(2em);
      box-shadow: 
        inset 0 0 3em #0002,
         -0.5em 1em 2em #0008,
        1em 1em 4em #000c,
        1em 3em 3em #0006;
      z-index: 1;
    }
  }
  
  &[disabled] {
    opacity: 0.5;
  }
}

@media print {
  .on-off {
    &, &::before, &::after {
      -webkit-print-color-adjust: exact;
      print-color-adjust: exact;
    }
  }
}

@media (prefers-reduced-motion) {
  .on-off {
    &, &::before, &::after {
      transition: none !important;
      animation: none !important;
    }
  }
}
.input-ctn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  margin-top: 10px;
  input {
    padding: .9em 1em;
    border-radius: 12px;
    &:focus, &:active {
      outline-color: #208de0;
      color: #208de0;
    }
  }
}
.information {
  position: relative;
  width: 40px;
  height: 40px;
  border: 4px solid #333;
  border-radius: 50%;
  cursor: pointer;
  transition: border-color 0.4s ease-in;
  transform: scale(.8);
}
.information:hover {
  border-color: #208de0;
}
.information:hover span {
  background: #208de0;
}
.information span {
  content: "";
  background: #333;
  position: absolute;
  transition: all 0.4s ease-in-out;
}
.information span:nth-child(1) {
  transform: translateX(-50%);
  left: 50%;
  border-radius: 50%;
  width: 6px;
  height: 6px;
  top: 6px;
}
.information span:nth-child(2) {
  transform: translateX(-50%);
  left: 50%;
  top: 15px;
  width: 4px;
  height: 18px;
  border-radius: 2px;
}

.is-clicked:hover {
  border-color: #ee2945;
}
.is-clicked:hover span {
  background: #ee2945;
}
.is-clicked span:nth-child(1) {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(45deg);
  width: 4px;
  height: 24px;
  border-radius: 2px;
}
.is-clicked span:nth-child(2) {
  top: 50%;
  left: 50%;
  width: 4px;
  height: 24px;
  transform: translate(-50%, -50%) rotate(-45deg);
}

.dialog {
  padding: 5px 15px;
  border: 4px solid #333;
  border-radius: 10px;
  position: absolute;
  top: -120px;
  left: -25px;
  width: 200px;
  background: white;
  box-shadow:  inset 0 -6px 0px #333, inset 0 0 0 6px #fcfcfc;
}
.dialog:before {
  content: "";
  border: 4px solid #333;
  border-top: none;
  border-right: none;
  background: #fcfcfc;
  width: 15px;
  height: 15px;
  display: block;
  position: absolute;
  transform: rotate(-45deg);
  bottom: -6px;
  left: 35px;
}
.dialog p {
  font-weight: 600;
}

.out {
  animation: outAnimation forwards 0.6s;
  animation-iteration-count: 1;
  transform-origin: 50% 50%;
  -webkit-animation: outAnimation forwards 0.6s;
  -webkit-animation-iteration-count: 1;
  -webkit-transform-origin: 50% 50%;
  -moz-animation: outAnimation forwards 0.6s;
  -moz-animation-iteration-count: 1;
  -moz-transform-origin: 50% 50%;
  -o-animation: outAnimation forwards 0.6s;
  -o-animation-iteration-count: 1;
  -o-transform-origin: 50% 50%;
  -ms-animation: outAnimation forwards 0.6s;
  -ms-animation-iteration-count: 1;
  -ms-transform-origin: 50% 50%;
}

@keyframes outAnimation {
  0% {
    opacity: 1;
    transform: scaleX(1) scaleY(1);
    right: -40px;
    top: -120px;
  }
  25% {
    opacity: 1;
    transform: scaleX(0.95) scaleY(0.95);
    right: -40px;
    top: -120px;
  }
  50% {
    opacity: 1;
    transform: scaleX(1.1) scaleY(1.1);
    right: -40px;
    top: -120px;
  }
  100% {
    opacity: 0;
    transform: scaleX(0.3) scaleY(0.3);
    right: 0px;
    top: -80px;
  }
}
@-moz-keyframes outAnimation {
  0% {
    opacity: 1;
    transform: scaleX(1) scaleY(1);
    right: -40px;
    top: -120px;
  }
  25% {
    opacity: 1;
    transform: scaleX(0.95) scaleY(0.95);
    right: -40px;
    top: -120px;
  }
  50% {
    opacity: 1;
    transform: scaleX(1.1) scaleY(1.1);
    right: -40px;
    top: -120px;
  }
  100% {
    opacity: 0;
    transform: scaleX(0.3) scaleY(0.3);
    right: 0px;
    top: -80px;
  }
}
@-webkit-keyframes outAnimation {
  0% {
    opacity: 1;
    transform: scaleX(1) scaleY(1);
    right: -40px;
    top: -120px;
  }
  25% {
    opacity: 1;
    transform: scaleX(0.95) scaleY(0.95);
    right: -40px;
    top: -120px;
  }
  50% {
    opacity: 1;
    transform: scaleX(1.1) scaleY(1.1);
    right: -40px;
    top: -120px;
  }
  100% {
    opacity: 0;
    transform: scaleX(0.3) scaleY(0.3);
    right: 0px;
    top: -80px;
  }
}
@-o-keyframes outAnimation {
  0% {
    opacity: 1;
    transform: scaleX(1) scaleY(1);
    right: -40px;
    top: -120px;
  }
  25% {
    opacity: 1;
    transform: scaleX(0.95) scaleY(0.95);
    right: -40px;
    top: -120px;
  }
  50% {
    opacity: 1;
    transform: scaleX(1.1) scaleY(1.1);
    right: -40px;
    top: -120px;
  }
  100% {
    opacity: 0;
    transform: scaleX(0.3) scaleY(0.3);
    right: 0px;
    top: -80px;
  }
}
@-ms-keyframes outAnimation {
  0% {
    opacity: 1;
    transform: scaleX(1) scaleY(1);
    right: -40px;
    top: -120px;
  }
  25% {
    opacity: 1;
    transform: scaleX(0.95) scaleY(0.95);
    right: -40px;
    top: -120px;
  }
  50% {
    opacity: 1;
    transform: scaleX(1.1) scaleY(1.1);
    right: -40px;
    top: -120px;
  }
  100% {
    opacity: 0;
    transform: scaleX(0.3) scaleY(0.3);
    right: 0px;
    top: -80px;
  }
}
.in {
  animation: inAnimation forwards 0.6s;
  animation-iteration-count: 1;
  transform-origin: 50% 50%;
  -webkit-animation: inAnimation forwards 0.6s;
  -webkit-animation-iteration-count: 1;
  -webkit-transform-origin: 50% 50%;
  -moz-animation: inAnimation forwards 0.6s;
  -moz-animation-iteration-count: 1;
  -moz-transform-origin: 50% 50%;
  -o-animation: inAnimation forwards 0.6s;
  -o-animation-iteration-count: 1;
  -o-transform-origin: 50% 50%;
  -ms-animation: inAnimation forwards 0.6s;
  -ms-animation-iteration-count: 1;
  -ms-transform-origin: 50% 50%;
}

@keyframes inAnimation {
  0% {
    opacity: 0;
    transform: scaleX(0.3) scaleY(0.3);
  }
  25% {
    opacity: 1;
    transform: scaleX(1.1) scaleY(1.1);
  }
  50% {
    opacity: 1;
    transform: scaleX(0.95) scaleY(0.95);
  }
  100% {
    opacity: 1;
    transform: scaleX(1) scaleY(1);
  }
}
@-moz-keyframes inAnimation {
  0% {
    opacity: 0;
    transform: scaleX(0.3) scaleY(0.3);
  }
  25% {
    opacity: 1;
    transform: scaleX(1.1) scaleY(1.1);
  }
  50% {
    opacity: 1;
    transform: scaleX(0.95) scaleY(0.95);
  }
  100% {
    opacity: 1;
    transform: scaleX(1) scaleY(1);
  }
}
@-webkit-keyframes inAnimation {
  0% {
    opacity: 0;
    transform: scaleX(0.3) scaleY(0.3);
  }
  25% {
    opacity: 1;
    transform: scaleX(1.1) scaleY(1.1);
  }
  50% {
    opacity: 1;
    transform: scaleX(0.95) scaleY(0.95);
  }
  100% {
    opacity: 1;
    transform: scaleX(1) scaleY(1);
  }
}
@-o-keyframes inAnimation {
  0% {
    opacity: 0;
    transform: scaleX(0.3) scaleY(0.3);
  }
  25% {
    opacity: 1;
    transform: scaleX(1.1) scaleY(1.1);
  }
  50% {
    opacity: 1;
    transform: scaleX(0.95) scaleY(0.95);
  }
  100% {
    opacity: 1;
    transform: scaleX(1) scaleY(1);
  }
}
@-ms-keyframes inAnimation {
  0% {
    opacity: 0;
    transform: scaleX(0.3) scaleY(0.3);
  }
  25% {
    opacity: 1;
    transform: scaleX(1.1) scaleY(1.1);
  }
  50% {
    opacity: 1;
    transform: scaleX(0.95) scaleY(0.95);
  }
  100% {
    opacity: 1;
    transform: scaleX(1) scaleY(1);
  }
}