* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: Arial, Helvetica, sans-serif;
}

.container {
  margin: 20px auto;
  width: 1000px;
}

.game-info {
  display: flex;
  justify-content: space-between;
  padding: 10px;
}

.game-info .category span {
  text-transform: capitalize;
  color: #E91E63;
  font-weight: bold;
}

.row {
  display: flex;
}

hr {
  margin: 10px 0;
  border: 1px solid #eee;
}

.hangman-draw {
  flex: 1;
  padding: 20px;
  height: 324px;
  background-color: #f8f8f8;
  
}

.hangman-draw .the-draw{
  width: 60px;
  height: 280px;
  position: relative;
  margin: auto;
}

.hangman-draw .the-bottom::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 4px;
  background-color: #222;
  bottom: 0;
}

.hangman-draw .the-stand::before {
  content: "";
  position: absolute;
  width: 4px;
  height: 100%;
  background-color: #222;
  left: 50%;
  transform: translateX(-50%);
}

.hangman-draw .the-hang::before {
  content: "";
  position: absolute;
  width: 100px;
  height: 4px;
  background-color: #222;
  left: 30px;
  top: 15px;
}

.hangman-draw .the-hang::after {
  content: "";
  position: absolute;
  width: 4px;
  height: 30px;
  background-color: #222;
  left: 130px;
  top: 15px;
}

.hangman-draw .the-rope::before {
  content: "";
  position: absolute;
  width: 70px;
  height: 70px;
  border: 4px dashed #222;
  border-radius: 50px;
  left: 93px;
  top: 43px;
}

.hangman-draw .the-man .head {
  position: absolute;
  width: 50px;
  height: 50px;
  border: 4px solid #222;
  border-radius: 50px;
  left: 107px;
  top: 57px;
}

.hangman-draw .the-man .body {
  position: absolute;
  width: 4px;
  height: 110px;
  background-color: #222;
  left: 130px;
  top: 107px;
}

.hangman-draw .the-man .hands::before,
.hangman-draw .the-man .hands::after {
  content: "";
  position: absolute;
  width: 50px;
  height: 4px;
  background-color: #222;
}

.hangman-draw .the-man .hands::before {
  transform: rotate(-30deg);
  left: 130px;
  top: 140px;
}

.hangman-draw .the-man .hands::after {
  transform: rotate(30deg);
  left: 84px;
  top: 140px;
}


.hangman-draw .the-man .legs::before,
.hangman-draw .the-man .legs::after {
  content: "";
  position: absolute;
  width: 50px;
  height: 4px;
  background-color: #222;
}

.hangman-draw .the-man .legs::before {
  transform: rotate(30deg);
  left: 130px;
  top: 226px;
}

.hangman-draw .the-man .legs::after {
  transform: rotate(-30deg);
  left: 84px;
  top: 226px;
}



/* إخفاء جميع أجزاء الرجل و أدوات التعليق */
.hangman-draw .the-bottom,
.hangman-draw .the-stand,
.hangman-draw .the-hang,
.hangman-draw .the-rope,
.hangman-draw .the-man .head,
.hangman-draw .the-man .body,
.hangman-draw .the-man .hands,
.hangman-draw .the-man .legs {
  opacity: 0;
  transition: 0.3s;
}

/* إظهار تدريجي حسب عدد الأخطاء */
.wrong-1 .the-bottom { opacity: 1; }
.wrong-2 .the-stand { opacity: 1; }
.wrong-3 .the-hang { opacity: 1; }
.wrong-4 .the-rope { opacity: 1; }
.wrong-5 .the-man .head { opacity: 1; }
.wrong-6 .the-man .body { opacity: 1; }
.wrong-7 .the-man .hands { opacity: 1; }
.wrong-8 .the-man .legs { opacity: 1; }


.letters {
  flex: 1;
  padding: 15px;
  text-align: center;
}

.letters .letter {
  width: 55px;
  height: 55px;
  background-color: #2196F3;
  color: white;
  display: inline-block;
  font-size: 24px;
  color: white;
  font-weight: bold;
  margin-right: 10px;
  margin-bottom: 10px;
  line-height: 55px;
  cursor: pointer;
}

.letters-guess {
  background-color: #f8f8f8;
  margin: 10px auto;
  padding: 20px;
  display: flex;
  justify-content: center;
}

.letters-guess div{
  width: 60px;
  height: 60px;
  background-color: #fdfdfd;
  border-bottom: 3px solid ;
  text-align: center;
  font-size: 24px;
  color: black;
  font-weight: bold;
  margin-right: 10px;
  line-height: 60px;
  text-transform: capitalize;
  transition: 0.3s;
}

.letters-guess span.hidden {
  opacity: 0;
}

div.empty-letter {
  width: 35px;
  border: none;
  opacity: 0;
}

.win-msg {
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  background-color: rgba(0,0,0,.7);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 999;
  opacity: 0;
  animation: gbackground 0.4s ease 0.5s forwards;
}

.win-msg .window {
  padding: 30px 60px;
  text-align: center;
  background-color: white;
  border-radius: 12px;
  font-size: 22px;
}

/* Animation */
.win-msg .window {
  transform: scale(0.6);
  animation: pop 0.4s ease 0.5s forwards;
}

@keyframes gbackground {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes pop {
  from {
    transform: scale(0.6);
  }
  to {
    transform: scale(1);
  }
}



.win-msg .window h3 {
  margin-bottom: 10px;
  color: #6aaa64;
}

.win-msg .window p {
  font-weight: bold;
  color: #444;
}


.win-msg .window button {
  margin-top: 15px;
  padding: 10px 18px;
  border: none;
  border-radius: 8px;
  background-color: #2196F3;
  color: white;
  font-size: 18px;
  cursor: pointer;
}



.game-over {
  padding: 30px 60px;
  text-align: center;
  background-color: white;
  border-radius: 12px;
  font-size: 22px;
  display: none;
}

.game-over h3 {
  margin-bottom: 10px;
  color: red;
}

.game-over p {
  font-weight: bold;
  color: #444;
}

.game-over p span {
  text-transform: uppercase;
  color: #6aaa64;
}


.game-over button {
  margin-top: 15px;
  padding: 10px 18px;
  border: none;
  border-radius: 8px;
  background-color: #2196F3;
  color: white;
  font-size: 18px;
  cursor: pointer;
}




