    /* Mobile-first base styles */

    body {
    font-family: Arial, sans-serif;
    margin: 10px;
    background: #222;
    color: #eee;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    padding-bottom: 40px;
    }

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

    .game-info {
    display: flex;
    justify-content: space-around;
    width: 90vw;
    max-width: 480px;
    margin-bottom: 15px;
    font-size: 1rem;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
    }

    #restart-btn {
    background-color: #009578;
    border: none;
    color: white;
    font-weight: bold;
    padding: 8px 14px;
    border-radius: 5px;
    cursor: pointer;
    flex-shrink: 0;
    transition: background-color 0.3s;
    }
    #restart-btn:hover {
    background-color: #007a5a;
    }

    .grid-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    width: 90vw;
    max-width: 480px;
    }

    /* Card styles */

    .card {
    background-color: #444;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.5);
    perspective: 1000px;
    cursor: pointer;
    height: 100px;
    position: relative;
    user-select: none;
    }

    .card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.5s;
    transform-style: preserve-3d;
    }

    .card.flipped .card-inner {
    transform: rotateY(180deg);
    cursor: default;
    }

    .card-front,
    .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 10px;
    backface-visibility: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 3rem;
    }

    .card-front {
    background-color: #1c7c54;
    color: #fff;
    }

    .card-back {
    background-color: #bbb;
    transform: rotateY(180deg);
    color: #222;
    font-weight: bold;
    }

    /* Responsive grid for tablets */

    @media screen and (min-width: 481px) {
    .grid-container {
        grid-template-columns: repeat(4, 1fr);
        max-width: 768px;
        gap: 15px;
    }
    .card {
        height: 140px;
    }
    h1 {
        font-size: 2rem;
    }
    .game-info {
        max-width: 768px;
        font-size: 1.2rem;
    }
    }

    /* Responsive grid for desktops */

    @media screen and (min-width: 769px) {
    .grid-container {
        grid-template-columns: repeat(6, 1fr);
        max-width: 1200px;
        gap: 18px;
    }
    .card {
        height: 160px;
    }
    h1 {
        font-size: 2.5rem;
    }
    .game-info {
        max-width: 1200px;
        font-size: 1.4rem;
    }
    }

    /* Large desktops and TVs */

    @media screen and (min-width: 1201px) {
    .grid-container {
        grid-template-columns: repeat(8, 1fr);
        max-width: 1600px;
        gap: 20px;
    }
    .card {
        height: 180px;
    }
    h1 {
        font-size: 3rem;
    }
    .game-info {
        max-width: 1600px;
        font-size: 1.6rem;
    }
    }
