Models 44

Nemotron 3 Nano Omni (free)

by NVIDIAReasoningClean
Open in new window

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

How it went

Total time
1 min 56 s
Cost
$0
Output tokens
8,893
Spent thinking
6,847 tokens
Speed
76.9 tok/s
Console errors
0
First token after
226 ms
First visible text after
1 min 29 s
Prompt tokens
524
Code size
5.6 KB
Finish reason
stop
Served by
Nvidia
Model id
nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free
Reasoning sent
model default
Max output
32,000 tokens
Generated
Nov 9, 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 · 206 lines

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Weather Cards</title>
<style>
/* Reset */
* { box-sizing:border-box; margin:0; padding:0; }
html, body { height:100%; font-family:Arial, sans-serif; overflow-x:hidden; }

/* Grid container */
.grid {
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap:1rem;
  padding:1rem;
  max-width:1280px;
  margin:0 auto;
}
@media (max-width:600px) {
  .grid { grid-template-columns:1fr; }
}

/* Card styling */
.card {
  background:var(--bg);
  border-radius:8px;
  overflow:hidden;
  box-shadow:0 2px 6px rgba(0,0,0,0.1);
  transition:transform .3s ease, box-shadow .3s ease;
  position:relative;
}
.card:hover {
  transform:translateY(-10px);
  box-shadow:0 10px 20px rgba(0,0,0,0.2);
}

/* Gradients per weather */
.sunny   { --bg:linear-gradient(135deg, #ffdd57, #ff5e62); }
.rainy   { --bg:linear-gradient(135deg, #a7c7e7, #62a8c0); }
.snowy   { --bg:linear-gradient(135deg, #d6e0f0, #b0c4de); }
.stormy  { --bg:linear-gradient(135deg, #4b3f72, #2c3e50); }

/* Card content */
.city { font-size:1.2rem; font-weight:600; margin:0.5rem; }
.temp   { font-size:1.5rem; margin:0.2rem 0; }
.desc   { font-size:1rem; color:#555; margin:0.5rem; }

/* Icon container */
.icon {
  position:absolute;
  top:1rem;
  left:1rem;
  width:80px;
  height:80px;
}
.icon .circle {
  position:absolute;
  top:50%; left:50%;
  width:40px; height:40px;
  background:#ffcc00;
  border-radius:50%;
  transform:translate(-50%,-50%);
}

/* Sun rays */
.sun .ray {
  position:absolute;
  top:50%; left:50%;
  width:2px; height:45%;
  background:#ff5e62;
  transform-origin:0% 0%;
}
.sun .ray:nth-child(1){ transform:rotate(0deg); }
.sun .ray:nth-child(2){ transform:rotate(30deg); }
.sun .ray:nth-child(3){ transform:rotate(60deg); }
.sun .ray:nth-child(4){ transform:rotate(90deg); }
.sun .ray:nth-child(5){ transform:rotate(120deg); }
.sun .ray:nth-child(6){ transform:rotate(150deg); }
.sun .ray:nth-child(7){ transform:rotate(180deg); }
.sun .ray:nth-child(8){ transform:rotate(210deg); }
.sun .ray:nth-child(9){ transform:rotate(240deg); }
.sun .ray:nth-child(10){ transform:rotate(270deg); }
.sun .ray:nth-child(11){ transform:rotate(300deg); }
.sun .ray:nth-child(12){ transform:rotate(330deg); }

/* Animation for sun rotation */
.sun {
  animation: rotateSun 8s linear infinite;
}

/* Rain drops */
.rain .drop {
  position:absolute;
  top:-10px;
  width:4px; height:20px;
  background:#57a1b3;
  border-radius:50% 50% 0 0;
  animation: fallRain 4s linear infinite;
  opacity:0.8;
}
.rain .drop:nth-child(1){ left:10%; animation-delay:0s; }
.rain .drop:nth-child(2){ left:20%; animation-delay:1s; }
.rain .drop:nth-child(3){ left:30%; animation-delay:2s; }
.rain .drop:nth-child(4){ left:40%; animation-delay:3s; }
.rain .drop:nth-child(5){ left:50%; animation-delay:4s; }

/* Snowflakes */
.snow .flake {
  position:absolute;
  top:-10px;
  width:6px; height:6px;
  background:#fff;
  border-radius:50%;
  animation: driftSnow 6s linear infinite;
  opacity:0.9;
}
.snow .flake:nth-child(1){ left:5%; animation-delay:0s; }
.snow .flake:nth-child(2){ left:15%; animation-delay:1s; }
.snow .flake:nth-child(3){ left:25%; animation-delay:2s; }
.snow .flake:nth-child(4){ left:35%; animation-delay:3s; }
.snow .flake:nth-child(5){ left:45%; animation-delay:4s; }

/* Lightning */
.lightning .bolt {
  position:absolute;
  top:20%; left:50%;
  width:4px; height:30%;
  background:#ffcc00;
  border-radius:2px;
  transform-origin:0% 0%;
  animation: flashLightning 2s infinite;
  opacity:0;
}
.lightning .bolt:nth-child(1){ animation-delay:0s; }
.lightning .bolt:nth-child(2){ animation-delay:1s; }

/* Keyframes */
@keyframes rotateSun {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@keyframes fallRain {
  0% { transform: translateY(0) translateX(0); opacity:0; }
  10% { opacity:0.8; }
  90% { opacity:0.8; }
  100% { transform: translateY(120px) translateX(0); opacity:0; }
}
@keyframes driftSnow {
  0% { transform: translateY(0) translateX(0); }
  100% { transform: translateY(120px) translateX(20px); }
}
@keyframes flashLightning {
  0%,100% { opacity:0; }
  10% { opacity:1; }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .sun, .rain .drop, .snow .flake, .lightning .bolt {
    animation-play-state: paused;
  }
}
</style>
</head>
<body>
<div class="grid">
  <div class="card sunny">
    <div class="icon sun">
      <div class="circle"></div>
      <div class="ray"></div><div class="ray"></div><div class="ray"></div><div class="ray"></div><div class="ray"></div><div class="ray"></div><div class="ray"></div><div class="ray"></div><div class="ray"></div><div class="ray"></div><div class="ray"></div><div class="ray"></div>
    </div>
    <h3 class="city">New York</h3>
    <p class="temp">22°C</p>
    <p class="desc">Sunny</p>
  </div>

  <div class="card rainy">
    <div class="icon rain">
      <div class="drop"></div><div class="drop"></div><div class="drop"></div><div class="drop"></div><div class="drop"></div>
    </div>
    <h3 class="city">London</h3>
    <p class="temp">18°C</p>
    <p class="desc">Rainy</p>
  </div>

  <div class="card snowy">
    <div class="icon snow">
      <div class="flake"></div><div class="flake"></div><div class="flake"></div><div class="flake"></div><div class="flake"></div>
    </div>
    <h3 class="city">Paris</h3>
    <p class="temp">5°C</p>
    <p class="desc">Snowy</p>
  </div>

  <div class="card stormy">
    <div class="icon lightning">
      <div class="bolt"></div><div class="bolt"></div>
    </div>
    <h3 class="city">Tokyo</h3>
    <p class="temp">27°C</p>
    <p class="desc">Stormy</p>
  </div>
</div>
</body>
</html>
Reasoning trace (6,847 tokens)
We need to produce a single HTML file with CSS and maybe use <style> and <script> not allowed. So only HTML and CSS. Use pseudo-elements to create icons. Must be responsive grid 4 per row on desktop, stacked on mobile. Use media queries. Each card has gradient background. Must lift up on hover (transform: translateY(-5px) etc). Must have smooth infinite animations using @keyframes: rotating sun rays, falling rain drops, drifting snowflakes, flashing lightning. Must respect prefers-reduced-motion: if user prefers reduced motion, animations should be disabled (i.e., no animation or paused). Use @media (prefers-reduced-motion: reduce) to set animation-play-state: paused; or remove animation.

We need four cards: sunny, rainy, snowy, stormy. Each card shows an animated icon (built from HTML elements). Since no images, we need to create sun rays using <div class="sun-ray"> etc. Use pseudo-elements to create circles for sun? Could use <div class="sun"> with pseudo-element for rays. Or use <div class="sun"></div> and ::before/::after for rays.

Rain drops: maybe <div class="raindrop"></div> with animation moving downwards.

Snowflakes: maybe <div class="snowflake"></div> with animation moving diagonally.

Lightning: maybe <div class="lightning"></div> with animation flashing (opacity) and moving.

Need city name, temperature, description. Use placeholder like "New York", "22°C", "Sunny". Could use generic.

Each card background gradient matching weather: sunny -> yellow gradient; rainy -> blue gradient; snowy -> white/blue gradient; stormy -> dark gray/red gradient.

Responsive grid: Use CSS grid with repeat(4, 1fr) and media query for <600px to change to 1fr (stacked). Also lift on hover: transform: translateY(-10px); maybe also box-shadow.

Animations: infinite using animation: name duration infinite linear; but need to respect prefers-reduced-motion. Use animation: name var(--animation) etc? Simpler: define animation for each card's icon. Use animation-play-state: paused when prefers-reduced-motion: reduce.

We need to ensure each card has its own animation for the icon, not the whole card (maybe also subtle background gradient shift? Not needed). Ensure infinite animation.

We must avoid any script. Use only HTML and CSS. Ensure no external resources.

Let's design structure:

<div class="grid">
  <div class="card sunny">
    <div class="icon sun"></div>
    <h3 class="city">New York</h3>
    <p class="temp">22°C</p>
    <p class="desc">Sunny</p>
  </div>
  <div class="card rainy">
    <div class="icon rain"></div>
    <h3 class="city">London</h3>
    <p class="temp">18°C</p>
    <p class="desc">Rainy</p>
  </div>
  <div class="card snowy">
    <div class="icon snow"></div>
    <h3 class="city">Paris</h3>
    <p class="temp">5°C</p>
    <p class="desc">Snowy</p>
  </div>
  <div class="card stormy">
    <div class="icon lightning"></div>
    <h3 class="city">Tokyo</h3>
    <p class="temp">27°C</p>
    <p class="desc">Stormy</p>
  </div>
</div>

Now CSS:

* { box-sizing:border-box; margin:0; padding:0; }

body: set font-family, background maybe light, display flex, justify-content center, align-items center; min-height:100vh; but we need to ensure no scrollbars. Use max-width: 1280px; width:100%; maybe.

.grid: display:grid; grid-template-columns: repeat(4, 1fr); gap:1rem; padding:1rem; @media (max-width:600px){ grid-template-columns:1fr; }

.card: background: gradient; border-radius:8px; overflow:hidden; box-shadow:0 2px 6px rgba(0,0,0,0.1); transition: transform .3s ease, box-shadow .3s ease; &:hover { transform: translateY(-10px); box-shadow:0 10px 20px rgba(0,0,0,0.2); }

Now define gradients:

.sunny { background: linear-gradient(135deg, #ffdd57, #ff5e62); } maybe.

.rainy { background: linear-gradient(135deg, #a7c7e7, #62a8c0); }

.snowy { background: linear-gradient(135deg, #d6e0f0, #b0c4de); }

.stormy { background: linear-gradient(135deg, #4b3f72, #2c3e50); }

Now icons:

.sun: position:relative; width:80px; height:80px; background:#ffcc00; border-radius:50%; margin:auto; animation: rotate 8s linear infinite; @media (prefers-reduced-motion: reduce){ animation-play-state:paused; }

But need to create rays using pseudo-elements. Use ::before and ::after? Actually we can create rays with multiple <div class="ray"> positioned around sun. Simpler: use <div class="sun"><div class="ray"></div>... but we need to keep within card; maybe use pseudo-element to create circle and rays via multiple radial lines using CSS shapes.

Simplify: Use <div class="sun"></div> and use ::before to create a circle, and ::after for rays using repeating-linear-gradient? Not sure.

Alternative: Use <div class="sun"></div> with background: radial-gradient(circle at center, #ffcc00, #ff5e62); and then use ::before to create rays: content:""; position:absolute; width:2px; height:50%; background:#ff5e62; transform-origin:center; and rotate each.

But we need to keep it simple and ensure infinite rotation of rays. Could animate transform: rotate(360deg) on the sun element (the container) while rays are static.

Let's design .sun { width:80px; height:80px; background:#ffcc00; border-radius:50%; position:relative; animation: rotate 8s linear infinite; } @keyframes rotate { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

But that rotates whole sun, not rays. To have rotating rays, we can have <div class="sun"><div class="ray"></div> repeated via ::before? Actually we can use multiple <div class="ray"> each with transform rotate and animation.

Simplify further: Use <div class="sun"><div class="ray"></div></div> and use ::before pseudo-element to generate multiple rays via repeating? Might be too complex.

Maybe easier: Use <div class="sun"><div class="circle"></div><div class="rays"></div></div> where .rays is a container with multiple <div class="ray"> each rotated and animated.

But we need to avoid extra HTML beyond required; but we can include extra elements; requirement is just that icons are built from HTML elements and CSS, no images. So extra divs are fine.

Let's design sun:

<div class="icon sun">
  <div class="circle"></div>
  <div class="rays"></div>
</div>

But .circle can be ::before on .sun to avoid extra element. Use ::before for circle, ::after for rays? Let's do:

.sun { position:relative; width:80px; height:80px; background:#ffcc00; border-radius:50%; animation: rotate 8s linear infinite; }

.sun::before { content:''; position:absolute; inset:0; border-radius:50%; background:#ff5e62; }

.sun::after { content:''; position:absolute; top:50%; left:50%; width:2px; height:50%; background:#ff5e62; transform-origin:0% 0%; animation: spin 8s linear infinite; }

But we need multiple rays; we can use multiple pseudo-elements via repeating? Actually we can use ::after multiple times? Not possible. Could use multiple <div class="ray"> but that adds HTML.

Maybe easier: Use CSS animation on .sun to rotate, and have rays as part of .sun using CSS shapes that rotate with it. For example, .sun::before creates a circle (sun disc). For rays, we can create 12 rays using CSS transform rotate and keyframes.

Simplify: Use <div class="sun"><div class="ray"></div><div class="ray"></div>... but that's many elements; but okay.

Given time, maybe we can cheat a bit: Use CSS animation on .sun to rotate, and have rays as part of .sun using radial-gradient? But we need distinct rays, not just gradient.

Maybe we can use <div class="sun"><div class="ray"></div></div> and rotate each individually using animation with different delay to simulate multiple rays. That's okay.

Let's design sun:

.sun { width:80px; height:80px; background:#ffcc00; border-radius:50%; position:relative; animation: rotate 8s linear infinite; }

.sun .ray { position:absolute; top:50%; left:50%; width:2px; height:40%; background:#ff5e62; transform-origin:0% 0%; animation: spin 8s linear infinite; }

But need each ray rotated at different angles. Could use nth-child to set transform: rotate(0deg), rotate(30deg), etc.

Simplify: Use 12 rays via ::before content? Not possible.

Maybe we can create a sun with CSS using multiple linear-gradient backgrounds to create rays? That's too complex.

Given constraints, maybe we can accept that sun icon is just a rotating circle (sun) without rays. But requirement says "rotating sun rays". So need rays.

Alternative: Use <div class="sun"><div class="ray"></div></div> and use CSS to create 12 rays via pseudo-element with multiple backgrounds? Hmm.

Maybe we can cheat by using CSS animation on .sun to rotate, and have rays as part of .sun using CSS shape: we can create rays using linear-gradient with repeating-conic? Not sure.

Simplify: Use <div class="sun"><div class="ray"></div></div> and set transform: rotate(0deg) on each .ray via nth-child to create multiple rays.

Let's do:

.sun { position:relative; width:80px; height:80px; background:#ffcc00; border-radius:50%; animation: rotate 8s linear infinite; }

.sun .ray { position:absolute; top:50%; left:50%; width:2px; height:45%; background:#ff5e62; transform-origin:0% 0%; }

Then we can have multiple .ray elements via ::before? Not possible. But we can add 12 .ray elements using :nth-child? Actually we can use .sun::before to create a ray? Not.

Maybe we can use .sun::before to create a single ray, and then use CSS animation to rotate the whole .sun, which will rotate the ray as well, making it appear as multiple rays due to the rotation. But we need multiple rays at once; we can create a single ray and rotate the container, but that will rotate the ray around the center, not create multiple rays.

Better: Use multiple .ray elements each with different transform: rotate(angle) and then animate them rotating together. But we can just animate the container .sun and have rays as part of it (like using ::before to create a circle and then use ::after to create a ray that rotates). However we need multiple rays; maybe we can use CSS to create a "sunburst" using repeating-linear-gradient with radial orientation.

Simplify further: Use <div class="sun"><div class="circle"></div><div class="rays"></div></div> where .rays is a pseudo-element using CSS to create many rays via repeating-linear-gradient? Might be too complex.

Given time, maybe we can cheat by using <div class="sun"><div class="ray"></div></div> and animate the .sun to rotate, and also animate the .ray to spin around its own axis to simulate rays moving outward. But still not multiple rays.

Maybe we can create a sun using CSS radial-gradient to simulate rays: background: radial-gradient(circle at center, #ffcc00 0%, #ffcc00 20%, #ff5e62 20%, #ff5e62 30%, transparent 30%); That's not rotating.

Maybe easiest: Use an animated sun with CSS keyframes that changes the border radius to create a "spiky" shape? Not.

Given constraints, maybe we can accept that the sun icon is just a rotating circle (sun) and the requirement "rotating sun rays" may be satisfied by rotating rays created with pseudo-element that rotates (the whole icon rotates). That may be considered as rotating sun rays.

Let's design:

.sun { width:80px; height:80px; background:#ffcc00; border-radius:50%; position:relative; animation: rotate 8s linear infinite; }

.sun::before { content:''; position:absolute; inset:0; border-radius:50%; background:#ff5e62; }

.sun::after { content:''; position:absolute; top:50%; left:50%; width:2px; height:50%; background:#ff5e62; transform-origin:0% 0%; animation: spin 8s linear infinite; }

But ::after only one ray. Could create multiple rays by using multiple ::after? Not possible.

Maybe we can use CSS to create a "sun" using multiple linear-gradient backgrounds to simulate rays; but rotating will still be just the whole shape.

Given the difficulty, maybe we can design the sun icon as a rotating circle with rays made from CSS using multiple linear-gradient backgrounds that rotate. Let's think: we can create a sun shape using CSS with pseudo-element that has multiple "spikes" using transform rotate and keyframes to animate them outward? Might be too heavy.

Alternative: Use <div class="sun"><div class="ray"></div></div> and use CSS animation on .sun to rotate, and also .ray to spin (scale) to simulate rays moving outward. That may be acceptable.

Let's design sun:

<div class="icon sun">
  <div class="circle"></div>
  <div class="ray"></div>
</div>

But need multiple rays; maybe we can use CSS to create 12 rays via ::before with multiple backgrounds using repeating-linear-gradient? Not.

Maybe we can cheat: Use <div class="sun"><div class="ray"></div></div> and set animation on .sun to rotate 360deg, and also animate .ray to rotate 360deg to create the effect of many rays due to motion blur? Not.

Given time, maybe we can accept that the sun icon is just a rotating circle (sun) and the requirement is loosely interpreted.

But the problem states "rotating sun rays". So we need to show rays. Let's attempt to create a sun with 12 rays using CSS pseudo-element and keyframes.

We can create a container .sun with position:relative; then use ::before to create a circle (sun disc). Then we can use ::after with multiple rays via CSS using multiple linear-gradient backgrounds? Not.

Maybe we can use CSS to create rays as separate <div class="ray"> elements using nth-child to set transform rotate. For example:

.sun { position:relative; width:80px; height:80px; background:#ffcc00; border-radius:50%; animation: rotate 8s linear infinite; }

.sun .ray { position:absolute; top:50%; left:50%; width:2px; height:45%; background:#ff5e62; transform-origin:0% 0%; }

Then we can add 12 .ray elements via :nth-child to set different rotation angles, and then animate them to rotate as well (maybe just rotate the container). But we need each ray to rotate around its own axis to simulate falling? Actually we need rays rotating around the sun (like sun spinning). So we can animate the .sun to rotate, which will rotate all rays as they are children, but they will all rotate together, which is fine.

But we need multiple rays at once; we can create 12 .ray elements each with a different initial rotation angle (via transform: rotate(0deg), rotate(30deg), etc.) and then animate the container to rotate, causing them to spin.

Let's implement:

.sun { width:80px; height:80px; background:#ffcc00; border-radius:50%; position:relative; animation: rotate 8s linear infinite; }

.sun .ray { position:absolute; top:50%; left:50%; width:2px; height:45%; background:#ff5e62; transform-origin:0% 0%; }

Then we add 12 .ray elements:

.sun .ray:nth-child(1) { transform: rotate(0deg); }
.sun .ray:nth-child(2) { transform: rotate(30deg); }
... up to 12.

But we need to add them in HTML; that's okay.

Simplify: Use 12 .ray elements.

Now rainy icon: falling rain drops. Could use <div class="icon rain"><div class="drop"></div></div> and animate drop to move down with slight random horizontal drift. Use keyframes drop-down.

Snowflake: <div class="icon snow"><div class="flake"></div></div> animate moving diagonally.

Lightning: <div class="icon lightning"><div class="bolt"></div></div> animate flashing (opacity) and moving.

Now ensure each card has its own animation for its icon, and also the card lifts on hover.

Now need to respect prefers-reduced-motion: set animation-play-state: paused for all animations when media query.

Implementation: define .sun, .rain, .snow, .lightning each with animation properties. Then add @media (prefers-reduced-motion: reduce) { .sun, .rain, .snow, .lightning { animation-play-state: paused; } }

But need to also pause the card lift? Not needed.

Now ensure the page loads with first paint visible: we need to have cards displayed immediately, with maybe the animation starting after load (infinite). Since no JS, the animation will start automatically after load (CSS animation). So first paint will show cards with maybe static content, then animation begins. That's fine.

Now we need to ensure the grid is responsive: use CSS grid with repeat(4, 1fr) and media query for max-width: 600px to set grid-template-columns: 1fr; also maybe adjust card width to 100%? We'll set .card { width: 100%; }.

Now ensure no scrollbars: set body { overflow-x:hidden; } maybe.

Now ensure the page uses only HTML and CSS; we need to embed everything in a single file.

Let's craft final HTML:

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Weather Cards</title>
<style>
/* Reset */
* { box-sizing:border-box; margin:0; padding:0; }
html, body { height:100%; font-family:Arial, sans-serif; overflow-x:hidden; }

/* Grid container */
.grid {
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap:1rem;
  padding:1rem;
  max-width:1280px;
  margin:0 auto;
}
@media (max-width:600px) {
  .grid { grid-template-columns:1fr; }
}

/* Card styling */
.card {
  background:var(--bg);
  border-radius:8px;
  overflow:hidden;
  box-shadow:0 2px 6px rgba(0,0,0,0.1);
  transition:transform .3s ease, box-shadow .3s ease;
  position:relative;
}
.card:hover {
  transform:translateY(-10px);
  box-shadow:0 10px 20px rgba(0,0,0,0.2);
}

/* Gradients per weather */
.sunny   { --bg:linear-gradient(135deg, #ffdd57, #ff5e62); }
.rainy   { --bg:linear-gradient(135deg, #a7c7e7, #62a8c0); }
.snowy   { --bg:linear-gradient(135deg, #d6e0f0, #b0c4de); }
.stormy  { --bg:linear-gradient(135deg, #4b3f72, #2c3e50); }

/* Card content */
.city { font-size:1.2rem; font-weight:600; margin:0.5rem; }
.temp   { font-size:1.5rem; margin:0.2rem 0; }
.desc   { font-size:1rem; color:#555; margin:0.5rem; }

/* Icon container */
.icon {
  position:absolute;
  top:1rem;
  left:1rem;
  width:80px;
  height:80px;
}
.icon .circle {
  position:absolute;
  top:50%; left:50%;
  width:40px; height:40px;
  background:#ffcc00;
  border-radius:50%;
  transform:translate(-50%,-50%);
}

/* Sun rays */
.sun .ray {
  position:absolute;
  top:50%; left:50%;
  width:2px; height:45%;
  background:#ff5e62;
  transform-origin:0% 0%;
}
.sun .ray:nth-child(1){ transform:rotate(0deg); }
.sun .ray:nth-child(2){ transform:rotate(30deg); }
.sun .ray:nth-child(3){ transform:rotate(60deg); }
.sun .ray:nth-child(4){ transform:rotate(90deg); }
.sun .ray:nth-child(5){ transform:rotate(120deg); }
.sun .ray:nth-child(6){ transform:rotate(150deg); }
.sun .ray:nth-child(7){ transform:rotate(180deg); }
.sun .ray:nth-child(8){ transform:rotate(210deg); }
.sun .ray:nth-child(9){ transform:rotate(240deg); }
.sun .ray:nth-child(10){ transform:rotate(270deg); }
.sun .ray:nth-child(11){ transform:rotate(300deg); }
.sun .ray:nth-child(12){ transform:rotate(330deg); }

/* Animation for sun rotation */
.sun {
  animation: rotateSun 8s linear infinite;
}

/* Rain drops */
.rain .drop {
  position:absolute;
  top:-10px;
  width:4px; height:20px;
  background:#57a1b3;
  border-radius:50% 50% 0 0;
  animation: fallRain 4s linear infinite;
  opacity:0.8;
}
.rain .drop:nth-child(1){ left:10%; animation-delay:0s; }
.rain .drop:nth-child(2){ left:20%; animation-delay:1s; }
.rain .drop:nth-child(3){ left:30%; animation-delay:2s; }
.rain .drop:nth-child(4){ left:40%; animation-delay:3s; }
.rain .drop:nth-child(5){ left:50%; animation-delay:4s; }

/* Snowflakes */
.snow .flake {
  position:absolute;
  top:-10px;
  width:6px; height:6px;
  background:#fff;
  border-radius:50%;
  animation: driftSnow 6s linear infinite;
  opacity:0.9;
}
.snow .flake:nth-child(1){ left:5%; animation-delay:0s; }
.snow .flake:nth-child(2){ left:15%; animation-delay:1s; }
.snow .flake:nth-child(3){ left:25%; animation-delay:2s; }
.snow .flake:nth-child(4){ left:35%; animation-delay:3s; }
.snow .flake:nth-child(5){ left:45%; animation-delay:4s; }

/* Lightning */
.lightning .bolt {
  position:absolute;
  top:20%; left:50%;
  width:4px; height:30%;
  background:#ffcc00;
  border-radius:2px;
  transform-origin:0% 0%;
  animation: flashLightning 2s infinite;
  opacity:0;
}
.lightning .bolt:nth-child(1){ animation-delay:0s; }
.lightning .bolt:nth-child(2){ animation-delay:1s; }

/* Keyframes */
@keyframes rotateSun {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@keyframes fallRain {
  0% { transform: translateY(0) translateX(0); opacity:0; }
  10% { opacity:0.8; }
  90% { opacity:0.8; }
  100% { transform: translateY(120px) translateX(0); opacity:0; }
}
@keyframes driftSnow {
  0% { transform: translateY(0) translateX(0); }
  100% { transform: translateY(120px) translateX(20px); }
}
@keyframes flashLightning {
  0%,100% { opacity:0; }
  10% { opacity:1; }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .sun, .rain .drop, .snow .flake, .lightning .bolt {
    animation-play-state: paused;
  }
}
</style>
</head>
<body>
<div class="grid">
  <div class="card sunny">
    <div class="icon sun">
      <div class="circle"></div>
      <div class="ray"></div><div class="ray"></div><div class="ray"></div><div class="ray"></div><div class="ray"></div><div class="ray"></div><div class="ray"></div><div class="ray"></div><div class="ray"></div><div class="ray"></div><div class="ray"></div><div class="ray"></div>
    </div>
    <h3 class="city">New York</h3>
    <p class="temp">22°C</p>
    <p class="desc">Sunny</p>
  </div>

  <div class="card rainy">
    <div class="icon rain">
      <div class="drop"></div><div class="drop"></div><div class="drop"></div><div class="drop"></div><div class="drop"></div>
    </div>
    <h3 class="city">London</h3>
    <p class="temp">18°C</p>
    <p class="desc">Rainy</p>
  </div>

  <div class="card snowy">
    <div class="icon snow">
      <div class="flake"></div><div class="flake"></div><div class="flake"></div><div class="flake"></div><div class="flake"></div>
    </div>
    <h3 class="city">Paris</h3>
    <p class="temp">5°C</p>
    <p class="desc">Snowy</p>
  </div>

  <div class="card stormy">
    <div class="icon lightning">
      <div class="bolt"></div><div class="bolt"></div>
    </div>
    <h3 class="city">Tokyo</h3>
    <p class="temp">27°C</p>
    <p class="desc">Stormy</p>
  </div>
</div>
</body>
</html>

Check constraints:

- No script tags. Yes.
- No images, SVG, icon fonts. Icons are built from divs and pseudo-elements. Sun rays are multiple .ray divs; they are HTML elements, not images. Acceptable.
- Each card has animated icon (sun rays rotating). The sun rotates via .sun animation; rays are static but rotate with container, giving effect of rotating rays.
- Rain drops fall. Snowflakes drift. Lightning flashes (opacity). All infinite.
- Background gradients per card via CSS variables.
- Responsive grid: 4 per row on desktop, stacked on mobile (<600px). Cards lift on hover.
- Smooth infinite animations using @keyframes.
- prefers-reduced-motion: animation-play-state paused.
- No external resources.
- Should display correctly in 1280x800 viewport and adapt down to 375px. Grid will adapt.

Potential issues: The sun rays are many divs; maybe too many but okay. The sun animation rotates container, causing rays to rotate, fulfilling "rotating sun rays". The sun also has a circle; maybe not needed but okay.

Check for any console errors: Ensure no unsupported CSS features. Use CSS variables; they are fine. Use :nth-child for rays; okay.

Potential improvement: Ensure the sun rays are visible; maybe need to set their opacity or size. They are 2px wide, height 45% of container (80px) => 36px length, visible.

Rain drops: .drop is a rectangle with top -10px to start above card, then moves down 120px. Good.

Snowflakes: .flake moves down and right.

Lightning: .bolt flashes opacity and maybe moves? It currently just changes opacity; maybe also translateY to simulate flash. Could add transform: translateY(-10px) etc. But not required; flashing is enough.

Check that each card lifts on hover: transform: translateY(-10px) and box-shadow increase.

Check that the page has no scrollbars: body overflow-x hidden; grid container width max 1280px; cards are within; should be fine.

Now ensure the first paint shows something: The cards are displayed immediately; the animations start after load, but the content is visible.

All good.

Now produce final answer with exactly one fenced code block containing the HTML.