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
3.1 s
Cost
$0.0016
Output tokens
1,026
Spent thinking
0 tokens
Speed
410.2 tok/s
Console errors
0
First token after
598 ms
First visible text after
598 ms
Prompt tokens
362
Code size
3.4 KB
Finish reason
stop
Served by
Google
Model id
google/gemini-3.1-flash-lite
Reasoning sent
{"effort":"none"}
Max output
65,536 tokens
Generated
Nov 12, 2026

What it was asked

The prompt
“a "like" button in pure CSS, no JavaScript, that does a crazy animation when you click it”
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.html · 129 lines

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>CSS Only Like Button</title>
    <style>
        :root {
            --bg: #1a1a2e;
            --heart: #ff2d55;
            --text: #ffffff;
        }
        body {
            margin: 0;
            padding: 0;
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: 100vh;
            background-color: var(--bg);
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            overflow: hidden;
        }

        /* The "Like" mechanism relies on a checkbox hack */
        #like-checkbox {
            display: none;
        }

        .container {
            position: relative;
            cursor: pointer;
            user-select: none;
        }

        .heart {
            width: 100px;
            height: 100px;
            background: #444;
            display: inline-block;
            position: relative;
            transform: rotate(-45deg);
            transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
            cursor: pointer;
        }

        .heart::before,
        .heart::after {
            content: "";
            width: 100px;
            height: 100px;
            border-radius: 50%;
            background: #444;
            position: absolute;
        }

        .heart::before { top: -50px; left: 0; }
        .heart::after { top: 0; left: 50px; }

        /* Animation Keyframes */
        @keyframes explosion {
            0% { transform: rotate(-45deg) scale(1); }
            30% { transform: rotate(-45deg) scale(1.5); }
            50% { transform: rotate(-45deg) scale(0.8); }
            70% { transform: rotate(-45deg) scale(1.2); }
            100% { transform: rotate(-45deg) scale(1); }
        }

        @keyframes particles {
            0% { opacity: 0; transform: scale(0); }
            50% { opacity: 1; transform: scale(1.5); }
            100% { opacity: 0; transform: scale(2); }
        }

        /* Trigger Animation on Check */
        #like-checkbox:checked + .container .heart {
            background: var(--heart);
            animation: explosion 0.6s ease-out;
        }

        #like-checkbox:checked + .container .heart::before,
        #like-checkbox:checked + .container .heart::after {
            background: var(--heart);
        }

        /* Decorative Particles */
        .particles {
            position: absolute;
            top: 50%;
            left: 50%;
            width: 10px;
            height: 10px;
            opacity: 0;
        }

        #like-checkbox:checked + .container .particles {
            animation: particles 0.8s ease-out;
        }

        .particles::before {
            content: "✦";
            color: gold;
            font-size: 2rem;
            position: absolute;
            left: -50px;
            top: -100px;
        }

        .instruction {
            position: absolute;
            bottom: 20%;
            color: #888;
            font-size: 1.2rem;
            text-align: center;
        }
    </style>
</head>
<body>

    <input type="checkbox" id="like-checkbox">
    <label for="like-checkbox" class="container">
        <div class="heart"></div>
        <div class="particles"></div>
    </label>

    <div class="instruction">Click the heart</div>

</body>
</html>