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

html {
  min-height: 100%;
}

body {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  color: #fff;
  background: linear-gradient(to top, #222, #444);
  font-family: "Courier New", Courier, monospace;
}

h1 {
  width: 100%;
  text-align: center;
  background: linear-gradient(to right, #aaa, #eee, #aaa);
  padding: 0.5rem;

  .red-text {
    color: red;
  }

  .blue-text {
    color: blue;
  }

  .green-text {
    color: green;
  }

  .yellow-text {
    color: yellow;
  }
}

.container {
  width: 100%;
  max-width: 600px;
  margin-bottom: 4rem;
  padding: 1rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.card {
  border: 0;
  width: 100%;
  aspect-ratio: 1;
  cursor: pointer;

  &:hover {
    transform: translateY(-0.1rem);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
  }

  &:active {
    transform: translateY(0.25rem);
  }

  &:disabled {
    cursor: not-allowed;
  }
}

.red {
  background-color: red;
  border-radius: 100rem 5rem 5rem 5rem;

  &.pressed {
    box-shadow: red 0 0 25px;
  }
}

.blue {
  background-color: blue;
  border-radius: 5rem 100rem 5rem 5rem;

  &.pressed {
    box-shadow: blue 0 0 25px;
  }
}

.green {
  background-color: green;
  border-radius: 5rem 5rem 5rem 100rem;

  &.pressed {
    box-shadow: green 0 0 25px;
  }
}

.yellow {
  background-color: yellow;
  border-radius: 5rem 5rem 100rem 5rem;

  &.pressed {
    box-shadow: yellow 0 0 25px;
  }
}

.btn {
  border: 0;
  color: #fff;
  font-size: 1.25rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: 0.25rem;
  cursor: pointer;
  overflow: hidden;

  &:active {
    transform: translateY(0.25rem);
  }
}

.start-btn {
  background-color: seagreen;

  &:hover {
    background-color: hsl(146, 50%, 30%);
  }

  &:disabled {
    background-color: #777;
    cursor: not-allowed;
  }
}

.score-container {
  display: flex;
  justify-content: space-around;
  width: 100%;
  max-width: 600px;
}

@media (max-width: 600px) {
  .score-container {
    flex-direction: column;
    align-items: center;
  }
}

.notification {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background-color: #fff;
  color: #000;
  padding: 0.5rem;
  border-radius: 0.5rem;
  animation: slideIn 0.5s ease-in-out, fadeOut 0.5s linear 2s;
  animation-fill-mode: forwards;
  min-width: 200px;
}

.success {
  border: 2px solid green;
}

.fail {
  border: 2px solid red;
}

@keyframes slideIn {
  from {
    transform: translateX(-30rem);
  }
  to {
    transform: translateX(0);
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}
