Models 44

gpt-oss-120b

by OpenAIReasoningClean
Open in new window

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

How it went

Total time
7.6 s
Cost
$0.0005
Output tokens
1,860
Spent thinking
1,029 tokens
Speed
260 tok/s
Console errors
0
First token after
423 ms
First visible text after
3.9 s
Prompt tokens
420
Code size
2.7 KB
Finish reason
stop
Served by
Crusoe
Model id
openai/gpt-oss-120b
Reasoning sent
{"effort":"medium"}
Max output
64,000 tokens
Generated
Nov 11, 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 · 101 lines

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Pure‑CSS Like Button</title>
<style>
  body{
    display:flex;
    justify-content:center;
    align-items:center;
    height:100vh;
    margin:0;
    background:#fafafa;
    font-family:sans-serif;
  }
  .like{
    position:relative;
    width:80px;
    height:80px;
  }
  .like input{
    position:absolute;
    width:0;
    height:0;
    opacity:0;
    pointer-events:none;
  }
  .like label{
    display:block;
    width:100%;
    height:100%;
    cursor:pointer;
    user-select:none;
  }
  .heart{
    width:100%;
    height:100%;
    fill:#bbb;
    transition:fill .2s;
    transform-origin:center;
  }
  /* Sparks */
  .spark{
    position:absolute;
    left:50%; top:50%;
    width:8px; height:8px;
    background:#e74c3c;
    border-radius:50%;
    opacity:0;
    transform:translate(-50%,-50%) scale(0);
  }
  .like input:checked + label .heart{
    fill:#e74c3c;
    animation:pop 0.5s ease-out forwards;
  }
  .like input:checked + label .spark{
    animation:burst 0.6s ease-out forwards;
  }
  .spark:nth-child(1){ animation-delay:.05s; transform:translate(-50%,-50%) rotate(0deg)   translateY(-30px);}
  .spark:nth-child(2){ animation-delay:.10s; transform:translate(-50%,-50%) rotate(72deg)  translateY(-30px);}
  .spark:nth-child(3){ animation-delay:.15s; transform:translate(-50%,-50%) rotate(144deg) translateY(-30px);}
  .spark:nth-child(4){ animation-delay:.20s; transform:translate(-50%,-50%) rotate(216deg) translateY(-30px);}
  .spark:nth-child(5){ animation-delay:.25s; transform:translate(-50%,-50%) rotate(288deg) translateY(-30px);}

  @keyframes pop{
    0%   { transform:scale(0);}
    40%  { transform:scale(1.5);}
    70%  { transform:scale(.9);}
    100% { transform:scale(1);}
  }
  @keyframes burst{
    0%   { opacity:1; transform:translate(-50%,-50%) scale(0);}
    60%  { opacity:1; transform:translate(-50%,-50%) scale(1);}
    100% { opacity:0; transform:translate(-50%,-50%) scale(0);}
  }

  /* Responsive scaling */
  @media (max-width:500px){
    .like{ width:60px; height:60px;}
  }
</style>
</head>
<body>
  <div class="like">
    <input type="checkbox" id="likeToggle">
    <label for="likeToggle">
      <svg viewBox="0 0 24 24" class="heart">
        <path d="M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 
                 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 
                 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 
                 11.54L12 21.35z"/>
      </svg>
      <span class="spark"></span>
      <span class="spark"></span>
      <span class="spark"></span>
      <span class="spark"></span>
      <span class="spark"></span>
    </label>
  </div>
</body>
</html>
Reasoning trace (1,029 tokens)
The task: create a "like" button in pure CSS, no JavaScript, that does a crazy animation when you click it. Must output HTML code with CSS inline, no JS. Must be self-contained. Should be visible on first paint. Use a button that toggles state on click using :checked pseudo-class on a hidden checkbox. Use CSS animation for hearts or explosions.

We can make a like button using a checkbox input hidden, label with heart icon (maybe using Unicode or an SVG). When checked, apply animation: e.g., scaling, rotating, color change, and some sparkles using pseudo-elements with keyframe animation.

We need to ensure it's pure CSS, no external fonts—can use Unicode heart (❤️) or create using CSS shapes. Simpler: use a label with a heart shape via CSS using :before/:after. We'll do an input type=checkbox id=like hidden; label for=like class=like-button. We'll style the label to show a heart shape using CSS, maybe as a simple shape: using Clip-path?? But we can also use an inline SVG inside label, and animate its fill and transform. SVG is allowed.

We'll embed an SVG heart (path) inside label. Styling: when input:checked + label, apply .liked pseudo-classes. Use ::before and ::after for particles.

Implement animation: on checking (like), trigger keyframes for scaling up and then down with bounce, plus maybe rotate. Use animation on :checked + label .heart.

But since we need the animation only on click, we can use CSS animation that triggers when the checkbox becomes checked using animation property, but it will only run once when state changes; but after unchecking, you need to reset? But we want a like (maybe toggle). Could use toggle; but could also use :active pseudo-class for a quick effect. However they want "crazy animation when you click it". We can animate on :checked, using animation: pop 0.6s ease-out forwards; the animation runs each time the state transitions from unchecked to checked. After unchecked, you could have another animation? But it's okay.

Simplify: clicking toggles, but only animate when going to checked. Use .like-input:checked + .like-label .heart { animation: explode 0.8s forwards; } Also have pseudo-elements particles using keyframes that animate and then disappear.

We'll also include a "like count" maybe.

Make sure everything is visible on first paint. We'll show a heart button with message.

We'll produce HTML: <div class="like-container"><input type="checkbox" id="like" class="like-input"><label for="like" class="like-label"><svg ... class="heart"...></svg></label></div>

Add style to hide input visually.

Define CSS: .like-label { cursor:pointer; display:inline-block; width:80px; height:80px; position:relative; } .heart { fill:#ccc; transition: fill .2s; transform-origin:center; } .like-input:checked + .like-label .heart { fill:#e74c3c; animation: pop 0.5s ease-out forwards; } .like-input:checked + .like-label::before, ::after for sparks.

Define keyframes pop: 0% { transform:scale(0); } 50% { transform:scale(1.4); } 100% { transform:scale(1); }

Define sparkles as ::before and ::after with small circles that appear from center with rotation and fade.

Simpler: create multiple particles using multiple pseudo-elements with multiple layers using :before and :after with multiple radial gradients? Hard.

Alternative: we can embed multiple small divs with class .spark that become visible on :checked using adjacent sibling combinator and CSS animation with delay and transform. But we need to have them present in HTML, but hidden initially; they become animated when input:checked. That's pure CSS.

Simplify: Add 5 <span class="spark"></span> inside label. They are positioned absolute at center, small circles with background color. When input:checked + label .spark { animation: burst 0.6s forwards; } Also use nth-child to vary direction.

Implement.

Make the container responsive - center.

Make no JS.

Now create final output: HTML with inline CSS. Ensure width responsive: use max-width.

Will be visible on first paint: button heart visible.

Now craft final code block.