body {
  font-family: sans-serif;
  text-align: center; 
  background: #e6e6e6;
  color: #000000;
}

#board {
  display: grid;
  gap: 5px;
  justify-content: center;
  margin-top: 10px;
  width: 100%;
  /*grid-template-rows: repeat(6, 20%);*/
}

.row {
  display: grid;
  grid-template-columns: repeat(5, 60px);
  gap: 5px;
  justify-content: center;
}
 
.tile-container {
  width: 100%;
  aspect-ratio: 1 / 1;
  display: inline-block;
  position: relative;
}
.tile {
  /*Tile container holds the actual tile width and height*/
  /*width: 60px*/
  /*height: 60px*/
  width: 100%;
  height: 100%;
  border: 2px solid #7e7e80;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  text-transform: uppercase;
  background-color: #b6b6b6;
  color: rgb(70, 70, 70);
}



#message { 
  font-size: 1.2rem;
  color: #ccc;
}
#keyboard {
  display: flex;
  width: 100%;
  flex-direction: column;
  gap: 5px;
  justify-content: center;
  align-items: center;
  margin: auto;
}

.keyboard-row {
  margin-top: 5px;
  display: flex;
  aspect-ratio: 9 / 1; 
  flex-wrap: nowrap;
  gap: 5px;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.key {
  display: flex;
  background-color: #818384;
  align-items: center;
  justify-content: center;
  color: white;
  border: none;
  border-radius: 5px;
  font-size: 16px;
  text-transform: uppercase;
  cursor: pointer;
  user-select: none;
  height: 100%;
  width: 9%; 
  transition: transform 0.05s ease, box-shadow 0.05s ease;  /* Smooth transition for the press effect */
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2); /* Adds a slight shadow to create depth */
}

.key:active {
  background-color: #252525;  
  transform: translateY(2px);   
  box-shadow: 0 0px 2px rgba(0, 0, 0, 0.4); 
}

.wide-key {
  width: 18%; 
}
.key:active {
  background-color: #565758;
} 

.correct {
  background-color: #538d4e;
  border-color: #538d4e;
  color: white;
}

.present {
  background-color: #b59f3b;
  border-color: #b59f3b;
  color: white;
}

.absent {
  background-color: #3a3a3c;
  border-color: #3a3a3c;
  color: white;
}





/*Animation stuff*/
@keyframes shake {
  0% { transform: translateX(0); }
  20% { transform: translateX(-5px); }
  40% { transform: translateX(5px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(5px); }
  100% { transform: translateX(0); }
}

.shake {
  animation: shake 0.25s ease;
}

@keyframes pop {
  0% { transform: scale(1); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

.pop {
  animation: pop 100ms ease;
}

.flash-red {
  animation: flashRed 0.25s;
}

@keyframes flashRed {
  0% { background-color: red; }
  100% { background-color: 3a3a3c; }
}

@keyframes infiniteShake {
  0%  { transform: translate(1px, 0px); }
  10% { transform: translate(-1px, 0px); }
  20% { transform: translate(0px, 1px); }
  30% { transform: translate(-1px, -1px); }
  40% { transform: translate(1px, 0px); }
  50% { transform: translate(0px, 1px); }
  60% { transform: translate(0px, -1px); }
  70% { transform: translate(-1px, 0px); }
  80% { transform: translate(1px, 1px); }
  90% { transform: translate(-1px, 0px); }
  100% { transform: translate(0, -1px); }
}

.tile-container.infinite-shake {
  animation-name: infiniteShake;
  animation-timing-function: ease-in-out;
  animation-iteration-count: 100;
}

@keyframes infiniteShakeHalf {
  0%  { transform: translate(0x, 0px); }
  10% { transform: translate(-0.75px, 0px); }
  20% { transform: translate(0px, 0px); }
  30% { transform: translate(-0.75px, 0px); }
  40% { transform: translate(0.75px, 0px); }
  50% { transform: translate(0px, 0.75px); }
  60% { transform: translate(0px, -0.75px); }
  70% { transform: translate(-0.75px, 0px); }
  80% { transform: translate(0px, 0.75px); }
  90% { transform: translate(-0.75px, 0px); }
  100% { transform: translate(0, 0px); }
}

.tile-container.infinite-shake-half {
  animation-name: infiniteShakeHalf;
  animation-timing-function: ease-in-out;
  animation-iteration-count: 50;
}

@keyframes infiniteShakeTiny {
  0%  { transform: translate(0x, 0px); }
  10% { transform: translate(0px, -0.5px); }
  20% { transform: translate(0px, 0px); }
  30% { transform: translate(-0.5px, 0px); }
  40% { transform: translate(0px, 0px); }
  50% { transform: translate(0px, 0px); }
  60% { transform: translate(0px, 0px); }
  70% { transform: translate(-0.5px, 0px); }
  80% { transform: translate(0px, 0.5px); }
  90% { transform: translate(-0.5px, 0px); }
  100% { transform: translate(0, 0px); }
}

.tile-container.infinite-shake-tiny {
  animation-name: infiniteShakeTiny;
  animation-timing-function: ease-in-out;
  animation-iteration-count: 50;
}


/* Font size needs to be 16 to stop double tap zooming in on safari */
button,
input,
select,
textarea {
  font-size: 16px !important;
  touch-action: manipulation; /* Helps prevent double-tap zoom */
}
.key {
  font-size: 16px !important;
  touch-action: manipulation;
}



