@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Inter:wght@400;600;700;800&display=swap');
:root{--bg:#0b0d19;--panel:#171427;--purple:#b8a8d8;--warm:#ffe6a3;--muted:#88839c}
*{box-sizing:border-box}
body{margin:0;min-height:100vh;background:radial-gradient(ellipse at 50% 42%,#171a2c 0%,#0c0e1b 58%,#080a13 100%);color:#f5f1fb;font-family:Inter,system-ui,sans-serif;display:flex;justify-content:center;align-items:center;padding:24px}
.stage{width:min(720px,100%);text-align:center}
h1{font-size:clamp(36px,7vw,62px);font-weight:700;font-style:italic;letter-spacing:-.055em;margin:0 0 10px;text-shadow:0 3px 22px #b9a7e322}
.lamp-scene{height:680px;max-height:calc(100vh - 300px);min-height:430px;position:relative;display:flex;align-items:center;justify-content:center;overflow:hidden}
.lamp{position:relative;width:360px;height:410px;transform:translateY(-5px);isolation:isolate}
.shade{position:absolute;z-index:4;left:89px;top:40px;width:182px;height:174px;background:linear-gradient(145deg,#c8b9e3,#a99acb 80%);clip-path:polygon(19% 0,81% 0,100% 100%,0 100%);border-radius:28px 28px 18px 18px;filter:drop-shadow(0 8px 16px #0005);transition:filter .2s,background .2s}
.face{position:absolute;inset:0}
.eye{position:absolute;top:67%;width:25px;height:13px;border-top:5px solid #282033;border-radius:50%}
.eye-left{left:27%}.eye-right{right:27%}
.cheek{position:absolute;top:77%;width:14px;height:8px;background:#ee9ba7;border-radius:50%;opacity:.8}
.cheek-left{left:22%}.cheek-right{right:22%}
.mouth{position:absolute;left:46%;top:78%;width:16px;height:15px;background:#33233b;border-radius:3px 3px 12px 12px;transform:rotate(180deg)}
.mouth:after{content:"";position:absolute;width:8px;height:6px;background:#ff765e;bottom:0;left:4px;border-radius:50%}
.bulb-glow{position:absolute;z-index:3;top:195px;left:100px;width:160px;height:35px;border-radius:50%;background:#ffe9a9;filter:blur(20px);opacity:0;transition:opacity .2s}
.neck{position:absolute;z-index:2;top:205px;left:91px;width:178px;height:12px;border-radius:50%;background:#ffe8a5;box-shadow:0 0 18px #ffe6a3;opacity:.65}
.stem{position:absolute;z-index:2;left:174px;top:211px;width:12px;height:124px;background:linear-gradient(90deg,#e7d7ad,#fff9df,#d5c69f);border-radius:8px;box-shadow:0 0 9px #ffe6a344}
.base{position:absolute;z-index:3;left:112px;top:324px;width:136px;height:31px;border-radius:50%;background:linear-gradient(180deg,#fff,#c9c8d0);box-shadow:inset 0 -5px 8px #9b9ba7,0 5px 12px #0005}
.base:after{content:"";position:absolute;left:18px;right:18px;top:5px;height:9px;border-radius:50%;background:#fff}
.cord-track{position:absolute;z-index:7;left:210px;top:211px;width:38px;height:150px}
.cord{position:absolute;top:0;left:10px;width:24px;height:105px;cursor:grab;touch-action:none;user-select:none;outline:none}
.cord:focus-visible .cord-handle{box-shadow:0 0 0 4px #b8a8d877,0 0 12px #fff}
.cord.dragging{cursor:grabbing}
.cord-string{position:absolute;left:9px;top:0;width:4px;height:83px;background:linear-gradient(90deg,#c9c4d1,#fff,#b5afbd);border-radius:4px;transform-origin:top;transition:height .12s}
.cord-handle{position:absolute;left:2px;top:78px;width:18px;height:23px;border-radius:50% 50% 45% 45%;background:radial-gradient(circle at 35% 25%,#fff,#d4d0dc 75%);box-shadow:0 3px 5px #0006;transition:top .12s}
.light{position:absolute;z-index:1;left:-12px;top:205px;width:384px;height:205px;opacity:0;pointer-events:none;background:linear-gradient(180deg,#ffe9a5aa 0%,#ffe6a355 38%,#ffe6a300 100%);clip-path:polygon(38% 0,62% 0,100% 100%,0 100%);filter:drop-shadow(0 0 40px #ffe6a3);transition:opacity .12s}
.light:after{content:"";position:absolute;left:20%;right:20%;bottom:3px;height:34px;border-radius:50%;background:#ffe6a3;filter:blur(20px)}
.lamp.on .light{opacity:1}.lamp.on .bulb-glow{opacity:1}.lamp.on .shade{background:linear-gradient(145deg,#d6c8f0,#b7a7d8);filter:drop-shadow(0 0 25px #ffe6a377)}
.lamp.on .neck{opacity:1;box-shadow:0 0 22px #ffe6a3}
.hint{position:absolute;bottom:14px;left:0;right:0;font:10px 'DM Mono',monospace;letter-spacing:.16em;color:#8e88a4}
.code-panel{display:grid;grid-template-columns:1fr 1fr;text-align:left;background:linear-gradient(135deg,#19162b,#141222);border:1px solid #302a45;border-radius:17px;overflow:hidden;box-shadow:0 18px 55px #0004}
.code-column{padding:20px 24px 24px;min-width:0}.code-column+ .code-column{border-left:1px solid #302a45}
.code-column h2{font:700 20px Inter,sans-serif;color:#66d9ff;margin:0 0 14px}.code-column:nth-child(2) h2{color:#ffd45d}
pre{margin:0;white-space:pre-wrap;overflow-wrap:anywhere;color:#d9d3e5;font:13px/2 'DM Mono',monospace}
code{font:inherit}footer{font:9px 'DM Mono',monospace;letter-spacing:.16em;color:#625d75;margin-top:18px}footer span{color:#ff7b9c}
@media(max-width:600px){body{padding:18px 12px}.lamp-scene{height:490px;min-height:400px}.lamp{transform:translateY(-12px) scale(.82)}.code-column{padding:14px 12px}.code-column h2{font-size:16px}pre{font-size:10px;line-height:1.9}.hint{font-size:8px}}
@media(prefers-reduced-motion:reduce){*{transition:none!important}}
