* {
  -webkit-box-sizing: border-box;
          box-sizing: border-box; }

html,
body {
  margin: 0;
  padding: 0;
  font-family: "Pacifico", "cursive";
  color: #fff;
  font-weight: 200;
  height: 100%;
  max-height: 100%;
  overflow: hidden;
  width: 100%; }

h1 {
  font-family: "Pacifico", "cursive";
  margin: 10px 0;
  color: #fff;
  font-size: 55px;
  font-weight: 200;
  text-shadow: #a84747 4px 0px 0px, #a84747 3.87565px 0.98962px 0px, #a84747 3.51033px 1.9177px 0px, #a84747 2.92676px 2.72656px 0px, #a84747 2.16121px 3.36588px 0px, #a84747 1.26129px 3.79594px 0px, #a84747 0.28295px 3.98998px 0px, #a84747 -0.71298px 3.93594px 0px, #a84747 -1.66459px 3.63719px 0px, #a84747 -2.51269px 3.11229px 0px, #a84747 -3.20457px 2.39389px 0px, #a84747 -3.69721px 1.52664px 0px, #a84747 -3.95997px 0.56448px 0px, #a84747 -3.97652px -0.43278px 0px, #a84747 -3.74583px -1.40313px 0px, #a84747 -3.28224px -2.28625px 0px, #a84747 -2.61457px -3.02721px 0px, #a84747 -1.78435px -3.57996px 0px, #a84747 -0.84318px -3.91012px 0px, #a84747 0.15041px -3.99717px 0px, #a84747 1.13465px -3.8357px 0px, #a84747 2.04834px -3.43574px 0px, #a84747 2.83468px -2.82216px 0px, #a84747 3.44477px -2.03312px 0px, #a84747 3.84068px -1.11766px 0px, #a84747 3.9978px -0.13272px 0px; }

h2 {
  font-size: 36px;
  font-weight: 200;
  margin: 10px 0 0; }

h3.value {
  font-size: 100px;
  font-weight: 200;
  line-height: 0.9;
  margin: 10px 0 20px; }

p.time {
  font-size: 30px;
  font-weight: 200;
  line-height: 0.9; }

.scenes {
  opacity: 1;
  -webkit-transition: opacity 0.5s ease-out;
  -o-transition: opacity 0.5s ease-out;
  transition: opacity 0.5s ease-out;
  width: 100%;
  height: 100%; }

.game.win .scenes {
  opacity: 0;
  position: relative; }

.game.win::after {
  content: "You win";
  font-family: "Pacifico", "cursive";
  font-size: 100px;
  font-weight: 200;
  width: 100%;
  text-align: center;
  line-height: 0.9;
  display: block;
  position: absolute;
  top: 50%;
  left: 50%;
  -webkit-transform: translate(-50%, -50%);
      -ms-transform: translate(-50%, -50%);
          transform: translate(-50%, -50%); }

.grid-container {
  padding-top: 42%;
  position: relative;
  width: 60%;
  margin: 0 auto; }

.grid {
  position: absolute;
  top: 0px;
  left: 0px;
  width: 100%;
  height: 100%;
  margin: 0px auto 100px;
  display: grid;
  grid-gap: 30px;
  grid-template-columns: 60% 40%;
  grid-template-rows: 20% 50% 30%; }
  .grid.started .game, .grid.started .menu, .grid.started .score {
    opacity: 1;
    visibility: visible; }
  .grid.started .game {
    -webkit-animation: bounceIn 1.4s ease-in;
            animation: bounceIn 1.4s ease-in; }
  .grid.started .menu {
    -webkit-animation: bounceIn 1.4s ease-in 0.6s;
            animation: bounceIn 1.4s ease-in 0.6s;
    -webkit-transition-delay: 0.6s;
         -o-transition-delay: 0.6s;
            transition-delay: 0.6s; }
  .grid.started .score {
    -webkit-animation: bounceIn 1.4s ease-in 0.3s;
            animation: bounceIn 1.4s ease-in 0.3s;
    -webkit-transition-delay: 0.3s;
         -o-transition-delay: 0.3s;
            transition-delay: 0.3s; }

header {
  grid-row: 1;
  grid-column: 1/3; }

.game,
.menu,
.score {
  opacity: 0;
  visibility: hidden; }

.game {
  grid-row: 2/4;
  grid-column: 1;
  background: #1e98bd;
  -webkit-box-shadow: 0px 0px 0px 2px #1e91b5;
          box-shadow: 0px 0px 0px 2px #1e91b5;
  padding: 8px;
  border-radius: 8px;
  position: relative; }

.score {
  grid-row: 2/3;
  grid-column: 2/3;
  background: #57b463;
  -webkit-box-shadow: 0px 0px 0px 2px #4a9c55;
          box-shadow: 0px 0px 0px 2px #4a9c55;
  border-radius: 8px;
  text-align: center; }

.menu {
  grid-row: 3/4;
  grid-column: 2/3;
  background: #2a9dc1;
  -webkit-box-shadow: 0px 0px 0px 2px #1e91b5;
          box-shadow: 0px 0px 0px 2px #1e91b5;
  border-radius: 8px; }

a.button {
  display: inline-block;
  text-decoration: none; }

.button {
  border: 1px solid #146580;
  padding: 8px 65px;
  margin: 3% 3% 1.5% 3%;
  height: 83%;
  width: 94%;
  color: #fff;
  font-family: "Pacifico";
  font-size: 30px;
  background: #38b4dc;
  border-radius: 8px;
  -webkit-transition: all 0.3s ease-in-out;
  -o-transition: all 0.3s ease-in-out;
  transition: all 0.3s ease-in-out;
  position: relative; }
  .button-container {
    height: 50%; }
  .button.git {
    text-align: center;
    margin-top: 1.5%;
    margin-bottom: 3%;
    -webkit-box-pack: center;
        -ms-flex-pack: center;
            justify-content: center;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex; }
  .button svg {
    position: relative;
    top: 22px;
    left: -11px;
    -webkit-transform: translateY(-50%);
        -ms-transform: translateY(-50%);
            transform: translateY(-50%); }
  .button:hover {
    cursor: pointer;
    background: #42cdfc; }
  .button:hover, .button:focus {
    outline: none; }

.scene-container {
  border-radius: 8px;
  background: #2792b3;
  border: 2px solid #1685a9;
  width: 23%;
  height: 23%;
  margin: 1%;
  -webkit-perspective: 30em;
          perspective: 30em;
  float: left; }

.scene {
  width: calc(100% + 4px);
  height: calc(100% + 4px);
  margin-top: -2px;
  margin-left: -2px;
  -webkit-transition: opacity 0.5s ease-in-out, -webkit-transform 0.5s ease-out;
  transition: opacity 0.5s ease-in-out, -webkit-transform 0.5s ease-out;
  -o-transition: transform 0.5s ease-out, opacity 0.5s ease-in-out;
  transition: transform 0.5s ease-out, opacity 0.5s ease-in-out;
  transition: transform 0.5s ease-out, opacity 0.5s ease-in-out, -webkit-transform 0.5s ease-out;
  -webkit-transition-delay: 0.5s;
       -o-transition-delay: 0.5s;
          transition-delay: 0.5s; }
  .scene.clicked .card, .scene.hide .card {
    -webkit-transform: rotateY(180deg);
            transform: rotateY(180deg); }

.card {
  width: 100%;
  height: 100%;
  -webkit-transition: -webkit-transform 0.5s;
  transition: -webkit-transform 0.5s;
  -o-transition: transform 0.5s;
  transition: transform 0.5s;
  transition: transform 0.5s, -webkit-transform 0.5s;
  -webkit-transform-style: preserve-3d;
          transform-style: preserve-3d; }

.face {
  width: 100%;
  height: 100%;
  color: #fff;
  line-height: 15em;
  text-align: center;
  position: absolute;
  -webkit-backface-visibility: hidden;
          backface-visibility: hidden; }

.front {
  border-radius: 5px;
  background-image: url(../img/reverse.jpg);
  background-size: cover;
  border: 3px solid #fff;
  -webkit-box-shadow: 1px 1px 1px 1px rgba(0, 0, 0, 0.3);
          box-shadow: 1px 1px 1px 1px rgba(0, 0, 0, 0.3); }

.back {
  border-radius: 5px;
  background-size: cover;
  -webkit-transform: rotateY(180deg);
          transform: rotateY(180deg);
  border: 3px solid #fff;
  -webkit-box-shadow: 1px 1px 1px 1px rgba(0, 0, 0, 0.3);
          box-shadow: 1px 1px 1px 1px rgba(0, 0, 0, 0.3); }

.hide {
  -webkit-transform: scale(0.9);
      -ms-transform: scale(0.9);
          transform: scale(0.9);
  opacity: 0;
  pointer-events: none; }

@-webkit-keyframes bounceIn {
  0% {
    opacity: 0;
    -webkit-transform: scale(0.6) translate3d(0, 0, 0);
            transform: scale(0.6) translate3d(0, 0, 0); }
  50% {
    opacity: 0.9;
    -webkit-transform: scale(1.1);
            transform: scale(1.1); }
  80% {
    opacity: 1;
    -webkit-transform: scale(0.89);
            transform: scale(0.89); }
  100% {
    opacity: 1;
    -webkit-transform: scale(1) translate3d(0, 0, 0);
            transform: scale(1) translate3d(0, 0, 0); } }

@keyframes bounceIn {
  0% {
    opacity: 0;
    -webkit-transform: scale(0.6) translate3d(0, 0, 0);
            transform: scale(0.6) translate3d(0, 0, 0); }
  50% {
    opacity: 0.9;
    -webkit-transform: scale(1.1);
            transform: scale(1.1); }
  80% {
    opacity: 1;
    -webkit-transform: scale(0.89);
            transform: scale(0.89); }
  100% {
    opacity: 1;
    -webkit-transform: scale(1) translate3d(0, 0, 0);
            transform: scale(1) translate3d(0, 0, 0); } }
