@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing:border-box;
	-webkit-box-sizing:border-box;
	-moz-box-sizing:border-box;
}

body {
  background: #f2fef5;
  font-family: 'Roboto', sans-serif; /*Fuente que llame de google fonts*/
  font-size: 17px;
  line-height: 21px;
  font-weight: 400;

}

h1 {

  color: #14AE5C;
  font-size: 70px;
  line-height: 73px;
  text-align: center;
  text-transform: uppercase; /*mayusculas*/
  margin: 40px 0;
}

header {

  width: 100%;
  max-width: 900px;
  margin: 0 auto;
}

#contenedorPrincipal{
  width: 100%;
  max-width: 900px;
  padding: 15px 15px 5px 15px;
  margin: 0 auto;
  text-align: center;

}

#contenedorPrincipal img{

width: 100%;
max-width: 400px;
}

#root {

  text-align: center;
}

#contenedor-cartas {
  width: 100%;
  max-width: 900px;
  padding: 15px 15px 5px 15px;
  /*border: 1px solid white;*/
  margin: 0 auto;
  display: flex; /* Elementos denytro de ese div se comporten flexibles, quede uno al lado del otro */
  flex-wrap: wrap; /* por defecto el display: flex los pone todos al lado sin repetar margen, wrap acomoda las imagenes pone solo las que quepan y las demas las baja*/
  align-items: flex-start; /*ubica los objetos en el eje x*/
  justify-content: center;
}

.carta-box {

  width: 21%;
  position: relative;
  perspective: 1000px;
  margin: 0 2% 20px 2%;
}

.carta-box input[type=checkbox] {

  position: absolute;
  opacity: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
}

.carta-box input[type=checkbox]:checked+label .carta {
  transform: rotateY(180deg);
}

.carta {
  transform-style: preserve-3d;
  transition: all 0.5s linear;
}

.carta img{

  width: 100%;
  
}

.frente {
  position: absolute;
  backface-visibility: hidden;
  width: 100%;
}

.detras {

  background: white;
}



#iniciar {

  color: white;
  background: #0D99FF url(../src/imagenes/play.png) no-repeat;
  background-size: 35px;
  background-position: 10px;
  border: 0;
  border-radius: 10px 0px;
  /*esquinas redondas*/
  padding: 12px 25px 12px 50px;
  font-size: 17px;
  font-weight: bold;
  /*letra negrilla*/
  cursor: pointer;
  margin-top: 30px;
  text-transform: uppercase;

}

#iniciar:hover {

  padding: 12px 35px 12px 60px;
  box-shadow: 0 0 10px #9553f9;
  font-size: 20px;
  transition: all 0.3s linear;
}

#reiniciar {
  color: white;
  background: #0D99FF url(../src/imagenes/refresh.png) no-repeat;
  background-size: 35px;
  background-position: 10px;
  border: 0;
  border-radius: 10px 0px;
  /*esquinas redondas*/
  padding: 12px 25px 12px 50px;
  font-size: 17px;
  font-weight: bold;
  /*letra negrilla*/
  cursor: pointer;
  margin-top: 30px;
  text-transform: uppercase;
  margin-bottom: 30px;
}

#reiniciar:hover {
  /*cuando pase el cursor encima*/

  padding: 12px 35px 12px 60px;
  box-shadow: 0 0 10px #9553f9;
  font-size: 20px;
  transition: all 0.3s linear;
}


#inicio {
  color: black;
  background: url(../src/imagenes/home.png);
  background-repeat: no-repeat;
  background-size: 60px;
  border: 0;
  padding: 10px 30px 8px 55px;
  font-size: 20px;
  font-weight: bold;
  /*letra negrilla*/
  cursor: pointer;
  margin-top: 30px;
  text-transform: uppercase;
}

#inicio:hover {
  /*cuando pase el cursor encima*/

  transform: scale(1.1);
  transition: all 0.3s linear;
}

#felicidades {

font-size: 20px;
width: 90%;
max-width: 400px;
background-color: greenyellow;
border: 5px solid rgb(126, 232, 19);
text-align: center;
border-radius: 40px;
position: fixed;
z-index: 1;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
-moz-transform: translate(-50%, -50%);
-webkit-transform: translate(-50%, -50%);
display: none;
}

#felicidades p{

  padding: 0 30px;
}

#felicidades p:first-child{

  font-size: 35px;
  line-height:  38px;
  text-transform: uppercase;
  font-weight: bold;
  color: #0D99FF;
  margin-top: 30px;
  padding: 0;
}

#felicidades img{

  width: 90%;
  max-width: 220px;
  margin-bottom: 20px;


}

#seguir {
  color: white;
  background: #0D99FF;
  background-size: 35px;
  background-position: 10px;
  border: 0;
  border-radius: 40px; /*esquinas redondas*/
  padding: 12px 12px ;
  font-size: 15px;
  font-weight: bold; /*letra negrilla*/
  cursor: pointer;
  margin: 30px 0;
  text-transform: uppercase;
}

#seguir:hover {
  /*cuando pase el cursor encima*/

  padding: 12px 35px 12px 60px;
  box-shadow: 0 0 10px #9553f9;
  font-size: 15px;
  transition: all 0.3s linear;
}

@media only screen and (min-width : 400px) and (max-width : 600px){

  h1{

    font-size: 50px;
    line-height: 53px;
  }
 
  .carta-box {
    width: 29.3%;
}
}

@media only screen and (min-width : 50px) and (max-width : 399px){

  h1{

    font-size: 35px;
    line-height: 38px;
  }

  #contenedorPrincipal img{

  width: 80%;
  
  }

  #iniciar {

    padding: 12px 15px 12px 50px;
    font-size: 15px;
  
  }

  #felicidades {

    font-size: 17px;
    
    }
    
    #felicidades p{
    
      padding: 0 15px;
    }
    
    #felicidades p:first-child{
    
      font-size: 25px;
      line-height: 28px;
    } 

    .carta-box {
      width: 31.3%;
      margin: 0 1% 20px 1%;
  }

  #reiniciar {
    
    margin-top: 0px;
    
}
}