body {
  background-color: black;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  margin: 0px;
  flex-direction: column;
  color: white;
  font-family: "Courier New", Courier, monospace;
}

#morse-text {
  color: white;
  width: 60%;
  max-width: 100vw;
  max-height: 1em;
  height: 1em;
  font-size: 2em;
  overflow: clip;
  text-align: right;
  white-space: pre;
  justify-content: flex-end;
  display: flex;
  flex-direction: row;
  align-items: center;
}

#predicted-letter {
  color: hsl(0, 0%, 53%);
}

#defined-letters {
  direction: rtl;
  text-align: left;
  overflow: clip;
  white-space: nowrap;
  flex-shrink: 1;
  max-width: 100%;
  display: inline-block;
}

#undefined-morse {
  color: hsl(0, 0%, 53%);
}

#key {
  position: relative;
  width: 160vh;
  max-width: 100vw;
  height: 80vh;
  max-height: 50vw;
}

#base * {
  position: absolute;
  box-shadow: 0px -3px 6px rgba(0, 0, 0, 0.289);
}

#base {
  position: absolute;
  border-radius: 3%;
  bottom: 0;
  width: 100%;
  right: 0;
  height: 20%;
  background: linear-gradient(
    to bottom,
    hsl(22, 45%, 19%),
    hsl(22, 45%, 21%),
    hsl(22, 45%, 20%),
    hsl(22, 45%, 18%),
    hsl(22, 45%, 19%),
    hsl(22, 45%, 21%),
    hsl(22, 45%, 20%),
    hsl(22, 45%, 21%),
    hsl(22, 45%, 19%),
    hsl(22, 45%, 19%),
    hsl(22, 45%, 21%),
    hsl(22, 45%, 20%),
    hsl(22, 45%, 18%),
    hsl(22, 45%, 19%),
    hsl(22, 45%, 19%),
    hsl(22, 45%, 19%),
    hsl(22, 45%, 20%),
    hsl(22, 45%, 19%),
    hsl(22, 45%, 21%),
    hsl(22, 45%, 20%),
    hsl(22, 45%, 21%),
    hsl(22, 45%, 19%),
    hsl(22, 45%, 19%),
    hsl(22, 45%, 21%),
    hsl(22, 45%, 20%),
    hsl(22, 45%, 18%),
    hsl(22, 45%, 19%),
    hsl(22, 45%, 19%),
    hsl(22, 45%, 20%),
    hsl(22, 45%, 19%),
    hsl(22, 45%, 21%),
    hsl(22, 45%, 18%),
    hsl(22, 45%, 21%),
    hsl(22, 45%, 18%),
    hsl(22, 45%, 19%)
  );
}

#morse-code-sheet {
  box-shadow: none;
  left: 2%;
  bottom: 0;
  height: 100%;
  width: 80%;
  font-weight: bold;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  z-index: 1;
  color: hsl(22, 45%, 15%);
}
#morse-code-sheet > .morse-code-sheet-content {
  box-shadow: none;
  position: static;
  gap: 0% 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  flex-direction: column;
  height: 60%;
  letter-spacing: 0.1em;
}
#morse-code-sheet > .morse-code-sheet-content span {
  text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;
  filter: drop-shadow(0 0 1px rgba(0, 0, 0, 0.5));
  box-shadow: none;
  position: static;
}

#base-texture {
  border-radius: 2%;
  bottom: 0;
  width: 100%;
  right: 0;
  height: 100%;
  z-index: 1;
  background: linear-gradient(
    to bottom right,
    hsl(22, 45%, 20%, 50%),
    hsl(22, 45%, 19%, 50%),
    hsl(22, 45%, 20%, 50%),
    hsl(22, 45%, 21%, 50%),
    hsl(22, 45%, 20%, 50%),
    hsl(22, 45%, 19%, 50%),
    hsl(22, 45%, 20%, 50%),
    hsl(22, 45%, 19%, 50%),
    hsl(22, 45%, 20%, 50%),
    hsl(22, 45%, 21%, 50%),
    hsl(22, 45%, 20%, 50%),
    hsl(22, 45%, 19%, 50%),
    hsl(22, 45%, 20%, 50%),
    hsl(22, 45%, 19%, 50%),
    hsl(22, 45%, 20%, 50%),
    hsl(22, 45%, 21%, 50%),
    hsl(22, 45%, 20%, 50%),
    hsl(22, 45%, 19%, 50%),
    hsl(22, 45%, 20%, 50%),
    hsl(22, 45%, 19%, 50%),
    hsl(22, 45%, 20%, 50%),
    hsl(22, 45%, 21%, 50%),
    hsl(22, 45%, 20%, 50%),
    hsl(22, 45%, 19%, 50%),
    hsl(22, 45%, 20%, 50%)
  );
}

#contact-base {
  border-top-left-radius: 1%;
  border-top-right-radius: 1%;
  bottom: 100%;
  left: 50%;
  width: 24%;
  height: 22%;
  background: linear-gradient(
    to bottom,
    hsl(49, 58%, 44%),
    hsl(49, 58%, 40%),
    hsl(49, 58%, 44%),
    hsl(49, 58%, 40%)
  );
}

#contact-base-bottom {
  border-top-left-radius: 3%;
  border-top-right-radius: 3%;
  bottom: 100%;
  right: 1%;
  width: 30%;
  height: 184%;
  background: linear-gradient(
    to right,
    rgb(139, 123, 54),
    rgb(182, 157, 48),
    rgb(139, 123, 54),
    rgb(110, 97, 43)
  );
}
#contact-base-middle {
  border-top-left-radius: 3%;
  border-top-right-radius: 3%;
  bottom: 100%;
  right: 20%;
  width: 60%;
  height: 35%;
  background: linear-gradient(
    to right,
    rgb(139, 123, 54),
    rgb(182, 157, 48),
    rgb(139, 123, 54),
    rgb(110, 97, 43)
  );
}
#contact-base-top {
  border-top-left-radius: 3%;
  border-top-right-radius: 3%;
  bottom: 100%;
  right: 20%;
  width: 60%;
  height: 190%;
  background: linear-gradient(
    to right,
    rgb(139, 123, 54),
    rgb(182, 157, 48),
    rgb(139, 123, 54),
    rgb(110, 97, 43)
  );
}

#lever-base {
  border-top-left-radius: 1%;
  border-top-right-radius: 1%;
  bottom: 100%;
  right: 1%;
  width: 23%;
  height: 30%;
  background: linear-gradient(
    to bottom,
    hsl(49, 58%, 44%),
    hsl(49, 58%, 42%),
    hsl(49, 58%, 42%),
    hsl(49, 58%, 42%),
    hsl(49, 58%, 44%),
    hsl(49, 58%, 43%),
    hsl(49, 58%, 44%)
  );
}
#lever-joint-base {
  border-top-left-radius: 42%;
  border-top-right-radius: 42%;
  bottom: 100%;
  left: 0;
  width: 45%;
  height: 340%;
  background: linear-gradient(
    to bottom,
    hsl(49, 58%, 43%),
    hsl(49, 58%, 42%),
    hsl(49, 58%, 42%),
    hsl(49, 58%, 43%),
    hsl(49, 58%, 43%),
    hsl(49, 58%, 42%),
    hsl(49, 58%, 42%),
    hsl(49, 58%, 43%),
    hsl(49, 58%, 43%),
    hsl(49, 58%, 42%),
    hsl(49, 58%, 42%),
    hsl(49, 58%, 43%),
    hsl(49, 58%, 43%),
    hsl(49, 58%, 42%),
    hsl(49, 58%, 42%),
    hsl(49, 58%, 43%),
    hsl(49, 58%, 38%)
  );
}
#lever-joint {
  border-radius: 100% / 30%;
  top: 10%;
  left: 30%;
  width: 40%;
  height: 50%;
  background: linear-gradient(
    to bottom,
    hsl(49, 58%, 43%),
    hsl(49, 58%, 42%),
    hsl(49, 58%, 41%),
    hsl(49, 58%, 42%),
    hsl(49, 58%, 43%),
    hsl(49, 58%, 43%),
    hsl(49, 58%, 42%),
    hsl(49, 58%, 41%),
    hsl(49, 58%, 42%),
    hsl(49, 58%, 43%),
    hsl(49, 58%, 43%),
    hsl(49, 58%, 42%)
  );
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.343);
}

#lever-stopper-bottom {
  border-top-left-radius: 3%;
  border-top-right-radius: 3%;
  bottom: 100%;
  left: 55%;
  width: 30%;
  height: 110%;
  background: linear-gradient(
    to right,
    rgb(139, 123, 54),
    rgb(182, 157, 48),
    rgb(139, 123, 54),
    rgb(110, 97, 43)
  );
}
#lever-stopper-middle {
  border-top-left-radius: 3%;
  border-top-right-radius: 3%;
  bottom: 100%;
  right: 20%;
  width: 60%;
  height: 60%;
  background: linear-gradient(
    to right,
    rgb(139, 123, 54),
    rgb(182, 157, 48),
    rgb(139, 123, 54),
    rgb(110, 97, 43)
  );
}
#lever-stopper-top {
  box-shadow: none;
  border-top-left-radius: 30%;
  border-top-right-radius: 30%;
  bottom: 100%;
  right: 20%;
  width: 60%;
  height: 210%;
  background: linear-gradient(
    to right,
    hsl(49, 44%, 38%),
    rgb(182, 157, 48),
    rgb(139, 123, 54),
    rgb(110, 97, 43)
  );
}
#lever-bar-joint-connection {
  position: absolute;
  border-bottom-left-radius: 100%;
  border-bottom-right-radius: 100%;
  bottom: 200%;
  left: 0;
  width: 45%;
  height: 220%;
  background: linear-gradient(
    to bottom,
    hsl(49, 58%, 43%),
    hsl(49, 58%, 43%),
    hsl(49, 58%, 43%),
    hsl(49, 58%, 43%),
    hsl(49, 58%, 43%),
    hsl(49, 58%, 42%),
    hsl(49, 58%, 42%),
    hsl(49, 58%, 42%),
    hsl(49, 58%, 42%),
    hsl(49, 58%, 42%),
    hsl(49, 58%, 42%),
    hsl(49, 58%, 43%),
    hsl(49, 58%, 43%),
    hsl(49, 58%, 42%),
    hsl(49, 58%, 42%),
    hsl(49, 58%, 43%)
  );
}
#lever-bar-center {
  position: absolute;
  bottom: 99%;
  left: 0;
  width: 100%;
  height: 80%;
  background: linear-gradient(
    to bottom,
    hsl(49, 58%, 43%),
    hsl(49, 58%, 43%),
    hsl(49, 58%, 43%),
    hsl(49, 58%, 43%),
    hsl(49, 58%, 43%),
    hsl(49, 58%, 42%),
    hsl(49, 58%, 42%),
    hsl(49, 58%, 42%),
    hsl(49, 58%, 42%),
    hsl(49, 58%, 42%),
    hsl(49, 58%, 42%),
    hsl(49, 58%, 43%),
    hsl(49, 58%, 43%),
    hsl(49, 58%, 42%),
    hsl(49, 58%, 42%),
    hsl(49, 58%, 43%)
  );
}
#lever-bar-stopper-hole {
  border-top-right-radius: 3%;
  border-bottom-right-radius: 3%;
  box-shadow: 0px -3px 0px rgba(0, 0, 0, 0.259), -1px 0px 0px hsl(49, 58%, 43%);
  top: 0;
  left: 100%;
  width: 100%;
  height: 50%;
  background: linear-gradient(
    to right,
    hsl(49, 58%, 43%),
    hsl(49, 58%, 41%),
    hsl(49, 58%, 45%),
    hsl(49, 58%, 38%),
    hsl(49, 58%, 30%)
  );
}

.lever-bar-screw-bottom {
  top: 50%;
  left: 143%;
  width: 25%;
  height: 51.5%;
  background: repeating-linear-gradient(
    -4deg,
    hsl(49, 58%, 43%) 0%,
    hsl(49, 58%, 37%) 16%
  );
}
#lever-bar-stopper-screw-mask {
  box-shadow: none;
  transform: rotate(60deg);
  position: absolute;
  top: 100%;
  right: 40%;
  width: 100%;
  height: 20%;
  background: black;
}
#lever-bar-stopper-screw-mask2 {
  box-shadow: none;
  transform: rotate(-60deg);
  top: 100%;
  left: 40%;
  width: 100%;
  height: 20%;
  background: black;
}
#lever-bar-stopper-screw-top {
  bottom: 199%;
  left: 0;
  width: 100%;
  height: 101.5%;
  background: linear-gradient(
    to right,
    hsl(49, 58%, 43%),
    hsl(49, 58%, 41%),
    hsl(49, 58%, 45%),
    hsl(49, 58%, 38%),
    hsl(49, 58%, 30%)
  );
}
.lever-bar-stopper-screw-washer {
  border-radius: 10% / 30%;
  bottom: 0;
  left: -50%;
  width: 200%;
  height: 21%;
  background: linear-gradient(
    to right,
    hsl(49, 58%, 43%),
    hsl(49, 58%, 41%),
    hsl(49, 58%, 45%),
    hsl(49, 58%, 38%),
    hsl(49, 58%, 30%)
  );
}
.lever-bar-stopper-screw-head {
  border-radius: 10% 10% 30% 30% / 25% 25% 45% 45%;
  bottom: 100%;
  left: -135%;
  width: 360%;
  height: 50%;
  background: repeating-linear-gradient(
    to right,
    hsl(49, 58%, 43%),
    hsl(49, 58%, 37%) 4%
  );
}
#lever-bar-stopper-screw-head-top {
  box-shadow: 0px 1px 0px rgba(0, 0, 0, 0.259);
  border-radius: 30% 30% 10% 10% / 45% 45% 25% 25%;
  left: 0;
  bottom: 100%;
  width: 100%;
  height: 100%;
}

#lever-bar-contact {
  box-shadow: 0px -2px 0px rgba(0, 0, 0, 0.124), -1px 0px 0px hsl(49, 58%, 43%),
    1px 0px 0px hsl(49, 58%, 43%);
  top: 0;
  right: 100%;
  width: 100%;
  height: 85%;
  background: linear-gradient(
    to right,
    hsl(49, 58%, 43%),
    hsl(49, 58%, 45%),
    hsl(49, 58%, 38%),
    hsl(48, 58%, 30%),
    hsl(48, 58%, 30%),
    hsl(49, 58%, 43%)
  );
}
.lever-bar-screw-bottom#lever-bar-contact-screw {
  left: -70%;
  top: -100%;
  height: 235%;
  border-radius: 0 0 30% 30%;
  background: repeating-linear-gradient(
    -4deg,
    hsl(49, 58%, 43%) 0%,
    hsl(49, 58%, 37%) 5%
  );
}
.lever-bar-stopper-screw-head#lever-bar-contact-screw-head {
  height: 10%;
}
.lever-bar-stopper-screw-head#lever-bar-contact-screw-head-top {
  height: 30%;
}
.lever-bar-stopper-screw-washer#lever-bar-contact-screw-washer {
  bottom: 57%;
  left: -45%;
  width: 190%;
  height: 4%;
}
.lever-bar-stopper-screw-washer#lever-bar-contact-screw-washer2 {
  box-shadow: 0px 1px 0px rgba(0, 0, 0, 0.058);
  box-shadow: 0px -3px 0px rgba(0, 0, 0, 0.14);
  bottom: 100%;
  left: 10%;
  width: 80%;
  height: 400%;
  border-radius: 10% 10% 0 0 / 50% 50% 0 0;
}

#lever-bar-neck {
  border-bottom-left-radius: 100%;
  box-shadow: none;
  position: absolute;
  top: 0;
  right: 100%;
  width: 500%;
  height: 100%;
  background: linear-gradient(
    to bottom right,
    hsl(49, 58%, 43%),
    hsl(49, 58%, 42%),
    hsl(49, 58%, 43%),
    hsl(49, 58%, 42%),
    hsl(49, 58%, 41%)
  );
}
#lever-bar-head {
  border-radius: 3%;
  box-shadow: -3px 0px 3px rgba(0, 0, 0, 0.289);
  box-shadow: none;
  position: absolute;
  top: 0;
  right: 90%;
  width: 19%;
  height: 45%;
  background: linear-gradient(
    to right,
    hsl(49, 58%, 43%),
    hsl(49, 58%, 41%),
    hsl(49, 58%, 45%),
    hsl(49, 58%, 38%),
    hsl(48, 58%, 30%),
    hsl(48, 58%, 30%),
    hsl(48, 58%, 40%),
    hsl(49, 58%, 43%),
    hsl(49, 58%, 43%),
    hsl(48, 58%, 30%)
  );
}

#spring {
  box-shadow: none;
  position: absolute;
  left: 6%;
  bottom: 100%;
  width: 50%;
  height: 192%;
  background: linear-gradient(
    to bottom,
    hsl(49, 58%, 43%),
    hsl(49, 58%, 40%),
    hsl(49, 58%, 43%),
    hsl(49, 58%, 40%),
    hsl(49, 58%, 43%),
    hsl(49, 58%, 40%),
    hsl(49, 58%, 43%),
    hsl(49, 58%, 40%),
    hsl(49, 58%, 43%),
    hsl(49, 58%, 40%),
    hsl(49, 58%, 43%),
    hsl(49, 58%, 40%),
    hsl(49, 58%, 43%)
  );
  border-radius: 100% 10% 60% 0/ 100% 10% 100% 0;
}
#spring-mask {
  box-shadow: none;
  position: absolute;
  bottom: 6%;
  right: 0%;
  width: 100%;
  height: 120%;
  background: hsl(0, 0%, 0%);
  border-radius: 100% 10% 60% 0/ 100% 10% 100% 0;
}
#spring-mask2 {
  box-shadow: none;
  top: 0%;
  right: 0%;
  width: 20%;
  height: 40%;
  background: hsl(0, 0%, 0%);
  border-radius: 0;
}

#spring-tip {
  box-shadow: none;
  position: absolute;
  bottom: 20%;
  left: 90%;
  width: 20%;
  height: 50%;
  background: linear-gradient(
    to bottom,
    hsl(49, 58%, 43%),
    hsl(49, 58%, 40%),
    hsl(49, 58%, 43%),
    hsl(49, 58%, 40%),
    hsl(49, 58%, 43%),
    hsl(49, 58%, 40%),
    hsl(49, 58%, 43%),
    hsl(49, 58%, 40%),
    hsl(49, 58%, 43%),
    hsl(49, 58%, 40%),
    hsl(49, 58%, 43%)
  );
  border-radius: 130% 100% 100% 100% / 130% 100% 100% 0%;
}
#spring-tip-mask {
  box-shadow: none;
  position: absolute;
  top: 15%;
  left: 5%;
  width: 92%;
  height: 100%;
  background: black;
  border-radius: 120% 100% 100% 100% / 130% 100% 100% 0%;
}
#spring-tip-mask2 {
  box-shadow: none;
  position: absolute;
  top: 20%;
  left: 50%;
  width: 80%;
  height: 80%;
  background: black;
  border-radius: 100% 0 0 0;
}
#spring-tip-mask3 {
  transform: rotate(36deg);
  box-shadow: none;
  top: 48%;
  left: -8%;
  width: 35%;
  height: 60%;
  background: rgb(0, 0, 0);
}

/* Animation */
@keyframes lowered-lever {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(-1.6deg);
  }
}
.lowered#lever-bar-joint-connection {
  animation-timing-function: linear;
  animation-name: lowered-lever;
  animation-duration: 0.02s;
  animation-fill-mode: forwards;
}

@keyframes raised-lever {
  from {
    transform: rotate(-1.6deg);
  }
  to {
    transform: rotate(0deg);
  }
}
.raised#lever-bar-joint-connection {
  animation-timing-function: linear;
  animation-name: raised-lever;
  animation-duration: 0.01s;
  animation-fill-mode: forwards;
}

@keyframes lowered-spring {
  from {
    transform-origin: 0% 99%;
    transform: scaleY(1) scaleX(1);
  }
  to {
    transform-origin: 0% 99%;
    transform: scaleY(0.95) scaleX(1.01);
  }
}
.lowered#spring {
  animation-timing-function: linear;
  animation-name: lowered-spring;
  animation-duration: 0.02s;
  animation-fill-mode: forwards;
}

@keyframes raised-spring {
  from {
    transform-origin: 0% 99%;
    transform: scaleY(0.95) scaleX(1.01);
  }
  to {
    transform-origin: 0% 99%;
    transform: scaleY(1) scaleX(1);
  }
}
.raised#spring {
  animation-timing-function: linear;
  animation-name: raised-spring;
  animation-duration: 0.01s;
  animation-fill-mode: forwards;
}
