#memory-cards-game {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.memory-cards-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 10px;
    width: 100%;
}

.memory-cards-controls #memory-cards-reset {
    background-color: #0073aa;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
}

.memory-cards-controls #memory-cards-reset:hover {
    background-color: #005177;
}

.memory-cards-divider {
    border: 0;
    height: 1px;
    background: #ccc;
    width: 100%;
    margin: 10px 0;
}

#memory-cards-board {
    display: grid;
    justify-content: center;
}

.memory-cards-card {
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    border: 1px solid #ccc;
    border-radius: 8px;
    width: 100px;
    height: 100px;
}

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

.card-face, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 8px;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    background-origin: content-box;
}

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

.card-back {
    background-color: #f0f0f0; 
}

/* ---------------------------------------------------- */
/* Mobiele aanpassingen */
/* ---------------------------------------------------- */

@media (max-width: 600px) {
    #memory-cards-board {
        /* Dwing 3 kolommen af op kleinere schermen */
        grid-template-columns: repeat(3, 1fr);
    }

    .memory-cards-card {
        /* Zorg dat de kaartjes flexibel zijn en de beschikbare ruimte vullen */
        width: 100%;
        height: auto;
        aspect-ratio: 1 / 1;
    }
}