#memory-game-container {
padding: 0;
margin: 0;
box-sizing: border-box;
}
.memory-game {
width: 1080px; display: flex;
flex-wrap: wrap;
margin: auto;
perspective: 1500px;
}
.memory-card {
position: relative;
width: 131px;
height: 131px;
margin: 2px;
transform: scale(1);
transform-style: preserve-3d;
transition: transform 0.5s;
}
@media(max-width: 1080px) {
.memory-game {
width: 810px;
}
}
@media(max-width: 810px) {
.memory-game {
width: 540px;
}
}
@media(max-width: 540px) {
.memory-game {
width: 405px;
}
}
.memory-card:active {
transform: scale(0.97);
transition: transform 0.2s;
}
.memory-card.flip {
transform: rotateY(180deg);
}
.front-face,
.back-face {
border-radius: 4px;
position: absolute;
width: 100%;
height: 100%;
background: #1c7ccc;
padding: 0;
backface-visibility: hidden;
}
.front-face {
transform: rotateY(180deg);
}
.score {
font-size: 2em;
color: black;
text-align: center;
padding-top: 20px;
padding-bottom: 30px;
}
#tryagain {
text-align: center;
}
.hidden {
display: none;
}