body {
    font-family: 'Vazirmatn', sans-serif;
    background-color: #2c3e50;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
}

.container {
    text-align: center;
    max-width: 600px;
    width: 100%;
    padding: 20px;
}

h1 {
    margin-bottom: 20px;
    color: #ecf0f1;
}

.stats {
    display: flex;
    justify-content: space-around;
    margin-bottom: 20px;
    font-size: 1.2rem;
    background: #34495e;
    padding: 10px;
    border-radius: 10px;
}

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

.card {
    background-color: transparent;
    height: 100px;
    cursor: pointer;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.5s;
}

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

.card-face {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 3rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.card-front {
    background-color: #3498db;
    transform: rotateY(0deg);
    /* This should be the back in visual logic usually, but let's stick to standard flip logic */
}

/* Adjusting logic: 
   Usually "Front" is the image, "Back" is the cover.
   When not flipped (0deg), we see the cover.
   When flipped (180deg), we see the image.
*/
.card-face.front {
    background-color: #ecf0f1;
    color: #2c3e50;
    transform: rotateY(180deg);
}

.card-face.back {
    background-color: #3498db;
    transform: rotateY(0deg);
}

.card-face.back::after {
    content: "❓";
    font-size: 2rem;
    opacity: 0.5;
}

.btn {
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 1rem;
    border-radius: 5px;
    cursor: pointer;
    font-family: 'Vazirmatn', sans-serif;
    transition: background 0.3s;
}

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

/* Responsive adjustments */
@media (max-width: 500px) {
    .game-board {
        grid-template-columns: repeat(4, 1fr);
        gap: 5px;
    }

    .card {
        height: 70px;
    }

    .card-face {
        font-size: 2rem;
    }
}