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

html, body {
  height: 100%; 
}

body {
  background-image: url('../img/anime.jpg'); 
  background-size: cover; 
  background-position: center; 
  background-repeat: no-repeat;
  background-attachment: fixed;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center; 
}

.container {
  font-size: 16px;
  background-color: rgba(255, 255, 255, 0.8);
  width: 90%;
  max-width: 34em;
  padding: 2em;
  border-radius: 0.6em;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.9); 
  border: 2px solid rgba(0, 0, 0, 0.9);
}
#options-container h2{
  margin-bottom: 20px;
}

#options-container {
  text-align: center;
  margin-bottom: 20px;
}

#options-container div {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1em;
}

#options-container button {
  padding: 0.6em 1.2em;
  border: 3px solid #000000;
  background-color: #ffffff;
  color: #000000;
  border-radius: 0.3em;
  text-transform: capitalize;
  cursor: pointer;
  transition: background-color 0.3s, color 0.3s;
}

#options-container button:disabled {
  border: 3px solid #808080;
  color: #808080;
  background-color: #efefef;
}

#options-container button.active {
  background-color: #39d78d;
  border: 3px solid #000000;
  color: #fff;
}

#options-container button:hover:not(.active):not(:disabled) {
  background-color: #39d78d;
  color: #fff;
}

.letter-container {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6em;
}

#letter-container button {
  height: 2.4em;
  width: 2.4em;
  border-radius: 0.3em;
  background-color: #ffffff;
  cursor: pointer;
}

.new-game-popup {
  background-color: #ffffff;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80%;
  max-width: 400px;
  padding: 2em;
  text-align: center;
  border-radius: 0.6em;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
  z-index: 1000;
}

#user-input-section {
  display: flex;
  justify-content: center;
  font-size: 1.8em;
  margin: 0.6em 0 1.2em 0;
}

canvas {
  display: block;
  margin: 1em auto;
  max-width: 100%;
  height: auto;
  border: 4px solid black;
  border-radius: 10px;
}

.hide {
  display: none;
}



#new-game-button {
  font-size: 1.25em;
  padding: 0.5em 1em;
  background-color: #39d78d;
  border: 3px solid #000000;
  color: #fff;
  border-radius: 0.2em;
  cursor: pointer;
}

.win-msg {
  color: #39d78d;
}

.lose-msg {
  color: #fe5152;
}

.leaderboard-container {
  margin-top: 2em;
  text-align: center;
  max-height: 200px;
  overflow-y: auto;
  border: 4px solid #000;
  border-radius: 10px;
  padding: 0.5em;
}

#leaderboard {
  width: 100%;
  border-collapse: collapse;
}

#leaderboard th,
#leaderboard td {
  border: 3px solid black;
  padding: 0.5em;
}

#leaderboard th {
  background-color: #39d78d;
  color: #000;
}

.score-button {
    position: fixed;
    top: 1em;
    right: 1em;
    padding: 0.5em 1em;
    background-color: #39d78d;
    border: 3px solid #000000;
    color: #000;
    border-radius: 0.3em;
    font-size: 1em;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
}

.score-button:hover {
    background-color: #2db56d;
}

.audio-button {
  position: fixed;
  top: 1em;
  left: 1em;
  padding: 0.3em;
  background-color: #39d78d;
  border: 3px solid #000000;
  color: #000;
  border-radius: 0.3em;
  font-size: 1.2em;
  cursor: pointer;
  transition: background-color 0.3s, color 0.3s;
  z-index: 1000;
}

.audio-button:hover {
  background-color: #2db56d;
}

.audio-button i {
  pointer-events: none;
}


@media (max-width: 600px) {
.container {
  padding: 1em;
}

.new-game-popup {
  width: 90%;
  padding: 1em;
}

#user-input-section {
  font-size: 1.5em;
}

#new-game-button {
  font-size: 1em;
  padding: 0.5em;
}

.letter-container button {
  height: 2em;
  width: 2em;
}

.score-button {
  font-size: 0.9em;
  padding: 0.4em 0.8em;
  top: 0.5em;
  right: 0.5em;
}

.audio-button {
  top: 0.5em;
  left: 0.5em;
  font-size: 0.9em;
  padding: 0.4em 0.8em;
}

#result-text {
  font-size: 1.5em;
}
#result-text img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

.leaderboard-container {
  max-height: 100px;
  }
}
