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
4.3 s
Cost
$0.0023
Output tokens
1,485
Spent thinking
124 tokens
Speed
463.4 tok/s
Console errors
0
First token after
1.0 s
First visible text after
1.0 s
Prompt tokens
362
Code size
4.3 KB
Finish reason
stop
Served by
Google
Model id
google/gemini-3.1-flash-lite
Reasoning sent
{"effort":"low"}
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 · 149 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 Crazy Like Button</title>
    <style>
        :root {
            --bg-color: #f0f2f5;
            --heart-color: #ff4757;
            --heart-bg: #e1e1e1;
        }

        body {
            margin: 0;
            padding: 0;
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
            background-color: var(--bg-color);
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        }

        .container {
            text-align: center;
        }

        /* The hidden checkbox hack is the only way to do "state" without JS */
        #like-toggle {
            display: none;
        }

        .like-wrapper {
            position: relative;
            cursor: pointer;
            width: 100px;
            height: 100px;
            display: flex;
            justify-content: center;
            align-items: center;
        }

        /* The Heart Icon structure */
        .heart {
            width: 50px;
            height: 50px;
            background-color: var(--heart-bg);
            display: inline-block;
            position: relative;
            transform: rotate(-45deg) scale(1);
            transition: background-color 0.3s ease;
        }

        .heart::before,
        .heart::after {
            content: '';
            width: 50px;
            height: 50px;
            background-color: var(--heart-bg);
            border-radius: 50%;
            position: absolute;
            transition: background-color 0.3s ease;
        }

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

        /* The "Crazy Animation" */
        @keyframes crazy-burst {
            0% { transform: rotate(-45deg) scale(1); }
            15% { transform: rotate(-45deg) scale(1.6); }
            30% { transform: rotate(-45deg) scale(0.8); }
            45% { transform: rotate(-45deg) scale(1.4); }
            60% { transform: rotate(-45deg) scale(0.9); }
            75% { transform: rotate(-45deg) scale(1.2); }
            100% { transform: rotate(-45deg) scale(1); }
        }

        @keyframes confetti {
            0% { transform: translateY(0) scale(1); opacity: 1; }
            100% { transform: translateY(-100px) scale(0); opacity: 0; }
        }

        /* Particles */
        .particle {
            position: absolute;
            width: 8px;
            height: 8px;
            background: #ffda79;
            border-radius: 50%;
            opacity: 0;
            pointer-events: none;
        }

        /* Trigger Animation on check */
        #like-toggle:checked + .like-wrapper .heart {
            background-color: var(--heart-color);
            animation: crazy-burst 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        }

        #like-toggle:checked + .like-wrapper .heart::before,
        #like-toggle:checked + .like-wrapper .heart::after {
            background-color: var(--heart-color);
        }

        /* Generate particles when clicked */
        #like-toggle:checked + .like-wrapper .particle {
            animation: confetti 0.8s ease-out forwards;
        }

        .p1 { top: -20px; left: 50%; animation-delay: 0.1s; }
        .p2 { top: 20px; left: 100%; animation-delay: 0.2s; }
        .p3 { top: 80px; left: 80%; animation-delay: 0.15s; }
        .p4 { top: 80px; left: 20%; animation-delay: 0.25s; }
        .p5 { top: 20px; left: -20px; animation-delay: 0.1s; }

        label {
            cursor: pointer;
            user-select: none;
        }

        h1 {
            color: #555;
            margin-bottom: 20px;
            font-size: 1.2rem;
            opacity: 0.7;
        }
    </style>
</head>
<body>

    <div class="container">
        <h1>Click the heart to explode!</h1>
        
        <input type="checkbox" id="like-toggle">
        <label for="like-toggle" class="like-wrapper">
            <div class="heart">
                <div class="particle p1"></div>
                <div class="particle p2"></div>
                <div class="particle p3"></div>
                <div class="particle p4"></div>
                <div class="particle p5"></div>
            </div>
        </label>
    </div>

</body>
</html>