@font-face { font-family: "Pricedown"; src: url("/assets/pricedown.woff") format("woff"); font-weight: 900; font-display: swap; }

:root {
  --night: #1a0b24;
  --ink: #14061e;
  --sun: #ffb35c;
  --pink: #ff4fa0;
  --gold: #f2b632;
  --money: #7dd36b;
  --white: #fff;
  --vi: linear-gradient(180deg, #ffd27a 0%, #ff9a52 30%, #ff4fa0 65%, #a14dff 100%);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; background: var(--night); color: var(--white); overscroll-behavior: none; }
body { font-family: "Helvetica Neue", Arial, system-ui, sans-serif; -webkit-text-size-adjust: 100%; touch-action: none; }
::selection { background: var(--pink); color: var(--white); }
img, svg, canvas, video { -webkit-user-select: none; user-select: none; -webkit-user-drag: none; -webkit-touch-callout: none; }
a, button { -webkit-tap-highlight-color: transparent; font: inherit; color: inherit; }
a:focus:not(:focus-visible), button:focus:not(:focus-visible) { outline: none; }

#game { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }

/* HUD */
.hud { position: fixed; z-index: 5; right: clamp(12px, 2.4vw, 32px); top: clamp(10px, 2vw, 24px); text-align: right; display: flex; flex-direction: column; align-items: flex-end;
  font-family: "Pricedown", Impact, sans-serif; line-height: .9; pointer-events: none; }
.hud-clock { font-size: clamp(30px, 3.6vw, 50px); -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill; filter: drop-shadow(3px 3px 0 var(--ink)); }
.hud-money { font-size: clamp(24px, 3vw, 42px); color: var(--money); -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill; filter: drop-shadow(3px 3px 0 var(--ink)); margin-top: 2px; font-variant-numeric: tabular-nums; }
.stars { display: flex; gap: 4px; margin-top: 8px; filter: drop-shadow(2px 2px 0 var(--ink)); }
.stars i { width: clamp(22px, 2.4vw, 32px); aspect-ratio: 1; display: block; background: rgba(255,255,255,.28);
  clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }
.stars i.on { background: var(--white); animation: pop .5s ease-out; }
.stars.flash i.on { animation: blink .5s steps(1) infinite; }
@keyframes pop { 0% { transform: scale(1.8); } 100% { transform: scale(1); } }
@keyframes blink { 50% { background: rgba(255,255,255,.2); } }
.pill { pointer-events: auto; margin-top: 12px; padding: 7px 14px 5px; border-radius: 6px; background: var(--vi); color: var(--white); text-decoration: none;
  font-size: 20px; letter-spacing: .03em; border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); -webkit-text-stroke: 1px var(--ink); paint-order: stroke fill; }

/* GTA help box */
.hint { position: fixed; z-index: 5; left: clamp(12px, 2.4vw, 32px); top: clamp(10px, 2vw, 24px); max-width: 320px;
  background: rgba(10, 4, 16, .82); padding: 12px 16px; border-radius: 4px; font-size: 15px; line-height: 1.35; transition: opacity .3s; pointer-events: none; }
.hint b { color: var(--pink); }
.hint.hide { opacity: 0; }

/* radar */
.radar { position: fixed; z-index: 4; left: clamp(14px, 2.4vw, 32px); bottom: clamp(14px, 2.4vw, 32px); width: 160px; height: 160px; border-radius: 50%;
  border: 4px solid var(--ink); box-shadow: 0 0 0 2px rgba(255,255,255,.35), 4px 4px 0 var(--ink); background: #222; pointer-events: none; }

/* touch controls */
.act { position: fixed; z-index: 6; right: 22px; bottom: 26px; width: 78px; height: 78px; border-radius: 50%; display: none;
  background: rgba(10,4,16,.7); border: 3px solid rgba(255,255,255,.7); font-family: "Pricedown", Impact, sans-serif; font-size: 40px; }
.act.near { background: var(--pink); border-color: var(--white); animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.08); } }
.stick { position: fixed; z-index: 6; width: 120px; height: 120px; border-radius: 50%; border: 3px solid rgba(255,255,255,.5); background: rgba(10,4,16,.35);
  display: none; transform: translate(-50%, -50%); pointer-events: none; }
.stick.on { display: block; }
.nub { position: absolute; left: 50%; top: 50%; width: 52px; height: 52px; margin: -26px 0 0 -26px; border-radius: 50%; background: rgba(255,255,255,.85); }
body.touch .act { display: block; }

/* big GTA messages */
.banner-msg { position: fixed; z-index: 8; inset: 0; display: grid; place-content: center; text-align: center; pointer-events: none; visibility: hidden; }
.banner-msg.on { visibility: visible; }
.msg-1 { font-family: "Pricedown", Impact, sans-serif; font-size: clamp(54px, 10vw, 150px); color: var(--gold); -webkit-text-stroke: 5px #000; paint-order: stroke fill;
  filter: drop-shadow(5px 5px 0 #000); transform: scale(.6); opacity: 0; }
.msg-2 { font-family: "Pricedown", Impact, sans-serif; font-size: clamp(28px, 4.4vw, 60px); -webkit-text-stroke: 3px #000; paint-order: stroke fill; opacity: 0; margin-top: 6px; }
.banner-msg.bad .msg-1 { color: #e8343c; }
.banner-msg.on .msg-1 { animation: stamp .45s cubic-bezier(.2,1.6,.4,1) forwards; }
.banner-msg.on .msg-2 { animation: fade .4s .5s forwards; }
@keyframes stamp { to { transform: scale(1); opacity: 1; } }
@keyframes fade { to { opacity: 1; } }

/* title card */
.title { position: fixed; z-index: 10; inset: 0; display: grid; place-items: center; overflow: auto;
  background: radial-gradient(120% 90% at 50% 100%, rgba(255,79,160,.55) 0%, rgba(161,77,255,.35) 40%, rgba(20,6,30,.92) 75%); backdrop-filter: blur(3px); transition: opacity .5s; }
.title.gone { opacity: 0; pointer-events: none; }
.title-inner { text-align: center; padding: 24px 18px; max-width: 760px; }
.title-cat { width: clamp(130px, 18vw, 200px); height: auto; display: block; margin: 0 auto 6px; animation: bob 1.2s ease-in-out infinite; filter: drop-shadow(0 14px 10px rgba(0,0,0,.45)); }
@keyframes bob { 50% { transform: translateY(-8px) rotate(2deg); } }
.logo { font-family: "Pricedown", Impact, sans-serif; font-weight: 900; line-height: .8; filter: drop-shadow(5px 6px 0 var(--ink)); }
.logo span { display: block; -webkit-text-stroke: 6px var(--ink); paint-order: stroke fill; }
.l1 { font-size: clamp(46px, 7vw, 96px); }
.l2 { font-size: clamp(96px, 15vw, 200px); background: var(--vi); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.tag { margin-top: 10px; font-family: "Pricedown", Impact, sans-serif; font-size: clamp(22px, 2.6vw, 32px); -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; filter: drop-shadow(3px 3px 0 var(--ink)); }
.tag em { font-style: normal; color: var(--pink); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 52px; padding: 0 22px; border-radius: 6px; text-decoration: none; cursor: pointer;
  font-family: "Pricedown", Impact, sans-serif; font-size: 26px; letter-spacing: .03em; border: 3px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); transition: transform .12s, box-shadow .12s; }
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.play { margin-top: 22px; height: 66px; padding: 0 40px; font-size: 38px; background: var(--white); color: var(--ink); animation: pulse 1.1s ease-in-out infinite; }
.controls { margin-top: 14px; font-size: 14px; color: rgba(255,255,255,.8); }
.controls b { color: var(--sun); }
.chrome { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 22px; }
.buy { background: var(--vi); color: var(--white); -webkit-text-stroke: 1.5px var(--ink); paint-order: stroke fill; }
.ca { background: rgba(10,4,16,.85); min-width: 0; max-width: 100%; font-size: 18px; }
.ca-label { color: var(--gold); }
.ca-val { font-family: ui-monospace, Menlo, monospace; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; max-width: 240px; }
.x { background: var(--white); color: var(--ink); width: 52px; padding: 0; font-size: 30px; }
.legal { margin-top: 18px; font-size: 11px; color: rgba(255,255,255,.5); }

.toast { position: fixed; left: 50%; bottom: 24px; z-index: 20; transform: translate(-50%, 20px); opacity: 0; background: rgba(10,4,16,.92); padding: 10px 16px; border-radius: 4px; font-size: 14px; transition: .3s; pointer-events: none; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 720px) {
  .hint { max-width: 56vw; font-size: 13px; padding: 9px 12px; }
  .radar { width: 104px; height: 104px; left: 12px; bottom: auto; top: calc(env(safe-area-inset-top) + 96px); }
  .pill { font-size: 17px; }
  .btn { height: 46px; font-size: 22px; padding: 0 16px; }
  .play { height: 58px; font-size: 32px; }
  .ca-val { max-width: 130px; }
  .x { width: 46px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------- GTA style menu ---------- */
body.in-menu .play-ui { display: none; }
.menu-btn { position: fixed; z-index: 6; left: 50%; top: 12px; transform: translateX(-50%); width: 44px; height: 36px; border-radius: 6px;
  background: rgba(10,4,16,.7); border: 2px solid rgba(255,255,255,.5); font-weight: 900; letter-spacing: 2px; cursor: pointer; }
.menu { position: fixed; z-index: 10; inset: 0; display: grid; grid-template-columns: minmax(300px, 520px) 1fr minmax(300px, 420px); grid-template-rows: auto 1fr auto;
  background: linear-gradient(90deg, rgba(20,6,30,.86) 0%, rgba(20,6,30,.35) 38%, rgba(20,6,30,0) 60%, rgba(20,6,30,.55) 100%); transition: opacity .45s; }
.menu.gone { opacity: 0; pointer-events: none; }
.topbar { grid-column: 1 / -1; display: flex; gap: 10px; justify-content: flex-end; align-items: center; padding: 14px clamp(14px, 2.4vw, 32px) 0; flex-wrap: wrap; }
.tb-ca { display: flex; align-items: center; gap: 8px; min-width: 0; background: rgba(10,4,16,.8); border: 2px solid var(--gold); border-radius: 8px; padding: 6px 8px 6px 12px; }
.tb-k { font-weight: 900; color: var(--gold); font-size: 14px; }
.tb-val { background: none; border: 0; cursor: pointer; font-family: ui-monospace, Menlo, monospace; font-size: 13px; color: rgba(255,255,255,.9); max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.tb-btn { background: rgba(255,255,255,.12); border: 0; border-radius: 6px; padding: 7px 12px; font-weight: 800; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--white); text-decoration: none; cursor: pointer; }
.tb-btn.hot { background: var(--vi); color: var(--ink); }
#caCopy { background: var(--gold); color: var(--ink); }
.tb-x { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 8px; background: rgba(10,4,16,.8); border: 2px solid rgba(255,255,255,.4); font-family: "Pricedown", Impact, sans-serif; font-size: 24px; text-decoration: none; }

.brand { grid-column: 1; grid-row: 2; align-self: start; padding: clamp(10px, 4vh, 40px) clamp(18px, 3vw, 44px) 0; }
.brand .logo { text-align: left; }
.brand .l1 { font-size: clamp(40px, 4.6vw, 70px); }
.brand .l2 { font-size: clamp(84px, 9.6vw, 150px); }
.brand .tag { text-align: left; }
.loc { margin-top: 14px; display: flex; gap: 10px; align-items: center; font-size: 13px; font-weight: 800; letter-spacing: .08em; }
.loc b { font-family: ui-monospace, Menlo, monospace; font-size: 15px; }
.loc span { color: var(--sun); }
.dot { width: 9px; height: 9px; border-radius: 50%; background: #3dff8a; box-shadow: 0 0 8px #3dff8a; display: inline-block; }

.items { grid-column: 1; grid-row: 2; align-self: end; display: flex; flex-direction: column; gap: 4px; padding: 0 clamp(18px, 3vw, 44px) clamp(18px, 4vh, 40px); }
.item { display: flex; align-items: baseline; gap: 14px; text-align: left; background: none; border: 0; cursor: pointer; padding: 6px 14px 4px; border-left: 6px solid transparent; color: rgba(255,255,255,.45); }
.item b { font-family: "Pricedown", Impact, sans-serif; font-weight: 900; font-size: clamp(38px, 4.4vw, 62px); line-height: 1; letter-spacing: .02em; }
.item small { font-size: 13px; font-weight: 700; letter-spacing: .04em; opacity: 0; transition: opacity .2s; }
.item.on { color: var(--white); border-left-color: var(--pink); background: linear-gradient(90deg, rgba(255,79,160,.32), rgba(255,79,160,0)); }
.item.on small { opacity: .85; }
.item.on b { -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill; }

.panel { grid-column: 3; grid-row: 2; align-self: center; margin-right: clamp(14px, 2.4vw, 32px); }
.pane { display: none; background: rgba(16,6,26,.88); border: 2px solid rgba(255,255,255,.12); border-top: 6px solid var(--pink); border-radius: 10px; padding: 20px 22px; }
.pane.on { display: block; }
.pane h2 { font-family: "Pricedown", Impact, sans-serif; font-weight: 900; font-size: 40px; letter-spacing: .03em; line-height: 1; margin-bottom: 10px; }
.pane p, .pane li { font-size: 15px; line-height: 1.5; color: rgba(255,255,255,.88); }
.pane ol { padding-left: 20px; display: grid; gap: 8px; }
.pane b { color: var(--sun); }
.keys p { margin: 6px 0; }
kbd { display: inline-block; min-width: 26px; padding: 2px 7px; margin-right: 4px; border-radius: 5px; background: rgba(255,255,255,.9); color: var(--ink); font: 800 12px ui-monospace, Menlo, monospace; text-align: center; }
.big { display: flex; align-items: center; justify-content: center; width: 100%; height: 64px; margin-top: 16px; border: 0; border-radius: 8px; cursor: pointer; text-decoration: none;
  background: #ff4f6d; color: var(--white); font-family: "Pricedown", Impact, sans-serif; font-size: 34px; letter-spacing: .04em; box-shadow: 0 6px 0 #b8213f; -webkit-text-stroke: 1.5px var(--ink); paint-order: stroke fill; }
.big:disabled { background: #6a5a78; box-shadow: 0 6px 0 #3e3248; cursor: wait; font-size: 22px; }
.big:not(:disabled):active { transform: translateY(4px); box-shadow: 0 2px 0 #b8213f; }
#buyBig { background: var(--vi); box-shadow: 0 6px 0 #7c2bd1; }

.bottombar { grid-column: 1 / -1; display: flex; gap: 18px; justify-content: space-between; align-items: center; flex-wrap: wrap; padding: 10px clamp(14px, 2.4vw, 32px);
  background: rgba(10,4,16,.85); font-size: 12px; font-weight: 700; }
.bottombar .tip { color: var(--gold); }
.bottombar .legal { color: rgba(255,255,255,.5); font-weight: 500; }

@media (max-width: 900px) {
  .menu { grid-template-columns: 1fr; grid-template-rows: auto auto 1fr auto auto; overflow: auto; background: linear-gradient(180deg, rgba(20,6,30,.8) 0%, rgba(20,6,30,.2) 45%, rgba(20,6,30,.85) 75%); }
  .topbar { justify-content: center; }
  .tb-val { max-width: 120px; }
  .brand { grid-row: 2; text-align: center; padding-top: 12px; }
  .brand .logo, .brand .tag { text-align: center; }
  .brand .l1 { font-size: 38px; } .brand .l2 { font-size: 78px; }
  .loc { justify-content: center; flex-wrap: wrap; }
  .items { grid-row: 4; flex-direction: row; flex-wrap: wrap; justify-content: center; padding: 8px 10px; }
  .item { padding: 4px 8px; border-left: 0; border-bottom: 4px solid transparent; }
  .item.on { border-bottom-color: var(--pink); background: none; }
  .item b { font-size: 26px; }
  .item small { display: none; }
  .panel { grid-column: 1; grid-row: 5; margin: 0 12px 12px; }
  .pane { padding: 14px 16px; }
  .pane h2 { font-size: 30px; }
  .bottombar { display: none; }
}

/* fire button + speech bubbles */
.fire { position: fixed; z-index: 6; right: 112px; bottom: 30px; width: 70px; height: 70px; border-radius: 50%; display: none; cursor: pointer;
  background: rgba(232,52,60,.85); border: 3px solid #fff; font-family: "Pricedown", Impact, sans-serif; font-size: 24px; color: #fff; }
.fire:active { transform: scale(.92); }
body.touch .fire { display: block; }
.bubbles { position: fixed; inset: 0; z-index: 4; pointer-events: none; overflow: hidden; }
.bubble { position: absolute; left: 0; top: 0; max-width: 220px; padding: 7px 11px; border-radius: 12px; background: #fff; color: #14061e;
  font: 800 14px/1.25 "Helvetica Neue", Arial, sans-serif; box-shadow: 3px 3px 0 #14061e; white-space: normal; text-align: center; will-change: transform; }
.bubble::after { content: ""; position: absolute; left: 50%; bottom: -8px; margin-left: -7px; border: 7px solid transparent; border-top-color: #fff; border-bottom: 0; }
.bubble.cat { background: #ff4fa0; color: #fff; }
.bubble.cat::after { border-top-color: #ff4fa0; }
.hp { width: clamp(120px, 12vw, 170px); height: 12px; margin-top: 8px; border: 2px solid var(--ink); background: rgba(10,4,16,.6); box-shadow: 2px 2px 0 var(--ink); }
.hp i { display: block; height: 100%; width: 100%; background: linear-gradient(180deg, #ff6b7d, #d8243f); transition: width .2s; }
.hurt { position: fixed; inset: 0; z-index: 3; pointer-events: none; opacity: 0; transition: opacity .25s; box-shadow: inset 0 0 160px 30px rgba(255,20,50,.6); }
.jumpb { position: fixed; z-index: 6; right: 30px; bottom: 118px; width: 62px; height: 62px; border-radius: 50%; display: none; cursor: pointer;
  background: rgba(42,90,255,.85); border: 3px solid #fff; font-family: "Pricedown", Impact, sans-serif; font-size: 19px; color: #fff; }
.jumpb:active { transform: scale(.92); }
body.touch .jumpb { display: block; }
