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

body {
  height: 100vh;
  display: flex;
  background: #060AB2;
}

.title {
    width: 100vw;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.memory-game {
  width: 80vw;
  height: 80vh;
  margin: 1em;
  display: flex;
  flex-wrap: wrap;
  perspective: 1000px;
}

.memory-card {
  width: calc(25% - 10px);
  height: calc(33.333% - 50px);
  margin: 5px;
  position: relative;
  box-shadow: 1px 1px 1px rgba(0,0,0,.3);
  transform: scale(1);
  transform-style: preserve-3d;
  transition: transform .5s;
}

 .memory-card:active {
   transform: scale(0.97);
   transition: transform .2s;
 }

.memory-card.flip {
    transform: rotateY(180deg);
}

.front-face,
.back-face {
  width: 90%;
  height: 90%;
  padding: 10px;
  position: absolute;
  border-radius: 5px;
  background: #1C7CCC;
  backface-visibility: hidden;
}

.front-face {
    transform: rotateY(180deg);
}

.footer {
    width: 100vw;
    height: 200px;
    margin: 10px;
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    perspective: 1000px;
    color: #f0ab3c;
    padding: 10px;
    color: yellow;
}

.frame {
    width: 80vw;
    height: 80vh;
    margin: 1em;
    display: flex;
    flex-wrap: wrap;
}


.button {
  background-color: #EA4C89;
  border-radius: 8px;
  border-style: none;
  box-sizing: border-box;
  color: #FFFFFF;
  cursor: pointer;
  display: flex;
  height: 60px;
  width: 80px;
  line-height: 20px;
  list-style: none;
  margin: 10px;
  outline: none;
  padding: 5px 5px;
  position: relative;
  text-align: center;
  text-decoration: none;
  transition: color 100ms;
  vertical-align: baseline;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

.button:hover,
.button:focus {
  background-color: #F082AC;
}

.score {
  margin: 20px;
}


.modal,
.modal-content {
            padding: 20px 20px 20px 20px;
            -webkit-animation-name: modal-animation;
            -webkit-animation-duration: 0.5s;
            animation-name: modal-animation;
            animation-duration: 0.2s;
            z-index: 3;
        }

        @-webkit-keyframes modal-animation {
            from {
                top: -200%;
                opacity: .5;
            }
            to {
                top: 50px;
                opacity: 1;
            }
        }

        @keyframes modal-animation {
            from {
                top: -200%;
                opacity: .5;
            }
            to {
                top: 50px;
                opacity: 1;
            }
        }

#win-banner {
  visibility: hidden;
  opacity: 0;
  position: relative;
  z-index: -1;
}

#win-banner-open {
  visibility: visible;
  opacity: 1;
  position: relative;
  z-index: 3;

}


@keyframes appear {
  50%{
    opacity: 1;
    transform: translateY(-500px);
  }
}

.win-modal{
  animation: appear 350ms ease-in 1;
  max-width: 500px;
  font-size: 1em;
  color: white;
  background: green;
}