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

body {
  height: 100vh;
  display: flex;
  gap: 20px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  font-weight: 700px;
}

main {
  width: 500px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

button {
  width: calc((500px / 3) - 5px);
  padding: 15px;
  border-radius: 8px;
  border: 2px solid black;
  flex-grow: 1;
  font-weight: 900;
}

.red {
  background-color: red;
}

.blue {
  background-color: blue;
}

.green {
  background-color: green;
}

button:hover {
  opacity: 0.8;
}

button:active {
  transform: translateY(2px);
}

@media (max-width: 500px) {
  main {
    flex-direction: column;
    width: 100%;
  }
  button {
    width: 80%;
  }
}
