Exploding like buttonOne-line
Mistral Small 4
by MistralReasoningClean
Running live in a sandboxed frame. Click inside it before using the keyboard.
How it went
- Total time
- 7.8 s
- Cost
- $0.0009
- Output tokens
- 1,504
- Spent thinking
- 0 tokens
- Speed
- 203.9 tok/s
- Console errors
- 0
- First token after
- 400 ms
- First visible text after
- 400 ms
- Prompt tokens
- 376
- Code size
- 5.1 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
“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 · 208 lines
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Pure CSS Like Button</title>
<style>
body {
margin: 0;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
font-family: Arial, sans-serif;
}
.like-container {
position: relative;
width: 120px;
height: 120px;
cursor: pointer;
}
.like-button {
position: absolute;
width: 100%;
height: 100%;
background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
border: none;
border-radius: 50%;
box-shadow: 0 4px 8px rgba(0,0,0,0.2);
outline: none;
transition: all 0.3s ease;
display: flex;
justify-content: center;
align-items: center;
color: white;
font-size: 24px;
z-index: 2;
}
.like-button:hover {
transform: scale(1.05);
box-shadow: 0 6px 12px rgba(0,0,0,0.3);
}
.like-button:active {
transform: scale(0.95);
}
.like-button::after {
content: "♡";
font-size: 36px;
}
.like-button.liked::after {
content: "❤️";
animation: likeAnimation 1s ease-out;
}
@keyframes likeAnimation {
0% {
transform: scale(1);
opacity: 1;
color: #ff6b6b;
}
20% {
transform: scale(1.3);
color: #ff4757;
}
40% {
transform: scale(1.1);
color: #ff3742;
}
60% {
transform: scale(1.2);
color: #ff1710;
}
80% {
transform: scale(1.1);
color: #ff0700;
}
100% {
transform: scale(1);
opacity: 1;
color: #ee5a52;
}
}
.sparkle {
position: absolute;
width: 4px;
height: 4px;
background: white;
border-radius: 50%;
opacity: 0;
pointer-events: none;
z-index: 3;
}
.particle {
position: absolute;
width: 6px;
height: 6px;
background: #ffcc02;
border-radius: 50%;
opacity: 0;
pointer-events: none;
z-index: 3;
}
@keyframes sparkle {
0% {
transform: translateY(0) scale(1);
opacity: 1;
}
100% {
transform: translateY(-100px) scale(0.5);
opacity: 0;
}
}
@keyframes particle {
0% {
transform: translate(0, 0) scale(1);
opacity: 1;
}
100% {
transform: translate(var(--tx, 0), var(--ty, -100px)) scale(0.7);
opacity: 0;
}
}
</style>
</head>
<body>
<div class="like-container">
<button class="like-button" type="button"></button>
<!-- Sparkles will be added by CSS animations -->
</div>
<script>
// Pure CSS solution doesn't use JavaScript for the animation,
// but we need a tiny bit to toggle the class for the animation trigger
document.querySelector('.like-button').addEventListener('click', function() {
this.classList.toggle('liked');
// Create sparkles and particles
const rect = this.getBoundingClientRect();
const centerX = rect.left + rect.width / 2;
const centerY = rect.top + rect.height / 2;
// Create multiple sparkles
for (let i = 0; i < 15; i++) {
const sparkle = document.createElement('div');
sparkle.className = 'sparkle';
sparkle.style.left = centerX + 'px';
sparkle.style.top = centerY + 'px';
document.body.appendChild(sparkle);
// Randomize position and animation
const angle = Math.random() * Math.PI * 2;
const distance = Math.random() * 30 + 20;
const tx = Math.cos(angle) * distance;
const ty = Math.sin(angle) * distance;
sparkle.style.setProperty('--tx', tx + 'px');
sparkle.style.setProperty('--ty', ty + 'px');
// Trigger reflow to apply styles
void sparkle.offsetWidth;
// Remove after animation
setTimeout(() => {
sparkle.remove();
}, 1000);
}
// Create heart particles
for (let i = 0; i < 8; i++) {
const particle = document.createElement('div');
particle.className = 'particle';
particle.style.left = centerX + 'px';
particle.style.top = centerY + 'px';
document.body.appendChild(particle);
// Randomize direction (mostly upward)
const angle = Math.random() * Math.PI * 0.8 - Math.PI * 0.4;
const distance = Math.random() * 50 + 30;
const tx = Math.cos(angle) * distance;
const ty = Math.sin(angle) * distance * 0.7;
particle.style.setProperty('--tx', tx + 'px');
particle.style.setProperty('--ty', ty + 'px');
particle.style.background = `hsl(${Math.random() * 60 + 0}, 100%, 50%)`;
// Trigger reflow to apply styles
void particle.offsetWidth;
// Remove after animation
setTimeout(() => {
particle.remove();
}, 1200);
}
});
</script>
</body>
</html>