:root { --pink: #ff2ea6; --cyan: #22e6ff; --yel: #ffe23a; --grn: #5dff9a; --ink: #12062a; --glass: rgba(18, 6, 42, .62); }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #12062a; color: #fff; font-family: 'Russo One', system-ui, sans-serif; user-select: none; -webkit-user-select: none; touch-action: none; }
#world { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; transition: filter 1.2s; }
body.dead #world { filter: grayscale(1) contrast(1.15) brightness(.75); }
#grade { position: fixed; inset: 0; pointer-events: none; background: radial-gradient(ellipse at 50% 45%, transparent 55%, rgba(20, 0, 40, .55) 100%); }
.hidden { display: none !important; }
button { font-family: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }

/* ---------- loader ---------- */
#loader { position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; background: radial-gradient(ellipse at 50% 60%, #3a0f5e 0%, #12062a 70%); transition: opacity .8s; }
#loader.out { opacity: 0; pointer-events: none; }
.ld-logo { width: min(64vw, 380px); filter: drop-shadow(0 0 30px rgba(255, 46, 166, .45)); animation: flick 3s infinite; }
.ld-bar { width: min(60vw, 300px); height: 6px; border-radius: 6px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.ld-bar i { display: block; height: 100%; width: 5%; background: linear-gradient(90deg, var(--pink), var(--cyan)); box-shadow: 0 0 12px var(--pink); transition: width .4s; }
.ld-txt { font-size: 12px; letter-spacing: .3em; text-transform: uppercase; opacity: .6; }
@keyframes flick { 0%, 100% { opacity: 1 } 47% { opacity: 1 } 48% { opacity: .55 } 49% { opacity: 1 } 73% { opacity: .85 } 74% { opacity: 1 } }

/* ---------- title ---------- */
#title { position: fixed; inset: 0; z-index: 20; display: flex; align-items: center; justify-content: center; padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(18, 6, 42, .15) 0%, rgba(18, 6, 42, 0) 35%, rgba(18, 6, 42, .55) 70%, rgba(18, 6, 42, .85) 100%); overflow-y: auto; animation: fadeIn 1.2s; }
@keyframes fadeIn { from { opacity: 0 } }
.t-wrap { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; width: min(560px, 100%); margin: auto; }
.t-logo { width: min(78vw, 450px, 44vh); filter: drop-shadow(0 0 24px rgba(255, 46, 166, .5)) drop-shadow(0 6px 30px rgba(0, 0, 0, .6)); animation: flick 4s infinite; }
.t-rule { display: flex; flex-direction: column; align-items: center; line-height: 1; margin-top: -4px; }
.t-k { font-size: clamp(13px, 3.4vw, 18px); letter-spacing: .28em; text-transform: uppercase; color: #fff; text-shadow: 0 2px 12px #000, 0 0 10px rgba(34, 230, 255, .6); }
.t-k b { color: var(--yel); }
.t-big { font-family: Anton, sans-serif; font-size: clamp(50px, min(15vw, 11vh), 96px); letter-spacing: .02em; margin: 4px 0 6px; color: #fff; -webkit-text-stroke: 2px #1a0630;
  background: linear-gradient(180deg, #fff 0%, #ffe9a8 38%, #ff8a3d 62%, #ff2ea6 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; filter: drop-shadow(0 0 18px rgba(255, 46, 166, .7)) drop-shadow(0 4px 0 #1a0630); }
.t-count { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 22px 10px; border-radius: 16px; background: var(--glass); border: 1px solid rgba(34, 230, 255, .35); box-shadow: 0 0 30px rgba(34, 230, 255, .15), inset 0 0 24px rgba(34, 230, 255, .08); backdrop-filter: blur(6px); }
.t-count small { font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: #bfefff; opacity: .85; }
.count { font-family: Anton, sans-serif; font-size: clamp(30px, 8vw, 44px); letter-spacing: .04em; color: #e8fdff; text-shadow: 0 0 14px var(--cyan), 0 0 2px #fff; white-space: nowrap; }
.count i { font-style: normal; font-size: .5em; color: var(--cyan); margin-left: 2px; margin-right: 6px; }
.neon-btn { position: relative; font-family: Anton, sans-serif; font-size: 28px; letter-spacing: .12em; padding: 14px 46px 12px; border-radius: 14px; border: 2px solid #fff; color: #fff; background: linear-gradient(180deg, #ff58b8, #ff1f8f 60%, #d10a73); box-shadow: 0 0 0 3px rgba(255, 46, 166, .35), 0 0 34px rgba(255, 46, 166, .75), inset 0 -4px 0 rgba(0, 0, 0, .25); text-shadow: 0 2px 0 rgba(0, 0, 0, .3); transition: transform .12s; animation: pulse 1.8s infinite; }
.neon-btn:hover { transform: scale(1.05); } .neon-btn:active { transform: scale(.97); }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(255, 46, 166, .2), 0 0 50px rgba(255, 46, 166, .95), inset 0 -4px 0 rgba(0, 0, 0, .25); } }
.links { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.lk { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; letter-spacing: .08em; padding: 10px 16px; border-radius: 10px; background: var(--glass); color: #fff; border: 1px solid rgba(255, 255, 255, .28); backdrop-filter: blur(6px); transition: background .15s; }
.lk:hover { background: rgba(255, 255, 255, .14); }
.lk.buy { background: linear-gradient(180deg, #2df0ff, #0fb6d6); color: #06121e; border-color: #bff8ff; box-shadow: 0 0 18px rgba(34, 230, 255, .55); }
.lk.off { opacity: .8; cursor: default; }
.lk.share { background: #000; border-color: rgba(255, 255, 255, .5); }
.lk.buy.off { background: var(--glass); color: #bff8ff; border-color: rgba(34, 230, 255, .5); box-shadow: none; }
.lk.ca i { font-style: normal; font-size: 10px; padding: 3px 6px; border-radius: 5px; background: var(--pink); }
.t-keys, .m-keys { font-size: 12px; opacity: .8; line-height: 2; letter-spacing: .04em; }
.t-keys span, .m-keys span { white-space: nowrap; }
.t-keys b, .m-keys b, kbd { display: inline-block; font-family: 'Russo One', sans-serif; font-weight: 400; font-size: 11px; padding: 2px 7px; margin: 0 4px 0 10px; border-radius: 5px; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .3); }
kbd { margin: 0 4px 0 0; background: var(--yel); color: #1a0630; border-color: #fff; }

/* ---------- HUD ---------- */
#hud { position: fixed; inset: 0; z-index: 10; pointer-events: none; }
#hud button, #hud a { pointer-events: auto; }
#hTL { position: absolute; left: max(14px, env(safe-area-inset-left)); top: max(12px, env(safe-area-inset-top)); display: flex; flex-direction: column; align-items: flex-start; gap: 6px; max-width: 46vw; }
.h-count { display: flex; align-items: stretch; border-radius: 9px; overflow: hidden; box-shadow: 0 4px 18px rgba(0, 0, 0, .45); }
.h-gta { font-family: Anton, sans-serif; font-size: 15px; letter-spacing: .06em; padding: 6px 9px 4px; background: linear-gradient(180deg, #ff58b8, #d10a73); }
.h-count b { font-family: Anton, sans-serif; font-weight: 400; font-size: 17px; letter-spacing: .06em; padding: 5px 11px 3px; background: rgba(12, 4, 28, .78); color: #e8fdff; text-shadow: 0 0 8px var(--cyan); white-space: nowrap; }
.h-hold { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: #fff; text-shadow: 0 1px 6px #000; padding-left: 2px; }
.h-hold b { color: var(--yel); font-weight: 400; }
#feed { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.note { max-width: 330px; font-size: 13px; line-height: 1.35; padding: 9px 12px; border-radius: 8px; background: rgba(8, 2, 20, .8); border-left: 3px solid var(--cyan); box-shadow: 0 6px 18px rgba(0, 0, 0, .4); animation: noteIn .35s cubic-bezier(.2, 1.4, .4, 1); transition: opacity .5s, transform .5s; }
.note b { color: var(--yel); font-weight: 400; } .note .st { color: var(--yel); letter-spacing: 2px; }
.note.cop { border-left-color: #ff3b5c; } .note.gold { border-left-color: var(--yel); }
.note.out { opacity: 0; transform: translateX(-20px); }
@keyframes noteIn { from { opacity: 0; transform: translateX(-24px) } }
#menuBtn { position: absolute; right: max(12px, env(safe-area-inset-right)); top: max(12px, env(safe-area-inset-top)); width: 42px; height: 42px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .3); background: rgba(12, 4, 28, .7); color: #fff; font-size: 20px; }
#hTR { position: absolute; right: calc(max(12px, env(safe-area-inset-right)) + 54px); top: max(10px, env(safe-area-inset-top)); display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
#stars { display: flex; gap: 3px; }
#stars i { width: 26px; height: 26px; clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); background: rgba(0, 0, 0, .45); }
#stars i.on { background: linear-gradient(180deg, #fff3a0, #ffc81a 60%, #e89400); filter: drop-shadow(0 0 4px #ffcf33); }
#stars.hot i:not(.on) { background: rgba(255, 255, 255, .2); }
#stars.flash i.on { background: rgba(255, 255, 255, .25); }
#cash { font-family: Anton, sans-serif; font-size: 34px; letter-spacing: .02em; color: var(--grn); -webkit-text-stroke: 1.5px #06240f; text-shadow: 0 3px 0 #06240f, 0 0 16px rgba(93, 255, 154, .5); line-height: 1.05; }
.bars { display: flex; flex-direction: column; gap: 4px; width: 150px; margin-top: 2px; }
.bar { height: 8px; border-radius: 4px; background: rgba(0, 0, 0, .55); border: 1px solid rgba(255, 255, 255, .35); overflow: hidden; }
.bar i { display: block; height: 100%; transition: width .2s; }
.bar.hp i { background: linear-gradient(90deg, #ff2e6a, #ff7ab8); }
.bar.car i { background: linear-gradient(90deg, #22c6ff, #9ff0ff); }
#radarWrap { position: absolute; left: max(14px, env(safe-area-inset-left)); bottom: max(14px, env(safe-area-inset-bottom)); width: 190px; height: 190px; border-radius: 50%; box-shadow: 0 0 0 3px rgba(18, 6, 42, .6), 0 10px 30px rgba(0, 0, 0, .5), 0 0 24px rgba(255, 46, 166, .35); }
#radar { width: 100%; height: 100%; border-radius: 50%; }
#stunt { position: absolute; left: 50%; top: 17%; transform: translateX(-50%); text-align: center; opacity: 0; pointer-events: none; white-space: nowrap; }
#stunt.on { animation: stuntIn 2.6s forwards; }
#stunt b { display: block; font-family: Anton, sans-serif; font-weight: 400; font-size: clamp(30px, 6.5vw, 64px); letter-spacing: .03em; color: #fff; -webkit-text-stroke: 2px #1a0630; text-shadow: 0 4px 0 #1a0630, 0 0 26px rgba(34, 230, 255, .8); }
#stunt span { display: inline-block; margin-top: 4px; font-family: Anton, sans-serif; font-size: clamp(22px, 4.4vw, 38px); color: var(--grn); -webkit-text-stroke: 1.5px #06240f; text-shadow: 0 3px 0 #06240f; }
#stunt.pink b { text-shadow: 0 4px 0 #1a0630, 0 0 30px rgba(255, 46, 166, .95); color: #ffe6f5; }
#stunt.gold b { color: #fff3b0; text-shadow: 0 4px 0 #3a2400, 0 0 30px rgba(255, 207, 51, .95); }
#stunt.green b { color: #d6ffe6; text-shadow: 0 4px 0 #06240f, 0 0 26px rgba(93, 255, 154, .9); }
#stunt.red b { color: #ffd0d8; text-shadow: 0 4px 0 #3a0010, 0 0 26px rgba(255, 59, 92, .9); }
@keyframes stuntIn { 0% { opacity: 0; transform: translateX(-50%) scale(2.2) } 10% { opacity: 1; transform: translateX(-50%) scale(.94) } 16% { transform: translateX(-50%) scale(1) } 82% { opacity: 1 } 100% { opacity: 0; transform: translateX(-50%) translateY(-12px) } }
#combo { position: absolute; left: 50%; top: 30%; transform: translateX(-50%) scale(.8); text-align: center; opacity: 0; transition: opacity .2s, transform .2s; }
#combo.on { opacity: 1; transform: translateX(-50%) scale(1); }
#combo small { display: block; font-size: 13px; letter-spacing: .35em; color: #fff; text-shadow: 0 2px 8px #000; }
#combo b { font-family: Anton, sans-serif; font-weight: 400; font-size: 40px; color: #fff; -webkit-text-stroke: 1.5px #1a0630; text-shadow: 0 3px 0 #1a0630, 0 0 18px rgba(255, 46, 166, .9); }
#combo b.g { color: var(--grn); text-shadow: 0 3px 0 #06240f, 0 0 16px rgba(93, 255, 154, .7); }
#combo b.r { color: #ff5c7a; }
#combo i { font-style: normal; font-family: Anton, sans-serif; font-size: 30px; margin-left: 10px; color: var(--yel); -webkit-text-stroke: 1.2px #3a2400; }
#bigCount { position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%); font-family: Anton, sans-serif; font-size: 130px; color: #fff; -webkit-text-stroke: 3px #1a0630; text-shadow: 0 6px 0 #1a0630, 0 0 40px var(--pink); opacity: 0; }
#bigCount.on { animation: cnt .9s forwards; } #bigCount.go { color: var(--grn); text-shadow: 0 6px 0 #06240f, 0 0 40px var(--grn); }
@keyframes cnt { 0% { opacity: 0; transform: translate(-50%, -50%) scale(2) } 15% { opacity: 1; transform: translate(-50%, -50%) scale(1) } 80% { opacity: 1 } 100% { opacity: 0; transform: translate(-50%, -50%) scale(.8) } }
#raceBox { position: absolute; left: 50%; top: max(12px, env(safe-area-inset-top)); transform: translateX(-50%); text-align: center; padding: 6px 16px 5px; border-radius: 10px; background: rgba(12, 4, 28, .78); border: 1px solid rgba(255, 46, 166, .6); box-shadow: 0 0 18px rgba(255, 46, 166, .35); }
#raceT { font-family: Anton, sans-serif; font-size: 30px; letter-spacing: .04em; color: #fff; text-shadow: 0 0 10px var(--pink); }
#raceCp { font-size: 10px; letter-spacing: .18em; opacity: .85; }
#hint { position: absolute; left: 50%; bottom: max(26px, env(safe-area-inset-bottom)); transform: translateX(-50%) translateY(10px); max-width: 90vw; font-size: 15px; padding: 11px 18px; border-radius: 12px; background: rgba(8, 2, 20, .8); border: 1px solid rgba(255, 255, 255, .22); box-shadow: 0 8px 22px rgba(0, 0, 0, .45); opacity: 0; transition: opacity .2s, transform .2s; text-align: center; }
#hint.on { opacity: 1; transform: translateX(-50%); }
#hint b { color: var(--yel); font-weight: 400; } #hint .r { color: #ff5c7a; }
#vname { position: absolute; right: max(26px, env(safe-area-inset-right)); bottom: 104px; font-family: 'Mr Dafoe', cursive; font-size: 54px; color: #ffe6f5; text-shadow: 0 0 12px var(--pink), 0 0 30px var(--pink), 0 3px 0 #5a0a38; opacity: 0; transform: translateX(30px); transition: opacity .35s, transform .35s; white-space: nowrap; }
#vname.on { opacity: 1; transform: none; }
#speedo { position: absolute; right: max(22px, env(safe-area-inset-right)); bottom: max(22px, env(safe-area-inset-bottom)); display: flex; align-items: baseline; gap: 6px; opacity: 0; transition: opacity .3s; }
#speedo.on { opacity: 1; }
#speedo b { font-family: Anton, sans-serif; font-weight: 400; font-size: 54px; color: #fff; -webkit-text-stroke: 1.5px #1a0630; text-shadow: 0 3px 0 #1a0630, 0 0 14px var(--cyan); min-width: 2.2ch; text-align: right; }
#speedo small { font-size: 13px; letter-spacing: .2em; color: var(--cyan); }
#bust { position: absolute; left: 50%; bottom: 90px; transform: translateX(-50%); width: 220px; height: 12px; border-radius: 6px; background: rgba(0, 0, 0, .6); border: 1px solid #fff; overflow: hidden; opacity: 0; transition: opacity .2s; }
#bust.on { opacity: 1; } #bust i { display: block; height: 100%; background: repeating-linear-gradient(90deg, #ff2d4a 0 14px, #2f6bff 14px 28px); }
#death { position: fixed; inset: 0; z-index: 30; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; background: radial-gradient(ellipse, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, .55)); animation: fadeIn 1s; }
#deathTxt { font-family: Anton, sans-serif; font-size: clamp(64px, 16vw, 150px); letter-spacing: .04em; color: #ff2d4a; -webkit-text-stroke: 3px #1a0008; text-shadow: 0 6px 0 #1a0008, 0 0 50px rgba(255, 45, 74, .6); animation: deathIn 1.4s cubic-bezier(.2, 1.2, .3, 1); }
#deathTxt.busted { color: #4d86ff; -webkit-text-stroke-color: #000a2a; text-shadow: 0 6px 0 #000a2a, 0 0 50px rgba(77, 134, 255, .6); }
#deathSub { margin-top: 8px; font-size: 18px; letter-spacing: .2em; color: #fff; text-shadow: 0 2px 8px #000; }
@keyframes deathIn { from { opacity: 0; transform: scale(1.6); letter-spacing: .4em } }

/* ---------- menu ---------- */
#menu { position: fixed; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(10, 2, 24, .6); backdrop-filter: blur(5px); }
.m-card { width: min(440px, 100%); max-height: 100%; overflow-y: auto; border-radius: 18px; background: linear-gradient(180deg, rgba(40, 10, 70, .96), rgba(16, 4, 36, .97)); border: 1px solid rgba(255, 46, 166, .5); box-shadow: 0 0 40px rgba(255, 46, 166, .3), 0 20px 60px rgba(0, 0, 0, .6); }
.m-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; font-family: Monoton, sans-serif; font-size: 26px; color: #ffe6f5; text-shadow: 0 0 12px var(--pink); border-bottom: 1px solid rgba(255, 255, 255, .1); }
.m-head button { width: 36px; height: 36px; border-radius: 9px; border: 1px solid rgba(255, 255, 255, .3); background: rgba(0, 0, 0, .3); color: #fff; font-size: 16px; }
.m-body { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 18px; text-align: center; }
.m-body .neon-btn { font-size: 22px; padding: 11px 40px 9px; animation: none; }
.m-gta small { font-size: 11px; letter-spacing: .3em; text-transform: uppercase; opacity: .8; }
.m-gta .count { font-size: 34px; }
.m-gta p { margin: 6px 0 0; font-size: 13px; line-height: 1.5; color: #ffe9a8; }
.m-prog { width: 100%; display: flex; flex-direction: column; gap: 4px; }
.pr-h { font-size: 11px; letter-spacing: .3em; opacity: .7; margin-bottom: 4px; }
.pr { display: flex; justify-content: space-between; font-size: 13px; padding: 8px 12px; border-radius: 8px; background: rgba(255, 255, 255, .06); }
.pr b { font-weight: 400; color: #bfb3d6; } .pr.ok b { color: var(--grn); } .pr.ok span::before { content: '✓ '; color: var(--grn); }
.m-row { display: flex; gap: 8px; }
.chip { font-size: 12px; letter-spacing: .1em; padding: 8px 12px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, .3); background: rgba(0, 0, 0, .3); color: #fff; }
#toast { position: fixed; left: 50%; top: 40%; transform: translate(-50%, -50%); z-index: 60; padding: 12px 20px; border-radius: 12px; background: rgba(8, 2, 20, .9); border: 1px solid var(--cyan); font-size: 15px; opacity: 0; pointer-events: none; transition: opacity .2s; }
#toast.on { opacity: 1; }

/* ---------- touch ---------- */
#touch { display: none; }
body.touch #touch { display: block; }
#stickZone { position: absolute; left: 0; bottom: 0; width: 58%; height: 62%; pointer-events: auto; }
#stick { position: fixed; width: 124px; height: 124px; margin: -62px 0 0 -62px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .35); background: rgba(12, 4, 28, .35); opacity: 0; transition: opacity .15s; pointer-events: none; }
#stick.on { opacity: 1; }
#knob { position: absolute; left: 50%; top: 50%; width: 54px; height: 54px; margin: -27px 0 0 -27px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #fff, #ff7ac4 50%, #ff2ea6); box-shadow: 0 0 18px var(--pink); }
.tb { position: absolute; pointer-events: auto; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .7); color: #fff; font-family: Anton, sans-serif; letter-spacing: .06em; box-shadow: 0 6px 20px rgba(0, 0, 0, .45); }
.tb.down { transform: scale(.92); filter: brightness(1.3); }
#tE { right: max(24px, env(safe-area-inset-right)); bottom: calc(max(24px, env(safe-area-inset-bottom)) + 104px); width: 78px; height: 78px; font-size: 30px; background: radial-gradient(circle at 40% 35%, #fff7b0, #ffcf33 60%, #d99600); color: #3a2400; }
#tDrift { right: calc(max(24px, env(safe-area-inset-right)) + 92px); bottom: max(24px, env(safe-area-inset-bottom)); width: 92px; height: 92px; font-size: 20px; background: radial-gradient(circle at 40% 35%, #b8fbff, #22e6ff 55%, #0a8fb0); color: #04202a; }

/* ---------- small screens / phones ---------- */
@media (max-width: 760px), (max-height: 520px) {
  #radarWrap { width: 120px; height: 120px; bottom: auto; top: calc(max(10px, env(safe-area-inset-top)) + 64px); left: max(10px, env(safe-area-inset-left)); }
  #hTL { max-width: 60vw; }
  .h-gta { font-size: 12px; padding: 5px 7px 3px; } .h-count b { font-size: 13px; padding: 4px 8px 2px; }
  .h-hold { font-size: 9px; }
  #feed { position: fixed; left: 50%; transform: translateX(-50%); top: calc(max(10px, env(safe-area-inset-top)) + 196px); align-items: center; width: 92vw; pointer-events: none; }
  body:not(.touch) #feed { top: auto; bottom: 120px; }
  .note { font-size: 12px; max-width: 92vw; padding: 7px 10px; }
  #cash { font-size: 25px; } #stars i { width: 19px; height: 19px; } .bars { width: 104px; }
  #vname { font-size: 36px; bottom: auto; top: 40%; right: 50%; transform: translate(50%, 10px); } #vname.on { transform: translate(50%, 0); }
  body.touch #speedo { right: auto; left: 50%; transform: translateX(-50%); bottom: max(14px, env(safe-area-inset-bottom)); } #speedo b { font-size: 36px; }
  body.touch #hint { bottom: auto; top: 58%; font-size: 13px; }
  #stunt { top: 24%; } #combo { top: 34%; } #combo b { font-size: 30px; }
  #raceBox { top: calc(max(10px, env(safe-area-inset-top)) + 40px); } #raceT { font-size: 22px; }
}
@media (max-height: 520px) { .t-logo { width: min(40vw, 300px); } .t-wrap { gap: 8px; } .t-big { font-size: 48px; } .neon-btn { font-size: 22px; padding: 10px 34px 8px; } }
@media (max-height: 520px) and (min-aspect-ratio: 4/3) {
  .t-wrap { display: grid; grid-template-columns: auto minmax(0, 360px); column-gap: 26px; row-gap: 8px; width: auto; align-items: center; justify-items: center; }
  .t-logo { grid-row: 1 / span 4; width: min(36vw, 300px); }
  .t-rule, .t-count, #playBtn, .links { grid-column: 2; }
  .t-big { font-size: 42px; margin: 2px 0; } .t-count { padding: 8px 16px 6px; } .t-count .count { font-size: 26px; }
  .t-keys { display: none; }
}

/* ---------- crazy additions ---------- */
#speedlines { position: fixed; inset: 0; pointer-events: none; opacity: 0; z-index: 5; background: repeating-conic-gradient(from 0deg at 50% 50%, rgba(255, 255, 255, .0) 0deg 3deg, rgba(255, 255, 255, .32) 3.3deg 3.6deg, rgba(255, 255, 255, 0) 4deg 7deg);
  -webkit-mask: radial-gradient(ellipse at 50% 50%, transparent 38%, #000 80%); mask: radial-gradient(ellipse at 50% 50%, transparent 38%, #000 80%); animation: sl .12s steps(2) infinite; }
@keyframes sl { 50% { transform: rotate(1.3deg) scale(1.02); } }
.bar.nos { position: relative; height: 12px; border-color: rgba(34, 230, 255, .6); display: none; }
.bar.nos.on { display: block; }
.bar.nos i { background: linear-gradient(90deg, #2d7bff, #22e6ff 60%, #e8fdff); box-shadow: 0 0 10px #22e6ff; }
.bar.nos.inf i { background: linear-gradient(90deg, #ff2ea6, #ffe23a, #22e6ff); }
.bar.nos span { position: absolute; left: 6px; top: 50%; transform: translateY(-50%); font-size: 8px; letter-spacing: .2em; color: #04202a; }
.ghost-btn { font-family: 'Russo One', sans-serif; font-size: 14px; letter-spacing: .14em; padding: 10px 20px; border-radius: 12px; color: #fff3b0; background: rgba(26, 10, 48, .72); border: 2px solid #ffcf33; box-shadow: 0 0 18px rgba(255, 207, 51, .35); }
.ghost-btn b { font-weight: 400; margin-left: 6px; padding: 2px 8px; border-radius: 6px; background: #ffcf33; color: #1a0630; }
.ghost-btn:hover { background: rgba(60, 20, 90, .85); }
#tNitro { right: calc(max(24px, env(safe-area-inset-right)) + 4px); bottom: calc(max(24px, env(safe-area-inset-bottom)) + 4px); width: 78px; height: 78px; font-size: 22px; background: radial-gradient(circle at 40% 35%, #ffd1ef, #ff2ea6 55%, #b10a67); }
.m-cheat { width: 100%; display: flex; flex-direction: column; gap: 6px; }
.m-cheat label { font-size: 11px; letter-spacing: .3em; opacity: .7; }
.m-cheat-row { display: flex; gap: 8px; }
.m-cheat input { flex: 1; min-width: 0; font-family: 'Russo One', sans-serif; font-size: 16px; letter-spacing: .2em; text-transform: uppercase; padding: 10px 12px; border-radius: 9px; border: 1px solid rgba(255, 46, 166, .6); background: rgba(0, 0, 0, .35); color: #fff; }
.m-cheat input:focus { outline: 2px solid #ff2ea6; }
.m-cheat small { font-size: 11px; opacity: .7; }
#unlockPop { position: fixed; right: 16px; top: 120px; z-index: 35; display: flex; align-items: center; gap: 12px; padding: 10px 16px 10px 10px; border-radius: 14px; background: rgba(12, 4, 28, .92); border: 2px solid var(--rc, #fff); box-shadow: 0 0 26px var(--rc, #fff); transform: translateX(130%); opacity: 0; transition: transform .45s cubic-bezier(.2, 1.3, .4, 1), opacity .3s; pointer-events: none; }
#unlockPop.on { transform: none; opacity: 1; }
#unlockPop img { width: 110px; height: 76px; object-fit: contain; border-radius: 8px; background: radial-gradient(ellipse at 50% 70%, rgba(255, 255, 255, .15), transparent 70%); }
#unlockPop small { display: block; font-size: 10px; letter-spacing: .25em; opacity: .75; }
#unlockPop b { display: block; font-family: Anton, sans-serif; font-weight: 400; font-size: 26px; letter-spacing: .03em; }
#unlockPop i { font-style: normal; font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: var(--rc); }
#garage { position: fixed; inset: 0; z-index: 45; display: flex; justify-content: center; padding: max(14px, env(safe-area-inset-top)) 14px max(14px, env(safe-area-inset-bottom)); background: rgba(10, 2, 24, .72); backdrop-filter: blur(6px); overflow-y: auto; }
.g-card { width: min(980px, 100%); margin: auto 0; border-radius: 20px; background: linear-gradient(180deg, rgba(44, 10, 76, .97), rgba(14, 4, 32, .98)); border: 1px solid rgba(255, 207, 51, .5); box-shadow: 0 0 50px rgba(255, 46, 166, .25), 0 30px 80px rgba(0, 0, 0, .6); padding-bottom: 18px; }
.g-head { display: flex; align-items: center; gap: 12px; padding: 16px 18px 6px; }
.g-head span { font-family: Monoton, sans-serif; font-size: clamp(28px, 6vw, 44px); color: #fff3b0; text-shadow: 0 0 14px #ffcf33; }
.g-head b { font-family: Anton, sans-serif; font-weight: 400; font-size: 20px; padding: 3px 10px; border-radius: 8px; background: #ffcf33; color: #1a0630; }
.g-head button { margin-left: auto; width: 38px; height: 38px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .3); background: rgba(0, 0, 0, .3); color: #fff; font-size: 16px; }
.g-sub { margin: 0 18px 8px; font-size: 13px; opacity: .8; line-height: 1.5; }
.g-sec { margin: 14px 18px 8px; font-size: 12px; letter-spacing: .35em; color: #bfefff; }
.g-load { padding: 40px; text-align: center; opacity: .7; }
.g-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; padding: 0 18px; }
.card { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 10px 10px 12px; border-radius: 14px; background: radial-gradient(ellipse at 50% 40%, color-mix(in srgb, var(--rc) 28%, #2a0b4a) 0%, #160634 75%); border: 2px solid color-mix(in srgb, var(--rc) 70%, transparent); overflow: hidden; }
.card.r-legendary { box-shadow: 0 0 22px rgba(255, 207, 51, .45); }
.card.r-epic { box-shadow: 0 0 16px rgba(192, 91, 255, .35); }
.card.r-legendary::after { content: ''; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .22) 45%, transparent 60%); background-size: 250% 100%; animation: shine 3.2s infinite; pointer-events: none; }
@keyframes shine { from { background-position: 150% 0 } to { background-position: -100% 0 } }
.c-art { aspect-ratio: 36 / 25; display: flex; align-items: center; justify-content: center; }
.c-art img { width: 100%; height: 100%; object-fit: contain; }
.card.locked .c-art img { filter: brightness(0) drop-shadow(0 0 10px var(--rc)); opacity: .9; }
.c-meta { display: flex; justify-content: space-between; font-size: 10px; letter-spacing: .25em; text-transform: uppercase; }
.c-rar { color: var(--rc); } .c-kind { opacity: .6; }
.c-name { font-family: Anton, sans-serif; font-size: 22px; letter-spacing: .02em; line-height: 1.1; }
.card.locked .c-name { opacity: .75; }
.c-how { font-size: 12px; line-height: 1.4; color: #d9cfee; min-height: 34px; }
.c-how::before { content: 'LOCKED: '; color: var(--rc); letter-spacing: .1em; }
.c-how.ok::before { content: ''; }
.c-btn { margin-top: auto; font-family: Anton, sans-serif; font-size: 17px; letter-spacing: .1em; padding: 8px; border-radius: 9px; border: 2px solid #fff; color: #1a0630; background: var(--rc); box-shadow: 0 0 14px color-mix(in srgb, var(--rc) 60%, transparent); }
.c-btn.on { background: transparent; color: var(--rc); border-color: var(--rc); box-shadow: none; }
@media (max-width: 760px) { .g-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 0 10px; } .c-name { font-size: 17px; } .c-how { font-size: 11px; } #unlockPop { top: auto; bottom: 200px; right: 10px; } #unlockPop img { width: 80px; height: 56px; } #unlockPop b { font-size: 20px; } }

/* ---------- title with the $VICE guy ---------- */
#title { display: grid; grid-template-columns: 1fr minmax(300px, 470px); align-items: center; padding: max(16px, env(safe-area-inset-top)) max(28px, 4vw) max(16px, env(safe-area-inset-bottom)) 16px; overflow: hidden;
  background: radial-gradient(ellipse at 28% 70%, rgba(255, 46, 166, .28), transparent 60%), linear-gradient(90deg, rgba(18, 6, 42, 0) 40%, rgba(18, 6, 42, .55) 75%); }
.t-hero { position: absolute; left: 0; bottom: 0; height: min(100vh, 60vw, calc(100vw - 470px)); width: auto; max-width: none; pointer-events: none; filter: drop-shadow(0 0 36px rgba(255, 46, 166, .5)) drop-shadow(0 10px 30px rgba(0, 0, 0, .5)); transform-origin: 50% 100%; animation: heroIn 1.1s cubic-bezier(.2, 1.1, .3, 1), heroBob 5s ease-in-out 1.1s infinite; }
@keyframes heroIn { from { opacity: 0; transform: translateY(40px) scale(.94); } }
@keyframes heroBob { 50% { transform: translateY(-8px) rotate(-.6deg); } }
.t-wrap { grid-column: 2; position: relative; z-index: 1; }
.t-rule { margin-top: 0; }
@media (max-aspect-ratio: 1/1) {
  #title { grid-template-columns: 1fr; align-items: start; padding-top: max(18px, env(safe-area-inset-top)); background: linear-gradient(180deg, rgba(18, 6, 42, .7) 0%, rgba(18, 6, 42, .35) 45%, rgba(255, 46, 166, .18) 100%); }
  .t-hero { left: 50%; transform: translateX(-50%); height: auto; width: min(104vw, 56vh); animation: fadeIn 1s; }
  .t-wrap { grid-column: 1; gap: 10px; margin: 0 auto; }
  .t-keys { display: none; }
  .t-big { font-size: clamp(44px, 12vw, 70px); }
  .t-count { padding: 8px 18px 6px; } .t-count .count { font-size: clamp(26px, 7.6vw, 36px); }
  .neon-btn { font-size: 24px; padding: 11px 40px 9px; }
}
@media (max-height: 520px) and (min-aspect-ratio: 4/3) { .t-hero { height: 100vh; } #title { grid-template-columns: 1fr minmax(0, 380px); } .t-wrap { display: flex; } }
