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

body {
  height: 100%;
  font-family: 'Overpass', sans-serif;
  overflow: hidden;
}

input, textarea{
  font-family: 'Overpass', sans-serif;
  font-size: 18px
}

/* fondo */
body::after{
  content: "";
  background: #fff;
  background: radial-gradient(circle, rgba(255,255,255,1) 0%, rgba(244,244,244,1) 100%);
  background: url("./img/tile.png");
  background-size: cover;
  opacity: 0.2;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  position: absolute;
  z-index: -1;
}

h1{
    font-size: 24px;
    line-height: 31px;
}
p{
    font-size: 20px;
    line-height: 26px;
}
p>span, h1>span{
    background: #ffffff;
    color: #be1522;
}
button{
    font-family: 'Overpass', sans-serif;
    padding: 7px 25px;
    background: none;
    color: #fff;
    border: 2px solid #fff;
    font-size: 18px;
}
button:active {
    outline: none;
    border: none;
}
button:focus {
    outline:0;
}

button:hover{
    background: #fff;
    color: #110073;
    cursor: pointer;
}

button.inverted{
    color: #000;
    border: 2px solid black;
}
button.inverted button:hover{
  color: #fff;
  background: #000;
}

#intro{
    position: absolute;
    width: 100vw;
    height: 100%;
    background: #be1522 url("./img/cartas-frontimage-mobile.jpg");
    background-size: cover;
    background-position: center;
    color: #fff;
    z-index: 999;
    /* padding: 25px; */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-evenly;
}
#intro-logo-container{
    width: 100%;
    background: #fffffff0;
    text-align: center;
}
#intro-logo-container img{
    max-width: 100%;
    padding: 5px;
}
#intro-text{
    max-width: 800px;
    padding: 10px;
}

#intro-jugar-but{
    margin: 0 auto;
    text-align: center;
    opacity: 0;
    background: #fff;
    border: 3px solid #be1522;
    color: #be1522;
}
#intro-jugar-but:hover{
    background: #be1522;
    color: #fff;
}
#intro .buttonContainer{
    text-align: center;
    width: 100%;
}


#white-fade{
    position: absolute;
    width: 100vw;
    height: 100vh;
    background: #fff;
    background: radial-gradient(circle, rgba(255,255,255,1) 0%, rgba(244,244,244,1) 100%);
    z-index: 9999;
    display: none;
    opacity: 0;
}


#memory-game {
    overflow-y:  scroll;
    position: absolute;
    width: 100vw;
    height: 100%;
    margin: auto;
    perspective: 1000px;
    margin-bottom: 100px;  /* por el infoTab */

    display: flex;
    flex-direction: column;
    height: 100%;
}

#memory-game h1{
    padding: 15px;
    color: #110073;
}
.content{
    flex: 1 0 auto;
}

.invisible{
    opacity: 0;
}

#game-container{
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    perspective: 1000px;
    margin-bottom: 60px;
}

.cardContainer{
    width: 25%;
    height: calc((100% / 5) - 7px);
    min-height: 125px;
}
.memory-card {
  position: relative;
  transform: scale(1);
          transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
  transition: transform .5s, position .3s, opacity 1s;
  /* box-shadow: 1px 1px 1px rgba(0,0,0,.3); */
  border: 2px solid #cf6366;
  border-radius: 5px;

  height: 124px;
  width: 80px;
  margin: 0 auto;
  /* width: 90px;
    height: 139px; */
}
.memory-card:hover{
    cursor: pointer;
}

.memory-card:active {
  transform: scale(0.97);
  transition: transform .2s;
}

.memory-card.flip {
            transform: rotateY(180deg);
    -webkit-transform: rotateY(180deg);
}

/* FIX TEMPORAL SAFARI */
.memory-card.flip .back-face{
    transition-delay: .2s;
    opacity: 0;
}

.front-face,
.back-face {
  width: 100%;
  height: 100%;
  padding: 5px;
  position: absolute;
  border-radius: 5px;
  background: #fff;
          backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.front-face {
          transform: rotateY(180deg);
  -webkit-transform: rotateY(180deg);
  transition: border .3s;
}

.matched{
    border: 3px solid #21ba45;
}

.noselect {
  -webkit-touch-callout: none; /* iOS Safari */
    -webkit-user-select: none; /* Safari */
     -khtml-user-select: none; /* Konqueror HTML */
       -moz-user-select: none; /* Old versions of Firefox */
        -ms-user-select: none; /* Internet Explorer/Edge */
            user-select: none; /* Non-prefixed version, currently
                                  supported by Chrome, Opera and Firefox */
}

.hidden{
    opacity: 0;
}

.noDisplay{
    display: none;
}


#comenzarJuego{
    width: 90px;
    height: 30px;
    position: absolute;
    left: 50%;
    right: 50%;
    top: 20px;
    border-radius: 5px;
    z-index: 9999;
}

#infoTab{
    position: fixed;
    z-index: -1;
    bottom: 0;
    width: 100%;
    padding: 15px;
    background: #f7a416;
    color: #fff;
    height: 0px;
    transition: all .3s;
    opacity: 0;
    overflow-y: scroll;
}
#infoTab.small{
    opacity: 1;
    height: 100px;
    z-index: 9999999999;
}

#infoTab.small button{
    height: 100%;
}
#infoTab button{
    margin-left: 10px;
}
#infoTab.small button:after {
    content: "Leer+";
}
#infoTab.small h2{
    font-size: 20px;
}
#infoTab.small .header{
    height: 100%;
}


#infoTab .header{
    display: flex;
    justify-content: space-between;
    font-size: 22px;
}
#infoTab.large button{
  color: #000;
  border: 2px solid #000;
}
#infoTab.large button:after {
    content: "x";
}
#infoTab.large{
    background: #fff;
    color: #000;
    display: block;
    opacity: 1;
    height: 100%;
    z-index: 99999;
}
#infoTab.large .body{
    display: block;
    margin-top: 20px;
}
#infoTab.large .ilustrador{
    font-size: 16px;
}

#infoTab .body, #infoTab.small .body{
    display: none;
}


#infoTab .imagen img{
    width: 100%;
    height: 100%;
    object-fit: contain;
}


#gameFooter{
    display: flex;
    justify-content: space-between;
    align-items: center;

    background:#404040;
    color: #fff;
    height: 90px;
    width: 100%;
    padding: 2px ;

    font-size: 14px;
}
#gameFooter>div{
    flex: 1 1 auto;
    margin: 5px;
}
#gameFooter img{
    max-height: 100%;
    max-width: 100%;
}
#gameFooter .anno{
    text-align: right;
}

#openInfo{
    z-index: 99;
    font-family: serif;
    padding: 0;
    font-size: 14px;
    height: 30px;
    width: 30px;
}



.displayNone{
    display: none !important;
}

#ganaste{
    position: absolute;
    width: 100%;
    height: 100%;
}

#ganaste .content{
    position: absolute;
    height: 100%;
    width: 100%;
    background: #F6F6F7;
}
#ganaste .content p{
    font-size: 20px;
}
#ganaste button{
    height: 80px;
}
#step1, #step2, #step3, #step4{
    padding: 20px;
}
#step1{
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
#step1 .twoButtons{
    display: flex;
    justify-content: space-between;
}
#step1 .greenBut{
    border: 2px solid #21ba45;
    color: #21ba45;
}
#step1 button, #step3 button{
    background: #fff;
}
#step1 img{
    margin-bottom: 60px;
}
#step1 h1{
    color: #21ba45;
    text-align: center;
}
#step1 .text{
    margin-bottom: 20px;
}


#step2{
    display: flex;
    flex-direction: column-reverse;
    height: 100%;
    position: relative;
}
#step2 #TextDialog{
    position: absolute;
    left: 0px;
    top: 0px;
    width: 100%;
    height: 100%;
    background: #292930db;
    border-radius: 9px;
    display: flex;
    flex-direction: column;
    text-align: center;
    justify-content: center;
}

#inputText{
    width: 300px;
    text-align: center;
    font-size: 40px;
}
#fontSelect{
    height: 32px;
    width: 247px;
    padding-top: 2px;
    font-family: Arial;
}
#fontSize{
    width: 50px;
}

#step2 #TextDialog .container > *{
    margin: 20px;
}

#step3{
    display: flex;
    flex-direction: column;
    height: 100%;
}
#step4 .icon{
    height: 40px;
    margin-bottom: -30px;
    z-index: 9;
}

#dibujoContainer{
    text-align: center;
    flex: 1 1 auto;
    margin: 10px 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

#dibujoCanvas{
    background: #fff;
    /* width: 100%;
    height: 100%; */
}
#dibujoCanvas:hover{
    cursor: crosshair;
}

#toolbarContainer{
    /* position: absolute; */
    /* height: 100%; */
    justify-content: center;
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}
#toolbar{
    height: 20px;
    width: 300px;
    /* margin-bottom: 20px; */

    display: flex;
    /* flex-direction: column; */
    justify-content: space-between;
}
#toolbar img{
    width: 20px;
}

#currColor{
    width: 20px;
    height: 20px;
    background: #1b2535;
    border-radius: 50%;
}
#currColor[data-color="#fff"]{
    border: 1px solid #000;
}

#changeStroke{
    position: absolute;
    width: 90px;
    height: 250px;
    margin-left: -2px;
    margin-top: -2px;
    display: flex;
}
#colorOptions{
    display: flex;
    flex-direction: column-reverse;
    justify-content: space-between;
    top: -225px;
    position: relative;
}
#colorOptions .colorOption{
    width: 25px;
    height: 25px;
    border-radius: 50%;
}
.colorOption[data-color="fff"]{
    border: 1px solid #000;
}
#widthOption{
    width: 25px;
    margin-left: 67px;
    padding-top: 30px;
    position: relative;
    top: -255px;
}
#currSize{
    text-align: center;
}
.pointer:hover{
    cursor: pointer;
}

#formulario{
  display: flex;
  flex-direction: column;
  height: 100%;
  padding-top: 10px;
}
#formulario input, #formulario textarea{
    margin-bottom: 10px;
    border: none;
    padding: 10px;
    border: 3px solid #fff;
}
#formulario input.badInput, #formulario textarea.badInput{
    border: 3px solid #be1522;
}
#formulario .badInput[type="checkbox"]{
    outline: 3px solid #be1522;
}
#formulario p{
    font-size: 14px;
}
#formulario .checkboxitem{
    margin-top: auto;
}

#enviandoForm{
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    justify-content: center;
    background: #ffffffe6;
    text-align: center;
}

#step4{
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
#step4 #imgContainer{
    /* height: 100%; */
    max-height: calc(100% - 160px);
    padding: 10px;
}
#step4 #imgContainer img{
    height: 100%;
    width: 100%;
    object-fit: contain;
}
#step4 #descargar img{
     width: 15px;
}

#info{
    position: absolute;
    background: #fff;
    height: 100%;
    width: 100%;
    overflow: scroll;
    padding: 30px;
}
#info ul{
    margin-bottom: 15px;
}
#info h3{
    margin-bottom: 10px;
}
#closeInfo{
    position: absolute;
    right: 20px;
}

#info h2{
  margin: 20px 0 10px;
}
#info p{
  margin-bottom: 5px
}


#mute{
    background: url("./icons/soundOn.png");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    height: 20px;
    width: 40px;
    filter: invert(1);
}
#mute:hover{
    cursor: pointer;
}
#mute.disabled{
	background: url("./icons/soundOff.png");
	background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}


#cerrar{
    position: absolute;
    top: 5px;
    right: 10px;
    z-index: 9;
    color: #797979;
    text-align: center;
    font-size: 20px;
}

ul > ul{
  margin-left: 20px;
  list-style: none;
  margin-left: 55px;
}

#cerrar:hover{
    cursor: pointer;
}
.bookTitle{
    font-style: italic;
}

@media only screen and (min-width: 885px) {
    h1{
        font-size: 28px;
        line-height: 35px;
    }
    p{
        font-size: 24px;
        line-height: 31px;
    }
    button{
        font-size: 28px;
    }
    #intro{
        background: #be1522 url("./img/cartas-frontimage.jpg");
    }
    .cardContainer{
        width: 9%;
    }
    .memory-game {
      padding: 0 100px;
    }
    #memory-game h1{
        padding: 10px 100px;
    }

    #game-container{
        margin-bottom: 50px;
        margin-top: 30px;
    }
    #infoTab.small h2{
        font-size: 32px;
    }
    #infoTab.large .body{
        display:flex;
    }
    #infoTab .body .content{
        flex: 2;
        padding-right: 100px;
        line-height: 30px;
    }
    #infoTab .body .imagen{
        flex: 1;
    }
    #gameFooter{
        padding: 10px;
    }


    /* Ganaste */
    #ganaste .content{
        background: #292930f7;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    #step2,#step3{
        width: calc(100% - 100px);
        height: calc(100% - 100px);
        background: #f6f6f7f5;
        border-radius: 10px;
    }
    #step1, #step4{
        background: #fff;
        width: 500px;
        height: 420px;
        padding: 30px;
        position: relative;
        border-radius: 10px;
    }
    #step4{
        height: 600px;
        background: #f6f6f7f5;
        padding: 50px;
    }
    #step1 .icon, #step4 .icon{
        position: absolute;
        left: calc(50% - 150px / 2);
        top: -70px;
        margin-bottom: -110px;
        width: 150px;
        height: 150px;
        margin: 0 auto;
        border-radius: 50%;
    }
    #step1 .icon{
        background: #ffffff;
    }
    #step1 .text {
        margin-top: 80px;
    }
    #step2{
        flex-direction: row;

    }
    #toolbar{
        flex-direction: column;
        width: 20px;
        height: 300px;
        padding: 0 15px;
    }
    #changeStroke{
        flex-direction: column;
        width: 250px;
        height: 90px;
    }
    #colorOptions{
        flex-direction: row;
        top: -2px;
        left: -2px;
    }
    #widthOption{
        top: -23px;
    }
    #widthOption .rangeContainer{
        margin-top: -27px;
        margin-left: 35px;
    }
    input[type="range"].range{
        -webkit-transform: rotate(0deg);
        -moz-transform: rotate(0deg);
        -o-transform: rotate(0deg);
        -ms-transform: rotate(0deg);
        transform: rotate(0deg);
        margin-top: 0px !important;
        margin-left: 0px !important;
    }
    #widthOption{
        margin-left: 45px;
        padding-top: 61px;
    }
    #step3{
        padding: 50px 100px;
    }
    #step3 button {
        background: #fff;
    }
    #formulario{
        max-width: 500px;
        margin: 0 auto;
    }
    #info{
        padding: 80px;
    }
    #cerrar{
        font-size: 40px;
        right: 20px;
    }

}

@media only screen and (min-width: 1200px) {
    #game-container{
        padding: 0 100px;
    }
    #gameFooter{
        padding: 10px 100px;
    }

}
