* {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            border: none;
            font-family: "Poppins", system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
        }

        body {
            min-height: 100vh;
            width: 100%;
            background: linear-gradient(145deg, #6c7e8f 0%, #4a5b6b 100%);
            display: flex;
            justify-content: center;
            align-items: center;
            flex-direction: column;
            padding: 1.5rem;
            gap: 1.2rem;
        }

        /* HEADER – Responsive title */
        h1 {
            color: white;
            background-color: #0a0f1c;
            font-size: clamp(1.6rem, 7vw, 2.5rem);
            font-weight: 700;
            letter-spacing: 2px;
            text-transform: uppercase;
            padding: 0.5rem 1.5rem;
            border-radius: 60px;
            box-shadow: 0 8px 20px rgba(0,0,0,0.2);
            text-align: center;
            margin-bottom: 0.25rem;
            backdrop-filter: blur(2px);
            word-break: keep-all;
        }

        /* GAME GRID – fully responsive */
        .container {
            display: grid;
            grid-template-columns: repeat(3, minmax(70px, 1fr));
            gap: 0;
            background-color: #1e2a32;
            border: 3px solid #0f1419;
            border-radius: 20px;
            overflow: hidden;
            box-shadow: 0 20px 30px rgba(0, 0, 0, 0.3);
            width: 100%;
            max-width: 500px;
            margin: 0 auto;
        }

        /* Each cell – perfect square + interactive */
        .box {
            aspect-ratio: 1 / 1;
            background-color: #fef9e8;
            border: 2px solid #1e2a32;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.2s ease;
            backdrop-filter: brightness(1);
        }

        .box:hover {
            background-color: #fffaec;
            transform: scale(0.98);
        }

        /* images inside cells scale nicely */
        .box img {
            max-width: 70%;
            max-height: 70%;
            width: auto;
            height: auto;
            object-fit: contain;
            pointer-events: none;
            transition: transform 0.1s ease;
        }

        /* winner animation – keeps original shape */
        .win {
            animation: winPulse 0.8s ease-in-out infinite alternate;
            background-color: #2ecc71 !important;
            box-shadow: inset 0 0 0 2px gold;
        }

        @keyframes winPulse {
            0% {
                background-color: #2ecc71;
                filter: brightness(1);
            }
            100% {
                background-color: #27ae60;
                filter: brightness(1.1);
                box-shadow: inset 0 0 0 4px #f1c40f;
            }
        }

        /* Status card – modern & responsive */
        .status {
            background-color: white;
            color: #1e2a32;
            font-weight: 600;
            font-size: clamp(1rem, 5vw, 1.5rem);
            text-align: center;
            padding: 0.7rem 1.8rem;
            border-radius: 60px;
            box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
            width: auto;
            min-width: 220px;
            max-width: 90%;
            backdrop-filter: blur(1px);
            transition: all 0.2s;
            letter-spacing: 0.5px;
        }

        /* Restart / Play again button */
        button {
            background: #0f172a;
            color: white;
            font-size: clamp(1rem, 4.5vw, 1.3rem);
            font-weight: 600;
            padding: 0.7rem 1.5rem;
            border-radius: 50px;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            gap: 8px;
            transition: 0.2s;
            box-shadow: 0 6px 0 #020617;
            border: none;
            letter-spacing: 0.5px;
        }

        button:active {
            transform: translateY(3px);
            box-shadow: 0 2px 0 #020617;
        }

        /* ------------------------------
            MEDIA QUERIES (Phones & small devices)
        ------------------------------ */
        @media (max-width: 560px) {
            body {
                padding: 1rem;
                gap: 0.8rem;
                justify-content: center;
            }

            .container {
                max-width: 95vw;
                border-width: 2px;
                border-radius: 16px;
            }

            .box {
                border-width: 1.5px;
            }

            .box img {
                max-width: 65%;
                max-height: 65%;
            }

            .status {
                padding: 0.5rem 1rem;
                font-weight: 500;
                margin: 0.5rem 0;
            }

            button {
                padding: 0.6rem 1.2rem;
                font-size: 0.95rem;
            }
        }

        @media (max-width: 420px) {
            .container {
                max-width: 98vw;
            }

            .box img {
                max-width: 55%;
                max-height: 55%;
            }

            h1 {
                font-size: clamp(1.3rem, 6vw, 1.8rem);
                padding: 0.4rem 1rem;
            }

            .status {
                font-size: 0.9rem;
                min-width: 180px;
            }

            button {
                font-size: 0.85rem;
                padding: 0.5rem 1rem;
            }
        }

        /* very tiny devices (fold, old iPhones) */
        @media (max-width: 340px) {
            .box img {
                max-width: 50%;
                max-height: 50%;
            }

            .status {
                font-size: 0.8rem;
                padding: 0.4rem 0.8rem;
            }

            button {
                padding: 0.4rem 0.9rem;
            }
        }

        /* landscape mode adjustment */
        @media (max-height: 500px) and (orientation: landscape) {
            body {
                gap: 0.5rem;
                padding: 0.8rem;
            }

            .container {
                max-width: 350px;
            }

            .box img {
                max-width: 55%;
            }

            h1 {
                font-size: 1.4rem;
                padding: 0.2rem 1rem;
                margin-bottom: 0;
            }
        }

        /* Accessibility & touch friendly */
        .box:active {
            transform: scale(0.96);
            transition: 0.05s;
        }

        button:focus-visible, .box:focus-visible {
            outline: 2px solid gold;
            outline-offset: 2px;
        }