.memory {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.memory .row-cards {
    display: flex;
    flex-flow: row wrap;
    justify-content: space-around;
}

.memory .row-cards .card {
    position: relative;
    transition: transform 0.6s ease;
    transform-style: preserve-3d;
    width: 160px;
    margin: 10px;
    height: 160px;
    flex-shrink: 0;
}


.memory .row-cards .card .front, .memory .row-cards .card .back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    transition: all 0.5 ease;
    overflow: hidden;
    cursor: pointer;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
}

.memory .row-cards .card .back {
    border-radius: 5px;
    background-color: var(--color2);
    color:#fff;
    font-size: 1.2em;
    border: solid 10px var(--color1);
}

.memory .row-cards .card .back h1 {
    font-size: 1em;
    text-align: center !important;
}


.memory .row-cards .card .front {
    border-radius: 5px;
    background-color: #fff;
    color: #22171D;
    transform: rotateY(180deg);
    padding: 1em;
}

.memory .row-cards .card .front h5 {
    text-align: center !important;
    color: var(--color2);
    font-weight: bold;
}

.memory .row-cards .card .front p {
    font-size: .85em;
    font-weight: 300;
    text-align: center;
    margin: 0;
}

.memory .animation-flip {
    transform: rotateY(180deg);
}