html, body { margin: 0; height: 100%; overflow: hidden; background: #0b0d12; color: #e8ecf1; font-family: system-ui, sans-serif; }
canvas { display: block; width: 100vw; height: 100vh; }
#ui { position: fixed; inset: 0; pointer-events: none; font-family: Impact, "Arial Black", system-ui, sans-serif; }
#ui button, #ui .panel, #ui .card { pointer-events: auto; }
.hidden { display: none !important; }
#screen { position: absolute; inset: 0; display: flex; align-items: center; padding: 0 4vw; box-sizing: border-box; }
.panel { background: rgba(30, 14, 4, 0.82); border: 3px solid #ffd23f; border-radius: 18px; padding: 18px 22px; max-width: 440px; max-height: 92vh; overflow: auto; color: #fff4d6; box-shadow: 0 0 40px rgba(0,0,0,.6); }
.panel.left { margin-right: auto; }
.panel.right { margin-left: auto; }
.panel.center { margin: 0 auto; text-align: center; }
.panel.wide { max-width: 560px; }
.panel h1 { font-size: clamp(40px, 8vw, 72px); line-height: .9; margin: 0 0 6px; color: #ffd23f; text-shadow: 3px 3px 0 #c0392b, 6px 6px 0 #000; }
.panel h2 { margin: 0 0 8px; color: #ffd23f; letter-spacing: 1px; }
.panel h3 { margin: 10px 0 2px; }
.tag { font-family: system-ui, sans-serif; opacity: .85; margin: 4px 0 10px; }
.hint, .prize { font-family: system-ui, sans-serif; font-size: 13px; opacity: .85; }
.prize { color: #ffe9a0; }
.coins { font-size: 22px; color: #ffd23f; margin: 6px 0; }
.ok { color: #7dff9a; font-size: 14px; }
.lock { color: #ff9a9a; font-size: 13px; }
.panel button { display: block; width: 100%; margin: 7px 0; padding: 10px; font: inherit; font-size: 18px; color: #2b1200; background: linear-gradient(#ffe36a, #ffb21e); border: 3px solid #5a2a00; border-radius: 12px; cursor: pointer; }
.panel button.big { font-size: 28px; padding: 14px; background: linear-gradient(#7dff9a, #19b34a); }
.panel button:hover { filter: brightness(1.15); transform: scale(1.02); }
.panel button:disabled { filter: grayscale(1) brightness(.6); cursor: not-allowed; }
.panel button.on { background: linear-gradient(#7dd8ff, #1e88ff); }
.tabs { display: flex; gap: 6px; }
.cards { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.cards.col { flex-direction: column; }
.card { background: rgba(255,255,255,.08); border: 2px solid #8a5a2a; border-radius: 10px; padding: 8px 10px; cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.card small { font-family: system-ui, sans-serif; opacity: .8; }
.card.sel { border-color: #ffd23f; background: rgba(255,210,63,.2); }
.card.locked { opacity: .55; cursor: not-allowed; }
.row { display: flex; align-items: center; gap: 8px; justify-content: space-between; margin: 6px 0; }
.row button { width: auto !important; margin: 0 !important; padding: 6px 12px !important; font-size: 15px !important; }
.sbar { display: inline-block; width: 100px; height: 10px; background: #000; border-radius: 6px; margin-left: 8px; vertical-align: middle; overflow: hidden; }
.sbar i { display: block; height: 100%; background: linear-gradient(90deg, #ffd23f, #ff5a3a); }
.stat { font-size: 15px; margin: 3px 0; }
.lbres div, #hLb div { padding: 2px 6px; }
.lbres .me, #hLb .me { background: rgba(255,210,63,.35); border-radius: 6px; color: #fff; }
#hTL { position: absolute; top: 12px; left: 14px; text-shadow: 2px 2px 0 #000; }
#hPos { font-size: 64px; color: #ffd23f; line-height: 1; }
#hLap, #hTime { font-size: 22px; color: #fff; }
#hLb { position: absolute; top: 12px; right: 14px; background: rgba(0,0,0,.45); border-radius: 10px; padding: 6px; font-size: 16px; min-width: 190px; color: #fff; }
#hMap { position: absolute; left: 14px; bottom: 14px; background: rgba(0,0,0,.4); border-radius: 12px; width: 150px; height: 150px; }
#hBoostBox { position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%); width: min(380px, 50vw); text-align: center; text-shadow: 1px 1px 0 #000; }
#hBoostBox .bar { height: 18px; background: rgba(0,0,0,.6); border: 2px solid #fff; border-radius: 10px; overflow: hidden; }
#hBoost { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #19d4ff, #ff4dd8, #ffd23f); }
#hItem { position: absolute; right: 14px; bottom: 90px; width: 120px; text-align: center; background: rgba(0,0,0,.5); border: 3px solid #ffd23f; border-radius: 14px; padding: 6px; }
#hItemIcon { font-size: 44px; }
#hItemName { font-size: 12px; }
#hSpeed { position: absolute; right: 18px; bottom: 28px; font-size: 28px; color: #fff; text-shadow: 2px 2px 0 #000; }
#hCoins { position: absolute; top: 120px; left: 16px; font-size: 20px; color: #ffd23f; text-shadow: 2px 2px 0 #000; }
#hPause { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); pointer-events: auto; font: inherit; border-radius: 8px; padding: 2px 12px; }
#hAttitude { display: none; position: absolute; top: 30%; width: 100%; text-align: center; font-size: 34px; color: #ff6b6b; text-shadow: 3px 3px 0 #000; }
#hAttitude::after { content: "YOUR CAMEL HAS AN ATTITUDE PROBLEM! MASH JUMP!"; }
#comm { position: absolute; top: 14%; left: 50%; transform: translateX(-50%) scale(.6); max-width: 70vw; text-align: center; font-size: clamp(18px, 3vw, 34px); color: #fff; background: rgba(192,57,43,.88); border: 3px solid #ffd23f; border-radius: 14px; padding: 8px 18px; opacity: 0; text-shadow: 2px 2px 0 #000; }
#comm.pop { animation: pop 4.4s ease-out forwards; }
@keyframes pop { 0% { opacity: 0; transform: translateX(-50%) scale(.5) rotate(-4deg); } 6% { opacity: 1; transform: translateX(-50%) scale(1.12) rotate(2deg); } 12% { transform: translateX(-50%) scale(1) rotate(0); } 85% { opacity: 1; } 100% { opacity: 0; transform: translateX(-50%) scale(1); } }
#big { position: absolute; top: 38%; width: 100%; text-align: center; font-size: clamp(50px, 12vw, 140px); color: #fff; text-shadow: 4px 4px 0 #000, 0 0 30px #ffd23f; opacity: 0; }
#big.show { animation: bigpop 1s ease-out forwards; }
#big.gold { color: #ffd23f; }
@keyframes bigpop { 0% { opacity: 0; transform: scale(2.5); } 15% { opacity: 1; transform: scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: scale(1.1); } }
#splat { position: absolute; inset: 0; background: radial-gradient(circle, rgba(150,220,40,.2) 20%, rgba(130,200,30,.85)); opacity: 0; }
#splat.on { animation: splat 2.8s ease-out; }
@keyframes splat { 0% { opacity: 1; } 70% { opacity: .8; } 100% { opacity: 0; } }
#stormOv { position: absolute; inset: 0; opacity: 0; background: repeating-linear-gradient(100deg, rgba(210,160,80,.35) 0 6px, rgba(160,110,50,.5) 6px 14px); background-size: 200px 100%; animation: wind .4s linear infinite; }
@keyframes wind { to { background-position: -200px 0; } }
#letterbox i { position: absolute; left: 0; width: 100%; height: 0; background: #000; transition: height .6s; }
#letterbox i:first-child { top: 0; }
#letterbox i:last-child { bottom: 0; }
#letterbox.on i { height: 11vh; }
#muteBtn { position: absolute; top: 12px; right: 14px; pointer-events: auto; font-size: 18px; border-radius: 8px; z-index: 5; }
#hud:not(.hidden) ~ #muteBtn { top: auto; bottom: 10px; right: 10px; opacity: .6; }
