Mistral Small 4
by MistralReasoningClean
Running live in a sandboxed frame. Click inside it before using the keyboard.
How it went
- Total time
- 17.1 s
- Cost
- $0.0023
- Output tokens
- 3,443
- Spent thinking
- 0 tokens
- Speed
- 206.2 tok/s
- Console errors
- 0
- First token after
- 435 ms
- First visible text after
- 435 ms
- Prompt tokens
- 525
- Code size
- 10.4 KB
- Finish reason
- stop
- Served by
- Mistral
- Model id
mistralai/mistral-small-2603- Reasoning sent
model default- 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 · 396 lines
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Animated Weather Cards</title>
<style>
:root {
--sun-yellow: #FFD700;
--rain-blue: #1E90FF;
--snow-white: #E0F2FE;
--storm-dark: #2C3E50;
--text-dark: #2C3E50;
--text-light: #FFFFFF;
}
@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%);
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
min-height: 100vh;
display: flex;
flex-direction: column;
}
.weather-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
gap: 20px;
max-width: 1400px;
margin: 0 auto;
width: 100%;
}
.weather-card {
background: linear-gradient(135deg, var(--card-bg-start), var(--card-bg-end));
border-radius: 16px;
padding: 25px;
color: var(--text-light);
box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
transition: transform 0.3s ease, box-shadow 0.3s ease;
position: relative;
overflow: hidden;
min-height: 320px;
display: flex;
flex-direction: column;
}
.weather-card:hover {
transform: translateY(-10px);
box-shadow: 0 15px 30px rgba(0, 0, 0, 0.25);
}
.weather-icon {
margin-bottom: 20px;
display: flex;
justify-content: center;
align-items: center;
min-height: 120px;
}
.sun {
position: relative;
width: 80px;
height: 80px;
}
.sun-core {
position: absolute;
width: 100%;
height: 100%;
background: var(--sun-yellow);
border-radius: 50%;
box-shadow: 0 0 0 10px rgba(255, 215, 0, 0.3);
}
.sun-ray {
position: absolute;
width: 12px;
height: 30px;
background: var(--sun-yellow);
border-radius: 5px;
top: 50%;
left: 50%;
transform-origin: center;
}
.sun-ray:nth-child(2) { transform: translate(-50%, -50%) rotate(0deg); }
.sun-ray:nth-child(3) { transform: translate(-50%, -50%) rotate(45deg); }
.sun-ray:nth-child(4) { transform: translate(-50%, -50%) rotate(90deg); }
.sun-ray:nth-child(5) { transform: translate(-50%, -50%) rotate(135deg); }
.sun-ray:nth-child(6) { transform: translate(-50%, -50%) rotate(180deg); }
.sun-ray:nth-child(7) { transform: translate(-50%, -50%) rotate(225deg); }
.sun-ray:nth-child(8) { transform: translate(-50%, -50%) rotate(270deg); }
.sun-ray:nth-child(9) { transform: translate(-50%, -50%) rotate(315deg); }
@keyframes sunRotate {
from { transform: translate(-50%, -50%) rotate(0deg); }
to { transform: translate(-50%, -50%) rotate(360deg); }
}
.sun-ray:nth-child(2) { animation: sunRotate 8s linear infinite; }
.sun-ray:nth-child(3) { animation: sunRotate 8s linear infinite 1s; }
.sun-ray:nth-child(4) { animation: sunRotate 8s linear infinite 2s; }
.sun-ray:nth-child(5) { animation: sunRotate 8s linear infinite 3s; }
.sun-ray:nth-child(6) { animation: sunRotate 8s linear infinite 4s; }
.sun-ray:nth-child(7) { animation: sunRotate 8s linear infinite 5s; }
.sun-ray:nth-child(8) { animation: sunRotate 8s linear infinite 6s; }
.sun-ray:nth-child(9) { animation: sunRotate 8s linear infinite 7s; }
.rain {
position: relative;
width: 100%;
height: 100px;
}
.rain-drop {
position: absolute;
width: 4px;
height: 15px;
background: linear-gradient(to bottom, #A5D8FF, #1E90FF);
border-radius: 2px;
animation: fall linear infinite;
}
@keyframes fall {
0% {
transform: translateY(-100px);
opacity: 0;
}
10% {
opacity: 1;
}
90% {
opacity: 1;
}
100% {
transform: translateY(100px);
opacity: 0;
}
}
.snow {
position: relative;
width: 100%;
height: 120px;
}
.snowflake {
position: absolute;
width: 6px;
height: 6px;
background: white;
border-radius: 50%;
animation: drift linear infinite;
}
.snowflake:nth-child(odd) {
width: 4px;
height: 4px;
}
@keyframes drift {
0% {
transform: translateY(-50px) translateX(0) rotate(0deg);
opacity: 0;
}
10% {
opacity: 1;
}
90% {
opacity: 1;
}
100% {
transform: translateY(100px) translateX(20px) rotate(360deg);
opacity: 0;
}
}
.storm {
position: relative;
width: 100%;
height: 120px;
}
.lightning {
position: absolute;
width: 6px;
height: 40px;
background: #FFD700;
left: 50%;
top: 20%;
transform: translateX(-50%);
animation: flash 2s ease-in-out infinite;
}
.lightning::before {
content: '';
position: absolute;
width: 0;
height: 0;
border-left: 12px solid transparent;
border-right: 12px solid transparent;
border-bottom: 20px solid #FFD700;
top: -20px;
left: -6px;
}
.lightning::after {
content: '';
position: absolute;
width: 0;
height: 0;
border-left: 20px solid transparent;
border-right: 20px solid transparent;
border-top: 15px solid #FFD700;
bottom: -15px;
left: -10px;
}
@keyframes flash {
0%, 100% { opacity: 0.3; }
50% { opacity: 1; }
}
.weather-info {
flex-grow: 1;
display: flex;
flex-direction: column;
justify-content: center;
}
.city {
font-size: 24px;
font-weight: 600;
margin-bottom: 5px;
text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}
.temp {
font-size: 48px;
font-weight: 700;
margin-bottom: 10px;
text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}
.description {
font-size: 16px;
opacity: 0.9;
text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}
/* Weather-specific styles */
.sunny-card {
--card-bg-start: #FFE57F;
--card-bg-end: #FFD700;
}
.rainy-card {
--card-bg-start: #87CEEB;
--card-bg-end: #1E90FF;
}
.snowy-card {
--card-bg-start: #E0F7FA;
--card-bg-end: #B3E5FC;
}
.stormy-card {
--card-bg-start: #455A64;
--card-bg-end: #2C3E50;
}
@media (max-width: 768px) {
.weather-grid {
grid-template-columns: 1fr;
}
.weather-card {
min-height: 280px;
}
}
@media (max-width: 480px) {
body {
padding: 10px;
}
.weather-card {
padding: 20px;
}
.temp {
font-size: 36px;
}
.city {
font-size: 20px;
}
}
</style>
</head>
<body>
<div class="weather-grid">
<!-- Sunny Card -->
<div class="weather-card sunny-card">
<div class="weather-icon">
<div class="sun">
<div class="sun-core"></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 class="sun-ray"></div>
</div>
</div>
<div class="weather-info">
<div class="city">Los Angeles</div>
<div class="temp">28°C</div>
<div class="description">Clear skies with plenty of sunshine</div>
</div>
</div>
<!-- Rainy Card -->
<div class="weather-card rainy-card">
<div class="weather-icon">
<div class="rain">
<div class="rain-drop" style="left: 10%; animation-duration: 1.2s;"></div>
<div class="rain-drop" style="left: 25%; animation-duration: 1.5s;"></div>
<div class="rain-drop" style="left: 40%; animation-duration: 1s;"></div>
<div class="rain-drop" style="left: 55%; animation-duration: 1.3s;"></div>
<div class="rain-drop" style="left: 70%; animation-duration: 1.1s;"></div>
<div class="rain-drop" style="left: 85%; animation-duration: 1.4s;"></div>
<div class="rain-drop" style="left: 15%; animation-duration: 1.6s;"></div>
<div class="rain-drop" style="left: 35%; animation-duration: 1.2s;"></div>
<div class="rain-drop" style="left: 60%; animation-duration: 1.7s;"></div>
<div class="rain-drop" style="left: 80%; animation-duration: 1.3s;"></div>
</div>
</div>
<div class="weather-info">
<div class="city">London</div>
<div class="temp">15°C</div>
<div class="description">Steady rain throughout the day</div>
</div>
</div>
<!-- Snowy Card -->
<div class="weather-card snowy-card">
<div class="weather-icon">
<div class="snow">
<div class="snowflake" style="left: 20%; animation-duration: 8s;"></div>
<div class="snowflake" style="left: 40%; animation-duration: 10s;"></div>
<div class="snowflake" style="left: 60%; animation-duration: 7s;"></div>
<div class="snowflake" style="left: 80%; animation-duration: 9s;"></div>
<div class="snowflake" style="left: 10%; animation-duration: 11s;"></div>
<div class="snowflake" style="left: 30%; animation-duration: 8s;"></div>
<div class="snowflake" style="left: 50%; animation-duration: 12s;"></div>
<div class="snowflake" style="left: 70%; animation-duration: 9s;"></div>
<div class="snowflake" style="left: 90%; animation-duration: 10s;"></div>
</div>
</div>
<div class="weather-info">
<div class="city">Chicago</div>
<div class="temp">-2°C</div>
<div class="description">Light snow with accumulation expected</div>
</div>
</div>
<!-- Stormy Card -->
<div class="weather-card stormy-card">
<div class="weather-icon">
<div class="storm">
<div class="lightning"></div>
</div>
</div>
<div class="weather-info">
<div class="city">Miami</div>
<div class="temp">22°C</div>
<div class="description">Thunderstorms likely this afternoon</div>
</div>
</div>
</div>
</body>
</html>