html {
  background-image: url("../assets/bg-game.png");
  background-size: 100%;
  background-repeat: no-repeat;
  background-position: center top;
}

body {
  margin-top: 18px;
  padding: 0;
  width: 100vw;
  box-sizing: border-box;
  overflow: hidden;
}

.start-game {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  top: 10px;
}

.title-game {
  font-size: 70px;
  color: #512101;
  text-shadow: 3px 3px rgba(0, 0, 0, 0.25);
}

.start-game img {
  width: 520px;
  position: relative;
  top: -20px;
}

.action-button {
  display: flex;
  gap: 10px;
  margin-top: -12px;
}

.play-game {
  display: flex;
  justify-content: center;
  align-items: center;

  width: 140px;
  height: 50px;
  font-size: 22px;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  background-color: #f97a00;
  color: #fff;
  box-shadow: 10px 5px 5px rgba(0, 0, 0, 0.25);
}

.play-game:hover {
  background-color: #fff;
  color: #f97a00;
  box-shadow: 10px 5px 5px rgba(0, 0, 0, 0.25);
  cursor: pointer;
}

.hyperlink-game {
  text-decoration: none;
  color: white;
}

/* game style */
.buttons {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 25px;
}

.display-hint {
  display: flex;
  align-items: center;
  gap: 10px;
  position: static !important;
  left: 0 !important;
}

.heading-game {
  position: static !important;
  left: 0 !important;
  flex: 1;
  display: flex;
  justify-content: center;
}

.reset-game {
  position: static !important;
  left: 0 !important;
  display: flex;
  justify-content: flex-end;
  flex: 1;
}

.hint-btn {
  background-color: #f97a00;
  border: none;
  color: white;
  width: 70px;
  height: 30px;
  font-size: 17px;
  cursor: pointer;
}

.hint-btn:hover {
  box-shadow: -2px 4px 4px rgba(0, 0, 0, 0.25);
}

.mute-btn {
  background-color: #fed16a;
  border: none;
  width: 40px;
  height: 30px;
  font-size: 17px;
  cursor: pointer;
  margin-right: 8px;
  border-radius: 25px;
}

.back-btn {
  background: none;
  border: none;
  width: 40px;
  height: 30px;
  font-size: 17px;
  cursor: pointer;
  margin-left: 8px;
  border-radius: 25px;
}

.off {
  width: 30px;
}

.hint-sentence {
  font-size: 17px;
  margin-left: 4px;
  height: 28px;
  width: 360px;
  padding-top: 10px;
  color: #f97a00;
}

.reset-btn {
  background-color: #7b4019;
  border: none;
  color: white;
  width: 150px;
  height: 30px;
  font-size: 17px;
  cursor: pointer;
}

.top-bar {
  display: flex;
  flex-direction: row;
  justify-content: space-around;
  align-items: center;
  font-size: 22px;
  margin-top: 22px;
}

.category {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  font-size: 18px;
  font-weight: 800;
  color: #004030;
}

.body-game {
  display: flex;
  flex-direction: row;
  justify-content: space-around;
  align-items: center;
}

.body-game img {
  width: 512px;
  height: 512px;
  position: relative;
  top: 2px;
}

.guess-word {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
  gap: 10px;
}

.boxes {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 20px;
}

.boxes-ar {
  display: flex;
  flex-direction: row-reverse;
  justify-content: center;
  align-items: center;
  gap: 20px;
}

.boxes .box, .boxes-ar .box {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  font-size: 20px;
  background-color: rgba(249, 122, 0, 0.36);
  border: 1px solid #f97a00;
  position: relative;
  top: -100px;
}

.keyboard {
  display: grid;
  grid-template-columns: repeat(9, 2fr);
  gap: 20px;
  cursor: url("../assets/rounded-cursor.png"), pointer;
}

.keyboard-ar {
  display: grid;
  grid-template-columns: repeat(9, 2fr);
  gap: 20px;
  cursor: url("../assets/rounded-cursor.png"), pointer;
  direction: rtl;
}

.keyboard span, .keyboard-ar span {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  background-color: #fed16a;
  border-radius: 5px;
  width: 30px;
  height: 25px;
  text-align: center;
  padding-top: 5px;
  box-shadow: 2px 2px rgba(0, 0, 0, 0.25);
}

.banner {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 15px;
  width: 605px;
  height: 350px;
  background-image: url("../assets/banner-winner.png");
  border-radius: 8px;
  position: absolute;
  top: 140px;
  left: 370px;
  z-index: 1;
  font-size: 70px;
}

.banner .winner {
  position: relative;
  top: 70px;
  left: 8px;
  color: #004030;
}

.wrong {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 30px;
  width: 600px;
  height: 350px;
  background-image: url("../assets/banner-gameover.png");
  border-radius: 8px;
  position: absolute;
  top: 140px;
  left: 370px;
  z-index: 1;
  font-size: 70px;
}

.wrong p {
  position: relative;
  top: 70px;
  left: 8px;
  color: #004030;
}

.banner a {
  text-decoration: none;
  color: #004030;
  font-size: 20px;
  position: relative;
  top: -10px;
  left: 4px;
}

/* Tablet landscape / iPad Pro (≤992px) */
@media (max-width: 992px) {
  html {
    min-height: 120vh;
    background-size: cover;
    background-position: center top;
  }

  body {
    overflow-y: auto;
    margin-top: 12px;
    margin-bottom: 12px;
  }

  .title-game {
    font-size: 55px;
    text-align: center;
  }

  .body-game {
    flex-direction: column;
    gap: 20px;
    align-items: center;
  }

  .body-game img {
    width: 400px;
    height: 400px;
  }

  .boxes .box {
    width: 32px;
    height: 32px;
    font-size: 16px;
    top: -30px;
  }

  .boxes-ar .box {
    width: 32px;
    height: 32px;
    font-size: 16px;
    top: -30px;
  }

  .keyboard {
    grid-template-columns: repeat(7, 1fr);
    gap: 12px;
    padding: 10px;
  }

  .keyboard-ar {
    grid-template-columns: repeat(7, 1fr);
    gap: 12px;
    padding: 10px;
  }

  .buttons {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px;
  }

  .display-hint,
  .reset-game {
    flex: 1;
    justify-content: flex-start;
    width: auto;
  }

  .banner,
  .wrong {
    width: 520px;
    height: 305px;
    left: 50%;
    transform: translateX(-50%);
    top: 160px;
    background-size: cover;
    font-size: 55px;
  }
}

/* Tablet portrait / iPad Mini (≤768px) */
@media (max-width: 768px) {
  html {
    min-height: 125vh;
    background-size: cover;
    background-position: center top;
  }

  .title-game {
    font-size: 45px;
    text-align: center;
  }

  .body{
    margin-bottom: 10px;
  }

  .body-game img {
    margin-top: 15px;
    width: 550px;
    height: 350px;
  }

  .boxes .box {
    width: 24px;
    height: 24px;
    font-size: 12px;
    top: -20px;
    left: 0;
  }

  .boxes-ar .box {
    width: 24px;
    height: 24px;
    font-size: 12px;
    top: -20px;
    left: 0;
  }

  .keyboard {
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
    padding: 8px;
  }

  .keyboard-ar {
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
    padding: 8px;
    direction: rtl;
  }

  .top-bar {
    flex-direction: column;
    gap: 5px;
    font-size: 16px;
  }

  .banner,
  .wrong {
    width: 475px;
    height: 275px;
    top: 180px;
    font-size: 45px;
  }

  .wrong p {
    top: 50px;
    font-size: 35px;
  }

  .banner a {
    font-size: 16px;
    top: 15px;
  }
}

/* Mobile phones (≤576px) */
@media (max-width: 576px) {
  html {
    min-height: 135vh;
    background-size: cover;
    background-position: center top;
  }

  body {
    overflow-y: auto;
    margin-top: 8px;
    margin-bottom: 8px;
  }

  .title-game {
    margin-top: 50px;
    font-size: 32px;
    text-align: center;
  }

  .start-game img {
    margin-top: 45px;
    width: 440px;
    top: -10px;
  }

  .action-button {
    flex-direction: column;
    gap: 12px;
    margin-top: 45px;
  }

  .play-game {
    width: 120px;
    height: 40px;
    font-size: 15px;
  }

  .body-game img {
    width: 350px;
    height: auto;
  }

  .boxes .box {
    width: 20px;
    height: 20px;
    font-size: 12px;
    top: -10px;
  }

    .boxes-ar .box {
    width: 20px;
    height: 20px;
    font-size: 12px;
    top: -10px;
  }

  .keyboard {
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    padding: 6px;
  }

  .keyboard-ar {
    direction: rtl;
    text-align: right;
  }

  .buttons {
    flex-direction: row;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    margin-left: -20px;
    margin-right: 5px;
  }

  .display-hint {
    flex-direction: row;
    width: auto;
    max-width: 50%;
    justify-content: center;
  }

  .reset-game {
    width: auto;
    max-width: 40%;
    justify-content: center;
  }

  .top-bar {
    flex-direction: column;
    gap: 5px;
    font-size: 14px;
  }

  .hint-sentence {
    width: 220px;
    font-size: 12px;
    margin-left: -5px;
  }

  .banner,
  .wrong {
    width: 372px;
    height: 215px;
    top: 200px;
    font-size: 32px;
  }

  .banner .winner,
  .wrong p {
    top: 50px;
    font-size: 26px;
  }

  .banner a {
    font-size: 16px;
    top: 15px;
  }
}
