* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  background: #ebe4d6;
  background-image: url("../img/fondo.jpg");
  min-height: 100%;
  font-family: 'Fredoka One', cursive;
}


iframe {
    /*display: block !important;*/   /* iframes are inline by default */
    border: none !important;         /* Reset default border */
    height: 100vh !important;        /* Viewport-relative units */
    width: 100vw !important;
}

.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;
      opacity: .5;
  }
}


/* AQUI ESTA EL COLOR CUANDO HACE MATCH */
@keyframes matchAnim  {
  0% { background: #bcffcc;}
  100% {background: white;}

}

.shake {
  /* Start the shake animation and make the animation last for 0.5 seconds */
  animation: shake 0.5s; 

  /* When the animation is finished, start again */
  animation-iteration-count:  3; 


}

@keyframes shake {
  0% { transform: translate(1px, 1px) rotate(0deg); }
  10% { transform: translate(-1px, -2px) rotate(-1deg); }
  20% { transform: translate(-3px, 0px) rotate(1deg); }
  30% { transform: translate(3px, 2px) rotate(0deg); }
  40% { transform: translate(1px, -1px) rotate(1deg); }
  50% { transform: translate(-1px, 2px) rotate(-1deg); }
  60% { transform: translate(-3px, 1px) rotate(0deg); }
  70% { transform: translate(3px, 1px) rotate(-1deg); }
  80% { transform: translate(-1px, -1px) rotate(1deg); }
  90% { transform: translate(1px, 2px) rotate(0deg); }
  100% { transform: translate(1px, -2px) rotate(-1deg);  }
}


.card {
  float: left;
  width: 16.66666%;
  height: 25%;
  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);
  border-radius: 50%;
}

@media (max-width: 800px) {
  .card {
    width: 25%;
    height: 16.666%;
  }
}

/* CONTROLA EL COLOR DE LA CARD */
.card .inside {
  width: 100%;
  height: 100%;
  display: block;
  -webkit-transform-style: preserve-3d;
          transform-style: preserve-3d;
  transition: .4s ease-in-out;
  /*background: white;*/ /* COLOR DE CARD */
  border-radius: 50%;
}

.card .inside.picked, .card .inside.matched {
  -webkit-transform: rotateY(180deg);
          transform: rotateY(180deg);
}

.card .inside.matched {
  -webkit-animation: 1s matchAnim shake  ease-in-out;
          animation: 1s matchAnim shake  ease-in-out;
  -webkit-animation-delay: .4s;
          animation-delay: .4s;
}

.card .inside.matched img{
  opacity: .5;
  transition: all ease-in-out 0.5s;
  filter:grayscale(50%);
}

.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;
  border-radius:50%;
}
.card .back img {
  max-width: 100%;
  display: block;
  margin: 0 auto;
  max-height: 100%;
  opacity: 1;
}

.card .front img{
  max-width: 100%;
  display: block;
  margin: 0 auto;
  max-height: 100%;
  opacity: 1;
}

.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);*/
  background-image: url(../img/fondo-start.jpg);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.modal {
  display: none;
  position: relative;
  width: 500px;
  /*height: 400px;*/
  max-height: 90%;
  max-width: 90%;
  min-height: 380px;
  margin: 0 auto;
  background: white;
  top: 25%;
  -webkit-transform: translateY(-50%);
          transform: translateY(-50%);
  padding: 30px 10px;
  border-radius: 10px;

  /*background-image: url("img/ICO-VELO.png");*/
  background-position: 200px 0;

  -webkit-box-shadow: 0px 0px 5px 0px rgba(0,0,0,0.75);
  -moz-box-shadow: 0px 0px 5px 0px rgba(0,0,0,0.75);
  box-shadow: 0px 0px 5px 0px rgba(0,0,0,0.75);

  -ms-transform: rotate(-10deg); /* IE 9 */
  -webkit-transform: rotate(-10deg); /* Safari 3-8 */
  transform: rotate(-10deg);

}
.modal .winner {
  font-size: 60px;
  text-align: center;
  font-family: "Anton", sans-serif;
  color: #4d4d4d;
  /*text-shadow: 0px 3px 0 black;*/
}

.modal .happy {
  font-size: 37px;
  text-align: center;
  font-family: "Anton", sans-serif;
  color: #4d4d4d;
  padding-top: 10px;
  /*text-shadow: 0px 3px 0 black;*/
}

hr {

    margin-top: 1rem;
    margin-bottom: 1rem;
    border: 0;
        border-top-color: currentcolor;
        border-top-style: none;
        border-top-width: 0px;
    border-top: 1px solid rgba(0,0,0,.1);

}

@media (max-width: 480px) {
  .modal .winner {
    font-size: 60px;
  }
}
.modal .restart {
  font-family: "Anton", sans-serif;
  margin: 30px auto;
  display: block;
  font-size: 50px;
  border: none;
  background: linear-gradient(blue, #0000B5, lightblue);
  border: 8px solid yellow;
  border-radius: 5px;
  color: yellow;
  cursor: pointer;
  width: 100px;
  height: 100px;
  padding: 0rem 0 .4rem.5rem;
  border-radius: 50%;
  -webkit-box-shadow: 0px 7px 12px 0px rgba(0,0,0,0.75);
  -moz-box-shadow: 0px 7px 12px 0px rgba(0,0,0,0.75);
  box-shadow: 0px 7px 12px 0px rgba(0,0,0,0.75);
}

.botton-next{
  font-family: "Anton", sans-serif;
  margin: 30px auto;
  display: block;
  font-size: 50px;
  border: none;
  background: linear-gradient(blue, #0000B5, lightblue);
  border: 8px solid yellow;
  border-radius: 5px;
  color: yellow;
  cursor: pointer;
  width: 100px;
  height: 100px;
  padding: 0rem 0 .4rem.5rem;
  border-radius: 50%;
  -webkit-box-shadow: 0px 7px 12px 0px rgba(0,0,0,0.75);
  -moz-box-shadow: 0px 7px 12px 0px rgba(0,0,0,0.75);
  box-shadow: 0px 7px 12px 0px rgba(0,0,0,0.75);
}
.modal .restart:hover {
  /*background: linear-gradient(#0000B5, #001642);*/
  background-color: #001642;
}

a .restart{
  text-decoration: none !important;
}
.modal .message {
  text-align: center;
  font-size: .6rem;
}
.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 {
  text-align: center;
  margin: 10px auto;
  font-weight: bold;
}
.modal .social {
  margin: 20px auto;
  text-align: center;
}
.modal .social li {
  display: inline-block;
  height: 50px;
  width: 50px;
  margin-right: 10px;
}
.modal .social li:last-child {
  margin-right: 0;
}
.modal .social li a {
  display: block;
  line-height: 50px;
  font-size: 20px;
  color: white;
  text-decoration: none;
  border-radius: 5px;
}
.modal .social li a.facebook {
  background: #3b5998;
}
.modal .social li a.facebook:hover {
  background: #4c70ba;
}
.modal .social li a.google {
  background: #D34836;
}
.modal .social li a.google:hover {
  background: #dc6e60;
}
.modal .social li a.twitter {
  background: #4099FF;
}
.modal .social li a.twitter:hover {
  background: #73b4ff;
}

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;
  }
}

/*//////////////////////
  CONTENEDOR BOTONES 
//////////////////////*/

.contendor-botones {
  width: 50%;
  /*max-width: 320px;*/
  margin: auto;
  font-size: 12px;
  line-height: 40px;
  text-align: center;
  align-items: center;                   /* centramos los div */
  margin-top: 32rem;                   
}

.contendor-botones  > div a {
  display: block;
  padding: 20px;
  background: rgba(252,234,187,1);
  background: -moz-linear-gradient(top, rgba(252,234,187,1) 0%, rgba(250,244,77,1) 50%, rgba(247,202,0,1) 51%, rgba(251,223,147,1) 100%);
  background: -webkit-gradient(left top, left bottom, color-stop(0%, rgba(252,234,187,1)), color-stop(50%, rgba(250,244,77,1)), color-stop(51%, rgba(247,202,0,1)), color-stop(100%, rgba(251,223,147,1)));
  background: -webkit-linear-gradient(top, rgba(252,234,187,1) 0%, rgba(250,244,77,1) 50%, rgba(247,202,0,1) 51%, rgba(251,223,147,1) 100%);
  background: -o-linear-gradient(top, rgba(252,234,187,1) 0%, rgba(250,244,77,1) 50%, rgba(247,202,0,1) 51%, rgba(251,223,147,1) 100%);
  background: -ms-linear-gradient(top, rgba(252,234,187,1) 0%, rgba(250,244,77,1) 50%, rgba(247,202,0,1) 51%, rgba(251,223,147,1) 100%);
  background: linear-gradient(to bottom, rgba(252,234,187,1) 0%, rgba(250,244,77,1) 50%, rgba(247,202,0,1) 51%, rgba(251,223,147,1) 100%);
  filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fceabb', endColorstr='#fbdf93', GradientType=0 );
  border:.5rem #ff6699 solid;
  color: #ff6699;
  box-shadow: 2px 2px 5px rgba(0,0,0,.5);
  border-radius: 50px;
  font-size: 25px;
  font-weight: 800;
  text-decoration: none;
}

.contendor-botones  > div a:hover {
  display: block;
  padding: 20px;
  background: rgba(252,234,187,1);
  background: -moz-linear-gradient(top, rgba(252,234,187,1) 0%, rgba(250,244,77,1) 50%, rgba(247,202,0,1) 51%, rgba(251,223,147,1) 100%);
  background: -webkit-gradient(left top, left bottom, color-stop(0%, rgba(252,234,187,1)), color-stop(50%, rgba(250,244,77,1)), color-stop(51%, rgba(247,202,0,1)), color-stop(100%, rgba(251,223,147,1)));
  background: -webkit-linear-gradient(top, rgba(252,234,187,1) 0%, rgba(250,244,77,1) 50%, rgba(247,202,0,1) 51%, rgba(251,223,147,1) 100%);
  background: -o-linear-gradient(top, rgba(252,234,187,1) 0%, rgba(250,244,77,1) 50%, rgba(247,202,0,1) 51%, rgba(251,223,147,1) 100%);
  background: -ms-linear-gradient(top, rgba(252,234,187,1) 0%, rgba(250,244,77,1) 50%, rgba(247,202,0,1) 51%, rgba(251,223,147,1) 100%);
  background: linear-gradient(to bottom, rgba(252,234,187,1) 0%, rgba(250,244,77,1) 50%, rgba(247,202,0,1) 51%, rgba(251,223,147,1) 100%);
  filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fceabb', endColorstr='#fbdf93', GradientType=0 );
  border:.5rem #ed1e79 solid;
  color: #ed1e79;
  box-shadow: 2px 2px 5px rgba(0,0,0,.5);
  border-radius: 50px;
  font-size: 35px;
  font-weight: 800;
  text-decoration: none;
}


/* /////// CSS GRID /////////// */

.contendor-botones  {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;     /* tamaño de columnas nuevas fr - aplicar tambien minmax(300px, 1fr) 1fr 1fr aplica tamaño minimo a la primera */ 
  grid-template-rows: 150px;              /* 1er fila 150px segunda 300px tamaño de filas */
  grid-gap: 20px;                         /* espaciado entre elementos */
}

.boton-jugar:hover{
  animation: boton-jugar linear 1s;
  /*animation-iteration-count: infinite;*/
  transform-origin: 50% 50%;
  -webkit-animation: boton-jugar linear 1s;
  /*-webkit-animation-iteration-count: infinite;*/
  -webkit-transform-origin: 50% 50%;
  -moz-animation: boton-jugar linear 1s;
  /*-moz-animation-iteration-count: infinite;*/
  -moz-transform-origin: 50% 50%;
  -o-animation: boton-jugar linear 1s;
  /*-o-animation-iteration-count: infinite;*/
  -o-transform-origin: 50% 50%;
  -ms-animation: boton-jugar linear 1s;
  /*-ms-animation-iteration-count: infinite;*/
  -ms-transform-origin: 50% 50%;
}

@keyframes boton-jugar{
  0% {
    transform:  rotate(0deg) scaleX(1.00) scaleY(1.00) ;
  }
  10% {
    transform:  rotate(-3deg) scaleX(0.80) scaleY(0.80) ;
  }
  20% {
    transform:  rotate(-3deg) scaleX(0.80) scaleY(0.80) ;
  }
  30% {
    transform:  rotate(3deg) scaleX(1.20) scaleY(1.20) ;
  }
  40% {
    transform:  rotate(-3deg) scaleX(1.20) scaleY(1.20) ;
  }
  50% {
    transform:  rotate(3deg) scaleX(1.20) scaleY(1.20) ;
  }
  60% {
    transform:  rotate(-3deg) scaleX(1.20) scaleY(1.20) ;
  }
  70% {
    transform:  rotate(3deg) scaleX(1.20) scaleY(1.20) ;
  }
  80% {
    transform:  rotate(-3deg) scaleX(1.20) scaleY(1.20) ;
  }
  90% {
    transform:  rotate(3deg) scaleX(1.20) scaleY(1.20) ;
  }
  100% {
    transform:  rotate(0deg) scaleX(1.20) scaleY(1.20) ;
  }
}

@-moz-keyframes boton-jugar{
  0% {
    -moz-transform:  rotate(0deg) scaleX(1.00) scaleY(1.00) ;
  }
  10% {
    -moz-transform:  rotate(-3deg) scaleX(0.80) scaleY(0.80) ;
  }
  20% {
    -moz-transform:  rotate(-3deg) scaleX(0.80) scaleY(0.80) ;
  }
  30% {
    -moz-transform:  rotate(3deg) scaleX(1.20) scaleY(1.20) ;
  }
  40% {
    -moz-transform:  rotate(-3deg) scaleX(1.20) scaleY(1.20) ;
  }
  50% {
    -moz-transform:  rotate(3deg) scaleX(1.20) scaleY(1.20) ;
  }
  60% {
    -moz-transform:  rotate(-3deg) scaleX(1.20) scaleY(1.20) ;
  }
  70% {
    -moz-transform:  rotate(3deg) scaleX(1.20) scaleY(1.20) ;
  }
  80% {
    -moz-transform:  rotate(-3deg) scaleX(1.20) scaleY(1.20) ;
  }
  90% {
    -moz-transform:  rotate(3deg) scaleX(1.20) scaleY(1.20) ;
  }
  100% {
    -moz-transform:  rotate(0deg) scaleX(1.20) scaleY(1.20) ;
  }
}

@-webkit-keyframes boton-jugar {
  0% {
    -webkit-transform:  rotate(0deg) scaleX(1.00) scaleY(1.00) ;
  }
  10% {
    -webkit-transform:  rotate(-3deg) scaleX(0.80) scaleY(0.80) ;
  }
  20% {
    -webkit-transform:  rotate(-3deg) scaleX(0.80) scaleY(0.80) ;
  }
  30% {
    -webkit-transform:  rotate(3deg) scaleX(1.20) scaleY(1.20) ;
  }
  40% {
    -webkit-transform:  rotate(-3deg) scaleX(1.20) scaleY(1.20) ;
  }
  50% {
    -webkit-transform:  rotate(3deg) scaleX(1.20) scaleY(1.20) ;
  }
  60% {
    -webkit-transform:  rotate(-3deg) scaleX(1.20) scaleY(1.20) ;
  }
  70% {
    -webkit-transform:  rotate(3deg) scaleX(1.20) scaleY(1.20) ;
  }
  80% {
    -webkit-transform:  rotate(-3deg) scaleX(1.20) scaleY(1.20) ;
  }
  90% {
    -webkit-transform:  rotate(3deg) scaleX(1.20) scaleY(1.20) ;
  }
  100% {
    -webkit-transform:  rotate(0deg) scaleX(1.20) scaleY(1.20) ;
  }
}

@-o-keyframes boton-jugar {
  0% {
    -o-transform:  rotate(0deg) scaleX(1.00) scaleY(1.00) ;
  }
  10% {
    -o-transform:  rotate(-3deg) scaleX(0.80) scaleY(0.80) ;
  }
  20% {
    -o-transform:  rotate(-3deg) scaleX(0.80) scaleY(0.80) ;
  }
  30% {
    -o-transform:  rotate(3deg) scaleX(1.20) scaleY(1.20) ;
  }
  40% {
    -o-transform:  rotate(-3deg) scaleX(1.20) scaleY(1.20) ;
  }
  50% {
    -o-transform:  rotate(3deg) scaleX(1.20) scaleY(1.20) ;
  }
  60% {
    -o-transform:  rotate(-3deg) scaleX(1.20) scaleY(1.20) ;
  }
  70% {
    -o-transform:  rotate(3deg) scaleX(1.20) scaleY(1.20) ;
  }
  80% {
    -o-transform:  rotate(-3deg) scaleX(1.20) scaleY(1.20) ;
  }
  90% {
    -o-transform:  rotate(3deg) scaleX(1.20) scaleY(1.20) ;
  }
  100% {
    -o-transform:  rotate(0deg) scaleX(1.20) scaleY(1.20) ;
  }
}

@-ms-keyframes boton-jugar {
  0% {
    -ms-transform:  rotate(0deg) scaleX(1.00) scaleY(1.00) ;
  }
  10% {
    -ms-transform:  rotate(-3deg) scaleX(0.80) scaleY(0.80) ;
  }
  20% {
    -ms-transform:  rotate(-3deg) scaleX(0.80) scaleY(0.80) ;
  }
  30% {
    -ms-transform:  rotate(3deg) scaleX(1.20) scaleY(1.20) ;
  }
  40% {
    -ms-transform:  rotate(-3deg) scaleX(1.20) scaleY(1.20) ;
  }
  50% {
    -ms-transform:  rotate(3deg) scaleX(1.20) scaleY(1.20) ;
  }
  60% {
    -ms-transform:  rotate(-3deg) scaleX(1.20) scaleY(1.20) ;
  }
  70% {
    -ms-transform:  rotate(3deg) scaleX(1.20) scaleY(1.20) ;
  }
  80% {
    -ms-transform:  rotate(-3deg) scaleX(1.20) scaleY(1.20) ;
  }
  90% {
    -ms-transform:  rotate(3deg) scaleX(1.20) scaleY(1.20) ;
  }
  100% {
    -ms-transform:  rotate(0deg) scaleX(1.20) scaleY(1.20) ;
  }
}