:root {
  --scale-factor: 1;
}

/* General Styles */
body {
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  font-family: 'Arial', sans-serif;
  background-image: url('resources/background1.png');
  background-size: cover;
  background-position: center;
  color: #333;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100dvh;
}

.divwrapper {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background-color: rgba(185, 0, 0, 0.532);
  border-radius: 10px;
  margin: 0;
  /* Ensure no margins are applied */
  padding: 0;
  /* Ensure no padding is applied */
  width: auto;
  /* Ensure width is not restricted */
  height: auto;
  /* Ensure height is not restricted */
  box-sizing: border-box;
  /* Ensure padding and border are included in the element's total width and height */

}

h1 {
  text-align: center;
  font-size: 2.5rem;
  color: white;
  margin-bottom: 0;
}


h2 {
  text-align: center;
  color: white;
  margin-top: 0;
  margin-bottom: 1rem;
}

/* Game Board Styles */
#game-board {
  display: flex;
  align-items: center;
  flex-direction: column;
  background-color: rgba(0, 90, 18, 0.9);
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Letter Box Styles */
.letter-box {
  background-color: rgb(236, 236, 236);
  border: 2px solid gray;
  border-radius: 5px;
  margin: 2px;
  font-size: 2.5rem;
  font-weight: 700;
  height: 3rem;
  width: 3rem;
  display: flex;
  justify-content: center;
  align-items: center;
  text-transform: uppercase;
  transition: background-color 0.3s, border-color 0.3s;
}

.letter-box:hover {
  border-color: #333;
}

.filled-box {
  border: 2px solid black;
}

/* Letter Row Styles */
.letter-row {
  display: flex;
}

/* Keyboard Container Styles */
#keyboard-cont {
  margin: 1rem 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
}

#keyboard-cont div {
  display: flex;
  justify-content: center;
  width: 100%;
}

.second-row {
  margin: 0.5rem 0;
}

/* Keyboard Button Styles */
.keyboard-button {
  font-size: 1rem;
  font-weight: 700;
  padding: 1rem 1.5rem;
  /* Increased padding for height */
  margin: 0 2px;
  cursor: pointer;
  text-transform: uppercase;
  border: none;
  border-radius: 5px;
  background-color: rgb(236, 236, 236);
  color: rgb(27, 27, 27);
  transition: background-color 0.3s, transform 0.1s;
  flex: 1;
  /* max-width: 3rem; */
}

.keyboard-button.enter,
.keyboard-button.delete {
  flex: 2;
  /* Make Enter and Delete buttons wider */
  max-width: none;
  /* Remove max-width restriction */
  padding: 1rem 2rem;
  /* Increased padding for width */
}

.keyboard-button:hover {
  background-color: #ccc;
}

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

.keyboardwrap {
  background-color: rgba(0, 90, 18, 0.9);
  padding: 0 1rem;
}

/* Media Query for Small Screens */
@media (max-width: 600px) {
  :root {
    --scale-factor: 1;
  }

  .keyboard-button {
    padding: 0.5rem;
    padding-top: 1rem;
    padding-bottom: 1rem;
    font-size: 0.8rem;
  }

  #keyboard-cont {
    max-width: 100%;
  }

  .keyboardwrap {
    width: 100%;
    position: fixed;
    bottom: 0;
    padding: 0.5rem 0;
    border-radius: 0;
  }

  .gamewrapper {
    position: fixed;
    top: 5vh;
    overflow-y: auto;
    transform: scale(var(--scale-factor));
    /* Adjust the scale as needed */
    transform-origin: center top;
  }

  @media (max-height: 660px) {
    :root {
      --scale-factor: 0.8;
    }

    .gamewrapper {
      transform: scale(var(--scale-factor));
    }

  }

}