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

.wrap {
  width: 100%;
  max-width: 500px;
  height: 500px;
  margin: 0 auto;
  font-size: 18px;
}

.container {
  width: 100%;
  height: 100%;
  padding: 20px;
  text-align: center;
  opacity: 0;
  transition: opacity 0.5s;
}
.container.show {
  opacity: 1;
}
.container h1 {
  margin-bottom: 30px;
  font-weight: 400;
  font-size: 1.6em;
}
.container .resultArea {
  width: 100%;
  height: 260px;
  margin: 0 auto;
  border: 1px solid #999;
  border-radius: 5px;
  box-shadow: 2px 2px 4px #999;
  display: flex;
  justify-content: center;
  align-items: center;
}
.container .resultArea.anime {
  animation: colorChange 0.5s ease 4;
}
.container .resultArea .resultText {
  font-size: 2.4em;
  width: 80%;
  height: 120px;
  line-height: 120px;
  background-color: #fff;
  border-radius: 5px;
  box-shadow: inset 0px 0px 10px 0px rgba(0, 0, 0, 0.3);
}
.container .resultArea .resultText.anime {
  animation: scaleChange 2s ease forwards;
}
.container .btnArea {
  margin-top: 30px;
}
.container .btnArea button {
  width: 80%;
  padding: 10px;
  font-size: 24px;
  cursor: pointer;
  background-color: #333;
  color: white;
  border: none;
  border-radius: 5px;
  transition: background-color 0.2s;
  pointer-events: none;
}
.container .btnArea button:hover {
  background-color: #555;
}
.container .btnArea button.show {
  opacity: 1;
  pointer-events: auto;
}
.container .btnArea button.hide {
  display: none;
}

@keyframes colorChange {
  0% {
    background-color: white;
  }
  10% {
    background-color: red;
  }
  20% {
    background-color: blue;
  }
  30% {
    background-color: green;
  }
  40% {
    background-color: yellow;
  }
  50% {
    background-color: purple;
  }
  60% {
    background-color: orange;
  }
  70% {
    background-color: pink;
  }
  80% {
    background-color: brown;
  }
  90% {
    background-color: aqua;
  }
  100% {
    background-color: black;
  }
}
@keyframes scaleChange {
  0% {
    transform: scale(1);
  }
  30%,
  70% {
    transform: scale(0);
  }
  100% {
    transform: scale(1);
  }
}
