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

body {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  background-color: var(--bg);
  padding: 100px 30px;
  min-height: 100vh;
}

:root {
  font-family: 'poppins', sans-serif;
  font-size: 16px;

  --white: hsl(0, 0%, 97%);
  --primary: hsl(166, 86%, 43%);

  --bg: hsl(194, 27%, 15%);
  --bg-dark: hsl(193, 27%, 10%);

  --h1: 3.6rem;
  --h1-lh: calc(var(--h1) * 1.2);

  --txt: 2.2rem;
  --txt-lh: calc(var(--txt) * 1.2);

  --txt-s: 1.1rem;
  --txt-s-lh: calc(var(--txt-s) * 1.2);
}

.title {
  font-size: var(--h1);
  line-height: var(--h1-lh);
  font-weight: 700;
  color: var(--primary);
}

.txt {
  font-size: var(--txt);
  line-height: var(--txt-lh);
  color: var(--white);
}

.txt-s {
  font-size: var(--txt-s);
  line-height: var(--txt-s-lh);
  color: var(--white);
}

.lives-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 2rem 0 4rem 0;
  gap: 0.5rem;
}

.lives-container .txt {
  font-weight: 700;
}

.hidden {
  display: none;
}

.heart {
  max-width: 35px;
  height: auto;
}

.alphabet {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  margin: 2rem 0 3rem 0;
  max-width: 1000px;
  gap: 1rem;
}

.letter {
  transition: all 0.25s ease-in-out;
  display: flex;
  justify-content: center;
  align-items: center;
  outline: solid 1px var(--white);
  line-height: var(--txt);
  font-size: var(--txt);
  color: var(--white);
  border-radius: 6px;
  height: 3.75rem;
  width: 3.75rem;
}

.letter--pressed {
  background-color: var(--white);
  color: var(--bg-dark);
}

.guess {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 2rem;
  gap: 0.75rem;
}

.guess-letter {
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: var(--txt);
  line-height: var(--txt-lh);
  border-bottom: 1px solid var(--white);
  color: var(--white);
  min-width: 1.25rem;
  height: 3.125rem;

  transition: all 0.15s ease-in-out;
  opacity: 1;
}

.guess-letter--pre-animation {
  opacity: 0;
}

#guess-definition {
  text-align: center;
  max-width: 600px;
  opacity: 0.5;
}

#guess-definition small {
  font-style: italic;
  display: block;
}

#guess-definition small:not(:last-child) {
  margin-bottom: 1rem;
}

@keyframes fadeInFromNone {
  0% {
    display: none;
    opacity: 0;
  }

  1% {
    display: block;
    opacity: 0;
  }

  100% {
    display: block;
    opacity: 1;
  }
}
