* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background: #f5f5f5;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 800px;
    width: 100%;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    padding: 20px;
    text-align: center;
}

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

.game-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.stats {
    display: flex;
    gap: 15px;
}

.stats span {
    font-weight: 600;
    color: #555;
}

#restart {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
}

#restart:hover {
    background: #45a049;
}

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

.card {
    width: 100%;
    height: 100px;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.5s;
    cursor: pointer;
    border-radius: 5px;
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.1);
}

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

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

.card-front {
    background: #4CAF50;
    color: white;
    font-size: 24px;
    transform: rotateY(180deg);
}

.card-back {
    background: #333;
    background-image: url('images/card-back.png');
    background-size: cover;
}

.instructions {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 5px;
    text-align: left;
    margin-top: 20px;
}

.instructions h2 {
    margin-bottom: 10px;
    color: #333;
}

.instructions p {
    margin-bottom: 5px;
    color: #555;
}

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

    .card {
        height: 80px;
    }
}