#memory-board {
    padding: 0 23rem;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 1.5rem;
}

.memory-card {
    aspect-ratio: 1 / 1;
    perspective: 1000px;
    cursor: pointer;
}

.card-inner {
    box-shadow: 5px 5px 8px #bbb;
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.memory-card.flipped .card-inner {
    transform: rotateY(180deg);
    cursor: default;
}

.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 8px;
}

.card-front {
    background-color: #83adc9;
    border: 1px solid rgba(93, 137, 167, 0.89);
    background-position: center;
    background-size: cover;
}

.card-back {
    background-size: cover;
    background-position: center;
    transform: rotateY(180deg);
    border: 1px solid #bbb;
}

.memory-card.matched .card-inner {
    opacity: 0.25;
    cursor: not-allowed;
}

#timer {
    font-size: 1.2em;
    margin-bottom: 10px;
}
