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

body {
    font-family: Arial, sans-serif;
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: black;
    padding: 20px;
}

.game-container {
    text-align: center;
    width: 100%;
    max-width: 400px;
}

h1 {
    font-size: 24px;
    margin-bottom: 20px;
}

.timer p {
    font-size: 18px;
}

.cards-container {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-gap: 10px;
    justify-content: center;
}

.card {
    width: 100px;
    height: 100px;
    background-color: #ddd;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    cursor: pointer;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.card.flipped {
    background-color: #fff;
}

.card.matched {
    background-color: #4caf50;
    cursor: not-allowed;
}

.cardValues {
    width: 100px;
    height: 100px;
}

.card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gridContainer {
    display: grid;
    grid-template-columns: repeat(5, 100px);
    grid-template-rows: repeat(2, 100px);
    gap: 15px;
    justify-content: center;
    align-items: center;
}

/* Tablet Styling */
@media (max-width: 768px) {
    .gridContainer {
        grid-template-columns: repeat(4, 80px);
        grid-template-rows: auto;
        gap: 12px;
    }

    .card, .cardValues, .card img {
        width: 80px;
        height: 80px;
    }

    h1 {
        font-size: 20px;
    }

    .timer p {
        font-size: 16px;
    }
}

/* Mobile Styling */
@media (max-width: 480px) {
    .gridContainer {
        grid-template-columns: repeat(3, 70px);
        gap: 10px;
    }

    .card, .cardValues, .card img {
        width: 70px;
        height: 70px;
        font-size: 18px;
    }

    h1 {
        font-size: 18px;
    }

    .timer p {
        font-size: 14px;
    }

    .game-container {
        max-width: 100%;
    }
}
