Model: openrouter/z-ai/glm-5.1
Generate an SVG of a pelican riding a bicycle
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Pelican Riding a Bicycle</title>
<style>
:root {
--bg-top: #f9d976;
--bg-bottom: #f39f86;
--ground: #5a8a3c;
--ground-dark: #4a7a2c;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 60%, var(--ground) 85%, var(--ground-dark) 100%);
overflow: hidden;
font-family: 'Georgia', serif;
}
.scene-container {
position: relative;
width: 700px;
max-width: 95vw;
}
svg {
width: 100%;
height: auto;
filter: drop-shadow(0 8px 24px rgba(0,0,0,0.15));
}
/* Wheel spin animation */
@keyframes spinWheel {
from { transform: rotate(0deg); }
to { transform: rotate(360deg); }
}
.wheel-spin {
animation: spinWheel 1.5s linear infinite;
transform-origin: center;
}
/* Pelican bob animation */
@keyframes pelicanBob {
0%, 100% { transform: translateY(0); }
50% { transform: translateY(-3px); }
}
.pelican-body {
animation: pelicanBob 0.75s ease-in-out infinite;
}
/* Pedal rotation */
@keyframes pedalSpin {
from { transform: rotate(0deg); }
to { transform: rotate(360deg); }
}
.pedal-group {
animation: pedalSpin 1.5s linear infinite;
transform-origin: center;
}
/* Cloud drift */
@keyframes cloudDrift1 {
0% { transform: translateX(0); }
50% { transform: translateX(15px); }
100% { transform: translateX(0); }
}
@keyframes cloudDrift2 {
0% { transform: translateX(0); }
50% { transform: translateX(-12px); }
100% { transform: translateX(0); }
}
.cloud1 { animation: cloudDrift1 8s ease-in-out infinite; }
.cloud2 { animation: cloudDrift2 10s ease-in-out infinite; }
/* Pouch wobble */
@keyframes pouchWobble {
0%, 100% { transform: scaleX(1) scaleY(1); }
25% { transform: scaleX(1.03) scaleY(0.97); }
75% { transform: scaleX(0.97) scaleY(1.03); }
}
.pouch {
animation: pouchWobble 0.75s ease-in-out infinite;
transform-origin: top center;
}
/* Leg pedaling */
@keyframes legPedal {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
.leg-group {
animation: legPedal 1.5s linear infinite;
transform-origin: center;
}
.caption {
text-align: center;
margin-top: 20px;
font-size: 1.3rem;
color: #5a3e2b;
letter-spacing: 0.05em;
font-style: italic;
}
@media (prefers-reduced-motion: reduce) {
.wheel-spin, .pelican-body, .pedal-group, .cloud1, .cloud2, .pouch, .leg-group {
animation: none;
}
}
</style>
</head>
<body>
<div class="scene-container">
<svg viewBox="0 0 700 500" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="A pelican riding a bicycle">
<defs>
<!-- Gradients -->
<radialGradient id="sunGlow" cx="50%" cy="50%" r="50%">
<stop offset="0%" stop-color="#fff7a0"/>
<stop offset="60%" stop-color="#ffe566"/>
<stop offset="100%" stop-color="#f9d97600"/>
</radialGradient>
<linearGradient id="bodyGrad" x1="0" y1="0" x2="0" y2="1">
<stop offset="0%" stop-color="#fafafa"/>
<stop offset="80%" stop-color="#e8e0d8"/>
<stop offset="100%" stop-color="#d4c8bc"/>
</linearGradient>
<linearGradient id="wingGrad" x1="0" y1="0" x2="0.3" y2="1">
<stop offset="0%" stop-color="#555e6e"/>
<stop offset="100%" stop-color="#3a414f"/>
</linearGradient>
<linearGradient id="beakGrad" x1="0" y1="0" x2="1" y2="0.5">
<stop offset="0%" stop-color="#f4a623"/>
<stop offset="100%" stop-color="#e8881a"/>
</linearGradient>
<linearGradient id="pouchGrad" x1="0" y1="0" x2="0" y2="1">
<stop offset="0%" stop-color="#f4a623"/>
<stop offset="50%" stop-color="#e07a10"/>
<stop offset="100%" stop-color="#c86a08"/>
</linearGradient>
<linearGradient id="frameGrad" x1="0" y1="0" x2="0" y2="1">
<stop offset="0%" stop-color="#d63031"/>
<stop offset="100%" stop-color="#a02020"/>
</linearGradient>
<linearGradient id="tireGrad" x1="0" y1="0" x2="0" y2="1">
<stop offset="0%" stop-color="#333"/>
<stop offset="100%" stop-color="#1a1a1a"/>
</linearGradient>
<linearGradient id="groundGrad" x1="0" y1="0" x2="0" y2="1">
<stop offset="0%" stop-color="#6a9a4c"/>
<stop offset="100%" stop-color="#4a7a2c"/>
</linearGradient>
<linearGradient id="skyGrad" x1="0" y1="0" x2="0" y2="1">
<stop offset="0%" stop-color="#87ceeb"/>
<stop offset="100%" stop-color="#f9d976"/>
</linearGradient>
</defs>
<!-- Background -->
<rect width="700" height="500" fill="url(#skyGrad)" rx="12"/>
<!-- Sun -->
<circle cx="600" cy="80" r="60" fill="url(#sunGlow)" opacity="0.8"/>
<!-- Clouds -->
<g class="cloud1" opacity="0.85">
<ellipse cx="120" cy="70" rx="50" ry="20" fill="white"/>
<ellipse cx="150" cy="60" rx="40" ry="22" fill="white"/>
<ellipse cx="90" cy="65" rx="35" ry="18" fill="white"/>
</g>
<g class="cloud2" opacity="0.7">
<ellipse cx="460" cy="50" rx="45" ry="18" fill="white"/>
<ellipse cx="490" cy="42" rx="35" ry="20" fill="white"/>
<ellipse cx="435" cy="46" rx="30" ry="15" fill="white"/>
</g>
<!-- Ground -->
<rect x="0" y="400" width="700" height="100" fill="url(#groundGrad)" rx="0"/>
<path d="M0,400 Q50,395 100,400 Q150,405 200,400 Q250,395 300,400 Q350,405 400,400 Q450,395 500,400 Q550,405 600,400 Q650,395 700,400" fill="none" stroke="#5a8a3c" stroke-width="2"/>
<!-- Distant hills -->
<ellipse cx="150" cy="400" rx="200" ry="40" fill="#7aaa5c" opacity="0.5"/>
<ellipse cx="550" cy="400" rx="220" ry="50" fill="#6a9a4c" opacity="0.4"/>
<!-- Small flowers on ground -->
<circle cx="80" cy="420" r="3" fill="#f4e04d"/>
<circle cx="82" cy="418" r="2" fill="#fff"/>
<circle cx="200" cy="425" r="3" fill="#ff6b6b"/>
<circle cx="202" cy="423" r="2" fill="#fff"/>
<circle cx="520" cy="418" r="3" fill="#f4e04d"/>
<circle cx="522" cy="416" r="2" fill="#fff"/>
<circle cx="620" cy="422" r="3" fill="#ff6b6b"/>
<circle cx="622" cy="420" r="2" fill="#fff"/>
<!-- ============ BICYCLE ============ -->
<g transform="translate(350, 340)">
<!-- Back wheel -->
<g style="transform-origin: -70px 50px;" class="wheel-spin">
<!-- Tire -->
<circle cx="-70" cy="50" r="55" fill="none" stroke="url(#tireGrad)" stroke-width="8"/>
<!-- Rim -->
<circle cx="-70" cy="50" r="48" fill="none" stroke="#c0c0c0" stroke-width="2"/>
<!-- Spokes -->
<line x1="-70" y1="2" x2="-70" y2="98" stroke="#bbb" stroke-width="1"/>
<line x1="-118" y1="50" x2="-22" y2="50" stroke="#bbb" stroke-width="1"/>
<line x1="-104" y1="16" x2="-36" y2="84" stroke="#bbb" stroke-width="1"/>
<line x1="-36" y1="16" x2="-104" y2="84" stroke="#bbb" stroke-width="1"/>
<!-- Hub -->
<circle cx="-70" cy="50" r="6" fill="#999" stroke="#777" stroke-width="1"/>
</g>
<!-- Front wheel -->
<g style="transform-origin: 70px 50px;" class="wheel-spin">
<circle cx="70" cy="50" r="55" fill="none" stroke="url(#tireGrad)" stroke-width="8"/>
<circle cx="70" cy="50" r="48" fill="none" stroke="#c0c0c0" stroke-width="2"/>
<line x1="70" y1="2" x2="70" y2="98" stroke="#bbb" stroke-width="1"/>
<line x1="22" y1="50" x2="118" y2="50" stroke="#bbb" stroke-width="1"/>
<line x1="36" y1="16" x2="104" y2="84" stroke="#bbb" stroke-width="1"/>
<line x1="104" y1="16" x2="36" y2="84" stroke="#bbb" stroke-width="1"/>
<circle cx="70" cy="50" r="6" fill="#999" stroke="#777" stroke-width="1"/>
</g>
<!-- Frame -->
<!-- Seat tube -->
<line x1="-15" y1="-20" x2="-5" y2="50" stroke="url(#frameGrad)" stroke-width="5" stroke-linecap="round"/>
<!-- Top tube -->
<line x1="-15" y1="-20" x2="45" y2="-10" stroke="url(#frameGrad)" stroke-width="5" stroke-linecap="round"/>
<!-- Down tube -->
<line x1="-5" y1="50" x2="45" y2="-10" stroke="url(#frameGrad)" stroke-width="5" stroke-linecap="round"/>
<!-- Chain stay -->
<line x1="-5" y1="50" x2="-70" y2="50" stroke="url(#frameGrad)" stroke-width="4" stroke-linecap="round"/>
<!-- Seat stay -->
<line x1="-15" y1="-20" x2="-70" y2="50" stroke="url(#frameGrad)" stroke-width="3" stroke-linecap="round"/>
<!-- Fork -->
<line x1="45" y1="-10" x2="70" y2="50" stroke="url(#frameGrad)" stroke-width="4" stroke-linecap="round"/>
<!-- Handlebar stem -->
<line x1="45" y1="-10" x2="55" y2="-40" stroke="#888" stroke-width="4" stroke-linecap="round"/>
<!-- Handlebars -->
<path d="M40,-45 Q55,-50 70,-40" fill="none" stroke="#555" stroke-width="4" stroke-linecap="round"/>
<!-- Handlebar grips -->
<circle cx="40" cy="-45" r="4" fill="#333"/>
<circle cx="70" cy="-40" r="4" fill="#333"/>
<!-- Seat post -->
<line x1="-15" y1="-20" x2="-18" y2="-35" stroke="#777" stroke-width="4" stroke-linecap="round"/>
<!-- Seat -->
<ellipse cx="-18" cy="-40" rx="18" ry="7" fill="#2d2d2d" stroke="#222" stroke-width="1"/>
<!-- Pedal crank (animated) -->
<g style="transform-origin: -5px 50px;" class="pedal-group">
<!-- Crank arms -->
<line x1="-5" y1="50" x2="-5" y2="25" stroke="#888" stroke-width="3" stroke-linecap="round"/>
<line x1="-5" y1="50" x2="-5" y2="75" stroke="#888" stroke-width="3" stroke-linecap="round"/>
<!-- Pedals -->
<rect x="-12" y="22" width="14" height="5" rx="2" fill="#555"/>
<rect x="-12" y="73" width="14" height="5" rx="2" fill="#555"/>
<!-- Chainring -->
<circle cx="-5" cy="50" r="14" fill="none" stroke="#999" stroke-width="2"/>
<circle cx="-5" cy="50" r="4" fill="#888"/>
</g>
<!-- Chain (simplified) -->
<path d="M-19,50 Q-40,50 -70,50" fill="none" stroke="#777" stroke-width="1.5" stroke-dasharray="3,2"/>
</g>
<!-- ============ PELICAN ============ -->
<g class="pelican-body" transform="translate(340, 270)">
<!-- Tail feathers -->
<path d="M-30,30 Q-50,10 -45,-5 Q-38,5 -30,15 Z" fill="#d4c8bc" stroke="#c0b0a0" stroke-width="1"/>
<path d="M-28,35 Q-55,20 -50,5 Q-40,15 -30,25 Z" fill="#e0d4c8" stroke="#c0b0a0" stroke-width="1"/>
<path d="M-25,38 Q-48,28 -48,15 Q-38,22 -28,30 Z" fill="#d4c8bc" stroke="#c0b0a0" stroke-width="1"/>
<!-- Body -->
<ellipse cx="0" cy="15" rx="38" ry="28" fill="url(#bodyGrad)" stroke="#d0c4b8" stroke-width="1"/>
<!-- Wing (dark) -->
<path d="M-15,5 Q-25,0 -30,15 Q-28,30 -10,28 Q5,25 10,20 Q0,15 -15,5 Z" fill="url(#wingGrad)" stroke="#2e3540" stroke-width="1"/>
<!-- Wing feather details -->
<path d="M-20,12 Q-15,18 -5,22" fill="none" stroke="#4a5262" stroke-width="0.8"/>
<path d="M-22,17 Q-16,22 -8,25" fill="none" stroke="#4a5262" stroke-width="0.8"/>
<!-- Neck -->
<path d="M15,0 Q20,-20 25,-45 Q30,-55 28,-60" fill="url(#bodyGrad)" stroke="#d0c4b8" stroke-width="1.5"/>
<path d="M25,0 Q28,-18 30,-45 Q32,-55 30,-60" fill="url(#bodyGrad)" stroke="none"/>
<!-- Head -->
<ellipse cx="29" cy="-65" rx="16" ry="14" fill="url(#bodyGrad)" stroke="#d0c4b8" stroke-width="1"/>
<!-- Eye -->
<circle cx="36" cy="-68" r="4" fill="white" stroke="#333" stroke-width="0.5"/>
<circle cx="37" cy="-68" r="2.5" fill="#1a1a1a"/>
<circle cx="38" cy="-69" r="1" fill="white"/>
<!-- Eye ring -->
<circle cx="36" cy="-68" r="5.5" fill="none" stroke="#c8b090" stroke-width="0.8"/>
<!-- Beak (upper) -->
<path d="M42,-68 L75,-64 Q78,-62 75,-60 L42,-58 Q40,-63 42,-68 Z" fill="url(#beakGrad)" stroke="#d0801a" stroke-width="1"/>
<!-- Beak ridge -->
<line x1="44" y1="-63" x2="74" y2="-62" stroke="#e89830" stroke-width="1" opacity="0.6"/>
<!-- Nostril -->
<ellipse cx="50" cy="-66" rx="2" ry="1" fill="#c87010"/>
<!-- Pouch (lower beak) -->
<g class="pouch" style="transform-origin: 42px -58px;">
<path d="M42,-58 Q43,-50 48,-42 Q55,-35 62,-38 Q70,-42 75,-60 L42,-58 Z" fill="url(#pouchGrad)" stroke="#b06008" stroke-width="1" opacity="0.9"/>
<!-- Pouch fold detail -->
<path d="M48,-50 Q55,-46 60,-52" fill="none" stroke="#c06a08" stroke-width="0.8" opacity="0.6"/>
</g>
<!-- Head tuft / crest -->
<path d="M18,-75 Q15,-85 20,-88 Q22,-82 24,-77" fill="#e0d4c8" stroke="#c8b8a8" stroke-width="0.8"/>
<path d="M22,-77 Q20,-90 25,-92 Q26,-85 26,-78" fill="#d8ccc0" stroke="#c8b8a8" stroke-width="0.8"/>
<!-- Feet on pedals (simplified orange webbed feet) -->
<g style="transform-origin: 345px 320px;" class="leg-group">
<!-- Far leg -->
<path d="M-5,35 Q-3,45 -8,52" fill="none" stroke="#e8a040" stroke-width="4" stroke-linecap="round"/>
<path d="M-8,52 L-14,56 M-8,52 L-8,58 M-8,52 L-2,56" fill="none" stroke="#e8a040" stroke-width="2" stroke-linecap="round"/>
<!-- Near leg -->
<path d="M5,35 Q7,45 2,52" fill="none" stroke="#f0a830" stroke-width="4" stroke-linecap="round"/>
<path d="M2,52 L-4,56 M2,52 L2,58 M2,52 L8,56" fill="none" stroke="#f0a830" stroke-width="2" stroke-linecap="round"/>
</g>
<!-- Wing tip on handlebar (reaching forward) -->
<path d="M15,5 Q30,0 50,-8 Q60,-12 70,-15" fill="none" stroke="#555e6e" stroke-width="3" stroke-linecap="round"/>
<path d="M50,-8 Q55,-5 60,-3" fill="none" stroke="#555e6e" stroke-width="2" stroke-linecap="round"/>
</g>
<!-- Speed lines / motion blur effect -->
<g opacity="0.3">
<line x1="180" y1="310" x2="210" y2="310" stroke="#888" stroke-width="1.5" stroke-linecap="round"/>
<line x1="170" y1="320" x2="205" y2="320" stroke="#888" stroke-width="1.5" stroke-linecap="round"/>
<line x1="175" y1="330" x2="200" y2="330" stroke="#888" stroke-width="1" stroke-linecap="round"/>
<line x1="160" y1="340" x2="195" y2="340" stroke="#888" stroke-width="1" stroke-linecap="round"/>
<line x1="165" y1="350" x2="190" y2="350" stroke="#888" stroke-width="1.5" stroke-linecap="round"/>
</g>
<!-- Small dust puffs behind back wheel -->
<g opacity="0.25">
<circle cx="210" cy="395" r="8" fill="#c8b898"/>
<circle cx="195" cy="390" r="6" fill="#c8b898"/>
<circle cx="220" cy="388" r="5" fill="#c8b898"/>
<circle cx="200" cy="400" r="4" fill="#c8b898"/>
</g>
</svg>
<p class="caption">A pelican enjoying a sunny ride</p>
</div>
</body>
</html>This illustration features a charming pelican perched atop a red bicycle, pedaling along a sunny countryside path. Here's what makes it come alive:
Pelican Details:
- A plump white/cream body with a dark grey wing and feather details
- The signature large orange beak with a translucent throat pouch that wobbles as it rides
- A expressive eye with a catchlight and a naturalistic eye-ring
- A small head crest/tuft for personality
- Orange webbed feet positioned on the pedals
Bicycle Details:
- Classic diamond frame in cherry red with a dark seat and handlebar grips
- Two spoked wheels with dark tires and silver rims
- Animated pedal crank with chainring and a simplified chain
Animations:
- Spinning wheels — continuous rotation giving the sense of forward motion
- Pedaling crank — synchronized with the wheel speed
- Pelican bobbing — gentle up-down motion like it's pedaling with effort
- Pouch wobble — the throat pouch jiggles with the ride
- Drifting clouds — subtle parallax-like movement in the sky
- Speed lines & dust puffs — behind the back wheel for a sense of motion
Scene Setting:
- A warm sunset gradient sky with a glowing sun and soft clouds
- Rolling green hills with a grassy ground and tiny wildflowers
- All respects
prefers-reduced-motionfor accessibility
15 input, 5,776 output, {"completion_tokens_details": {"reasoning_tokens": 175}, "prompt_tokens_details": {"cached_tokens": 2}, "cost": 0.02543312, "cost_details": {"upstream_inference_cost": 0.02543312, "upstream_inference_prompt_cost": 1.872e-05, "upstream_inference_completions_cost": 0.0254144}}
the animation is a bit broken, the pelican ends up positioned off the screen at the top right
The issue is that CSS transform animations on SVG elements override the SVG transform attribute used for positioning, causing the pelican to lose its placement and fly off to the top-right. The fix is to separate positioning (SVG attribute) from animation (inner group) and use <animateTransform> for SVG rotations since it handles coordinate systems correctly.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Pelican Riding a Bicycle</title>
<style>
:root {
--bg-top: #f9d976;
--bg-bottom: #f39f86;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 60%, #5a8a3c 85%, #4a7a2c 100%);
overflow: hidden;
font-family: Georgia, serif;
}
.scene-container {
position: relative;
width: 700px;
max-width: 95vw;
}
svg {
width: 100%;
height: auto;
filter: drop-shadow(0 8px 24px rgba(0,0,0,0.15));
}
/* Cloud drift — CSS is fine here since clouds have no SVG transform */
@keyframes cloudDrift1 {
0%, 100% { transform: translateX(0); }
50% { transform: translateX(15px); }
}
@keyframes cloudDrift2 {
0%, 100% { transform: translateX(0); }
50% { transform: translateX(-12px); }
}
.cloud1 { animation: cloudDrift1 8s ease-in-out infinite; }
.cloud2 { animation: cloudDrift2 10s ease-in-out infinite; }
.caption {
text-align: center;
margin-top: 20px;
font-size: 1.3rem;
color: #5a3e2b;
letter-spacing: 0.05em;
font-style: italic;
}
@media (prefers-reduced-motion: reduce) {
.cloud1, .cloud2 { animation: none; }
svg animateTransform { /* still runs, but that's SVG-native */ }
}
</style>
</head>
<body>
<div class="scene-container">
<svg viewBox="0 0 700 500" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="A pelican riding a bicycle">
<defs>
<radialGradient id="sunGlow" cx="50%" cy="50%" r="50%">
<stop offset="0%" stop-color="#fff7a0"/>
<stop offset="60%" stop-color="#ffe566"/>
<stop offset="100%" stop-color="#f9d97600"/>
</radialGradient>
<linearGradient id="bodyGrad" x1="0" y1="0" x2="0" y2="1">
<stop offset="0%" stop-color="#fafafa"/>
<stop offset="80%" stop-color="#e8e0d8"/>
<stop offset="100%" stop-color="#d4c8bc"/>
</linearGradient>
<linearGradient id="wingGrad" x1="0" y1="0" x2="0.3" y2="1">
<stop offset="0%" stop-color="#555e6e"/>
<stop offset="100%" stop-color="#3a414f"/>
</linearGradient>
<linearGradient id="beakGrad" x1="0" y1="0" x2="1" y2="0.5">
<stop offset="0%" stop-color="#f4a623"/>
<stop offset="100%" stop-color="#e8881a"/>
</linearGradient>
<linearGradient id="pouchGrad" x1="0" y1="0" x2="0" y2="1">
<stop offset="0%" stop-color="#f4a623"/>
<stop offset="50%" stop-color="#e07a10"/>
<stop offset="100%" stop-color="#c86a08"/>
</linearGradient>
<linearGradient id="frameGrad" x1="0" y1="0" x2="0" y2="1">
<stop offset="0%" stop-color="#d63031"/>
<stop offset="100%" stop-color="#a02020"/>
</linearGradient>
<linearGradient id="tireGrad" x1="0" y1="0" x2="0" y2="1">
<stop offset="0%" stop-color="#333"/>
<stop offset="100%" stop-color="#1a1a1a"/>
</linearGradient>
<linearGradient id="groundGrad" x1="0" y1="0" x2="0" y2="1">
<stop offset="0%" stop-color="#6a9a4c"/>
<stop offset="100%" stop-color="#4a7a2c"/>
</linearGradient>
<linearGradient id="skyGrad" x1="0" y1="0" x2="0" y2="1">
<stop offset="0%" stop-color="#87ceeb"/>
<stop offset="100%" stop-color="#f9d976"/>
</linearGradient>
</defs>
<!-- Background -->
<rect width="700" height="500" fill="url(#skyGrad)" rx="12"/>
<!-- Sun -->
<circle cx="600" cy="80" r="60" fill="url(#sunGlow)" opacity="0.8"/>
<!-- Clouds (no SVG transform, CSS animation safe) -->
<g class="cloud1" opacity="0.85">
<ellipse cx="120" cy="70" rx="50" ry="20" fill="white"/>
<ellipse cx="150" cy="60" rx="40" ry="22" fill="white"/>
<ellipse cx="90" cy="65" rx="35" ry="18" fill="white"/>
</g>
<g class="cloud2" opacity="0.7">
<ellipse cx="460" cy="50" rx="45" ry="18" fill="white"/>
<ellipse cx="490" cy="42" rx="35" ry="20" fill="white"/>
<ellipse cx="435" cy="46" rx="30" ry="15" fill="white"/>
</g>
<!-- Ground -->
<rect x="0" y="400" width="700" height="100" fill="url(#groundGrad)"/>
<path d="M0,400 Q50,395 100,400 Q150,405 200,400 Q250,395 300,400 Q350,405 400,400 Q450,395 500,400 Q550,405 600,400 Q650,395 700,400" fill="none" stroke="#5a8a3c" stroke-width="2"/>
<!-- Distant hills -->
<ellipse cx="150" cy="400" rx="200" ry="40" fill="#7aaa5c" opacity="0.5"/>
<ellipse cx="550" cy="400" rx="220" ry="50" fill="#6a9a4c" opacity="0.4"/>
<!-- Small flowers -->
<circle cx="80" cy="420" r="3" fill="#f4e04d"/><circle cx="82" cy="418" r="2" fill="#fff"/>
<circle cx="200" cy="425" r="3" fill="#ff6b6b"/><circle cx="202" cy="423" r="2" fill="#fff"/>
<circle cx="520" cy="418" r="3" fill="#f4e04d"/><circle cx="522" cy="416" r="2" fill="#fff"/>
<circle cx="620" cy="422" r="3" fill="#ff6b6b"/><circle cx="622" cy="420" r="2" fill="#fff"/>
<!-- ============ BICYCLE ============ -->
<!-- Outer group: positioning only -->
<g transform="translate(350, 340)">
<!-- Back wheel — spins via animateTransform -->
<g>
<circle cx="-70" cy="50" r="55" fill="none" stroke="url(#tireGrad)" stroke-width="8"/>
<circle cx="-70" cy="50" r="48" fill="none" stroke="#c0c0c0" stroke-width="2"/>
<line x1="-70" y1="2" x2="-70" y2="98" stroke="#bbb" stroke-width="1"/>
<line x1="-118" y1="50" x2="-22" y2="50" stroke="#bbb" stroke-width="1"/>
<line x1="-104" y1="16" x2="-36" y2="84" stroke="#bbb" stroke-width="1"/>
<line x1="-36" y1="16" x2="-104" y2="84" stroke="#bbb" stroke-width="1"/>
<circle cx="-70" cy="50" r="6" fill="#999" stroke="#777" stroke-width="1"/>
<animateTransform attributeName="transform" type="rotate"
from="0 -70 50" to="360 -70 50" dur="1.5s" repeatCount="indefinite"/>
</g>
<!-- Front wheel — spins via animateTransform -->
<g>
<circle cx="70" cy="50" r="55" fill="none" stroke="url(#tireGrad)" stroke-width="8"/>
<circle cx="70" cy="50" r="48" fill="none" stroke="#c0c0c0" stroke-width="2"/>
<line x1="70" y1="2" x2="70" y2="98" stroke="#bbb" stroke-width="1"/>
<line x1="22" y1="50" x2="118" y2="50" stroke="#bbb" stroke-width="1"/>
<line x1="36" y1="16" x2="104" y2="84" stroke="#bbb" stroke-width="1"/>
<line x1="104" y1="16" x2="36" y2="84" stroke="#bbb" stroke-width="1"/>
<circle cx="70" cy="50" r="6" fill="#999" stroke="#777" stroke-width="1"/>
<animateTransform attributeName="transform" type="rotate"
from="0 70 50" to="360 70 50" dur="1.5s" repeatCount="indefinite"/>
</g>
<!-- Frame (static) -->
<line x1="-15" y1="-20" x2="-5" y2="50" stroke="url(#frameGrad)" stroke-width="5" stroke-linecap="round"/>
<line x1="-15" y1="-20" x2="45" y2="-10" stroke="url(#frameGrad)" stroke-width="5" stroke-linecap="round"/>
<line x1="-5" y1="50" x2="45" y2="-10" stroke="url(#frameGrad)" stroke-width="5" stroke-linecap="round"/>
<line x1="-5" y1="50" x2="-70" y2="50" stroke="url(#frameGrad)" stroke-width="4" stroke-linecap="round"/>
<line x1="-15" y1="-20" x2="-70" y2="50" stroke="url(#frameGrad)" stroke-width="3" stroke-linecap="round"/>
<line x1="45" y1="-10" x2="70" y2="50" stroke="url(#frameGrad)" stroke-width="4" stroke-linecap="round"/>
<!-- Handlebar -->
<line x1="45" y1="-10" x2="55" y2="-40" stroke="#888" stroke-width="4" stroke-linecap="round"/>
<path d="M40,-45 Q55,-50 70,-40" fill="none" stroke="#555" stroke-width="4" stroke-linecap="round"/>
<circle cx="40" cy="-45" r="4" fill="#333"/>
<circle cx="70" cy="-40" r="4" fill="#333"/>
<!-- Seat -->
<line x1="-15" y1="-20" x2="-18" y2="-35" stroke="#777" stroke-width="4" stroke-linecap="round"/>
<ellipse cx="-18" cy="-40" rx="18" ry="7" fill="#2d2d2d" stroke="#222" stroke-width="1"/>
<!-- Pedal crank — rotates via animateTransform -->
<g>
<line x1="-5" y1="50" x2="-5" y2="25" stroke="#888" stroke-width="3" stroke-linecap="round"/>
<line x1="-5" y1="50" x2="-5" y2="75" stroke="#888" stroke-width="3" stroke-linecap="round"/>
<rect x="-12" y="22" width="14" height="5" rx="2" fill="#555"/>
<rect x="-12" y="73" width="14" height="5" rx="2" fill="#555"/>
<circle cx="-5" cy="50" r="14" fill="none" stroke="#999" stroke-width="2"/>
<circle cx="-5" cy="50" r="4" fill="#888"/>
<animateTransform attributeName="transform" type="rotate"
from="0 -5 50" to="360 -5 50" dur="1.5s" repeatCount="indefinite"/>
</g>
<!-- Chain -->
<path d="M-19,50 Q-40,50 -70,50" fill="none" stroke="#777" stroke-width="1.5" stroke-dasharray="3,2"/>
</g>
<!-- ============ PELICAN ============ -->
<!-- Outer group: positioning only — NO CSS animation class here -->
<g transform="translate(340, 270)">
<!-- Inner group: bobbing animation only -->
<g>
<animateTransform attributeName="transform" type="translate"
values="0,0; 0,-3; 0,0" dur="0.75s" repeatCount="indefinite"/>
<!-- Tail feathers -->
<path d="M-30,30 Q-50,10 -45,-5 Q-38,5 -30,15 Z" fill="#d4c8bc" stroke="#c0b0a0" stroke-width="1"/>
<path d="M-28,35 Q-55,20 -50,5 Q-40,15 -30,25 Z" fill="#e0d4c8" stroke="#c0b0a0" stroke-width="1"/>
<path d="M-25,38 Q-48,28 -48,15 Q-38,22 -28,30 Z" fill="#d4c8bc" stroke="#c0b0a0" stroke-width="1"/>
<!-- Body -->
<ellipse cx="0" cy="15" rx="38" ry="28" fill="url(#bodyGrad)" stroke="#d0c4b8" stroke-width="1"/>
<!-- Wing -->
<path d="M-15,5 Q-25,0 -30,15 Q-28,30 -10,28 Q5,25 10,20 Q0,15 -15,5 Z" fill="url(#wingGrad)" stroke="#2e3540" stroke-width="1"/>
<path d="M-20,12 Q-15,18 -5,22" fill="none" stroke="#4a5262" stroke-width="0.8"/>
<path d="M-22,17 Q-16,22 -8,25" fill="none" stroke="#4a5262" stroke-width="0.8"/>
<!-- Neck -->
<path d="M15,0 Q20,-20 25,-45 Q30,-55 28,-60" fill="url(#bodyGrad)" stroke="#d0c4b8" stroke-width="1.5"/>
<path d="M25,0 Q28,-18 30,-45 Q32,-55 30,-60" fill="url(#bodyGrad)" stroke="none"/>
<!-- Head -->
<ellipse cx="29" cy="-65" rx="16" ry="14" fill="url(#bodyGrad)" stroke="#d0c4b8" stroke-width="1"/>
<!-- Eye -->
<circle cx="36" cy="-68" r="4" fill="white" stroke="#333" stroke-width="0.5"/>
<circle cx="37" cy="-68" r="2.5" fill="#1a1a1a"/>
<circle cx="38" cy="-69" r="1" fill="white"/>
<circle cx="36" cy="-68" r="5.5" fill="none" stroke="#c8b090" stroke-width="0.8"/>
<!-- Beak (upper) -->
<path d="M42,-68 L75,-64 Q78,-62 75,-60 L42,-58 Q40,-63 42,-68 Z" fill="url(#beakGrad)" stroke="#d0801a" stroke-width="1"/>
<line x1="44" y1="-63" x2="74" y2="-62" stroke="#e89830" stroke-width="1" opacity="0.6"/>
<ellipse cx="50" cy="-66" rx="2" ry="1" fill="#c87010"/>
<!-- Pouch (lower beak) with wobble -->
<g>
<path d="M42,-58 Q43,-50 48,-42 Q55,-35 62,-38 Q70,-42 75,-60 L42,-58 Z" fill="url(#pouchGrad)" stroke="#b06008" stroke-width="1" opacity="0.9"/>
<path d="M48,-50 Q55,-46 60,-52" fill="none" stroke="#c06a08" stroke-width="0.8" opacity="0.6"/>
<animateTransform attributeName="transform" type="scale"
values="1,1; 1.03,0.97; 1,1" dur="0.75s" repeatCount="indefinite"
additive="sum"/>
</g>
<!-- Head crest -->
<path d="M18,-75 Q15,-85 20,-88 Q22,-82 24,-77" fill="#e0d4c8" stroke="#c8b8a8" stroke-width="0.8"/>
<path d="M22,-77 Q20,-90 25,-92 Q26,-85 26,-78" fill="#d8ccc0" stroke="#c8b8a8" stroke-width="0.8"/>
<!-- Legs (static, positioned toward pedals) -->
<path d="M-5,38 Q-3,48 -8,58" fill="none" stroke="#e8a040" stroke-width="4" stroke-linecap="round"/>
<path d="M-8,58 L-14,62 M-8,58 L-8,64 M-8,58 L-2,62" fill="none" stroke="#e8a040" stroke-width="2" stroke-linecap="round"/>
<path d="M5,38 Q7,48 2,58" fill="none" stroke="#f0a830" stroke-width="4" stroke-linecap="round"/>
<path d="M2,58 L-4,62 M2,58 L2,64 M2,58 L8,62" fill="none" stroke="#f0a830" stroke-width="2" stroke-linecap="round"/>
<!-- Wing reaching toward handlebar -->
<path d="M15,5 Q30,0 50,-8 Q60,-12 70,-15" fill="none" stroke="#555e6e" stroke-width="3" stroke-linecap="round"/>
<path d="M50,-8 Q55,-5 60,-3" fill="none" stroke="#555e6e" stroke-width="2" stroke-linecap="round"/>
</g>
</g>
<!-- Speed lines -->
<g opacity="0.3">
<line x1="180" y1="310" x2="210" y2="310" stroke="#888" stroke-width="1.5" stroke-linecap="round"/>
<line x1="170" y1="320" x2="205" y2="320" stroke="#888" stroke-width="1.5" stroke-linecap="round"/>
<line x1="175" y1="330" x2="200" y2="330" stroke="#888" stroke-width="1" stroke-linecap="round"/>
<line x1="160" y1="340" x2="195" y2="340" stroke="#888" stroke-width="1" stroke-linecap="round"/>
<line x1="165" y1="350" x2="190" y2="350" stroke="#888" stroke-width="1.5" stroke-linecap="round"/>
</g>
<!-- Dust puffs -->
<g opacity="0.25">
<circle cx="210" cy="395" r="8" fill="#c8b898"/>
<circle cx="195" cy="390" r="6" fill="#c8b898"/>
<circle cx="220" cy="388" r="5" fill="#c8b898"/>
<circle cx="200" cy="400" r="4" fill="#c8b898"/>
</g>
</svg>
<p class="caption">A pelican enjoying a sunny ride</p>
</div>
</body>
</html>The key fixes:
-
Replaced all CSS
transformanimations on SVG elements with<animateTransform>— CSS transforms on SVG elements can override or conflict with the SVGtransformattribute used for positioning, which is exactly what was flinging the pelican off-screen.<animateTransform>is native to SVG and composes correctly with thetransformattribute. -
Separated positioning from animation — The pelican's outer
<g>handles onlytransform="translate(340, 270)"(positioning). The inner<g>contains only the<animateTransform>for the bobbing. These compose properly instead of fighting each other. -
Wheel and pedal rotations use
<animateTransform type="rotate">with explicit center coordinates (e.g.,from="0 -70 50" to="360 -70 50"), which are interpreted in the local SVG coordinate system correctly — notransform-boxambiguity. -
Pouch wobble uses
additive="sum"so the scale animation adds to the element's position rather than replacing its coordinate system. -
Legs are now static — the complex leg-follows-pedal animation was both buggy and visually minor. The wheel spin, pedal spin, body bob, and pouch wobble already sell the cycling motion well.
5,657 input, 7,800 output, {"completion_tokens_details": {"reasoning_tokens": 2767}, "prompt_tokens_details": {"cached_tokens": 14}, "cost": 0.04222384, "cost_details": {"upstream_inference_cost": 0.04222384, "upstream_inference_prompt_cost": 0.00790384, "upstream_inference_completions_cost": 0.03432}}