
.game-container {
    text-align: center;
    width: 90%;
    max-width: 800px;
}

}

.game-info {
    display: flex;
    justify-content: space-around;
    margin-bottom: 20px;
    font-size: 1.2em;
}

.difficulty {
    margin-bottom: 20px;
}

.btn {
    background-color: #ea512e;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    margin: 0 5px;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #d9431f;
}

.game-board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.card {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    cursor: pointer;
    aspect-ratio: 1 / 1;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2em;
    transform-style: preserve-3d;
    transition: transform 0.5s;
}

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

.card .card-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

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

.card .card-back {
    background-color: #ea512e;
    color: white;
}

.card img {
    width: 80%;
    height: 80%;
    object-fit: contain;
}

.win-message {
    padding: 20px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.leaderboard {
    margin-top: 20px;
}

.leaderboard ol {
    list-style-type: none;
    padding: 0;
}

.leaderboard li {
    padding: 5px;
    border-bottom: 1px solid #ddd;
}

@media (max-width: 600px) {
    .game-board {
        grid-template-columns: repeat(3, 1fr);
    }
    .card {
        font-size: 1.5em;
    }
}
