body {
  background-color:  #e6dec6;
  font-family: sans-serif;
  text-align: center;
}

h1 {
  font-family: "Rock Salt", cursive;
  font-size: 50px;
  margin-top: 20px;
  color: #000;
}

/* Hangman Container */
.flex-container {
  display: flex;
  max-width: 1200px;
  margin: auto;
  margin: 60px 20px 0 20px;
}

.flex-hangman-container {
  flex: 50%;
  position: relative;
  height: 290px;
  width: 220px;
  margin: auto;
  margin-top: 40px;
}

.gallows .pole {
  width: 4px;
  height: 400px;
  background: #000000;
  position: absolute;
  left: 50px;
  top: 0;
}

.gallows .beam {
  width: 230px;
  height: 4px;
  background: #000;
  position: absolute;
  left: 50px;
  top: 0;
}

.gallows .bottom {
  width: 190px;
  height: 4px;
  background: #000;
  position: absolute;
  left: -14px;
  top: 400px;

}

.gallows .rope {
  width: 4px;
  height: 55px;
  background: #000;
  position: absolute;
  left: 195px;
  top: 3px;
}

.gallows .support {
  width: 4px;
  height: 90px;
  background: #000;
  position: absolute;
  left: 79px;
  top: -14px;
  transform: rotate(45deg);
}

.gallows .support-one {
  width: 4px;
  height: 70px;
  background: #000;
  position: absolute;
  left: 26px;
  top: 345px;
  transform: rotate(45deg);
}

.gallows .support-two {
  width: 4px;
  height: 70px;
  background: #000;
  position: absolute;
  left: 74px;
  top: 345px;
  transform: rotate(-45deg);
}

/* Hangman Body */
.man .body-part {
  display: none;
  position: absolute;
}

.head {
  font-size: 30px;
  top: 66px;
  left: 167px;
  position: absolute;
}

.body {
  width: 5px;
  height: 110px;
  top: 115px;
  left: 194px;
  background-color: black;
}

.left-arm {
  width: 60px;
  height: 5px;
  top: 155px;
  left: 148px;
  transform: rotate(-50deg);
  background-color: black;
}

.right-arm {
  width: 60px;
  height: 5px;
  top: 155px;
  left: 186px;
  transform: rotate(50deg);
  background-color: black;
}

.left-leg {
  width: 70px;
  height: 5px;
  top: 245px;
  left: 140px;
  transform: rotate(-50deg);
  background-color: black;
}

.right-leg {
  width: 70px;
  height: 5px;
  top: 245px;
  left: 184px;
  transform: rotate(50deg);
  background-color: black;
}

.flex-word {
  flex: 50%;
}

#word {
  font-size: 50px;
  letter-spacing: 15px;
  margin-top: 70px;
  font-family: "Caveat", cursive;
}

/* Keyboard */
.keyboard {
  margin-top: 80px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  width: 100%;
  max-width: 550px;
  margin-left: auto;
  margin-right: auto;
  justify-content: center;
}

.keyboard button {
  flex: 0 0 50px;
  height: 50px;
  width: 50px;
  font-size: 30px;
  background-color: #f7cb72;
  border: 2px solid #c12c2f;
  cursor: pointer;
  transition: background 0.2s;
  border-radius: 6px;
  font-family: "Caveat", cursive;
}

.keyboard button:disabled {
  background-color: #d8c199;
  border: 2px solid #c56365;
  opacity: 0.5;
  color: #555;
  cursor: not-allowed;
}

#message {
  font-size: 16px;
  font-weight: bold;
  margin: 30px 0 30px 0;
  font-family: "Jost", sans-serif;
}

#restart-button {
  margin-bottom: 35px;
  padding: 10px 23px;
  font-size: 16px;
  background-color: #f7cb72;
  border: 2px solid #af2c2e;
  border-radius: 25px;
  cursor: pointer;
  font-family: "Jost", sans-serif;
}

#restart-button:hover {
  background-color: #e1b660;
}

@media screen and (max-width: 800px) {
  .flex-container {
    flex-direction: column;
    align-items: center;
  }

  .flex-hangman-container {
    margin-top: 20px;
  }
  
  .gallows .pole {
    width: 3px;
    height: 200px;
    left: 50px;
    top: 0;
  }
  
  .gallows .beam {
    width: 130px;
    height: 3px;
    left: 50px;
    top: 0;
  }
  
  .gallows .bottom {
    width: 100px;
    height: 3px;
    left: 13px;
    top: 200px;
  }
  
  .gallows .rope {
    width: 3px;
    height: 30px;
    left: 140px;
    top: 3px;
  }
  
  .gallows .support {
    width: 3px;
    height: 60px;
    left: 68px;
    top: -11px;
    transform: rotate(45deg);
  }
  
  .gallows .support-one {
    width: 3px;
    height: 40px;
    left: 35px;
    top: 170px;
    transform: rotate(45deg);
  }
  
  .gallows .support-two {
    width: 3px;
    height: 40px;
    left: 65px;
    top: 170px;
    transform: rotate(-45deg);
  }
  
  /* Hangman Body */
  .head {
    font-size: 18px;
    top: 38px;
    left: 124px;
  }
  
  .body {
    width: 3px;
    height: 60px;
    top: 66px;
    left: 140px;
  }
  
  .left-arm {
    width: 40px;
    height: 3px;
    top: 95px;
    left: 108px;
    transform: rotate(-50deg);
  }
  
  .right-arm {
    width: 40px;
    height: 3px;
    top: 95px;
    left: 135px;
    transform: rotate(50deg);
  }
  
  .left-leg {
    width: 40px;
    height: 3px;
    top: 137px;
    left: 109px;
    transform: rotate(-50deg);
  }
  
  .right-leg {
    width: 40px;
    height: 3px;
    top: 137px;
    left: 135px;
    transform: rotate(50deg);
  }

  #word {
    margin-top: 250px;
  }

  .keyboard {
    margin-top: 40px;
  }
}