@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', sans-serif;
}

body {
    background: #f0f4f8;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    overflow: hidden;
}

.game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    padding: 20px 30px;
}

h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
    text-align: center;
}

.game-board {
    display: grid;
    grid-template-columns: repeat(4, 100px);
    grid-template-rows: repeat(4, 100px);
    gap: 15px;
}

.card {
    width: 100px;
    height: 100px;
    position: relative;
    cursor: pointer;
    transform-style: preserve-3d;
    transition: transform 0.5s ease;
}

.card.flip {
    transform: rotateY(180deg);
}

.card .card-face {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 10px;
    backface-visibility: hidden;
}

.card .front-face {
    background: #ffffff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    color: #555;
    font-weight: 500;
    transform: rotateY(180deg);
}

.card .back-face {
    background: linear-gradient(135deg, #6e8efb, #a777e3);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

@media (max-width: 600px) {
    .game-board {
        grid-template-columns: repeat(4, 70px);
        grid-template-rows: repeat(4, 70px);
    }

    .card {
        width: 70px;
        height: 70px;
    }

    h1 {
        font-size: 1.5rem;
    }
}