*, *::after, *::before {
  box-sizing: border-box;
  font-family: Arial;
}

body {
  background-color: #F5F2E8;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  padding: 1em;
  font-size: clamp(.5rem, 2.5vmin, 1.5rem);
}
.wrap{
  flex-grow: 1;
}

.clue{
  display: grid;
  justify-content: center;
  color: black;
  vertical-align: bottom;
  margin-top: 2em;
  font-size: 1.5em;
}

img {
  width: 75px;
  height:75px;
}

.home{
  width: 75px;
  height:75px;
}

.keyboard {
  display: grid;
  grid-template-columns: repeat(20, minmax(auto, 1.5em));
  grid-auto-rows: 5em;
  gap: .25em;
  justify-content: center;
  align-content: center;
}

.key {
  font-size: inherit;
  grid-column: span 2;
  border: none;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: hsl(
    var(--hue, 200),
    var(--saturation, 1%),
    calc(var(--lightness-offset, 0%) + var(--lightness, 51%))
  );
  color: white;
  fill: white;
  text-transform: uppercase;
  border-radius: .25em;
  cursor: pointer;
  user-select: none;
}

.key.large {
  grid-column: span 3;
}

.key > svg {
  width: 1.75em;
  height: 1.75em;
}

.key:hover, .key:focus {
  --lightness-offset: 10%;
}

.key.wrong {
  --lightness: 23%;
}

.key.wrong-location {
  --hue: 49;
  --saturation: 51%;
  --lightness: 47%;
}

.key.correct {
  --hue: 115;
  --saturation: 29%;
  --lightness: 43%;
}

.guess-grid {
  display: grid;
  justify-content: center;
  align-content: center;
  margin-top: 3em;
  grid-template-columns: repeat(5, 5em);
  grid-template-rows: repeat(3, 5em);
  gap: .25em;
  padding-bottom: 1em;
}

.tile {
  font-size: 2em;
  color: white;
  border: .05em solid hsl(240, 2%, 23%);
  text-transform: uppercase;
  font-weight: bold;
  display: flex;
  justify-content: center;
  align-items: center;
  user-select: none;
  transition: transform 250ms linear;
}

.tile[data-state="active"] {
  border-color: hsl(200, 1%, 34%);
}

.tile[data-state="wrong"] {
  border: none;
  background-color: hsl(240, 2%, 23%);
}

.tile[data-state="wrong-location"] {
  border: none;
  background-color: hsl(49, 51%, 47%);
}

.tile[data-state="correct"] {
  border: none;
  background-color: hsl(115, 29%, 43%);
}

.tile.shake {
  animation: shake 250ms ease-in-out;
}

.tile.dance {
  animation: dance 500ms ease-in-out;
}

.tile.flip {
  transform: rotateX(90deg);
}

@keyframes shake {
  10% {
    transform: translateX(-5%);
  }

  30% {
    transform: translateX(5%);
  }

  50% {
    transform: translateX(-7.5%);
  }

  70% {
    transform: translateX(7.5%);
  }

  90% {
    transform: translateX(-5%);
  }

  100% {
    transform: translateX(0);
  }
}

@keyframes dance {
  20% {
    transform: translateY(-50%);
  }  

  40% {
    transform: translateY(5%);
  }  

  60% {
    transform: translateY(-25%);
  }  

  80% {
    transform: translateY(2.5%);
  }  

  90% {
    transform: translateY(-5%);
  }  

  100% {
    transform: translateY(0);
  }
}

.alert-container {
  position: fixed;
  top: 10vh;
  left: 50vw;
  transform: translateX(-50%);
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.alert {
  pointer-events: none;
  background-color: hsl(204, 7%, 85%);
  padding: .75em;
  border-radius: .25em;
  opacity: 1;
  transition: opacity 500ms ease-in-out;
  margin-bottom: .5em;
}

.alert:last-child {
  margin-bottom: 0;
}

.alert.hide {
  opacity: 0;
}

svg {
  pointer-events: none;
}

button {
  touch-action: manipulation;
}

.win-keyboard{
  display: none;
}

.win-box {
  display: none; /* Use flexbox for centering */
  justify-content: center; /* Center horizontally */
  align-items: center; /* Center vertically (if needed) */
  flex-direction: column; /* Stack buttons vertically */
  color: white;
  margin-bottom: 5em;
}

.win-box-show{
  display: flex;
}

.lose-box {
  display: none; /* Use flexbox for centering */
  justify-content: center; /* Center horizontally */
  align-items: center; /* Center vertically (if needed) */
  flex-direction: column; /* Stack buttons vertically */
  color: white;
  margin-bottom: 5em;
}

.lose-box-show{
  display: flex;
}

.button {
  background-color: #28a745; /* Green background */
  color: white; /* Text color */
  border: 2px solid white; /* White border */
  border-radius: 12px; /* Rounded corners */
  padding: 6px 12px; /* Reduced padding for less width */
  cursor: pointer; /* Cursor changes to pointer on hover */
  transition: background-color 0.3s ease, transform 0.2s ease; /* Smooth transition */
  margin: 5px; /* Add some spacing between buttons */
  width: 20%;
}

.button:hover {
  background-color: #218838; /* Darker shade on hover */
  transform: scale(1.05); /* Slightly grow on hover */
}

.button:focus {
  outline: none; /* Remove outline */
  box-shadow: 0 0 5px white; /* Add shadow for focus state */
}

.support{
  font-size: small;
}

.nextClue{
	background: none;
	color: inherit;
	border: none;
	font: inherit;
	cursor: pointer;
	outline: inherit;
}

.bi{
  margin-top: 100%;
  padding-top: 10%;
  padding-left: 10%;
  margin-right: 75%;
}

.nextday{
  color: white;
  max-width: 300px;
  max-height: 50px;
  align-self: center;
  margin-bottom: 2rem;
}

.day{
  display: inline;
  font-size: 25px;
}
