* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
background-image: -webkit-radial-gradient(center top, circle farthest-corner, #FFF 0%, #D8DFE9 100%);
  background-image: radial-gradient(circle farthest-corner at center top, #FFF 0%, #D8DFE9 100%);
}

.wrap {
  position: relative;
  height: 100%;
  min-height: 500px;
  padding-bottom: 20px;
}

.game {
  -webkit-transform-style: preserve-3d;
          transform-style: preserve-3d;
  -webkit-perspective: 500px;
          perspective: 500px;
  min-height: 100%;
  height: 100%;
}

@-webkit-keyframes matchAnim {
  0% {
    background: #bcffcc;
  }
  100% {
    background: white;
  }
}

@keyframes matchAnim {
  0% {
    background: #bcffcc;
  }
  100% {
    background: white;
  }
}
.card {
  float: left;
  width: 16.66666%;
  height: 18%;
  padding: 5px;
  text-align: center;
  display: block;
  -webkit-perspective: 500px;
          perspective: 500px;
  position: relative;
  cursor: pointer;
  z-index: 50;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
@media (max-width: 800px) {
  .card {
    width: 25%;
    height: 16.666%;
  }
}
.card .inside {
  width: 100%;
  height: 100%;
  display: block;
  -webkit-transform-style: preserve-3d;
          transform-style: preserve-3d;
  -webkit-transition: .4s ease-in-out;
  transition: .4s ease-in-out;
  background: white;
}
.card .inside.picked, .card .inside.matched {
  -webkit-transform: rotateY(180deg);
          transform: rotateY(180deg);
}
.card .inside.matched {
  -webkit-animation: 1s matchAnim ease-in-out;
          animation: 1s matchAnim ease-in-out;
  -webkit-animation-delay: .4s;
          animation-delay: .4s;
}
.card .front, .card .back {
  border: 1px solid black;
  -webkit-backface-visibility: hidden;
          backface-visibility: hidden;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 20px;
}
.card .front img, .card .back img {
  max-width: 100%;
  display: block;
  margin: 0 auto;
  max-height: 100%;
}
.card .front {
  -webkit-transform: rotateY(-180deg);
          transform: rotateY(-180deg);
}
@media (max-width: 800px) {
  .card .front {
    padding: 5px;
  }
}
.card .back {
  -webkit-transform: rotateX(0);
          transform: rotateX(0);
}
@media (max-width: 800px) {
  .card .back {
    padding: 10px;
  }
}

.modal-overlay {
  display: none;
  background: rgba(0, 0, 0, 0.8);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.modal {
  display: none;
  position: relative;
  width: 500px;
  height: 5000px;
  max-height: 90%;
  max-width: 90%;
  min-height: 380px;
  margin: 0 auto;
  background: #222;
  top: 50%;
  -webkit-transform: translateY(-50%);
          transform: translateY(-50%);
  padding: 30px 10px;
  border-radius: 7px;
}
.modal .youwon {
  font-size: 50px;
  text-align: center;
  font-family: "Anton", sans-serif;
  color: white;
  text-shadow: 0px 3px 0 black;
}
@media (max-width: 480px) {
  .modal .youwon {
    font-size: 50px;
  }
}
.modal .restart, .home {
  font-family: "Anton", sans-serif;
  margin: 30px auto;
  padding: 20px 30px;
  display: block;
  font-size: 20px;
  border: none;
  background: #4d4d4d;
  background: -webkit-gradient(linear, left top, left bottom, from(#4d4d4d), to(#222));
  background: linear-gradient(green, lightgreen);
  border: 1px solid #222;
  border-radius: 6px;
  color: white;
  text-shadow: 0px 1px 0 black;
  cursor: pointer;
}
.modal .restart, .home:hover {
  background: -webkit-gradient(linear, left top, left bottom, from(#222), to(black));
  background: linear-gradient(lightgreen, green);
}
.modal .message {
  text-align: center;
}
.modal .message a {
  text-decoration: none;
  color: #28afe6;
  font-weight: bold;
}
.modal .message a:hover {
  color: #56c0eb;
  border-bottom: 1px dotted #56c0eb;
}
.modal .share {
  text-align: center;
  margin: 10px auto;
  color: white;
}
.modal .soc-ico {
  margin: 20px auto;
  text-align: center;
}
.modal .soc-ico li {
  display: inline-block;
  height: 50px;
  width: 50px;
  margin-right: 10px;
}
.modal .soc-ico li:last-child {
  margin-right: 0;
}
.modal .soc-ico li a {
  display: block;
  line-height: 50px;
  font-size: 20px;
  color: white;
  text-decoration: none;
  border-radius: 5px;
}
.modal .soc-ico li a.fb {
  background: #3b5998;
}
.modal .soc-ico li a.fb:hover {
  background: #4c70ba;
}
.modal .soc-ico li a.google {
  background: #D34836;
}
.modal .soc-ico li a.google:hover {
  background: #dc6e60;
}
.modal .soc-ico li a.tweet {
  background: #4099FF;
}
.modal .soc-ico li a.tweet:hover {
  background: #73b4ff;
}
.modal .soc-ico li a.wa {
  background: #4FCE5D;
}
.modal .soc-ico li a.wa:hover {
  background: #9ce3a4;
}
.modal .soc-ico li a.mail {
  background: #D34836;
}
.modal .soc-ico li a.mail:hover {
  background: #dc6e60;
}
.modal .soc-ico li a.insta {
  background: linear-gradient(#F58529, #FEDA77, #DD2A7B, #8134AF, #515BD4)
}
.modal .soc-ico li a.insta:hover {
  background: linear-gradient(#515BD4, #8134AF, #DD2A7B, #FEDA77, #F58529)
}


footer {
  height: 20px;
  position: absolute;
  bottom: 0;
  width: 100%;
  z-index: 0;
}
footer .disclaimer {
  line-height: 20px;
  font-size: 12px;
  color: #727272;
  text-align: center;
}
@media (max-width: 767px) {
  footer .disclaimer {
    font-size: 8px;
  }
}

.modal2 {
  display: none; 
  position: fixed;
  z-index: 1;
  padding-top: 100px;
  left: 0;
  top: 0;
  width: 100%; 
  height: 100%; 
  overflow: auto; 
  background-color: rgb(0,0,0); 
  background-color: rgba(0,0,0,0.4); 
}


.modal2-content {
  background-color: #fefefe;
  margin: auto;
  padding: 20px;
  border: 1px solid #888;
  width: 80%;
}


.close {
  color: #aaaaaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
}

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