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

.header {
  text-align: center;

  background: rgb(248, 224, 11);
}

.header h1 {
  margin-bottom: 1rem;
}

section {
  height: 100vh;
  background-color: rgb(40, 54, 250);
  font-family: sans-serif;
}

.score {
  color: rgb(224, 224, 224);
  height: 20vh;
  display: flex;
  justify-content: space-around;
  align-items: center;
}
.score h2 {
  font-size: 30px;
}
.score p {
  text-align: center;
  padding: 10px;
  font-size: 25px;
}

.intro {
  color: rgb(224, 224, 224);
  height: 50vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-around;
  transition: opacity 0.5s ease;
}

.intro h1 {
  font-size: 50px;
}

.intro button,
.match button {
  width: 150px;
  height: 50px;
  background: none;
  border: none;
  color: rgb(224, 224, 224);
  font-size: 20px;
  background: rgb(221, 200, 10);
  border-radius: 3px;
  cursor: pointer;
}

.intro button:hover {
  background: greenyellow;
  color: #ffffff;
}

.options button:hover {
  background: greenyellow;
  color: #ffffff;
}
.restart {
  display: inline-block;
  margin-top: 1.5em;
}

.restart button:hover {
  background: greenyellow;
  color: #ffffff;
}
.match {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition: opacity 0.5s ease 0.5s;
}
.winner {
  color: rgb(224, 224, 224);
  text-align: center;
  font-size: 50px;
}

.hands,
.options {
  display: flex;
  justify-content: space-around;
  align-items: center;
}

.player-hand {
  transform: rotateY(180deg);
}

div.fadeOut {
  opacity: 0;
  pointer-events: none;
}

div.fadeIn {
  opacity: 1;
  pointer-events: all;
}

@keyframes shakePlayer {
  0% {
    transform: rotateY(180deg) translateY(0px);
  }
  15% {
    transform: rotateY(180deg) translateY(-50px);
  }
  25% {
    transform: rotateY(180deg) translateY(0px);
  }
  35% {
    transform: rotateY(180deg) translateY(-50px);
  }
  50% {
    transform: rotateY(180deg) translateY(0px);
  }
  65% {
    transform: rotateY(180deg) translateY(-50px);
  }
  75% {
    transform: rotateY(180deg) translateY(0px);
  }
  85% {
    transform: rotateY(180deg) translateY(-50px);
  }
  100% {
    transform: rotateY(180deg) translateY(0px);
  }
}

@keyframes shakeComputer {
  0% {
    transform: translateY(0px);
  }
  15% {
    transform: translateY(-50px);
  }
  25% {
    transform: translateY(0px);
  }
  35% {
    transform: translateY(-50px);
  }
  50% {
    transform: translateY(0px);
  }
  65% {
    transform: translateY(-50px);
  }
  75% {
    transform: translateY(0px);
  }
  85% {
    transform: translateY(-50px);
  }
  100% {
    transform: translateY(0px);
  }
}
.modal {
  display: none;
  position: fixed;
  margin-top: 2%;
  z-index: 1;
  left: 0;
  top: 0;
  height: 100%;
  width: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
  margin: 10% auto;
  width: 60%;
  box-shadow: 0 5px 8px 0 rgba(0, 0, 0, 0.2), 0 7px 20px 0 rgba(0, 0, 0, 0.17);
  animation-name: modalopen;
  animation-duration: var(--modal-duration);
}

.modal-header h2,
.modal-footer h3 {
  margin: 0;
}

.modal-header {
  background: var(--modal-color);
  padding: 15px;
  color: #fff;
  border-top-left-radius: 5px;
  border-top-right-radius: 5px;
}

.modal-body {
  padding: 10px 20px;
  background: #fff;
}

.modal-footer {
  background: var(--modal-color);
  padding: 10px;
  color: #fff;
  text-align: center;
  border-bottom-left-radius: 5px;
  border-bottom-right-radius: 5px;
}

.close {
  color: #ccc;
  float: right;
  font-size: 30px;
  color: #fff;
}

.close:hover,
.close:focus {
  color: #000;
  text-decoration: none;
  cursor: pointer;
}

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

@media (max-width: 760px) {
  .winner {
    font-size: 1rem;
  }

  .options {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
  }
  img {
    width: 6.5rem;
    height: auto;
  }
}
