:root {
  --correct-color: #47d747;
  --present-color: #f7f749;
  --absent-color: #888;
  --invalid-color: #ff3f3f;
}

html,
body {
  height: 100%;
}

body {
  display: grid;
  place-items: center;
  background-color: #0e1626;
  color: white;
  margin: 0;
  font-family: Poppins, sans-serif;
}

main {
  width: 100vw;
}

h1 {
  text-align: center;
  margin-top: 0;
  margin-bottom: 1.5rem;
}

#game {
  color: white;
  background-image: linear-gradient(153deg, #1c2b45 13%, #0c1321 85%),
    linear-gradient(149deg, #fec63b 3%, rgba(254, 198, 59, 0) 80%);
  position: relative;
  border-radius: 20px;
  width: 300px;
  margin: auto;
}

#game:before {
  content: "";
  display: block;
  position: absolute;
  inset: -7px;
  background-image: linear-gradient(138deg, #6ba0e2 -20%, #131e32 105%);
  z-index: -1;
  border-radius: 25px;
}

.row {
  display: flex;
  justify-content: center;
}

.row.current .tile:empty:first-of-type {
  animation: fade 2s;
  animation-fill-mode: both;
  animation-iteration-count: infinite;
}

@keyframes fade {
  50% {
    background: rgba(255, 255, 255, 0.05);
  }
}

.tile {
  outline: 1px solid rgba(73, 110, 158, 0.1);
  width: 100%;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 50px;
  font-weight: 600;
  text-transform: uppercase;
  color: #496e9e;
}

#keyboard {
  margin-top: 2rem;
}

.key {
  background: #c5c5c5;
  color: #1c2b45;
  border: 0;
  margin: 2px;
  height: 50px;
  min-width: 30px;
  border-radius: 4px;
  cursor: pointer;
}

.row.invalid .tile,
.tile.invalid {
  color: var(--invalid-color);
  text-shadow: 0 0 12px rgba(246, 38, 38, 0.42);
}

.tile.correct {
  color: var(--correct-color);
  text-shadow: 0 0 12px rgba(38, 246, 110, 0.42);
}

.key.correct {
  background: var(--correct-color);
  color: white;
}

.tile.present {
  color: var(--present-color);
  text-shadow: 0 0 12px rgba(246, 171, 38, 0.42);
}

.key.present {
  background: var(--present-color);
}

.key.absent {
  background: var(--absent-color);
}

header {
  position: relative;
}

output {
  display: block;
  font-weight: 500;
  font-style: italic;
  font-size: 17px;
  text-align: center;
  margin-top: 1.25rem;
  margin-right: 1.25rem;
  position: absolute;
  right: 0;
  top: 0;
  padding: 1rem;
  background-color: rgba(43, 72, 128, 0.6);
  border-radius: 0.5rem;
}
