Models 44

Claude Opus 5.5

by Anthropicreasoning 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 9 s
Cost
$0.170
Output tokens
8,335
Spent thinking
1,642 tokens
Speed
127.4 tok/s
Console errors
0
First token after
3.7 s
First visible text after
20.5 s
Prompt tokens
780
Code size
13.9 KB
Finish reason
stop
Served by
Claude Platform on AWS
Model id
anthropic/claude-opus-5.5
Reasoning sent
model default
Max output
128,000 tokens
Generated
Nov 12, 2026

What it was asked

The prompt
Create a set of four animated weather cards (sunny, rainy, snowy, stormy), made with HTML and CSS only. Requirements: - Absolutely no JavaScript: the file must not contain any <script> tag or inline event handler. - No images, no SVG, no icon fonts: every weather icon is built from HTML elements and pseudo-elements styled with CSS. - Each card shows an animated icon (rotating sun rays, falling rain drops, drifting snowflakes, flashing lightning), a city name, a temperature and a short description. - Each card has its own background gradient matching the weather. - The cards are displayed in a responsive grid (4 per row on desktop, stacked on mobile) and lift up on hover. - Smooth infinite animations using @keyframes, and respect prefers-reduced-motion.
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 · 375 lines

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Animated Weather Cards — Pure CSS</title>
<style>
  *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

  body {
    min-height: 100vh;
    font-family: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
    background: radial-gradient(circle at 20% 0%, #26304d 0%, #12162a 55%, #0b0d1a 100%);
    color: #fff;
    padding: 40px 24px 48px;
    overflow-x: hidden;
  }

  header { text-align: center; margin-bottom: 36px; }
  header h1 { font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 700; letter-spacing: .5px; }
  header p { margin-top: 8px; color: #a9b3d6; font-size: .95rem; }

  .grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
    max-width: 1220px;
    margin: 0 auto;
  }
  @media (max-width: 1024px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
  @media (max-width: 600px)  { .grid { grid-template-columns: 1fr; max-width: 380px; } }

  /* ---------- CARD ---------- */
  .card {
    position: relative;
    overflow: hidden;
    border-radius: 26px;
    padding: 22px 22px 20px;
    min-height: 410px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 14px 30px rgba(0,0,0,.35);
    transition: transform .4s cubic-bezier(.2,.8,.3,1.2), box-shadow .4s ease;
    isolation: isolate;
  }
  .card:hover {
    transform: translateY(-12px);
    box-shadow: 0 28px 50px rgba(0,0,0,.5);
  }
  .card::before {           /* soft glossy highlight */
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, rgba(255,255,255,.22) 0%, rgba(255,255,255,0) 45%);
    z-index: -1;
    pointer-events: none;
  }

  .sunny  { background: linear-gradient(165deg, #ffb347 0%, #ff8a3d 40%, #f0567a 100%); }
  .rainy  { background: linear-gradient(165deg, #5f7fa8 0%, #3d5579 50%, #22324f 100%); }
  .snowy  { background: linear-gradient(165deg, #a8d8f5 0%, #6fa8dc 50%, #4a74b8 100%); }
  .stormy { background: linear-gradient(165deg, #4b3f72 0%, #2b2446 50%, #15122a 100%); }

  .top {
    display: flex; justify-content: space-between; align-items: center;
    font-size: .8rem; letter-spacing: 1.5px; text-transform: uppercase;
    opacity: .85;
  }
  .badge {
    padding: 4px 10px; border-radius: 999px;
    background: rgba(255,255,255,.2);
    backdrop-filter: blur(4px);
  }

  .icon {
    position: relative;
    width: 180px;
    height: 165px;
    margin: 12px auto 6px;
  }

  .info { margin-top: auto; }
  .city { font-size: 1.35rem; font-weight: 600; }
  .temp {
    font-size: 3.6rem; font-weight: 200; line-height: 1.05; margin: 2px 0;
  }
  .temp sup { font-size: 1.4rem; vertical-align: super; font-weight: 400; }
  .desc { font-size: .95rem; opacity: .9; }

  .stats {
    display: flex; justify-content: space-between;
    margin-top: 16px; padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,.25);
    font-size: .75rem;
  }
  .stats div { text-align: center; flex: 1; }
  .stats b { display: block; font-size: .95rem; font-weight: 600; margin-bottom: 2px; }
  .stats span { opacity: .75; }

  /* ---------- SUN ---------- */
  .sun, .rays {
    position: absolute; left: 50%; top: 50%;
    border-radius: 50%;
    transform: translate(-50%, -50%);
  }
  .rays {
    width: 156px; height: 156px;
    background: repeating-conic-gradient(from 0deg, #ffe680 0deg 9deg, transparent 9deg 30deg);
    -webkit-mask: radial-gradient(circle, transparent 0 50px, #000 52px 72px, transparent 74px);
            mask: radial-gradient(circle, transparent 0 50px, #000 52px 72px, transparent 74px);
    animation: spin 14s linear infinite;
  }
  .rays.inner {
    width: 130px; height: 130px;
    background: repeating-conic-gradient(from 15deg, rgba(255,250,200,.8) 0deg 5deg, transparent 5deg 30deg);
    -webkit-mask: radial-gradient(circle, transparent 0 48px, #000 50px 60px, transparent 62px);
            mask: radial-gradient(circle, transparent 0 48px, #000 50px 60px, transparent 62px);
    animation: spin 9s linear infinite reverse;
  }
  .sun {
    width: 86px; height: 86px;
    background: radial-gradient(circle at 35% 35%, #fffbe0 0%, #ffe14d 45%, #ffae1a 100%);
    box-shadow: 0 0 30px 8px rgba(255,220,90,.7), 0 0 70px 20px rgba(255,170,60,.4);
    animation: pulse 3s ease-in-out infinite;
  }

  @keyframes spin { to { transform: translate(-50%, -50%) rotate(360deg); } }
  @keyframes pulse {
    0%,100% { box-shadow: 0 0 30px 8px rgba(255,220,90,.7), 0 0 70px 20px rgba(255,170,60,.4); }
    50%     { box-shadow: 0 0 40px 14px rgba(255,230,120,.85), 0 0 90px 30px rgba(255,170,60,.5); }
  }

  /* ---------- CLOUD ---------- */
  .cloud {
    position: absolute;
    left: 28px; top: 50px;
    width: 124px; height: 44px;
    border-radius: 44px;
    background: #e9eef5;
    z-index: 2;
    animation: float 5s ease-in-out infinite;
  }
  .cloud::before, .cloud::after {
    content: ""; position: absolute; border-radius: 50%; background: inherit;
  }
  .cloud::before { width: 54px; height: 54px; left: 16px; top: -26px; }
  .cloud::after  { width: 72px; height: 72px; right: 12px; top: -40px; }

  .rainy .cloud  { background: #cfd8e4; box-shadow: 0 8px 18px rgba(0,0,0,.2); }
  .snowy .cloud  { background: #ffffff; box-shadow: 0 8px 18px rgba(30,60,120,.2); }
  .stormy .cloud { background: #5d5876; box-shadow: 0 8px 18px rgba(0,0,0,.4); }
  .stormy .cloud.back {
    background: #3e3a55; left: 52px; top: 36px; transform: scale(.8);
    z-index: 1; animation-delay: -2s; box-shadow: none;
  }

  @keyframes float {
    0%,100% { translate: 0 0; }
    50%     { translate: 6px -4px; }
  }

  /* ---------- RAIN ---------- */
  .precip {
    position: absolute;
    left: 36px; top: 96px;
    width: 110px; height: 72px;
    overflow: hidden;
    z-index: 1;
  }
  .drop {
    position: absolute; top: -18px;
    width: 3px; height: 16px; border-radius: 3px;
    background: linear-gradient(to bottom, rgba(180,220,255,0), #bfe3ff);
    animation: fall 1s linear infinite;
  }
  .drop:nth-child(1)  { left: 6px;  animation-delay: 0s; }
  .drop:nth-child(2)  { left: 18px; animation-delay: .45s; }
  .drop:nth-child(3)  { left: 30px; animation-delay: .2s; }
  .drop:nth-child(4)  { left: 42px; animation-delay: .7s; }
  .drop:nth-child(5)  { left: 54px; animation-delay: .1s; }
  .drop:nth-child(6)  { left: 66px; animation-delay: .55s; }
  .drop:nth-child(7)  { left: 78px; animation-delay: .3s; }
  .drop:nth-child(8)  { left: 90px; animation-delay: .8s; }
  .drop:nth-child(9)  { left: 100px; animation-delay: .4s; }
  .drop:nth-child(10) { left: 12px; animation-delay: .9s; }
  .drop:nth-child(11) { left: 60px; animation-delay: .65s; }
  .drop:nth-child(12) { left: 84px; animation-delay: .15s; }

  @keyframes fall {
    0%   { transform: translate(0, 0) rotate(12deg); opacity: 0; }
    15%  { opacity: 1; }
    100% { transform: translate(-16px, 92px) rotate(12deg); opacity: .3; }
  }

  /* ---------- SNOW ---------- */
  .flake {
    position: absolute; top: -14px;
    width: 2px; height: 12px;
    background: #fff; border-radius: 2px;
    animation: drift 4s linear infinite;
  }
  .flake::before, .flake::after {
    content: ""; position: absolute; inset: 0;
    background: inherit; border-radius: inherit;
  }
  .flake::before { transform: rotate(60deg); }
  .flake::after  { transform: rotate(-60deg); }

  .snowy .precip { height: 76px; left: 26px; width: 130px; }
  .flake:nth-child(1)  { left: 8px;   animation-delay: 0s;    animation-duration: 4s; }
  .flake:nth-child(2)  { left: 26px;  animation-delay: -1.5s; animation-duration: 5s; scale: .7; }
  .flake:nth-child(3)  { left: 44px;  animation-delay: -3s;   animation-duration: 4.4s; }
  .flake:nth-child(4)  { left: 62px;  animation-delay: -.7s;  animation-duration: 5.4s; scale: .6; }
  .flake:nth-child(5)  { left: 80px;  animation-delay: -2.2s; animation-duration: 4.2s; }
  .flake:nth-child(6)  { left: 98px;  animation-delay: -3.6s; animation-duration: 5s; scale: .8; }
  .flake:nth-child(7)  { left: 114px; animation-delay: -1s;   animation-duration: 4.6s; scale: .7; }
  .flake:nth-child(8)  { left: 36px;  animation-delay: -2.8s; animation-duration: 5.8s; scale: .5; }
  .flake:nth-child(9)  { left: 72px;  animation-delay: -4.2s; animation-duration: 4.8s; scale: .9; }
  .flake:nth-child(10) { left: 106px; animation-delay: -2.6s; animation-duration: 5.2s; scale: .55; }

  @keyframes drift {
    0%   { transform: translate(0, 0) rotate(0deg); opacity: 0; }
    10%  { opacity: 1; }
    25%  { transform: translate(6px, 22px) rotate(90deg); }
    50%  { transform: translate(-5px, 45px) rotate(180deg); }
    75%  { transform: translate(6px, 68px) rotate(270deg); }
    90%  { opacity: 1; }
    100% { transform: translate(0, 92px) rotate(360deg); opacity: 0; }
  }

  /* ---------- STORM ---------- */
  .stormy .precip { left: 30px; }
  .stormy .drop { background: linear-gradient(to bottom, rgba(170,170,220,0), #b9b4e6); animation-duration: .7s; }

  .bolt-wrap {
    position: absolute;
    left: 74px; top: 82px;
    z-index: 3;
    filter: drop-shadow(0 0 8px #ffe14d) drop-shadow(0 0 18px rgba(255,220,80,.7));
    animation: flash 3.2s linear infinite;
  }
  .bolt {
    width: 38px; height: 70px;
    background: linear-gradient(to bottom, #fff7c0, #ffd21f);
    clip-path: polygon(45% 0, 100% 0, 66% 38%, 96% 38%, 22% 100%, 40% 54%, 6% 54%);
  }
  .stormy::after {
    content: ""; position: absolute; inset: 0;
    background: radial-gradient(circle at 50% 30%, rgba(255,250,220,.55), rgba(255,255,255,.08) 70%);
    opacity: 0; pointer-events: none; z-index: -1;
    animation: flash 3.2s linear infinite;
  }
  @keyframes flash {
    0%, 84%  { opacity: 0; }
    86%      { opacity: 1; }
    88%      { opacity: .15; }
    90%      { opacity: 1; }
    94%      { opacity: .6; }
    100%     { opacity: 0; }
  }

  /* ---------- REDUCED MOTION ---------- */
  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
      animation: none !important;
      transition: none !important;
    }
    .drop  { top: 20px; opacity: .8; transform: rotate(12deg); }
    .drop:nth-child(even) { top: 45px; }
    .flake { top: 18px; }
    .flake:nth-child(even) { top: 48px; }
    .bolt-wrap { opacity: 1; }
    .card:hover { transform: none; }
  }
</style>
</head>
<body>
  <header>
    <h1>Weather Around the World</h1>
    <p>Pure HTML &amp; CSS animated weather cards — no JavaScript, no images</p>
  </header>

  <main class="grid">
    <!-- SUNNY -->
    <article class="card sunny">
      <div class="top"><span>Mon · 14:00</span><span class="badge">Sunny</span></div>
      <div class="icon" aria-hidden="true">
        <div class="rays"></div>
        <div class="rays inner"></div>
        <div class="sun"></div>
      </div>
      <div class="info">
        <h2 class="city">Barcelona</h2>
        <div class="temp">29<sup>°C</sup></div>
        <p class="desc">Clear skies and bright sunshine all day</p>
        <div class="stats">
          <div><b>32%</b><span>Humidity</span></div>
          <div><b>8 km/h</b><span>Wind</span></div>
          <div><b>UV 8</b><span>Index</span></div>
        </div>
      </div>
    </article>

    <!-- RAINY -->
    <article class="card rainy">
      <div class="top"><span>Mon · 14:00</span><span class="badge">Rain</span></div>
      <div class="icon" aria-hidden="true">
        <div class="cloud"></div>
        <div class="precip">
          <i class="drop"></i><i class="drop"></i><i class="drop"></i><i class="drop"></i>
          <i class="drop"></i><i class="drop"></i><i class="drop"></i><i class="drop"></i>
          <i class="drop"></i><i class="drop"></i><i class="drop"></i><i class="drop"></i>
        </div>
      </div>
      <div class="info">
        <h2 class="city">London</h2>
        <div class="temp">14<sup>°C</sup></div>
        <p class="desc">Steady showers, bring an umbrella</p>
        <div class="stats">
          <div><b>88%</b><span>Humidity</span></div>
          <div><b>19 km/h</b><span>Wind</span></div>
          <div><b>12 mm</b><span>Rain</span></div>
        </div>
      </div>
    </article>

    <!-- SNOWY -->
    <article class="card snowy">
      <div class="top"><span>Mon · 14:00</span><span class="badge">Snow</span></div>
      <div class="icon" aria-hidden="true">
        <div class="cloud"></div>
        <div class="precip">
          <i class="flake"></i><i class="flake"></i><i class="flake"></i><i class="flake"></i><i class="flake"></i>
          <i class="flake"></i><i class="flake"></i><i class="flake"></i><i class="flake"></i><i class="flake"></i>
        </div>
      </div>
      <div class="info">
        <h2 class="city">Oslo</h2>
        <div class="temp">-4<sup>°C</sup></div>
        <p class="desc">Light snowfall drifting through the city</p>
        <div class="stats">
          <div><b>76%</b><span>Humidity</span></div>
          <div><b>11 km/h</b><span>Wind</span></div>
          <div><b>6 cm</b><span>Snow</span></div>
        </div>
      </div>
    </article>

    <!-- STORMY -->
    <article class="card stormy">
      <div class="top"><span>Mon · 14:00</span><span class="badge">Storm</span></div>
      <div class="icon" aria-hidden="true">
        <div class="cloud back"></div>
        <div class="cloud"></div>
        <div class="bolt-wrap"><div class="bolt"></div></div>
        <div class="precip">
          <i class="drop"></i><i class="drop"></i><i class="drop"></i><i class="drop"></i>
          <i class="drop"></i><i class="drop"></i><i class="drop"></i><i class="drop"></i>
          <i class="drop"></i><i class="drop"></i>
        </div>
      </div>
      <div class="info">
        <h2 class="city">Miami</h2>
        <div class="temp">24<sup>°C</sup></div>
        <p class="desc">Thunderstorms with frequent lightning</p>
        <div class="stats">
          <div><b>94%</b><span>Humidity</span></div>
          <div><b>46 km/h</b><span>Wind</span></div>
          <div><b>28 mm</b><span>Rain</span></div>
        </div>
      </div>
    </article>
  </main>
</body>
</html>
Reasoning trace (1,642 tokens)
I'm sketching out the HTML/CSS layout: a dark gradient body with a header, a card grid that goes from four columns on desktop down to two on medium screens and one on mobile, and cards about 420px tall with a 160px icon area. For the sunny icon, I'm considering a rotating sun with rays, possibly built with a repeating conic gradient and a mask.

Still writing styles...

Still styling the cards: the icon effects are getting specific now, with rain drops, snowflakes, and a lightning flash overlay for the stormy card. I'm also settling the colour palette, hover lift, and a reduced-motion fallback.

Still writing the icon styles...

Still styling the rain and storm icons...

Still finishing the bolt wrapper and the card text layout.