
body{
    background-color: rgb(255, 228, 225);
    margin: 0 auto;
    padding: 5px;
    font-family: 'Indie Flower', cursive;
}
/* we define a grid tocontain alls the element*/
#container{
    max-width: 800px;
    margin: 0 auto;
    padding: 5px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: minmax(150px, auto);
    grid-gap: 10px;
    margin-top: 30px;
    background-color: mediumpurple;
    padding: 5px;
    perspective: 1000px;
      
}

/*the memory-cards style with the 3d effect */ 

.memory-card{
    margin: 3px;
    padding: 2px;
    position: relative;
    transition: transform .8s;
    transform-style: preserve-3d;
}
.memory-card:hover{
    transform:scale(1.2);/**/
}

.back{
    backface-visibility: hidden;
    position: absolute;

}


.memory-card.flip{
    transform: rotateY(180deg);
    
}

.front{
    position: absolute;
    transform: rotateY(180deg);
    backface-visibility: hidden;
}

.memory-card:active{
    transform: scale(0.90);
    transition: .1s;
}

img{
    width: 100%;
    height: 100%;
    border-radius: 12px;
}

.header{
     width: 100%;
     margin-bottom: 10px;
     border-style: none;
     text-align: center;
}

h1{
    font-family: 'Indie Flower', cursive;
    font-weight: 900;
    color: rgb(176, 15, 224);
}
li{
    display: inline-flex;
}
.playagain{
  background-color: rgb(176, 15, 224); 
  border: none;
  color: white;
  padding: 15px ;
  text-align: center;
  display: inline-block;
  font-size: 30px;
  font-family: 'Indie Flower', cursive;

}
.playagain:active{
    background-color: rgb(206, 190, 188);
    transform: translateY(9px);
}
.move{
    background-color: rgb(176, 15, 224); 
    border: none;
    color: white;
    padding: 15px ;
    text-align: center;
    display: inline-block;
    font-size: 30px;
    font-family: 'Indie Flower', cursive;
    
}
.timer, .won{
    background-color: rgb(176, 15, 224); 
    border: none;
    color: white;
    padding: 15px ;
    text-align: center;
    display: inline-block;
    font-size: 30px;
    font-family: 'Indie Flower', cursive;
    
}


/* adding some media queries*/

/*all the screen less or equals to 700px*/
@media screen and (max-width: 700px) {

    #container{
        max-width: 550px;
        margin: 0 auto;
        padding: 5px;
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        grid-auto-rows: minmax(100px, auto);
        grid-gap: 5px;
        background-color: rgb(181, 186, 216);
        padding: 3px;
        perspective: 800px;     
    }
   
    
  /*all the screen less or equal to 400px*/

  @media screen and (max-width: 400px) {
    #container{
        max-width: 250px;
        margin: 0 auto;
        padding: 2px;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: minmax(100px, auto);
        grid-gap: 5px;
        background-color: rgb(24, 204, 48);
        padding: 3px;
        perspective: 500px;     
    }
}}