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

body {
    height: 100vh;
    width: 80%;
    display: flex;
    background: #fdfdfd;
    flex-direction: column;
    align-items: center;
    font-family: "Arial Black"
}



.memory-game {
    width: 75%;
    height: 85%;
    margin: auto;
    display: flex;
    flex-wrap: wrap;
    perspective: 1000px;
}

.scorecard{
    display: flex;
    flex-direction: row;
    justify-content:center;
    text-align: right;
    align-items:flex-end;
    width: 50%;
}

.title{
    display: flex;
    flex-direction: column;
    align-items:center;
    min-height: 15vh;
    width: 100%
}





.memory-card {
    width: calc(25% - 10px);
    height: calc(33.333% - 10px);
    margin: 5px;
    position: relative;
    box-shadow: 1px 1px 1px rgba(0,0,0,.3);
    cursor: pointer;
    transform-style: preserve-3d;
    transition: transform .5s;
}

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

.front-face,
.back-face {
    width: 100%;
    height: 100%;
    padding: 20px;
    position: absolute;
    border-radius: 5px;
    transition: transform .6s cubic-bezier(0.4, 0.0, 0.2, 1);
    backface-visibility: hidden;
}

.memory-card {
    width: calc(25% - 10px);
    height: calc(33.333% - 10px);
    margin: 5px;
    position: relative;
    transform-style: preserve-3d;
    box-shadow: 1px 1px 0 rgba(0, 0, 0, .3);
    transform: scale(1);
} 
.memory-card:active {
    transform: scale(0.97);
    transition: transform .2s;
}

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

.memory-game {
    margin: auto;
    display: flex;
    flex-wrap: wrap;
    perspective: 1000px;
}



.memory-card {
    width: calc(25% - 10px);
    height: calc(33.333% - 10px);
    margin: 5px;
    position: relative;
    box-shadow: 1px 1px 1px rgba(0,0,0,.3);
    cursor: pointer;
    transform: scale(1);
}

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

/* The css code on lines 56-57, 61, 71-72, 80-82, 85-86, 90, 113-114 make up our 3D flip effect */

.front-face
{   width: 100%;
    height: 100%;
    position: absolute;
    border-radius: 2px;
    padding: 5px;
    transform: rotateY(180deg);

}
.back-face {
width: 100%;
height: 100%;
padding: 5px;
position: absolute;
border-radius: 2px;
}

h1{
    font-size: 200%;
	color: black;
	text-align: center;
	margin-top: 0;
	text-transform: uppercase;
	font-weight: 900;
}

h3{
    font-size: 100%;
    color:black;
    text-align: center;
    margin-top: 0;
    text-transform: uppercase;
    font-weight: 900;
    padding-top: 20px;
}

h4{
    text-align: right;
    padding-right: 10px;
}


#btn{
    color: rgb(5, 5, 5);
    border: 2px solid rgb(11, 10, 10);
    border-radius: 3px;
    padding: 18px 26px;
    font-family: "Arial Black";
    font-size: 14px;
    letter-spacing: 1px;
    cursor: pointer;
    width: 20%;
    height: 10%;
}

