* { box-sizing: border-box; margin: 0; padding: 0; }
html, body, #root { height: 100%; }
body { overflow: hidden; font-family: 'Vazirmatn', system-ui, sans-serif; background: #2a160a; color: #fff6e6; }
canvas { display: block; touch-action: none; position: absolute; inset: 0; width: 100%; height: 100%; }
button { font-family: inherit; cursor: pointer; border: 0; }
.app { position: fixed; inset: 0; overflow: hidden; user-select: none; -webkit-user-select: none; touch-action: none; }
.screen { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: max(16px, env(safe-area-inset-top)) 18px max(22px, env(safe-area-inset-bottom)); line-height: 1.7; }
.home { background: linear-gradient(180deg, rgba(40,18,6,.75), rgba(40,18,6,0) 35%, rgba(40,18,6,0) 55%, rgba(30,12,4,.9)); }
.spacer { flex: 1; }
.title { text-align: center; margin-top: 44px; }
.title h1 { font-size: clamp(38px, 11vw, 60px); font-weight: 900; color: #ffd34a; text-shadow: 0 4px 0 #8a3a10, 0 8px 18px rgba(0,0,0,.6); line-height: 1.3; }
.title p { font-size: 18px; color: #ffe9c2; text-shadow: 0 2px 4px #000; }
.top-coin { position: absolute; top: max(14px, env(safe-area-inset-top)); inset-inline-end: 16px; }
.pill { display: inline-flex; align-items: center; gap: 6px; background: rgba(30,14,4,.7); border: 2px solid #d9a441; border-radius: 999px; padding: 4px 14px; font-weight: 800; backdrop-filter: blur(4px); }
.coin-ico { display: inline-block; width: 18px; height: 18px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff2a8, #ffc83a 45%, #b07a10); box-shadow: 0 0 0 2px #7a4a00 inset; vertical-align: middle; }
.btn { min-height: 52px; min-width: 140px; padding: 0 22px; border-radius: 16px; font-size: 18px; font-weight: 800; color: #fff6e6; background: linear-gradient(#2a6f97, #1c4a66); box-shadow: 0 5px 0 #0f2a3a, 0 8px 16px rgba(0,0,0,.4); transition: transform .08s; }
.btn:active { transform: translateY(3px); box-shadow: 0 2px 0 #0f2a3a; }
.btn.gold { color: #3a1a04; background: linear-gradient(#ffe07a, #e8a62a); box-shadow: 0 5px 0 #8a5410, 0 8px 18px rgba(0,0,0,.4); }
.btn.big { min-width: 240px; min-height: 62px; font-size: 24px; }
.btn.locked { background: #555; box-shadow: 0 5px 0 #222; opacity: .8; }
.btn.done { background: linear-gradient(#3aa76d, #1f7a4a); box-shadow: 0 5px 0 #0e3a22; }
.ghost { background: rgba(0,0,0,.4); color: #fff; border-radius: 12px; padding: 8px 14px; font-size: 15px; min-height: 44px; }
.row { display: flex; gap: 12px; }
.best { font-size: 18px; text-shadow: 0 2px 4px #000; } .best b { color: #ffd34a; }
.where { font-size: 14px; opacity: .85; }
.hint { font-size: 13px; opacity: .8; text-align: center; max-width: 320px; }
.bar { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.bar h2 { font-size: 22px; color: #ffd34a; text-shadow: 0 2px 0 #6a2a08; }
.card { background: linear-gradient(180deg, rgba(60,28,10,.92), rgba(35,15,5,.95)); border: 2px solid #d9a441; border-radius: 22px; padding: 18px; box-shadow: 0 12px 30px rgba(0,0,0,.5); width: min(100%, 380px); }
.bike-card { display: flex; flex-direction: column; gap: 14px; align-items: stretch; }
.bike-nav { display: flex; align-items: center; gap: 10px; }
.bike-info { flex: 1; text-align: center; min-width: 0; } .bike-info h3 { font-size: 24px; color: #ffd34a; } .bike-info p { font-size: 14px; opacity: .85; }
.round { width: 48px; height: 48px; border-radius: 50%; background: #d9a441; color: #3a1a04; font-size: 28px; font-weight: 900; }
.stats { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; align-items: center; font-size: 14px; }
.meter { height: 10px; background: rgba(255,255,255,.12); border-radius: 6px; overflow: hidden; } .meter span { display: block; height: 100%; max-width: 100%; background: linear-gradient(90deg, #ffd34a, #ff7a2a); }
.markets { background: rgba(30,12,4,.75); }
.mk-list { display: flex; flex-direction: column; gap: 12px; width: min(100%, 400px); overflow: auto; padding-bottom: 10px; }
.mk { position: relative; display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 18px; background: linear-gradient(135deg, var(--c), #1a0c04); border: 2px solid rgba(217,164,65,.5); color: #fff6e6; text-align: start; }
.mk.sel { border-color: #ffd34a; box-shadow: 0 0 0 3px rgba(255,211,74,.35); }
.mk.lock { filter: grayscale(.6) brightness(.8); }
.mk-arch { width: 52px; height: 64px; flex: none; border-radius: 26px 26px 4px 4px; background: linear-gradient(#ffd34a, #c46a1a); box-shadow: inset 0 -14px 0 rgba(0,0,0,.25); }
.mk-txt { flex: 1; min-width: 0; } .mk-txt h3 { font-size: 18px; } .mk-txt p { font-size: 13px; opacity: .8; }
.mk-state { font-size: 13px; font-weight: 800; background: rgba(0,0,0,.4); padding: 4px 10px; border-radius: 10px; white-space: nowrap; }
.hud { position: absolute; inset: 0; pointer-events: none; padding: max(12px, env(safe-area-inset-top)) 14px; }
.hud-top { display: flex; align-items: center; gap: 8px; }
.pill.score { flex-direction: column; gap: 0; line-height: 1.3; padding: 4px 16px; border-radius: 16px; } .pill.score small { font-size: 11px; opacity: .8; } .pill.score b { font-size: 22px; color: #ffd34a; }
.pause-btn { pointer-events: auto; margin-inline-start: auto; width: 48px; height: 48px; border-radius: 14px; background: rgba(30,14,4,.7); border: 2px solid #d9a441; display: flex; align-items: center; justify-content: center; gap: 6px; }
.pause-btn i { width: 6px; height: 18px; background: #ffd34a; border-radius: 2px; }
.hud-sub { margin-top: 6px; font-size: 13px; text-shadow: 0 1px 3px #000; }
.powers { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; align-items: flex-start; }
.power { padding: 4px 12px; border-radius: 10px; font-weight: 800; font-size: 14px; }
.power.mag { background: rgba(224,48,42,.85); } .power.shd { background: rgba(40,140,210,.85); }
.speedup { position: absolute; top: 30%; inset-inline: 0; text-align: center; font-size: 40px; font-weight: 900; color: #ffd34a; text-shadow: 0 4px 0 #8a3a10; animation: pop .6s ease-out; }
@keyframes pop { from { transform: scale(.3); opacity: 0; } 70% { transform: scale(1.15); } to { transform: scale(1); opacity: 1; } }
.tut { position: absolute; bottom: 18%; inset-inline: 0; margin: auto; width: fit-content; max-width: 90%; text-align: center; background: rgba(0,0,0,.55); padding: 8px 16px; border-radius: 14px; font-size: 15px; pointer-events: none; }
.hand { width: 34px; height: 34px; margin: 0 auto 4px; border-radius: 50%; background: #fff; opacity: .85; animation: swipe 1.4s infinite ease-in-out; }
@keyframes swipe { 0%,100% { transform: translateX(-50px); } 50% { transform: translateX(50px); } }
.dim { background: rgba(10,4,0,.55); justify-content: center; }
.modal { display: flex; flex-direction: column; gap: 12px; align-items: center; text-align: center; animation: pop .35s ease-out; }
.modal h2 { font-size: 28px; color: #ffd34a; }
.modal .btn { width: 100%; }
.newrec { background: #e0302a; padding: 2px 14px; border-radius: 10px; font-weight: 900; animation: pop .5s ease-out; }
.big-score { font-size: 54px; font-weight: 900; color: #fff; text-shadow: 0 4px 0 #8a3a10; line-height: 1.3; }
.over-rows { width: 100%; display: flex; flex-direction: column; gap: 6px; }
.over-rows div { display: flex; justify-content: space-between; background: rgba(0,0,0,.3); padding: 6px 12px; border-radius: 10px; }
.over-rows b { color: #ffd34a; }
