:root {
  --font-family: ui-sans-serif, system-ui, -apple-system, "BlinkMacSystemFont",
    "Segoe UI", "Roboto", "Helvetica Neue", "Arial", "Noto Sans", sans-serif;
  --black: #101214;
  --white: #f8f9fa;
  --bg: var(--black);
  --fg: var(--white);
}
*,
::before,
::after {
  box-sizing: border-box;
}
html,
body,
button {
  font-family: var(--font-family);
  background-color: var(--bg);
  color: var(--fg);
  margin: 0;
}
html {
  line-height: 1;
}
body {
  line-height: inherit;
  text-align: center;
}
header {
  padding-top: 2rem;
  line-height: 1.25;
}
h1 {
  font-weight: 700;
  font-size: 2rem;
  margin: 0;
  letter-spacing: 0.025rem;
}
h2 {
  font-weight: 300;
  font-size: 1.5rem;
  margin: 0;
}
main {
  position: relative;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}
button {
  line-height: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 0.25rem;
  padding: 0.5rem;
  cursor: pointer;
  background-color: hsl(208deg 12% 18%);
  border: none;
  text-transform: uppercase;
  font-size: 2rem;
  margin: auto;
  font-weight: 500;
  letter-spacing: 0.0125rem;
  width: 100%;
  height: 100%;
  transition: all 0.2s;
}
button:hover,
button:focus {
  transform: scale(1.05);
  background-color: hsl(208deg 12% 33%);
}
#grid {
  margin: auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(5, 1fr);
  gap: 1vmin;
  padding: 1vmin;
  width: 100%;
  height: 100%;
  transition: opacity 0.4s ease;
}
#grid.fade-out {
  opacity: 0;
}
#outcome {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}
#outcome div {
  width: 50vmin;
  height: 50vmin;
  padding: 5vmin;
  display: flex;
  justify-content: center;
  align-items: center;
}
svg {
  display: block;
  width: 100%;
  height: auto;
}
#success {
  background-color: hsl(128deg 52% 38%);
  border-radius: 50%;
}
#failure {
  background-color: hsl(358deg 67% 52%);
  border-radius: 2vmin;
}
.hide {
  display: none !important;
}

@keyframes pop {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  60% {
    transform: scale(1.1);
    opacity: 1;
  }
  80% {
    transform: scale(0.9);
  }
  100% {
    transform: scale(1);
  }
}
.pop {
  animation: pop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}
