Back to the app
The code
The Most Uncomfortable Web Page by Claude Opus 5.5
Exactly as the AI wrote it. Shown as text, so nothing runs on this page.
index.html
works · auto-checked (Checked by an automated pass. Not hand-played yet.)<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>A Perfectly Normal Website</title>
<style>
*{box-sizing:border-box}
html,body{margin:0;height:100%;overflow:hidden;font-family:Georgia,"Comic Sans MS",serif;background:#f4f1ea;color:#333;touch-action:manipulation;-webkit-user-select:none;user-select:none}
body{background-image:repeating-linear-gradient(0.6deg,transparent 0 39px,#e3ddd0 39px 40px)}
#app{position:relative;width:100%;height:100%;display:flex;align-items:center;justify-content:center;padding:16px}
.card{position:relative;width:min(460px,100%);background:#fff;border:2px solid #bbb;border-radius:6px 9px 5px 11px;padding:22px 20px 26px;box-shadow:5px 6px 0 #d8d2c5;transform:rotate(-1.3deg)}
h1{font-size:1.5rem;margin:0 0 6px;letter-spacing:.02em}
h1 span{position:relative;top:1px}
h1 span:nth-child(odd){top:-1px}
p{line-height:1.5;margin:8px 0}
.step{font-size:.8rem;color:#999;text-align:right;transform:translateX(3px)}
button{font:inherit;font-size:1.1rem;min-height:56px;min-width:140px;padding:12px 20px;border-radius:12px 10px 13px 9px;border:2px solid #2d6a4f;background:#52b788;color:#fff;cursor:pointer;transition:left .35s ease,top .35s ease,transform .35s ease}
button.alt{background:#fff;color:#555;border-color:#aaa}
.row{display:flex;gap:12px;justify-content:space-between;flex-wrap:wrap;margin-top:16px}
.row button:nth-child(2){transform:rotate(1.5deg) translateY(2px)}
.bar{height:30px;border:2px solid #888;border-radius:15px;overflow:hidden;margin:16px 0 6px;transform:rotate(.7deg)}
.fill{height:100%;width:0;background:repeating-linear-gradient(45deg,#74c69d 0 12px,#95d5b2 12px 24px);transition:width .4s ease}
.pct{text-align:center;font-size:1.3rem;transform:translateX(1px)}
.cookie{position:absolute;width:min(300px,86vw);background:#fff8e1;border:2px solid #e0b84a;border-radius:10px;padding:12px;box-shadow:3px 4px 0 #e9d9a6;font-size:.95rem;transition:transform .4s}
.cookie button{min-width:110px;min-height:48px;font-size:1rem;margin-top:8px;background:#e9c46a;border-color:#b08a2a;color:#333}
.close{position:absolute;right:-6px;top:-10px;min-width:48px;min-height:48px;padding:0;border-radius:50%;background:#e76f51;border-color:#9c3c25;font-size:1.2rem}
.arena{position:relative;height:220px;border:2px dashed #ccc;border-radius:10px;margin-top:12px}
.arena button{position:absolute}
.boxes label{display:flex;align-items:center;gap:12px;padding:12px;margin:6px 0;border:2px solid #ddd;border-radius:10px;font-size:1.05rem;cursor:pointer}
.boxes label:nth-child(2){margin-left:4px}
.boxes label:nth-child(3){transform:rotate(-.8deg)}
.boxes input{width:28px;height:28px}
.small{font-size:.75rem;color:#aaa}
#cursor{position:fixed;width:30px;height:30px;border-radius:50%;background:rgba(80,120,255,.35);border:2px solid #4a6cf7;pointer-events:none;z-index:999;display:none;transition:left .6s ease,top .6s ease;transform:translate(-50%,-50%)}
#demo{position:fixed;left:8px;bottom:8px;background:#333;color:#fff;font-size:.8rem;padding:6px 10px;border-radius:8px;display:none;z-index:998}
.thanks h1{font-size:2rem}
.flower{font-size:3rem;text-align:center;transform:rotate(4deg)}
</style>
</head>
<body>
<div id="app"></div>
<div id="cursor"></div>
<div id="demo">Demo — touch anywhere to take over</div>
<script>
const app=document.getElementById('app');
const wobble=t=>t.split('').map(c=>'<span>'+c+'</span>').join('');
let stage=0,demo=false,timers=[];
function card(html){app.innerHTML='<div class="card">'+html+'</div>';return app.querySelector('.card');}
function stepTxt(n){return '<div class="step">Step '+n+' of 4'+(n>2?' (approximately)':'')+'</div>';}
/* STAGE 1: welcome with Continue / Continue */
function s1(){stage=1;const c=card(stepTxt(1)+'<h1>'+wobble('Welcome!')+'</h1><p>Thank you for visiting our very normal page. Please choose one.</p><div class="row"><button class="alt" id="a">Continue</button><button id="b">Continue</button></div><p class="small">Both buttons are the same. One of them is slightly more the same.</p>');
let n=0;const swap=e=>{n++;if(n<3){const r=c.querySelector('.row');r.insertBefore(r.lastChild,r.firstChild);c.querySelector('.small').textContent=['Hmm, not that one. Try again.','Closer. Emotionally.'][n-1];}else s2();};
c.querySelector('#a').onclick=swap;c.querySelector('#b').onclick=swap;}
/* STAGE 2: multiplying cookie notices */
function s2(){stage=2;const c=card(stepTxt(2)+'<h1>'+wobble('Cookies')+'</h1><p>Before continuing, please close the cookie notice.</p><p class="small" id="cn">Notices closed: 0</p>');
let closed=0,open=0;
function spawn(){open++;const d=document.createElement('div');d.className='cookie';
const w=Math.min(300,innerWidth*.86);d.style.left=(Math.random()*(innerWidth-w-20)+10)+'px';d.style.top=(Math.random()*(innerHeight-190)+20)+'px';d.style.transform='rotate('+(Math.random()*6-3)+'deg)';
d.innerHTML='<b>We use cookies 🍪</b><br>'+['To remember that you dislike cookie notices.','This notice is also a cookie.','By closing this you agree to more notices.','Our lawyers said "one more".','Last one. Probably.'][Math.min(closed,4)]+'<br><button>Accept</button><button class="close">✕</button>';
document.body.appendChild(d);
d.querySelectorAll('button').forEach(b=>b.onclick=()=>{d.remove();open--;closed++;document.getElementById('cn')&&(document.getElementById('cn').textContent='Notices closed: '+closed+(closed>3?' (they respect you now)':''));
if(closed<6){spawn();if(closed%2===1&&closed<5)spawn();}else if(open===0){setTimeout(s3,300);}else if(open<=0)s3();
if(closed>=6&&open===0)return;});
return d;}
setTimeout(spawn,500);}
/* STAGE 3: dodging button */
function s3(){stage=3;document.querySelectorAll('.cookie').forEach(e=>e.remove());const c=card(stepTxt(3)+'<h1>'+wobble('Press the button')+'</h1><p id="m">It is right there. Just press it.</p><div class="arena"><button id="d">Press me</button></div>');
const a=c.querySelector('.arena'),b=c.querySelector('#d'),m=c.querySelector('#m');let dodges=0;
b.style.left='20px';b.style.top='80px';
const msgs=['Whoa, you startled it.','It is shy.','It is reconsidering.','It is tired now. Go on.'];
function dodge(e){if(dodges>=4)return;e.preventDefault();dodges++;const W=a.clientWidth-b.offsetWidth,H=a.clientHeight-b.offsetHeight;
b.style.left=Math.random()*W+'px';b.style.top=Math.random()*H+'px';b.style.transform='rotate('+(Math.random()*20-10)+'deg)';m.textContent=msgs[dodges-1];
if(dodges>=4){b.textContent='Fine. Press me.';b.style.transform='rotate(2deg) scale(.95)';}}
b.addEventListener('pointerdown',dodge);
b.addEventListener('pointerenter',e=>{if(e.pointerType==='mouse')dodge(e)});
b.onclick=()=>{if(dodges>=4)s4();};}
/* STAGE 4: progress bar that slides back */
function s4(){stage=4;const c=card(stepTxt(4)+'<h1>'+wobble('Loading your reward')+'</h1><div class="bar"><div class="fill"></div></div><div class="pct">0%</div><p id="m" class="small">Please do not blink.</p><div class="boxes"></div>');
const f=c.querySelector('.fill'),pc=c.querySelector('.pct'),m=c.querySelector('#m');let p=0,back=0;
const notes=['Oops, it slipped.','It got nervous near the end.','One more try, it believes in itself.'];
const iv=setInterval(()=>{p+=Math.random()*9+3;if(p>=99&&back<3){p=99;f.style.width='99%';pc.textContent='99%';clearInterval(iv);
setTimeout(()=>{p=[40,72,91][back];m.textContent=notes[back];back++;f.style.width=p+'%';pc.textContent=Math.floor(p)+'%';s4loop();},900);return;}
if(p>=100){p=100;clearInterval(iv);f.style.width='100%';pc.textContent='100% (ish)';m.textContent='Done! Just confirm a few things.';boxes(c);return;}
f.style.width=p+'%';pc.textContent=Math.floor(p)+'%';},350);
timers.push(iv);
function s4loop(){const iv2=setInterval(()=>{p+=Math.random()*5+2;
if(p>=99&&back<3){p=99;f.style.width='99%';pc.textContent='99%';clearInterval(iv2);setTimeout(()=>{p=[40,72,91][back];m.textContent=notes[back];back++;f.style.width=p+'%';pc.textContent=Math.floor(p)+'%';s4loop();},900);return;}
if(p>=100){p=100;clearInterval(iv2);f.style.width='100%';pc.textContent='100% (ish)';m.textContent='Done! Just confirm a few things.';boxes(c);return;}
f.style.width=p+'%';pc.textContent=Math.floor(p)+'%';},300);timers.push(iv2);}}
function boxes(c){const bx=c.querySelector('.boxes');
bx.innerHTML='<label><input type="checkbox"> I am not a robot</label><label><input type="checkbox"> I am not not a robot</label><label><input type="checkbox"> I have read nothing</label><div class="row"><button id="fin">Finish</button></div>';
const cbs=[...bx.querySelectorAll('input')];let un=0;
cbs.forEach((cb,i)=>cb.onchange=()=>{if(cb.checked&&i===0&&un<1){un++;setTimeout(()=>{cb.checked=false;},500);}});
bx.querySelector('#fin').onclick=()=>{if(cbs.every(x=>x.checked))s5();else{const b=bx.querySelector('#fin');b.textContent='Tick all three, please';}};}
/* STAGE 5: thanks */
function s5(){stage=5;const c=card('<div class="thanks"><div class="flower">🌷</div><h1>'+wobble('Thank you')+'</h1><p>…for your extraordinary patience. You closed the cookies, caught the shy button and nursed a progress bar through three crises.</p><p>Everything is now perfectly straight.*</p><p class="small">*It is not.</p><div class="row"><button id="r">Do it again</button></div></div>');
c.style.transform='rotate(0.4deg)';c.querySelector('#r').onclick=()=>s1();}
/* DEMO */
const cur=document.getElementById('cursor');
function moveTo(el){const r=el.getBoundingClientRect();cur.style.left=r.left+r.width/2+'px';cur.style.top=r.top+r.height/2+'px';}
function later(fn,ms){const t=setTimeout(()=>{if(demo)fn();},ms);timers.push(t);}
function tap(el,ms,fn){later(()=>{if(!el||!el.isConnected){fn&&fn();return;}moveTo(el);later(()=>{if(el.isConnected){if(stage===3)el.dispatchEvent(new PointerEvent('pointerdown',{bubbles:true,pointerType:'touch'}));el.click();}fn&&fn();},650);},ms);}
function runDemo(){if(!demo)return;s1();
tap(document.querySelector('#b'),500,()=>tap(app.querySelector('.row button'),300,()=>tap(app.querySelector('.row button'),300,demoCookies)));}
function demoCookies(){let k=0;function go(){if(!demo)return;if(stage!==2){demoDodge();return;}const c=document.querySelector('.cookie .close');if(c)tap(c,350,go);else later(go,400);if(++k>30)demoDodge();}later(go,700);}
function demoDodge(){if(!demo)return;if(stage<3)s3();let k=0;function go(){if(!demo||stage!==3){demoBar();return;}const b=document.querySelector('#d');tap(b,250,()=>{if(++k<6)go();else demoBar();});}later(go,400);}
function demoBar(){if(!demo)return;if(stage<4)s4();const w=setInterval(()=>{if(!demo){clearInterval(w);return;}const cbs=document.querySelectorAll('.boxes input');if(cbs.length){clearInterval(w);cbs.forEach(cb=>{cb.checked=true;});later(()=>{const f=document.querySelector('#fin');if(f){moveTo(f);later(()=>{s5();later(runDemo,3000);},600);}},800);}if(document.querySelector('.fill')&&stage===4){/* speed demo */}},300);timers.push(w);}
function endDemo(){if(!demo)return;demo=false;timers.forEach(t=>{clearTimeout(t);clearInterval(t);});timers=[];cur.style.display='none';document.getElementById('demo').style.display='none';document.querySelectorAll('.cookie').forEach(e=>e.remove());s1();}
if(location.hash==='#demo'){demo=true;cur.style.display='block';document.getElementById('demo').style.display='block';
['pointerdown','touchstart','mousedown'].forEach(ev=>addEventListener(ev,e=>{if(e.isTrusted)endDemo();},{capture:true}));runDemo();}
else s1();
</script>
</body>
</html>
