Models 44

Gemini 3.1 Flash Lite

by GoogleReasoningClean
Open in new window

Running live in a sandboxed frame. Click inside it before using the keyboard.

How it went

Total time
17.1 s
Cost
$0.0085
Output tokens
5,610
Spent thinking
4,117 tokens
Speed
349.9 tok/s
Console errors
0
First token after
1.0 s
First visible text after
13.6 s
Prompt tokens
353
Code size
4.2 KB
Finish reason
stop
Served by
Google
Model id
google/gemini-3.1-flash-lite
Reasoning sent
{"effort":"high"}
Max output
65,536 tokens
Generated
Nov 12, 2026

What it was asked

The prompt
“draw me an SVG of an astronaut cat skateboarding on the moon”
System prompt, sent with every prompt
You are generating a self-contained web demo. It will be rendered automatically in a sandboxed iframe and compared side by side with the output of other AI models given the exact same task.

Output rules:
- Reply with exactly ONE fenced code block containing the complete file: ```html (or ```svg when the task asks for an SVG). No text before or after the code block.
- Everything must be inline: CSS in <style>, JavaScript in <script>. No external files, images, fonts or network requests, except the CDN URLs explicitly allowed by the task.
- Do not use localStorage, sessionStorage, cookies, IndexedDB, alert(), confirm(), prompt() or window.open(): they are blocked in the sandbox and will throw.
- The page must look right in a 1280×800 viewport and adapt gracefully down to 375px wide. No horizontal scrollbar.
- Something meaningful must be visible on first paint: a screenshot is taken automatically about 3 seconds after load, without any interaction.
- Everything that makes the demo interesting must be visible within the first seconds: nothing hidden behind a high score, a later level or a long play session.
- Games must start in a self-playing demo mode (a simple AI plays) behind a "Click or press a key to start" message, so the game can be judged in action without playing.
- The iframe only receives keyboard events after the user clicks it: if the demo uses the keyboard, display a clear "Click or press a key to start" message.
- The code must run with zero errors in the console of the latest Chrome.

Code run-1.svg · 144 lines

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Astronaut Cat Skateboarding</title>
    <style>
        body {
            margin: 0;
            padding: 0;
            width: 100%;
            height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
            background: #050510;
            overflow: hidden;
            font-family: sans-serif;
        }

        #game-container {
            position: relative;
            width: 100%;
            max-width: 800px;
        }

        svg {
            width: 100%;
            height: auto;
            display: block;
        }

        #overlay {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            background: rgba(0, 0, 0, 0.4);
            color: white;
            font-size: 1.5rem;
            cursor: pointer;
            z-index: 10;
            text-align: center;
            transition: opacity 0.5s;
        }

        .cat-group {
            animation: ride 6s linear infinite;
        }

        .wheel {
            transform-origin: center;
            transform-box: fill-box;
            animation: spin 1s linear infinite;
        }

        @keyframes ride {
            0% { transform: translateX(-150px); }
            100% { transform: translateX(850px); }
        }

        @keyframes spin {
            from { transform: rotate(0deg); }
            to { transform: rotate(360deg); }
        }

        .jump {
            animation: jump 0.5s ease-in-out;
        }

        @keyframes jump {
            0%, 100% { transform: translateY(0); }
            50% { transform: translateY(-50px); }
        }
    </style>
</head>
<body>

<div id="game-container">
    <div id="overlay">Click or press any key to jump</div>
    
    <svg viewBox="0 0 800 400" id="scene">
        <!-- Background Stars -->
        <circle cx="50" cy="50" r="1.5" fill="white" />
        <circle cx="200" cy="80" r="2" fill="white" />
        <circle cx="450" cy="40" r="1" fill="white" />
        <circle cx="700" cy="100" r="2" fill="white" />
        <circle cx="150" cy="200" r="1.5" fill="white" />
        <circle cx="600" cy="250" r="1" fill="white" />
        <circle cx="350" cy="300" r="2" fill="white" />

        <!-- Moon Surface -->
        <path d="M 0 350 Q 400 300 800 350 L 800 400 L 0 400 Z" fill="#4a4a55" />
        <circle cx="100" cy="370" r="30" fill="#3a3a45" />
        <circle cx="500" cy="390" r="50" fill="#3a3a45" />
        <circle cx="750" cy="360" r="40" fill="#3a3a45" />

        <!-- Astronaut Cat -->
        <g id="cat" class="cat-group" transform="translate(100, 200)">
            <!-- Helmet -->
            <circle cx="50" cy="30" r="30" fill="#e0e0e0" />
            <circle cx="50" cy="30" r="22" fill="#88ccee" opacity="0.6" />
            <!-- Ears -->
            <polygon points="25,10 40,0 55,10" fill="#e0e0e0" />
            <polygon points="45,10 60,0 75,10" fill="#e0e0e0" />
            <!-- Suit -->
            <rect x="30" y="55" width="40" height="50" rx="10" fill="#ffffff" />
            <!-- Tail -->
            <path d="M 70 80 Q 90 60 90 90" fill="none" stroke="#e0e0e0" stroke-width="5" />
            <!-- Skateboard -->
            <rect x="10" y="105" width="80" height="10" rx="5" fill="#333" />
            <!-- Wheels -->
            <circle class="wheel" cx="25" cy="120" r="8" fill="#555" />
            <circle class="wheel" cx="75" cy="120" r="8" fill="#555" />
        </g>
    </svg>
</div>

<script>
    const overlay = document.getElementById('overlay');
    const cat = document.getElementById('cat');

    function jump() {
        if (cat.classList.contains('jump')) return;
        cat.classList.add('jump');
        setTimeout(() => cat.classList.remove('jump'), 500);
    }

    function start() {
        overlay.style.opacity = '0';
        setTimeout(() => overlay.style.display = 'none', 500);
        jump();
    }

    document.addEventListener('keydown', start);
    overlay.addEventListener('click', start);
</script>

</body>
</html>
Reasoning trace (4,117 tokens)
**Conceptualizing Cosmic Feline Ride**

I'm focusing on visualizing this cosmic cat's epic skateboarding session. The moon's desolate beauty will be the backdrop, with Earth a distant, watchful presence. I'm picturing the dynamic movement of the cat, the lunar dust kicking up, and the overall vibrant energy of the scene.

**Defining Cosmic Cat's Motion**

I'm now concentrating on bringing the astronaut cat to life, specifically its skateboarding action across the lunar landscape. I’ll be using SVG's animation capabilities to create a smooth, self-playing demo, focusing on the cat's movement and the spinning wheels.

**Animating Lunar Skateboarding**

I'm solidifying the animation details for the astronaut cat's lunar skateboarding. The focus is on a self-playing sequence, treating the "demo" as an immediate animation rather than a game loop, and I'll incorporate a "Click to reset" if interaction becomes necessary.

**Developing Cat-Astronaut Interaction**

I'm now refining the interactive elements for the cat-astronaut. Considering it's not a traditional game, I'm planning a "Click to start" prompt before initiating the self-playing animation of the cat riding across the screen, with spinning wheels.

**Implementing Interactivity**

I'm integrating the required "Click or press a key to start" overlay. The core animation of the cat skateboarding will play automatically once initiated, featuring spinning wheels and a dynamic lunar ride. I'm also solidifying the SVG composition and CSS keyframes for a responsive and visually engaging experience.

**Defining Start Overlay**

I'm implementing the "Click or press a key to start" overlay. The core animation will be running continuously in the background, and this overlay will simply pause the perception until activated by user input.

**Clarifying Demo Mode**

I'm revisiting the "self-playing demo mode" concept. It appears the intention is for the animation to play continuously, but be visually obstructed by an overlay until user interaction uncovers it, rather than being truly "behind" it. This impacts how the script will manage the animation's state.

**Refining Overlay Logic**

I'm solidifying how the "Click to start" message interacts with the background animation. It seems the intention is for the animation to be visible even with the overlay, perhaps through transparency, rather than completely hidden. I'll ensure the user can see the cat's ride while waiting for their input.

**Structuring Lunar Cat Animation**

I'm integrating the core SVG elements for the astronaut cat and its skateboard, alongside the moon background. I'm adjusting dimensions and positioning within the `viewBox` to ensure scalability and immediate visual appeal. The foundation for a self-playing, responsive animation is taking shape.

**Incorporating Visual Enhancements**

I'm now focusing on enriching the visual aesthetic by incorporating random star-like circles in the dark background, adding craters to the moon's surface, and giving the astronaut cat a distinct tail. This aims to elevate the overall scene's richness and depth while ensuring the core animation remains clear and loops seamlessly.

**Enhancing Scene Details**

I'm now focusing on adding visual flair. This includes introducing random stars to the background, texturing the moon with craters, and giving the astronaut cat a distinct tail for better characterization, ensuring the core animation remains fluid and loop-ready.

**Centering Animation Elements**

I'm ensuring the cat's skateboarding animation, including spinning wheels and the responsive SVG scaling, is perfectly centered within the viewport. I've applied `width: 100%; height: auto;` to the SVG to handle graceful adaptation across various screen sizes, making the lunar ride a focal point.

**Refining Cat's Appearance**

I'm now focusing on small but impactful details for the astronaut cat: adding subtle ears, defining its eyes within the helmet, and sketching in whiskers. I'm also consolidating the CSS for the main container to ensure the SVG scales and centers effectively, making the overall presentation more polished.

**Finalizing Animation Details**

I'm completing the technical aspects of the animation. The cat is grouped for movement, and its wheels are set to spin via CSS keyframes with the correct `transform-origin` and `transform-box`. I've confirmed the "self-playing demo" approach aligns with the project's intent.

Raw response
```html
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Astronaut Cat Skateboarding</title>
    <style>
        body {
            margin: 0;
            padding: 0;
            width: 100%;
            height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
            background: #050510;
            overflow: hidden;
            font-family: sans-serif;
        }

        #game-container {
            position: relative;
            width: 100%;
            max-width: 800px;
        }

        svg {
            width: 100%;
            height: auto;
            display: block;
        }

        #overlay {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            background: rgba(0, 0, 0, 0.4);
            color: white;
            font-size: 1.5rem;
            cursor: pointer;
            z-index: 10;
            text-align: center;
            transition: opacity 0.5s;
        }

        .cat-group {
            animation: ride 6s linear infinite;
        }

        .wheel {
            transform-origin: center;
            transform-box: fill-box;
            animation: spin 1s linear infinite;
        }

        @keyframes ride {
            0% { transform: translateX(-150px); }
            100% { transform: translateX(850px); }
        }

        @keyframes spin {
            from { transform: rotate(0deg); }
            to { transform: rotate(360deg); }
        }

        .jump {
            animation: jump 0.5s ease-in-out;
        }

        @keyframes jump {
            0%, 100% { transform: translateY(0); }
            50% { transform: translateY(-50px); }
        }
    </style>
</head>
<body>

<div id="game-container">
    <div id="overlay">Click or press any key to jump</div>
    
    <svg viewBox="0 0 800 400" id="scene">
        <!-- Background Stars -->
        <circle cx="50" cy="50" r="1.5" fill="white" />
        <circle cx="200" cy="80" r="2" fill="white" />
        <circle cx="450" cy="40" r="1" fill="white" />
        <circle cx="700" cy="100" r="2" fill="white" />
        <circle cx="150" cy="200" r="1.5" fill="white" />
        <circle cx="600" cy="250" r="1" fill="white" />
        <circle cx="350" cy="300" r="2" fill="white" />

        <!-- Moon Surface -->
        <path d="M 0 350 Q 400 300 800 350 L 800 400 L 0 400 Z" fill="#4a4a55" />
        <circle cx="100" cy="370" r="30" fill="#3a3a45" />
        <circle cx="500" cy="390" r="50" fill="#3a3a45" />
        <circle cx="750" cy="360" r="40" fill="#3a3a45" />

        <!-- Astronaut Cat -->
        <g id="cat" class="cat-group" transform="translate(100, 200)">
            <!-- Helmet -->
            <circle cx="50" cy="30" r="30" fill="#e0e0e0" />
            <circle cx="50" cy="30" r="22" fill="#88ccee" opacity="0.6" />
            <!-- Ears -->
            <polygon points="25,10 40,0 55,10" fill="#e0e0e0" />
            <polygon points="45,10 60,0 75,10" fill="#e0e0e0" />
            <!-- Suit -->
            <rect x="30" y="55" width="40" height="50" rx="10" fill="#ffffff" />
            <!-- Tail -->
            <path d="M 70 80 Q 90 60 90 90" fill="none" stroke="#e0e0e0" stroke-width="5" />
            <!-- Skateboard -->
            <rect x="10" y="105" width="80" height="10" rx="5" fill="#333" />
            <!-- Wheels -->
            <circle class="wheel" cx="25" cy="120" r="8" fill="#555" />
            <circle class="wheel" cx="75" cy="120" r="8" fill="#555" />
        </g>
    </svg>
</div>

<script>
    const overlay = document.getElementById('overlay');
    const cat = document.getElementById('cat');

    function jump() {
        if (cat.classList.contains('jump')) return;
        cat.classList.add('jump');
        setTimeout(() => cat.classList.remove('jump'), 500);
    }

    function start() {
        overlay.style.opacity = '0';
        setTimeout(() => overlay.style.display = 'none', 500);
        jump();
    }

    document.addEventListener('keydown', start);
    overlay.addEventListener('click', start);
</script>

</body>
</html>
```