* { box-sizing: border-box; margin: 0; padding: 0; }
html, body, #root { height: 100%; }
body { overflow: hidden; font-family: 'Vazirmatn', system-ui, sans-serif; background: #0d1828; color: #fff; user-select: none; -webkit-user-select: none; }
canvas { display: block; touch-action: none; }
button { font-family: inherit; cursor: pointer; }
.app { position: fixed; inset: 0; overflow: hidden; }
.screen { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; padding: max(16px, env(safe-area-inset-top)) 18px 20px; gap: 10px; overflow-y: auto; line-height: 1.7; }
.menu-bg { background: linear-gradient(180deg, rgba(8,20,40,.25), rgba(8,18,34,.85)), url(/assets/bg_title_menu.webp) center/cover; }
.logo { width: min(46vw, 210px); margin-top: 18px; filter: drop-shadow(0 8px 20px rgba(0,0,0,.5)); animation: float 3s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-8px); } }
.title { font-size: clamp(38px, 11vw, 60px); font-weight: 900; line-height: 1.3; color: #fff; text-shadow: 0 4px 0 #c2410c, 0 10px 24px rgba(0,0,0,.5); }
.sub { opacity: .9; font-size: 15px; text-align: center; }
.preview { width: min(92vw, 420px); height: 200px; flex-shrink: 0; }
.btn { width: min(80vw, 320px); min-height: 52px; border: 0; border-radius: 16px; font-size: 18px; font-weight: 800; color: #fff; background: linear-gradient(180deg, #3d8bff, #1f5fd0); box-shadow: 0 5px 0 #143f8f, 0 10px 20px rgba(0,0,0,.35); transition: transform .1s; flex-shrink: 0; }
.btn.big { background: linear-gradient(180deg, #ff9a3c, #ea580c); box-shadow: 0 5px 0 #9a3412, 0 10px 20px rgba(0,0,0,.35); font-size: 21px; min-height: 58px; }
.btn.ghost { background: rgba(255,255,255,.14); box-shadow: none; border: 2px solid rgba(255,255,255,.4); }
.btn:active { transform: translateY(3px); }
.btn:disabled { filter: grayscale(.8); opacity: .6; }
.coins { position: absolute; top: max(14px, env(safe-area-inset-top)); inset-inline-start: 14px; display: flex; align-items: center; gap: 6px; background: rgba(0,0,0,.45); border-radius: 30px; padding: 2px 12px 2px 6px; font-weight: 800; }
.coins.static { position: static; }
.coins img { width: 28px; }
.topbar { width: 100%; display: flex; justify-content: space-between; align-items: center; }
.chip { background: rgba(0,0,0,.45); color: #fff; border: 0; border-radius: 20px; padding: 6px 16px; font-size: 15px; min-height: 40px; }
.h2 { font-size: 28px; font-weight: 900; text-shadow: 0 3px 10px rgba(0,0,0,.6); }
.path { width: 100%; max-width: 460px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.node { display: flex; align-items: center; gap: 10px; width: 58%; min-width: 230px; background: rgba(255,255,255,.92); color: #13233c; border: 0; border-radius: 18px; padding: 8px 10px; text-align: start; box-shadow: 0 6px 0 rgba(0,0,0,.25); animation: pop .4s backwards; }
.node:nth-child(2) { animation-delay: .06s } .node:nth-child(3) { animation-delay: .12s } .node:nth-child(4) { animation-delay: .18s } .node:nth-child(5) { animation-delay: .24s }
.node.locked { background: rgba(160,175,195,.8); }
.num { width: 48px; height: 48px; flex-shrink: 0; border-radius: 50%; background: #ea580c; color: #fff; display: grid; place-items: center; font-size: 22px; font-weight: 900; }
.locked .num { background: #4b5a70; }
.num img { width: 32px; }
.ninfo { min-width: 0; display: flex; flex-direction: column; line-height: 1.5; }
.ninfo small { font-size: 11px; opacity: .75; overflow-wrap: anywhere; }
.stars img { width: 20px; }
.carrow { display: flex; align-items: center; }
.carrow .preview { width: min(70vw, 340px); }
.arrow { width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(0,0,0,.5); color: #fff; font-size: 28px; }
.panel { width: min(90vw, 380px); background: rgba(10,22,44,.75); border: 2px solid rgba(255,255,255,.2); border-radius: 20px; padding: 14px 18px; }
.panel h3 { font-size: 22px; margin-bottom: 6px; }
.stat { display: flex; align-items: center; gap: 10px; margin: 4px 0; }
.stat span { width: 52px; font-size: 14px; }
.bar { flex: 1; height: 10px; border-radius: 6px; background: rgba(255,255,255,.15); overflow: hidden; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, #ffb347, #ea580c); border-radius: 6px; }
.race { padding: 0; }
.gl { position: absolute; inset: 0; }
.hud { position: absolute; inset: 0; pointer-events: none; }
.hud > * { pointer-events: auto; }
.hud-top { position: absolute; top: max(10px, env(safe-area-inset-top)); inset-inline: 10px; display: flex; gap: 6px; align-items: center; }
.hbox { background: rgba(8,18,36,.65); border-radius: 12px; padding: 2px 10px; display: flex; flex-direction: column; align-items: center; line-height: 1.4; min-width: 64px; }
.hbox small { font-size: 11px; opacity: .8; } .hbox b { font-size: 17px; }
.pause { margin-inline-start: auto; width: 44px; height: 44px; border-radius: 12px; border: 0; background: rgba(8,18,36,.65); color: #fff; font-size: 14px; }
.minimap { position: absolute; top: calc(max(10px, env(safe-area-inset-top)) + 58px); inset-inline-end: 10px; width: 104px; height: 104px; }
.speedo { position: absolute; top: calc(max(10px, env(safe-area-inset-top)) + 58px); inset-inline-start: 10px; width: 110px; height: 110px; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; }
.speedo img { position: absolute; inset: 0; width: 100%; opacity: .95; }
.speedo b { position: relative; font-size: 24px; margin-top: 34px; text-shadow: 0 2px 4px #000; } .speedo small { position: relative; font-size: 10px; }
.needle { position: absolute; left: 50%; top: 50%; width: 3px; height: 42px; margin-left: -1.5px; margin-top: -42px; background: #ff5a1f; transform-origin: 50% 100%; border-radius: 2px; transition: transform .1s; }
.cd { position: absolute; top: 34%; width: 100%; text-align: center; font-size: 110px; font-weight: 900; text-shadow: 0 6px 0 #c2410c, 0 10px 30px #000; animation: pop .5s; pointer-events: none; }
.msg { position: absolute; top: 28%; width: 100%; text-align: center; font-size: 30px; font-weight: 900; text-shadow: 0 3px 0 #9a3412, 0 6px 16px #000; animation: pop .3s; pointer-events: none; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } }
.wheel { position: absolute; bottom: max(18px, env(safe-area-inset-bottom)); inset-inline-start: 12px; width: 150px; height: 150px; touch-action: none; display: grid; place-items: center; }
.wheel img { width: 100%; pointer-events: none; transition: transform .05s; filter: drop-shadow(0 6px 10px rgba(0,0,0,.5)); }
.wheel span { position: absolute; bottom: -6px; font-size: 12px; background: rgba(0,0,0,.5); border-radius: 8px; padding: 0 8px; pointer-events: none; }
.pedals { position: absolute; bottom: max(18px, env(safe-area-inset-bottom)); inset-inline-end: 12px; display: flex; gap: 10px; align-items: flex-end; }
.pbtn { position: relative; width: 84px; height: 84px; border-radius: 50%; border: 3px solid rgba(255,255,255,.6); background: rgba(8,18,36,.6); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; touch-action: none; font-size: 12px; font-weight: 800; line-height: 1.3; }
.pbtn:active { transform: scale(.92); background: rgba(234,88,12,.7); }
.pbtn img { width: 44px; pointer-events: none; } .pbtn span { pointer-events: none; }
.nitro { width: 96px; height: 96px; margin-bottom: 40px; }
.nbar { position: absolute; inset-inline-end: -10px; top: 10px; width: 8px; height: 76px; background: rgba(0,0,0,.5); border-radius: 4px; display: flex; align-items: flex-end; overflow: hidden; }
.nbar em { display: block; width: 100%; background: linear-gradient(0deg, #22d3ee, #a5f3fc); }
.overlay { position: absolute; inset: 0; background: rgba(5,12,24,.6); display: grid; place-items: center; padding: 16px; backdrop-filter: blur(3px); }
.card { width: min(92vw, 380px); background: linear-gradient(180deg, #1c3358, #0f1e38); border: 3px solid rgba(255,255,255,.25); border-radius: 24px; padding: 20px; display: flex; flex-direction: column; align-items: center; gap: 10px; line-height: 1.7; }
.card.pop { animation: pop .4s; }
.card h2 { font-size: 30px; font-weight: 900; color: #ffd27a; }
.card .btn { width: 100%; }
.bigstars img { width: 64px; animation: pop .5s backwards; }
.bigstars img:nth-child(2) { width: 80px; }
.rows { width: 100%; } .rows div { display: flex; justify-content: space-between; border-bottom: 1px solid rgba(255,255,255,.1); padding: 3px 0; }
.reward { display: flex; align-items: center; gap: 8px; font-size: 22px; font-weight: 900; color: #ffd27a; }
.reward img { width: 36px; }
