/* Global Rules */
* {
  padding: 0px;
  margin: 0px;
  box-sizing: border-box;
  user-select: none;
  -webkit-tap-highlight-color: #dddddd8a;
}
body {
  padding: 20px;
  font-family: Arial, Helvetica, sans-serif;
}
body .loader {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border-width: 3px;
  border-color: #009c76 transparent #009c76 #009c76;
  border-style: solid;
  position: fixed;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-name: spin;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  animation-duration: 0.6s;
}
@media (max-width: 767px) {
  body {
    padding: 10px;
  }
}
/* End Global Rules */
/* Welcome */
.welcome {
  background-color: #EEE;
  border-radius: 10px;
  width: 1000px;
  max-width: 100%;
  padding: 20px;
  margin: 100px auto;
}
.welcome .title {
  text-align: center;
  background-color: #02cc96;
  width: fit-content;
  margin: 0px auto 50px;
  padding: 20px;
  border-radius: 10px;
  font-size: 30px;
  color: white;
}
.welcome .title > span {
  font-weight: bold;
}
.welcome .desc {
  background-color: #009c76;
  color: white;
  padding: 20px;
  border-radius: 10px;
  line-height: 2;
  font-size: 20px;
  margin-bottom: 30px;
}
.welcome .start {
  width: fit-content;
  background-color: #00d793;
  border-radius: 10px;
  padding: 10px 20px;
  margin: 0px auto;
  font-size: 20px;
  color: white;
  cursor: pointer;
  transition-duration: 0.3s;
}
.welcome .start:hover {
  background-color: #01c587;
}
@media (max-width: 767px) {
  .welcome .title {
    font-size: 17px;
  }
  .welcome .desc {
    font-size: 16px;
  }
  .welcome .start {
    font-size: 16px;
  }
  .welcome .start:hover {
    background-color: #00d793;
  }
}
/* End Welcome */
/* Game */
.game {
  background-color: #EEE;
  border-radius: 10px;
  width: 1000px;
  max-width: 100%;
  padding: 20px;
  margin: 100px auto;
  position: relative;
} 
@media (max-width: 767px) {
  .game {
    margin-top: 0px;
  }
}
.game .lost,
.game .win {
  width: 500px;
  max-width: 100%;
  height: 300px;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  padding: 10px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: #3333338b;
}
.game .lost > h3,
.game .win > h3 {
  color: white;
  padding: 10px 20px;
  border-radius: 10px;
  margin-bottom: 10px;
  font-size: 30px;
}
.game .win > h3 {
  background-color: #02c782;
}
.game .lost > h3 {
  background-color: rgb(222, 4, 4);
}
.game .lost > .next,
.game .win > .next {
  background-color: #00949c;
  color: white;
  padding: 5px 15px;
  border-radius: 10px;
  font-size: 20px;
  cursor: pointer;
  transition-duration: 0.3s;
}
.game .lost > .next:hover,
.game .win > .next:hover {
  background-color: #007b82;
}
@media (max-width: 767px) {
  .game .lost > h3,
  .game .win > h3 {
    font-size: 20px;
  }
  .game .lost > .next,
  .game .win > .next {
    font-size: 14px;
  }
  .game .lost > .next:hover,
  .game .win > .next:hover {
    background-color: #00949c;
  }
}
.game .info-row {
  display: flex;
  justify-content: space-between;
  background-color: #01c587;
  color: white;
  padding: 10px;
  border-radius: 10px;
  font-size: 20px;
  margin-bottom: 20px;
}
@media (max-width: 767px) {
  .game .info-row {
    font-size: 16px;
  }
}
.game .info-row .word-from span {
  color: #cb1111f8;
}
.game .draw-letters-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.game .draw-letters-row .the-draw {
  width: 300px;
  height: 300px;
  max-width: 100%;
  position: relative;
}
.game .draw-letters-row .the-draw > .floor,
.game .draw-letters-row .the-draw > .stand,
.game .draw-letters-row .the-draw > .stand-stick,
.game .draw-letters-row .the-draw > .roap,
.game .draw-letters-row .the-draw > .head,
.game .draw-letters-row .the-draw > .body,
.game .draw-letters-row .the-draw > .hand-left,
.game .draw-letters-row .the-draw > .hand-right,
.game .draw-letters-row .the-draw > .leg-left,
.game .draw-letters-row .the-draw > .leg-right {
  position: absolute;
  background-color: black;
  display: none;
}
.game .draw-letters-row .the-draw > .floor {
  width: 100px;
  height: 4px;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0px;
}
.game .draw-letters-row .the-draw > .stand {
  width: 4px;
  height: 250px;
  left: 50%;
  transform: translateX(-50%);
  bottom: 4px;
}
.game .draw-letters-row .the-draw > .stand-stick {
  width: 60px;
  height: 4px;
  bottom: 250px;
  left: 50%;
}
.game .draw-letters-row .the-draw > .roap {
  width: 4px;
  height: 50px;
  left: calc(50% + 60px);
  bottom: 204px;
} 
.game .draw-letters-row .the-draw > .roap::before {
  content: "";
  position: absolute;
  width: 50px;
  height: 50px;
  bottom: -54px;
  left: 50%;
  transform: translateX(-50%);
  border: 4px dotted black;
  border-radius: 50%;
}
.game .draw-letters-row .the-draw > .head {
  width: 40px;
  height: 40px;
  border: 4px solid black;
  border-radius: 50%;
  position: absolute;
  left: calc(50% + 42px);
  bottom: calc(204px - 45px);
}
.game .draw-letters-row .the-draw > .body {
  width: 4px;
  height: 100px;
  left: calc(50% + 60px);
  bottom: calc(204px - 145px)
}
.game .draw-letters-row .the-draw > .hand-left {
  width: 4px;
  height: 50px;
  left: calc(50% + 42px);
  bottom: calc(204px - 85px);
  transform: rotate(-45deg);
}
.game .draw-letters-row .the-draw > .hand-right {
  width: 4px;
  height: 50px;
  left: calc(50% + 78px);
  bottom: calc(204px - 85px);
  transform: rotate(45deg);
}
.game .draw-letters-row .the-draw > .leg-left {
  width: 4px;
  height: 50px;
  left: calc(50% + 42px);
  bottom: calc(204px - 185px);
  transform: rotate(-135deg);
}
.game .draw-letters-row .the-draw > .leg-right {
  width: 4px;
  height: 50px;
  left: calc(50% + 78px);
  bottom: calc(204px - 185px);
  transform: rotate(135deg);
}
.game .draw-letters-row .letters {
  background-color: #ddd;
  width: calc(100% - 300px);
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  padding: 20px;
}
.game .draw-letters-row .letters span {
  background-color: #01c587;
  width: 50px;
  text-align: center;
  max-width: 100%;
  height: fit-content;
  padding: 10px;
  border-radius: 6px;
  color: white;
  font-size: 35px;
  cursor: pointer;
}
.game .draw-letters-row .letters span.clicked {
  opacity: 0.1;
  background-color: #140000;
  pointer-events: none;
  cursor: default;
}
@media (max-width: 767px) {
  .game .draw-letters-row {
    flex-direction: column;
    gap: 10px
  }
  .game .draw-letters-row .the-draw {
    right: 30px;
    height: 160px;
    width: 150px;
  }
  .game .draw-letters-row .the-draw > .floor {
    width: 50px;
  }
  .game .draw-letters-row .the-draw > .stand {
    height: 150px;
  }
  .game .draw-letters-row .the-draw > .stand-stick {
    bottom: 150px; 
    width: 30px;
  }
  .game .draw-letters-row .the-draw > .roap {
    height: 25px;
    left: calc(50% + 30px);
    bottom: 129px;
  }
  .game .draw-letters-row .the-draw > .roap::before {
    width: 25px;
    height: 25px;
    bottom: -32px;
  }
  .game .draw-letters-row .the-draw > .head {
    width: 20px;
    height: 20px;
    left: calc(50% + 22px);
    bottom: calc(204px - 100px)
  }
  .game .draw-letters-row .the-draw > .body {
    height: 50px;
    left: calc(50% + 30px);
    bottom: calc((204px - 150px));
  }
  .game .draw-letters-row .the-draw > .hand-left {
    height: 25px;
    left: calc(50% + 20px);
    bottom: calc(204px - 122px);
  }
  .game .draw-letters-row .the-draw > .hand-right {
    height: 25px;
    left: calc(50% + 40px);
    bottom: calc(204px - 122px);
  }
  .game .draw-letters-row .the-draw > .leg-left {
    height: 25px;
    left: calc(50% + 21px);
    bottom: calc(204px - 170px);
  }
  .game .draw-letters-row .the-draw > .leg-right {
    height: 25px;
    left: calc(50% + 40px);
    bottom: calc(204px - 170px);
  }
  .game .draw-letters-row .letters {
    gap: 10px;
    width: 100%;
  }
  .game .draw-letters-row .letters span {
    font-size: 16px;
    width: calc((100% / 7) - 10px);
    text-align: center;
  }  
}
.game .answer-row {
  height: 80px;
  margin-top: 50px;
  background-color: rgb(255, 255, 255);
  border-radius: 10px;
  display: flex;
  padding: 10px;
  gap: 20px;
  justify-content: center;
}
.game .answer-row span {
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  font-size: 28px;
  width: 40px;
  color: black;;
  border-radius: 10px;
}
.game .answer-row span.has-before::before {
  content: "";
  position: absolute;
  background-color: black;
  height: 5px;
  width: 100%;
  left: 0px;
  bottom: 0px;
}
/* End Game */
/* Final Page */
.final-page {
  background-color: #EEE;
  border-radius: 10px;
  width: 1000px;
  max-width: 100%;
  padding: 20px;
  margin: 100px auto;
}
.final-page .title {
  text-align: center;
  background-color: #02cc96;
  width: fit-content;
  margin: 0px auto 50px;
  padding: 20px;
  border-radius: 10px;
  font-size: 25px;
  color: white;
}
.final-page .thanks {
  background-color: #009c76;
  color: white;
  padding: 15px;
  border-radius: 10px;
  font-size: 20px;
  margin-bottom: 30px;
  text-align: center;
}
.final-page .buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}
.final-page .re-try,
.final-page .home {
  background-color: #52a98d;
  border-radius: 10px;
  padding: 10px 20px;
  font-size: 20px;
  color: white;
  cursor: pointer;
  transition-duration: 0.3s;
  border: none;
}
.final-page .buttons .re-try:hover,
.final-page .buttons .home:hover {
  background-color: #1e8061;
}
@media (max-width: 767px) {
  .final-page .title {
    font-size: 20px;
  }

  .final-page .thanks {
    font-size: 16px;
  }

  .final-page .re-try,
  .final-page .home {
    font-size: 16px;
  }

  .final-page .re-try:hover,
  .final-page .home:hover {
    background-color: #52a98d;
  }
}
/* End Final Page */
/* Animation */
@keyframes spin {
  0% {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}
/* End Animation */