body {
  text-align: center;
  background: #ffffff;
}

#navigation {
  float: left;
  clear: both;
}

#html5-pexeso {
  margin-top: 2px;
  font-size: 15pt;
}

#new-game {
  margin-top: 10px;
  margin-bottom: 10px;
  float: right;
}

#game {
  float: left;
  width: 100%;
  z-index: 10;
  margin-bottom: 100px;
}

.card {
  width: 10%;
  float: left;
}

.face {
  width: 120px;
  height: 120px;
  margin: 10px 10px 10px 10px;
  background-color: blue;

  -moz-transition: all 0.3s;
  -webkit-transition: all 0.3s;
  transition: all 0.3s;

  border-radius: 10px;

  -moz-transition-property: opacity, -moz-transform, -moz-box-shadow;
  -moz-transition-duration: 0.3s;
  -webkit-transition-property: opacity, -webkit-transform, -webkit-box-shadow;
  -webkit-transition-duration: 0.3s;
  transition-property: opacity, transform, box-shadow;
  transition-duration: 0.3s;

  -moz-backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.front {
  background: #337ab7;
  z-index: 10;
}

.back {
  display: flex;
  margin-top: -130px;
  background: #efefef;

  -moz-transform: rotate3d(0, 1, 0, -180deg);
  -webkit-transform: rotate3d(0, 1, 0, -180deg);
  transform: rotate3d(0, 1, 0, -180deg);

  z-index: 8;
  background: #f0ad4e;
}

.back > .fa {
  line-height: 100px;
  font-size: 400%;
  color: #000;
}

.card:hover .face {
  -webkit-box-shadow: 0 0 20px #aaa;
  box-shadow: 0 0 10px #aaa;
}

.card-flipped .face {
  -webkit-box-shadow: 0 0 20px #aaa;
  box-shadow: 0 0 10px #aaa;
}
.card-flipped .front {
  -moz-transform: rotate3d(0, 1, 0, 180deg);
  -webkit-transform: rotate3d(0, 1, 0, 180deg);
  transform: rotate3d(0, 1, 0, 180deg);

  z-index: 8;
}

.card-flipped .back {
  -moz-transform: rotate3d(0, 1, 0, 0deg);
  -webkit-transform: rotate3d(0, 1, 0, 0deg);
  transform: rotate3d(0, 1, 0, 0deg);

  z-index: 10;
}

.back img {
  margin: auto;
  width: 110px;
  height: 110px;
}

.card-removed {
  opacity: 0.75;
  filter: grayscale(1);
}

.card-removed .front {
  -moz-transform: rotate3d(0, 1, 0, 180deg);
  -webkit-transform: rotate3d(0, 1, 0, 180deg);
  transform: rotate3d(0, 1, 0, 180deg);

  z-index: 8;
}

.card-removed .back {
  -moz-transform: rotate3d(0, 1, 0, 0deg);
  -webkit-transform: rotate3d(0, 1, 0, 0deg);
  transform: rotate3d(0, 1, 0, 0deg);

  z-index: 10;
}

@media (max-width: 430px) {
  .card {
    width: 50%;
  }

  #game {
    margin-left: 20px;
  }
}

@media (min-width: 430px) {
  .card {
    width: 33%;
  }

  .face {
    height: 120px;
    width: 120px;
  }

  .back {
    margin-top: -130px;
  }

  .back > .fa {
    line-height: 100px;
    font-size: 50pt;
  }

  .modal-title {
    font-size: 20pt;
  }

  #new-game,
  #renew-game,
  #game-start {
    font-size: 16pt;
  }

  #info,
  .modal-content,
  .badge {
    font-size: 14pt;
  }

  #html5-pexeso {
    margin-top: 5px;
    font-size: 16pt;
  }

  #game {
    margin-bottom: 200px;
  }
}

@media (min-width: 580px) {
  .card {
    width: 25%;
  }
}

@media (min-width: 730px) {
  .card {
    width: 20%;
  }

  #new-game,
  #renew-game,
  #game-start {
    font-size: 15pt;
  }

  #info,
  .modal-content,
  .badge {
    font-size: 13pt;
  }

  #game {
    margin-left: 10px;
    margin-bottom: 100px;
  }
}

@media (min-width: 890px) {
  .card {
    width: 16%;
  }

  #new-game,
  #renew-game,
  #game-start {
    font-size: 14pt;
  }

  #info,
  .modal-content,
  .badge {
    font-size: 12pt;
  }

  #game {
    margin-left: 20px;
  }
}

@media (min-width: 1080px) {
  .card {
    width: 13%;
  }

  #new-game,
  #renew-game,
  #game-start {
    font-size: 100%;
  }
}

@media (min-width: 1300px) {
  .card {
    width: 11%;
  }
}
