/* Importing Google font - Open Sans */
@import url("https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;500;600;700&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Open Sans", sans-serif;
}

body {
  display: flex;
  padding: 0 10px;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: #fff; /* Set background to white */
}

.container {
  display: flex;
  width: 95vw;
  gap: 70px;
  padding: 5vh 3vw;
  background: #fff; /* Ensure the container blends with the white background */
  border-radius: 10px;
  align-items: flex-end;
  justify-content: space-between;
}

.hangman-box img {
  user-select: none;
  max-width: 270px;
}

.hangman-box h1 {
  font-size: 2.5rem;
  text-align: center;
  margin-top: 20px;
  text-transform: uppercase;
}

.game-box .word-display {
  list-style: none;
  display: flex;
  gap: 20px; /* Space between letters */
  justify-content: center;
  align-items: center;
  flex-wrap: nowrap; /* Ensure letters stay on one line */
  overflow-x: auto; /* Allow scrolling if needed for very long words */
  max-width: 100%; /* Prevent overflow beyond container */
  padding: 10px 0; /* Add padding for visual separation */
}

.word-display .letter {
  width: 40px; /* Adjusted for larger size */
  font-size: 2.5rem;
  text-align: center;
  font-weight: 600;
  text-transform: uppercase;
  border-bottom: 3px solid #000;
}

.word-display .letter.guessed {
  border-color: transparent;
}

.game-box h4 {
  text-align: center;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 15px;
}

.game-box h4 b {
  font-weight: 600;
}

.game-box .guesses-text b {
  color: #ff0000;
}

.game-box .keyboard {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: 40px;
  justify-content: center;
}

:where(.game-modal, .keyboard) button {
  color: #000000;
  border: none;
  outline: none;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 4px;
  text-transform: uppercase;
  background: #ffffff;
}

.keyboard button {
  font-size: 1.5rem;
  padding: 10px 20px;

  padding: 7px;
  width: calc(100% / 9 - 5px);
}

.keyboard button[disabled] {
  pointer-events: none;
  opacity: 0.6;
}

:where(.game-modal, .keyboard) button:hover {
  background: #f8c2c2;
}

.game-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 0 10px;
  transition: opacity 0.4s ease;
}

.game-modal.show {
  opacity: 1;
  pointer-events: auto;
  transition: opacity 0.4s 0.4s ease;
}

.game-modal .content {
  padding: 30px;
  max-width: 420px;
  width: 100%;
  border-radius: 10px;
  background: #fff;
  text-align: center;
}

.game-modal img {
  max-width: 130px;
  margin-bottom: 20px;
}

.game-modal img[src="images/victory.gif"] {
  margin-left: -10px;
}

.game-modal h4 {
  font-size: 1.53rem;
}

.game-modal p {
  font-size: 1.15rem;
  margin: 15px 0 30px;
  font-weight: 500;
}

.game-modal p b {
  color: #000000;
  font-weight: 600;
}

.game-modal button {
  padding: 12px 23px;
}

.streak-box {
  margin-top: 20px;
  text-align: center;
  font-size: 1.2rem;
  font-weight: 600;
  color: #333;
  background: #f8f9fa;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 5px;
}

@media (max-width: 782px) {
  .container {
    flex-direction: column;
    padding: 30px 15px;
    align-items: center;
  }

  .hangman-box img {
    max-width: 200px;
  }

  .hangman-box h1 {
    display: none;
  }

  .game-box h4 {
    font-size: 1rem;
  }

  .word-display .letter {
    margin-bottom: 35px;
    font-size: 1.7rem;
  }

  .word-display .letter.guessed {
    border-color: transparent;
  }

  .game-modal img {
    max-width: 120px;
  }

  .game-modal h4 {
    font-size: 2.5rem;
  }

  .game-modal p {
    font-size: 1.1rem;
  }

  .game-modal button {
    padding: 10px 18px;
  }

  .streak-box {
    font-size: 1rem;
    margin-top: 15px;
    padding: 8px;
  }
}


/* Ensure keyboard letters have a black border */
.keyboard-letter, .keyboard button {
  font-size: 1.5rem;
  padding: 10px 20px;

    border: 2px solid black;
    border-radius: 5px; /* Optional for rounded corners */
}

.hints {
  font-size: 2rem;
}

/* Styling for the Turkey GIF */
#turkey-gif {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 150px;
    height: auto;
    z-index: 1000;
}



/* Enhanced Mute button styles */
.mute-button {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1000; /* Ensure the button is on top of other elements */
    background-color: #f0f0f0;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.mute-button:hover {
    background-color: #d9d9d9;
    transform: scale(1.1);
}

.mute-button:active {
    transform: scale(0.95);
}

#fullscreen-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #fff;
    border: none;
    border-radius: 5px;
    padding: 10px;
    cursor: pointer;
    font-size: 18px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}
#fullscreen-btn:hover {
    background-color: #f0f0f0;
}
