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

body{
    background: radial-gradient(circle at center, #0f0c29, #302b63, #24243e);
    color: #ff6ec7;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: "Fredoka",sans-serif;
    height: 100vh;
    
}

.game-container{
    background-color: rgba(0, 0, 0, 0.25);
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 0 15px #04ffff;
    text-align: center;
    display: flex;
    flex-direction: column;
    place-items: center;
}

.game_info{
    color: #00ffff; 
    font-size: 1.3rem;
    text-shadow: 0 0 5px #00ffff;
    display: flex;
    flex-direction: column;
    /* padding-top: 1rem; */
    padding-bottom: 2rem;
    gap: 10px; 
}

h1{
    font-size: 50px;
    word-spacing: 3px;
}

#start-up{
    font-size: 2rem;
    color: #edf756;
    padding: 20px 10px 20px 10px; 
}


#start-button{
    background: linear-gradient(to bottom right, #ff6ec7, #6eeeffee);
    color: #12343b;
    padding: 7px 25px 7px 25px ;
    font-size: 1.4rem;
    border: none;
    outline: none;
    border-radius: 5px;
    font-family: "Fredoka", sans-serif;
    font-weight: 600;
    font-size: 20px;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all .5s ease;
}

#restart-btn{
    background: linear-gradient(to bottom right, #7f37ca,#e11894);
    color: #12343b;
    border: none;
    outline: none;
    border-radius: 5px;
    font-family: "Fredoka", sans-serif;
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all .5s ease-in-out;
    padding: 9px 20px 9px 20px;
    font-size: 1.3rem;
    margin-top: 1rem;
}

#restart-btn:hover{
    background: linear-gradient(to bottom left, #e11894, #8029dc, #3dafe9);
    box-shadow: 0 0 15px #0a044e;
    transform: scale(103%);
    transition: all .5s ease-in-out;
    
}

#restart-btn:active{
    background: linear-gradient(to bottom left, #e11894, #8029dc, #3dafe9);
    box-shadow: 0 0 15px #0a044e;
    transform: scale(103%);
    transition: all .5s ease;
}

#start-button:hover{
    background: linear-gradient(to bottom right, #ff6ec7, #6eeeffee);
    box-shadow: 0 0 15px #04ffff;
    transform: scale(105%);
}

#start-button:active{
    background: linear-gradient(to top left, #ff6ec7, #6eeeffee);
    box-shadow: 0 0 15px #00ffff;
    transform: scale(110%);
}

#game-board{
    display: grid;
    grid-template-columns: repeat(4,1fr);
    justify-content: center;
    place-items: center;
    gap: 20px;
    padding-bottom: 1rem;
}

/*cards style*/

.card{
    width: 90px;
    height: 90px;
    background-color: #0f0c29;
    /* border: 1px solid #0f0c29; */
    border-radius: 10px;
    perspective: 1000px;
    position: relative;
    cursor: pointer;
}

.card.flip .card-inner{
    transform: rotateY(-180deg) scale(110%);
}

.card-inner{
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.5s;
    transform-style: preserve-3d;
}

.card-front, .card-back{
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
}

.card-front{
     background: linear-gradient(to bottom right,#582b47,#0a044e,#7f37ca);
     color: #16dcdc;   
}

.card-back{
    background-color: #a0d2eb;
    transform: rotateY(180deg);
    
}

.card:active{
    box-shadow: 0 0 15px #ff6ec7;
}

/* win message display */

.win-message{
    background-color: #a0d2eb;
    border-radius: 10px;
    padding: 20px;
    color: #12343b;
    box-shadow: 0 0 15px #04ffff;
    font-size: 20px;
    text-align: center;
    width: 300px;
    display:flex;
    justify-content: center;
    place-items: center;
}

/* arrow-button */
#arrow-btn{
    background-color: #a0d2eb;
    color: #302b63;
    font-size: 20px;
    /* border: 1px solid; */
    border-radius: 50%;
    padding: 5px 5px 5px 5px;
    position: absolute;
    top:20px;
    left: 20px;
    cursor: pointer;
    z-index: 10;
}
.game-container{
    position: relative;
    padding-top: 50px;
}
#arrow-btn:hover{
    background-color: #feb300;
    color: #ffff;
    box-shadow: 0 0 15px #ffff;
}
#arrow-btn:active{
    background-color: #feb300;
    color: #ffff;
    box-shadow: 0 0 15px #ffff;
    transform: scale(110%);
}


@media(max-width: 375px){
    
    .card{
        width: 70px;
        height: 70px;
    }
    #game-board{
        grid-template-columns: repeat(3,1fr);
    }
    #arrow-btn{
        top: 50px;
        left: 10px;
    }
    
}
 
@media(min-width: 425px) and (max-width:767px) {
    .card{
        width: 70px;
        height: 70px;
    }
}