* {
  box-sizing: border-box;
}
html, body {
  height: 100%;
}
body {
  background: rgb(0, 116, 217);
  font-family: Nunito, Arial, sans-serif;
  color: #fff;
  min-height: 100%;
  font-size: 12px;
}
.wrap {
  position: relative;
  height: 100%;
  min-height: 360px;
  padding-bottom: 20px;
  overflow: hidden;
}
.game {
  transform-style: preserve-3d;
  perspective: 600px;
  min-height: 100%;
  height: 100%;
}
@keyframes matchAnim {
  0% {
    background: #bcffcc;
  }
  100% {
    background: white;
  }
}
.card {
  float: left;
  width: 16.66666%;
  height: 25%;
  padding: 5px;
  text-align: center;
  display: block;
/*  perspective: 600px; */
  position: relative;
  cursor: pointer;
  z-index: 50;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  transform-style: preserve-3d;
}

.glink , .glink:visited {
    font-size: 2.5vw;
    position: absolute;
    bottom: 0;
    left: 0;
    text-shadow: 0 0 1px #fff;
    color: #000;
    text-decoration: none;
    width: inherit;
    font-family: 'Yanone Kaffeesatz', sans-serif;
    font-weight: 700;
}
.glink:hover, .glink:active {
    color: #f00;
}

@media (max-width: 800px) {}
@media (orientation: portrait) {
  .card {
    width: 25%;
    height: 16.666%;
  }
  .glink {
    font-size: 3.5vw;
   }
}
.card .inside {
  width: 100%;
  height: 100%;
  display: block;
  transform-style: preserve-3d;
  transition: 0.4s ease-in-out;
  background: white;
}
.card .inside.picked, .card .inside.matched {
  transform: rotateY(180deg);
}
.card .inside.matched {
  animation: 1s matchAnim ease-in-out;
  animation-delay: 0.4s;
}

.card .front, .card .back {
/*  border: 1px solid black;*/
  backface-visibility: hidden;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 2px;
}
.card .front img, .card .back img {
  max-width: 100%;
  display: block;
  margin: 0 auto;
  max-height: 100%;
	-webkit-user-drag: none;
}
.card .front {
  transform: rotateY(-180deg);
}
@media (max-width: 800px) {
  .card .front {
    padding: 0.5px;
  }
}
.card .back {
  transform: rotateX(0);
}

hr { border: 0; height: 1px; background: #fff; background-image: linear-gradient(to right, #00f, #fff, #0ff); }

.endgame {
    text-align: center;
    position: absolute;
    top: 50%;
    width: 100%;
}
.rnd2 {
    position: absolute;
    top: 55%;
    width: 100%;
    text-align: center;
    font-size: 1.4em;
}
button, .fsco {
  -moz-border-radius: 5px;
  -webkit-border-radius: 5px;
  border-radius: 5px;
  -khtml-border-radius: 5px;
  background: #fff;
  color: rgb(0, 116, 217);
  border: solid 1px #fff;
  text-decoration: none;
  margin: 10px;
  outline: none;
  font-family: Nunito, Arial, sans-serif;
  padding: 2px 12px;
}
button {
  cursor: pointer;
  font-size: 1.6em;
  padding: 8px 20px;
}
button:hover {
  transition: all 0.3s ease-in-out;
  background: #0ce853;
  border: solid 1px #fff;
  color: #fff;
}

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

.card .inside.cpicked {
  transform: rotateX(10deg) rotateY(190deg);
}

/* .card .inside.cpicked {
  border:4px dashed red;
}
.cmatched .front img  opacity: 0.3;
.cmatched .front img {
  filter: contrast(0.5) brightness(2);
}
.cmatched .front img {
	filter: blur(1px) opacity(.5);
} 
.cmatched .front img{
    opacity: 0.5;
    visibility: visible;
} */
.cmatched .front img {
	filter: opacity(.5);
} 

.card .inside.cmatched {
	transform: rotateY(180deg) translateZ(30px) rotateX(15deg);
}

.matched .back img {
  display: none !important;
}
.cmatched {
  word-wrap: break-word; 
	cursor: default;
}