* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background: linear-gradient(135deg, #6a11cb, #2575fc);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
}

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

h1 {
    margin-bottom: 10px;
    font-size: 2.5rem;
}

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

button {
    padding: 10px 18px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    background: white;
    color: #2575fc;
    font-weight: bold;
    transition: 0.3s;
}

button:hover {
    transform: scale(1.05);
}

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

.card {
    height: 120px;
    position: relative;
    cursor: pointer;
    transform-style: preserve-3d;
    transition: transform 0.6s;
}

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

.face {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    backface-visibility: hidden;
}

.front {
    background: #ffffff22;
    border: 2px solid rgba(255,255,255,0.3);
}

.back {
    background: white;
    color: #333;
    transform: rotateY(180deg);
}

.card.matched .back {
    background: #8cff8c;
}

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

    .card {
        height: 90px;
    }
}