Models 44

GPT-6 Luna Pro

by OpenAIreasoning defaultClean
Open in new window

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

How it went

Total time
1 min 20 s
Cost
$0.0072
Output tokens
11,865
Spent thinking
4,089 tokens
Speed
798.9 tok/s
Console errors
0
First token after
1 min 5 s
First visible text after
1 min 20 s
Prompt tokens
12,995
Code size
11.0 KB
Finish reason
stop
Served by
OpenAI
Model id
openai/gpt-6-luna-pro
Reasoning sent
model default
Max output
128,000 tokens
Generated
Nov 13, 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 · 393 lines

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>A Like Button in Pure CSS</title>
<style>
  * { box-sizing: border-box; }

  :root {
    color-scheme: dark;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  }

  body {
    margin: 0;
    min-width: 320px;
    min-height: 100vh;
    display: grid;
    place-items: center;
    overflow-x: hidden;
    color: #f8f5ff;
    background:
      radial-gradient(ellipse at 50% 42%, rgba(91, 47, 145, .24), transparent 43%),
      radial-gradient(ellipse at 12% 90%, rgba(28, 99, 133, .12), transparent 35%),
      #100d19;
  }

  body::before,
  body::after {
    content: "";
    position: fixed;
    width: 330px;
    height: 330px;
    border: 1px solid rgba(226, 190, 255, .07);
    border-radius: 50%;
    pointer-events: none;
  }

  body::before { top: -210px; left: -130px; }
  body::after { right: -210px; bottom: -210px; width: 440px; height: 440px; }

  .page {
    width: min(100% - 36px, 690px);
    padding: 34px 24px;
  }

  .card {
    position: relative;
    text-align: center;
    padding: clamp(34px, 7vw, 68px) 22px 38px;
    border: 1px solid rgba(255, 255, 255, .09);
    border-radius: 28px;
    background: linear-gradient(145deg, rgba(35, 27, 49, .94), rgba(23, 19, 33, .96));
    box-shadow: 0 32px 100px rgba(0, 0, 0, .4), inset 0 1px rgba(255,255,255,.05);
    overflow: hidden;
  }

  .card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 18%;
    width: 64%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 173, 232, .7), transparent);
  }

  .eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 8px 12px;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 999px;
    color: #c9bed7;
    background: rgba(255,255,255,.035);
    font-size: 10px;
    font-weight: 750;
    letter-spacing: .17em;
    text-transform: uppercase;
  }

  .eyebrow-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #ff72b6;
    box-shadow: 0 0 12px #ff72b6;
  }

  h1 {
    margin: 26px 0 12px;
    font-size: clamp(34px, 7vw, 54px);
    line-height: 1.06;
    letter-spacing: -.055em;
    font-weight: 760;
  }

  h1 span {
    color: transparent;
    background: linear-gradient(100deg, #ff91c9 5%, #cf9bff 58%, #91caff);
    background-clip: text;
    -webkit-background-clip: text;
  }

  .intro {
    max-width: 410px;
    margin: 0 auto;
    color: #aaa1b8;
    font-size: 15px;
    line-height: 1.7;
  }

  .action-area {
    position: relative;
    margin: 38px auto 0;
    width: fit-content;
    max-width: 100%;
  }

  /* The checkbox is the entire interaction: no JavaScript required. */
  .like-toggle {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    clip-path: inset(50%);
  }

  .like-button {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    width: min(352px, calc(100vw - 76px));
    min-height: 78px;
    padding: 0 23px;
    border: 1px solid rgba(255,255,255,.42);
    border-radius: 20px;
    color: white;
    background: linear-gradient(105deg, #ff4e93, #e747b7 54%, #b24dec);
    box-shadow: 0 12px 34px rgba(224, 61, 160, .28), inset 0 1px rgba(255,255,255,.35);
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    transition: transform .18s ease, filter .2s ease, box-shadow .25s ease, background .35s ease;
  }

  .like-button:hover {
    transform: translateY(-3px) scale(1.015);
    filter: saturate(1.12) brightness(1.08);
    box-shadow: 0 17px 42px rgba(224, 61, 160, .4), inset 0 1px rgba(255,255,255,.4);
  }

  .like-button:active { transform: scale(.97); }

  .like-toggle:focus-visible + .like-button {
    outline: 3px solid #fff;
    outline-offset: 6px;
  }

  .heart {
    position: relative;
    flex: 0 0 23px;
    width: 23px;
    height: 23px;
    color: white;
    background: currentColor;
    transform: rotate(-45deg);
    transition: color .25s ease;
  }

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

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

  .button-copy {
    min-width: 148px;
    font-size: 16px;
    font-weight: 730;
    letter-spacing: -.015em;
    text-align: left;
  }

  .button-copy span { display: block; }
  .copy-liked { display: none !important; }

  .count {
    display: grid;
    place-items: center;
    min-width: 35px;
    height: 35px;
    margin-left: auto;
    padding: 0 9px;
    border: 1px solid rgba(255,255,255,.28);
    border-radius: 11px;
    background: rgba(66, 18, 67, .19);
    font-size: 13px;
    font-weight: 750;
  }

  .count-one { display: none; }

  .burst {
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
  }

  .burst i {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 9px;
    height: 9px;
    border-radius: 2px;
    opacity: 0;
    background: var(--color, #fff);
  }

  .burst i:nth-child(3n) { border-radius: 50%; width: 7px; height: 7px; }
  .burst i:nth-child(4n) { width: 5px; height: 13px; border-radius: 4px; }

  .like-button::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: -2px;
    border: 2px solid rgba(255, 151, 215, .9);
    border-radius: 22px;
    opacity: 0;
    pointer-events: none;
  }

  .like-toggle:checked + .like-button {
    background: linear-gradient(105deg, #d948a6, #a64de1 58%, #7d61ec);
    box-shadow: 0 14px 42px rgba(166, 74, 218, .4), inset 0 1px rgba(255,255,255,.36);
    animation: button-chaos .72s cubic-bezier(.2,.8,.25,1);
  }

  .like-toggle:checked + .like-button .heart {
    color: #fff4fb;
    animation: heart-chaos .86s cubic-bezier(.2,.9,.25,1);
  }

  .like-toggle:checked + .like-button::before {
    animation: ring-pop .62s ease-out;
  }

  .like-toggle:checked + .like-button .burst i {
    animation: scatter .82s cubic-bezier(.15,.7,.25,1) both;
    animation-delay: var(--delay, 0s);
  }

  .like-toggle:checked + .like-button .copy-idle { display: none; }
  .like-toggle:checked + .like-button .copy-liked { display: block !important; }
  .like-toggle:checked + .like-button .count-zero { display: none; }
  .like-toggle:checked + .like-button .count-one { display: block; }

  .hint {
    margin: 18px 0 0;
    color: #898096;
    font-size: 12px;
    letter-spacing: .025em;
  }

  .hint strong { color: #c8b9d6; font-weight: 600; }

  .footnote {
    margin: 40px 0 0;
    color: #716a7e;
    font-size: 11px;
    letter-spacing: .12em;
    text-transform: uppercase;
  }

  .footnote span { color: #b991d5; }

  @keyframes heart-chaos {
    0%   { transform: rotate(-45deg) scale(1); }
    17%  { transform: rotate(28deg) scale(1.55); }
    33%  { transform: rotate(-75deg) scale(.78); }
    49%  { transform: rotate(34deg) scale(1.42); }
    66%  { transform: rotate(-58deg) scale(.93); }
    82%  { transform: rotate(-31deg) scale(1.2); }
    100% { transform: rotate(-45deg) scale(1); }
  }

  @keyframes button-chaos {
    0%   { transform: scale(1) rotate(0); }
    13%  { transform: scale(.9) rotate(-3deg); }
    27%  { transform: scale(1.09) rotate(2deg); }
    42%  { transform: scale(.96) rotate(-1.5deg); }
    59%  { transform: scale(1.045) rotate(1deg); }
    75%  { transform: scale(.99) rotate(-.5deg); }
    100% { transform: scale(1) rotate(0); }
  }

  @keyframes ring-pop {
    0% { opacity: .9; transform: scale(.88); }
    100% { opacity: 0; transform: scale(1.22); }
  }

  @keyframes scatter {
    0% {
      opacity: 0;
      transform: translate(-50%, -50%) scale(.25) rotate(0);
    }
    16% { opacity: 1; }
    100% {
      opacity: 0;
      transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y))) scale(0) rotate(var(--spin, 180deg));
    }
  }

  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; }
    .like-toggle:checked + .like-button,
    .like-toggle:checked + .like-button .heart,
    .like-toggle:checked + .like-button::before,
    .like-toggle:checked + .like-button .burst i { animation-duration: .01ms; }
  }

  @media (max-width: 480px) {
    .page { width: calc(100% - 24px); padding: 20px 0; }
    .card { border-radius: 23px; padding-top: 38px; padding-bottom: 31px; }
    .intro { font-size: 14px; }
    .action-area { margin-top: 31px; }
    .like-button { min-height: 72px; gap: 12px; padding: 0 17px; }
    .button-copy { min-width: 132px; font-size: 15px; }
    .footnote { margin-top: 32px; }
  }
</style>
</head>
<body>
  <main class="page">
    <section class="card" aria-labelledby="title">
      <div class="eyebrow"><span class="eyebrow-dot"></span> CSS only · zero JavaScript</div>
      <h1 id="title">A tiny click.<br><span>An unreasonable amount of love.</span></h1>
      <p class="intro">One little like button, powered entirely by a checkbox and an absolutely over-the-top animation.</p>

      <div class="action-area">
        <input class="like-toggle" type="checkbox" id="like-toggle">
        <label class="like-button" for="like-toggle">
          <span class="burst" aria-hidden="true">
            <i style="--x:-104px;--y:-51px;--color:#ffd166;--spin:210deg;--delay:.01s"></i>
            <i style="--x:-83px;--y:-83px;--color:#fff;--spin:-160deg;--delay:.04s"></i>
            <i style="--x:-40px;--y:-105px;--color:#ff86c5;--spin:220deg;--delay:.02s"></i>
            <i style="--x:8px;--y:-112px;--color:#b8f3ff;--spin:-220deg;--delay:.06s"></i>
            <i style="--x:59px;--y:-94px;--color:#ffd166;--spin:180deg;--delay:.03s"></i>
            <i style="--x:101px;--y:-56px;--color:#fff;--spin:-180deg;--delay:.08s"></i>
            <i style="--x:112px;--y:-5px;--color:#ff86c5;--spin:220deg;--delay:.05s"></i>
            <i style="--x:93px;--y:53px;--color:#b8f3ff;--spin:-220deg;--delay:.02s"></i>
            <i style="--x:48px;--y:94px;--color:#ffd166;--spin:190deg;--delay:.07s"></i>
            <i style="--x:-4px;--y:108px;--color:#fff;--spin:-190deg;--delay:.04s"></i>
            <i style="--x:-59px;--y:89px;--color:#ff86c5;--spin:220deg;--delay:.01s"></i>
            <i style="--x:-102px;--y:45px;--color:#b8f3ff;--spin:-200deg;--delay:.06s"></i>
          </span>
          <span class="heart" aria-hidden="true"></span>
          <span class="button-copy">
            <span class="copy-idle">Give it a like</span>
            <span class="copy-liked">You liked it!</span>
          </span>
          <span class="count" aria-hidden="true">
            <span class="count-zero">0</span>
            <span class="count-one">1</span>
          </span>
        </label>
      </div>

      <p class="hint"><strong>Click to unleash the chaos.</strong> Click again to undo.</p>
      <p class="footnote">Made with <span>♥</span> &amp; CSS</p>
    </section>
  </main>
</body>
</html>
Reasoning trace (4,089 tokens)
**Evaluating CSS button design**

I'm thinking about creating a heart icon using CSS by combining two circles and a rotated square or just using a heart glyph. I'll incorporate a button with a heart character and add ornamental burst particles with child spans. For interaction, I want a checkbox label to toggle and animate when checked, with fun effects like squishing buttons, floating confetti, and bursts. I need to ensure the animations are layered properly, using CSS properties for positioning and effects.**Clarifying checkbox logic**

I'm considering how to structure the checkbox logic. I don't want to imply any metric, so I might just use a simple counter where it starts at "0" and switches to "1" when checked. This way, I can keep the logic straightforward and easy to understand, ensuring it operates smoothly without any confusion for the user. It seems like a clean approach for tracking the checkbox state!**Refining UI elements**

I'm working on a more refined UI featuring a counter pill on the right, while keeping the current dimensions in mind. The button should be resized to 290 x 88, with a label showing a heart and the number pill. I also need to ensure the button is centered. Additionally, I want to address the text to uncheck "Liked!" so that it only appears when it's checked. There’s definitely a lot to consider here!**Designing CSS Layouts**

I’m thinking about how to create a user interface purely with CSS. Showing social metrics could seem arbitrary, but perhaps displaying a "like" count from 0 to 1 makes sense on the card. I want to ensure the button text changes dynamically, also labeling the layout with icons. I’m considering using a bright style and a gradient for the card title, and I need to calculate widths effectively at different breakpoints. Overall, I need to ensure this functions without any JavaScript.**Configuring Particle Layouts**

I'm designing a particle layout, considering a base width and height of 8 pixels, centered in the viewport. I’m thinking about the button width, using either a max width based on the viewport or a specific width for mobile. To enhance the card, I want to add decorative elements like a title and subtitle. I envision a detailed title with two lines. Plus, I want the button to be prominent and include CSS animations triggered by clicks, along with a glowing effect and various layering techniques for depth.