Models 44

Mistral Small 4

by MistralReasoningClean
Open in new window

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

How it went

Total time
15.1 s
Cost
$0.0021
Output tokens
3,291
Spent thinking
0 tokens
Speed
224.9 tok/s
Console errors
0
First token after
490 ms
First visible text after
490 ms
Prompt tokens
525
Code size
9.6 KB
Finish reason
stop
Served by
Mistral
Model id
mistralai/mistral-small-2603
Reasoning sent
{"effort":"none"}
Max output
209,715 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 · 325 lines

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Weather Cards</title>
  <style>
    :root {
      --sun-yellow: #FFD700;
      --rain-blue: #4A90E2;
      --snow-light-blue: #B0E0E6;
      --storm-dark-blue: #1E3A8A;
      --text-dark: #1F2937;
      --text-light: #F9FAFB;
      --shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
      --shadow-hover: 0 15px 30px rgba(0, 0, 0, 0.15);
    }

    @media (prefers-reduced-motion: reduce) {
      * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
      }
    }

    body {
      margin: 0;
      padding: 20px;
      background: linear-gradient(135deg, #F5F7FA 0%, #C3CFE2 100%);
      min-height: 100vh;
      font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
      display: flex;
      flex-direction: column;
      align-items: center;
    }

    .weather-grid {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 20px;
      width: 100%;
      max-width: 1200px;
      margin: 0 auto;
    }

    .weather-card {
      background: white;
      border-radius: 16px;
      padding: 24px;
      text-align: center;
      box-shadow: var(--shadow);
      transition: transform 0.3s ease, box-shadow 0.3s ease;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      min-height: 300px;
      position: relative;
      overflow: hidden;
    }

    .weather-card:hover {
      transform: translateY(-10px);
      box-shadow: var(--shadow-hover);
    }

    .weather-icon {
      width: 120px;
      height: 120px;
      margin-bottom: 20px;
      position: relative;
    }

    /* Sunny */
    .sunny .weather-icon {
      background: radial-gradient(circle at center, var(--sun-yellow) 40%, transparent 40%);
    }

    .sunny .sun-ray {
      position: absolute;
      width: 6px;
      height: 30px;
      background: var(--sun-yellow);
      top: 50%;
      left: 50%;
      transform-origin: center;
      border-radius: 3px;
    }

    .sunny .sun-ray:nth-child(1) { transform: translate(-50%, -50%) rotate(0deg); animation: sunRotate 8s linear infinite; }
    .sunny .sun-ray:nth-child(2) { transform: translate(-50%, -50%) rotate(45deg); animation: sunRotate 8s linear infinite 1s; }
    .sunny .sun-ray:nth-child(3) { transform: translate(-50%, -50%) rotate(90deg); animation: sunRotate 8s linear infinite 2s; }
    .sunny .sun-ray:nth-child(4) { transform: translate(-50%, -50%) rotate(135deg); animation: sunRotate 8s linear infinite 3s; }
    .sunny .sun-ray:nth-child(5) { transform: translate(-50%, -50%) rotate(180deg); animation: sunRotate 8s linear infinite 4s; }
    .sunny .sun-ray:nth-child(6) { transform: translate(-50%, -50%) rotate(225deg); animation: sunRotate 8s linear infinite 5s; }
    .sunny .sun-ray:nth-child(7) { transform: translate(-50%, -50%) rotate(270deg); animation: sunRotate 8s linear infinite 6s; }
    .sunny .sun-ray:nth-child(8) { transform: translate(-50%, -50%) rotate(315deg); animation: sunRotate 8s linear infinite 7s; }

    /* Rainy */
    .rainy {
      background: linear-gradient(135deg, var(--rain-blue) 0%, #2563EB 100%);
      color: var(--text-light);
    }

    .rainy .weather-icon {
      position: relative;
    }

    .rainy .raindrop {
      position: absolute;
      width: 4px;
      height: 12px;
      background: rgba(255, 255, 255, 0.7);
      border-radius: 2px;
      bottom: 0;
    }

    .rainy .raindrop:nth-child(1) { left: 20%; animation: fall 1.5s linear infinite 0.1s; }
    .rainy .raindrop:nth-child(2) { left: 40%; animation: fall 1.8s linear infinite 0.3s; }
    .rainy .raindrop:nth-child(3) { left: 60%; animation: fall 1.6s linear infinite 0.5s; }
    .rainy .raindrop:nth-child(4) { left: 80%; animation: fall 1.9s linear infinite 0.7s; }
    .rainy .raindrop:nth-child(5) { left: 30%; animation: fall 1.7s linear infinite 0.9s; }
    .rainy .raindrop:nth-child(6) { left: 70%; animation: fall 1.5s linear infinite 1.1s; }
    .rainy .raindrop:nth-child(7) { left: 10%; animation: fall 1.8s linear infinite 1.3s; }
    .rainy .raindrop:nth-child(8) { left: 90%; animation: fall 1.6s linear infinite 1.5s; }

    /* Snowy */
    .snowy {
      background: linear-gradient(135deg, var(--snow-light-blue) 0%, #87CEEB 100%);
      color: var(--text-dark);
    }

    .snowy .weather-icon {
      position: relative;
    }

    .snowy .snowflake {
      position: absolute;
      width: 6px;
      height: 6px;
      background: white;
      border-radius: 50%;
      box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.5);
    }

    .snowy .snowflake:nth-child(1) { top: 20%; left: 20%; animation: drift 4s linear infinite 0s; }
    .snowy .snowflake:nth-child(2) { top: 30%; left: 50%; animation: drift 5s linear infinite 1s; }
    .snowy .snowflake:nth-child(3) { top: 25%; left: 80%; animation: drift 6s linear infinite 2s; }
    .snowy .snowflake:nth-child(4) { top: 40%; left: 10%; animation: drift 4.5s linear infinite 3s; }
    .snowy .snowflake:nth-child(5) { top: 50%; left: 70%; animation: drift 5.5s linear infinite 0.5s; }
    .snowy .snowflake:nth-child(6) { top: 60%; left: 30%; animation: drift 4.8s linear infinite 1.5s; }
    .snowy .snowflake:nth-child(7) { top: 70%; left: 90%; animation: drift 5.2s linear infinite 2.5s; }
    .snowy .snowflake:nth-child(8) { top: 80%; left: 40%; animation: drift 4.3s linear infinite 0.8s; }

    /* Stormy */
    .stormy {
      background: linear-gradient(135deg, var(--storm-dark-blue) 0%, #1E40AF 100%);
      color: var(--text-light);
    }

    .stormy .weather-icon {
      position: relative;
    }

    .stormy .lightning {
      position: absolute;
      width: 0;
      height: 0;
      border-left: 15px solid transparent;
      border-right: 15px solid transparent;
      border-top: 30px solid #FFD700;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      opacity: 0;
      animation: flash 2s infinite;
    }

    .stormy .lightning:nth-child(2) {
      border-top: 25px solid #FFD700;
      animation: flash 2.5s infinite 0.3s;
    }

    .stormy .lightning:nth-child(3) {
      border-top: 20px solid #FFD700;
      animation: flash 1.8s infinite 0.6s;
    }

    .city-name {
      font-size: 1.8rem;
      font-weight: 600;
      margin: 10px 0;
    }

    .temperature {
      font-size: 2.5rem;
      font-weight: 700;
      margin: 10px 0;
    }

    .description {
      font-size: 1rem;
      opacity: 0.9;
      margin-top: 10px;
    }

    @keyframes sunRotate {
      from { transform: translate(-50%, -50%) rotate(0deg); }
      to { transform: translate(-50%, -50%) rotate(360deg); }
    }

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

    @keyframes drift {
      0% { transform: translateY(0) translateX(0); opacity: 1; }
      100% { transform: translateY(100px) translateX(20px); opacity: 0; }
    }

    @keyframes flash {
      0%, 100% { opacity: 0; }
      5% { opacity: 1; }
    }

    @media (max-width: 1024px) {
      .weather-grid {
        grid-template-columns: repeat(2, 1fr);
      }
    }

    @media (max-width: 768px) {
      .weather-grid {
        grid-template-columns: 1fr;
      }

      .weather-card {
        min-height: 250px;
      }
    }

    @media (max-width: 480px) {
      body {
        padding: 10px;
      }

      .city-name {
        font-size: 1.5rem;
      }

      .temperature {
        font-size: 2rem;
      }
    }
  </style>
</head>
<body>
  <div class="weather-grid">
    <!-- Sunny -->
    <div class="weather-card sunny">
      <div class="weather-icon">
        <div class="sun-ray"></div>
        <div class="sun-ray"></div>
        <div class="sun-ray"></div>
        <div class="sun-ray"></div>
        <div class="sun-ray"></div>
        <div class="sun-ray"></div>
        <div class="sun-ray"></div>
        <div class="sun-ray"></div>
      </div>
      <div class="city-name">Los Angeles</div>
      <div class="temperature">28°C</div>
      <div class="description">Clear skies and sunshine</div>
    </div>

    <!-- Rainy -->
    <div class="weather-card rainy">
      <div class="weather-icon">
        <div class="raindrop"></div>
        <div class="raindrop"></div>
        <div class="raindrop"></div>
        <div class="raindrop"></div>
        <div class="raindrop"></div>
        <div class="raindrop"></div>
        <div class="raindrop"></div>
        <div class="raindrop"></div>
      </div>
      <div class="city-name">London</div>
      <div class="temperature">15°C</div>
      <div class="description">Light rain showers</div>
    </div>

    <!-- Snowy -->
    <div class="weather-card snowy">
      <div class="weather-icon">
        <div class="snowflake"></div>
        <div class="snowflake"></div>
        <div class="snowflake"></div>
        <div class="snowflake"></div>
        <div class="snowflake"></div>
        <div class="snowflake"></div>
        <div class="snowflake"></div>
        <div class="snowflake"></div>
      </div>
      <div class="city-name">Chicago</div>
      <div class="temperature">-2°C</div>
      <div class="description">Snow flurries expected</div>
    </div>

    <!-- Stormy -->
    <div class="weather-card stormy">
      <div class="weather-icon">
        <div class="lightning"></div>
        <div class="lightning"></div>
        <div class="lightning"></div>
      </div>
      <div class="city-name">Miami</div>
      <div class="temperature">22°C</div>
      <div class="description">Thunderstorms likely</div>
    </div>
  </div>
</body>
</html>