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

html {
  font-family: 'Cinzel', serif;
  user-select: none;
}

body {
  display: grid;
  place-items: center;
  height: 100vh;
  width: 100vw;
  background-color: black;
  margin: 0;
}

.container {
  position: absolute;
  background-color: antiquewhite;
  display: grid;
  place-items: center;
  grid-template-areas:
    'header'
    'word'
    'footer';
  padding: 1rem;
  gap: 1rem;
  max-width: 1200px;
  width: 100%;
}

header {
  grid-area: header;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: 1fr;
  place-items: center;
  justify-content: space-between;

  font-size: 2rem;
}

.active-game,
.fails,
.new-game {
  display: grid;
  place-items: center;
  width: 100%;
  max-width: 368px;
  height: 180px;
  text-align: center;
}

.active-game {
  border: 0.15rem solid black;
}

.new-game {
  border: 0.15rem solid black;
}

.new-game:hover {
  background-color: rgba(244, 195, 117, 0.622);
  cursor: pointer;
}

main {
  grid-area: word;
  font-size: 5rem;
  text-align: center;
}

footer {
  display: grid;
  place-items: center;
  grid-template-rows: repeat(2, 1fr);
  grid-template-columns: repeat(13, 1fr);
  grid-area: footer;
  gap: 0.5rem;
}

p {
  display: flex;
  flex-direction: row;
  justify-content: center;
  border: 1px solid black;
  font-size: 2rem;
  height: 4rem;
  width: 4rem;
}

p:hover {
  background-color: rgba(244, 195, 117, 0.622);
  cursor: pointer;
}

.disabled-letter {
  color: #5759c2;
  pointer-events: none;
}

/* Media Queries for responsiveness */
@media (max-width: 1024px) {
  header {
    font-size: 1.5rem;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
  }

  .active-game,
  .fails,
  .new-game {
    max-width: 100%;
    height: 150px;
  }

  main {
    font-size: 4rem;
  }

  footer {
    grid-template-rows: repeat(2, 1fr);
    grid-template-columns: repeat(13, 1fr);
  }

  p {
    font-size: 1.5rem;
    height: 3rem;
    width: 3rem;
  }
}

@media (max-width: 768px) {
  header {
    font-size: 1.2rem;
  }

  .active-game,
  .fails,
  .new-game {
    height: 120px;
  }

  main {
    font-size: 3rem;
  }

  footer {
    grid-template-rows: repeat(2, 1fr);
    grid-template-columns: repeat(7, 1fr);
    gap: 0.25rem;
  }

  p {
    font-size: 1.2rem;
    height: 2.5rem;
    width: 2.5rem;
  }
}

@media (max-width: 480px) {
  header {
    font-size: 1rem;
  }

  .active-game,
  .fails,
  .new-game {
    height: 100px;
  }

  main {
    font-size: 2rem;
  }

  footer {
    grid-template-rows: repeat(2, 1fr);
    grid-template-columns: repeat(5, 1fr);
  }

  p {
    font-size: 1rem;
    height: 2rem;
    width: 2rem;
  }
}
