        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            user-select: none; /* Prevent selection on mobile */
            -webkit-tap-highlight-color: transparent;
        }

        body {
            font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
            background: linear-gradient(145deg, #1a2a3a 0%, #0f1a24 100%);
            min-height: 100vh;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            padding: 1.5rem;
            margin: 0;
        }

        /* main title */
        h1 {
            font-size: clamp(2rem, 8vw, 3.5rem);
            font-weight: 700;
            background: linear-gradient(135deg, #FFD166, #FFB347);
            background-clip: text;
            -webkit-background-clip: text;
            color: transparent;
            text-shadow: 0 2px 5px rgba(0,0,0,0.2);
            margin-bottom: 1rem;
            letter-spacing: 1px;
            text-align: center;
        }

        /* game container grid */
        #game-container {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: clamp(0.8rem, 4vw, 1.5rem);
            max-width: 550px;
            width: 100%;
            margin: 1rem auto;
            padding: 0.5rem;
        }

        .color-btn {
            aspect-ratio: 1 / 1;
            border-radius: 24px;
            cursor: pointer;
            box-shadow: 0 12px 20px rgba(0, 0, 0, 0.3), inset 0 1px 2px rgba(255,255,255,0.4);
            transition: all 0.1s ease;
            will-change: transform;
            touch-action: manipulation;
        }

        .color-btn:active {
            transform: scale(0.96);
            filter: brightness(0.95);
        }

        /* individual colors with gradients */
        #green {
            background: linear-gradient(145deg, #2ecc71, #27ae60);
            box-shadow: 0 8px 0 #1e7e3a;
        }
        #red {
            background: linear-gradient(145deg, #e74c3c, #c0392b);
            box-shadow: 0 8px 0 #962d22;
        }
        #yellow {
            background: linear-gradient(145deg, #f1c40f, #f39c12);
            box-shadow: 0 8px 0 #c87f0a;
        }
        #blue {
            background: linear-gradient(145deg, #3498db, #2980b9);
            box-shadow: 0 8px 0 #1f618d;
        }

        .color-btn.active {
            transform: scale(0.96);
            filter: brightness(1.2);
            box-shadow: 0 4px 0 rgba(0,0,0,0.3);
            transition: 0.05s linear;
        }

        /* status panel */
        #game-status {
            background: rgba(0, 0, 0, 0.55);
            backdrop-filter: blur(12px);
            border-radius: 60px;
            padding: 0.8rem 1.5rem;
            margin: 1rem 0;
            width: auto;
            max-width: 90vw;
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            gap: 1rem 2rem;
            border: 1px solid rgba(255,255,200,0.2);
        }

        .my-text {
            font-size: clamp(0.85rem, 4vw, 1.2rem);
            font-weight: 600;
            color: #fef9e0;
            background: rgba(0,0,0,0.4);
            padding: 0.3rem 1rem;
            border-radius: 40px;
            letter-spacing: 0.5px;
            backdrop-filter: blur(4px);
            display: inline-flex;
            align-items: baseline;
            gap: 6px;
        }

        .my-text span {
            font-weight: 800;
            color: #ffd966;
        }

        #sequence-display {
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 1px;
            background: #1e2a32;
            padding: 0.2rem 0.6rem;
            border-radius: 32px;
            display: inline-block;
        }

        /* start button */
        #start-btn {
            background: linear-gradient(95deg, #4CAF50, #2e7d32);
            border: none;
            padding: 0.9rem 2rem;
            font-size: clamp(1rem, 5vw, 1.4rem);
            font-weight: bold;
            color: white;
            border-radius: 80px;
            cursor: pointer;
            box-shadow: 0 8px 0 #1b5e20;
            transition: 0.07s linear;
            margin-top: 0.5rem;
            margin-bottom: 1rem;
            width: fit-content;
            touch-action: manipulation;
        }

        #start-btn:active {
            transform: translateY(4px);
            box-shadow: 0 4px 0 #1b5e20;
        }

        /* level message */
        #level-message {
            font-size: clamp(1.1rem, 5vw, 1.7rem);
            font-weight: bold;
            text-align: center;
            background: rgba(0,0,0,0.7);
            backdrop-filter: blur(12px);
            padding: 0.7rem 1.4rem;
            border-radius: 80px;
            margin-top: 1rem;
            width: auto;
            max-width: 85vw;
            transition: opacity 0.4s ease, transform 0.2s;
            color: #ffecb3;
            border-left: 6px solid gold;
            display: none;
            opacity: 0;
        }

        #level-message.show {
            display: block;
            opacity: 1;
            animation: gentlePop 0.4s ease-out;
        }

        @keyframes gentlePop {
            0% { transform: scale(0.9); opacity: 0; }
            100% { transform: scale(1); opacity: 1; }
        }

        /* responsive for small screens */
        @media (max-width: 550px) {
            body {
                padding: 1rem;
                justify-content: center;
            }
            #game-container {
                gap: 0.9rem;
                max-width: 380px;
            }
            .color-btn {
                border-radius: 18px;
            }
            #game-status {
                flex-direction: column;
                align-items: center;
                gap: 0.5rem;
                padding: 0.7rem 1rem;
                border-radius: 48px;
            }
            .my-text {
                font-size: 0.8rem;
                padding: 0.2rem 0.8rem;
            }
        }

        @media (max-width: 400px) {
            #game-container {
                gap: 0.7rem;
            }
            .color-btn {
                border-radius: 14px;
            }
            h1 {
                margin-bottom: 0.3rem;
            }
            #start-btn {
                padding: 0.6rem 1.5rem;
            }
        }

        /* landscape orientation */
        @media (max-height: 500px) and (orientation: landscape) {
            body {
                padding: 0.5rem;
                flex-direction: row;
                flex-wrap: wrap;
                gap: 1rem;
            }
            h1 {
                font-size: 1.6rem;
                margin: 0;
            }
            #game-container {
                max-width: 320px;
                gap: 0.6rem;
            }
            #game-status {
                flex-direction: row;
                flex-wrap: wrap;
                width: auto;
            }
        }

        /* hide elements initially but animation handled by JS */
        .my-text {
            display: none;
        }
        .my-text.show {
            display: inline-flex;
        }