* { box-sizing: border-box; margin: 0; padding: 0; }
html, body, #root { height: 100%; }
body { overflow: hidden; font-family: 'Vazirmatn', system-ui, sans-serif; background: #f6cfe0; color: #4b2456; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }
canvas { display: block; touch-action: none; }
button { font-family: inherit; cursor: pointer; border: none; }
.app { position: fixed; inset: 0; overflow: hidden; }
.game-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.screen { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; padding: max(14px, env(safe-area-inset-top)) 16px max(18px, env(safe-area-inset-bottom)); line-height: 1.8; }
.loading { justify-content: center; gap: 14px; background: url(/assets/menu_bg.webp) center/cover, #f6cfe0; }
.load-logo { width: 170px; animation: bob 2s ease-in-out infinite; }
.logo-text { font-weight: 900; font-size: 34px; color: #fff; text-shadow: 0 3px 0 #c2457a, 0 6px 0 #6d2a5c, 0 10px 18px rgba(75,36,86,.4); }
.logo-text.big { font-size: 46px; }
.bar { width: 220px; height: 14px; border-radius: 10px; background: rgba(255,255,255,.55); overflow: hidden; border: 2px solid #fff; }
.bar div { height: 100%; background: linear-gradient(90deg, #ff8fb3, #ff5a8a); transition: width .2s; }
.muted { color: #6d4a7a; font-size: 14px; opacity: .9; }
.small { font-size: 12px; }
.topbar { width: 100%; max-width: 480px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.topbar h2 { font-size: 21px; font-weight: 900; color: #fff; text-shadow: 0 2px 0 #c2457a; }
.icon-btn { width: 46px; height: 46px; border-radius: 15px; background: #fff; color: #c2457a; display: grid; place-items: center; box-shadow: 0 4px 0 #e6a8c4; }
.icon-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #e6a8c4; }
.coin-pill { display: flex; align-items: center; gap: 6px; background: rgba(75,36,86,.72); color: #fff; padding: 4px 14px 4px 10px; border-radius: 30px; font-weight: 800; font-size: 17px; backdrop-filter: blur(4px); }
.coin-ic { display: inline-block; width: 18px; height: 18px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff3b0, #ffc93c 45%, #e08a12); box-shadow: inset 0 0 0 2px #ffdf6e; flex: none; }
.menu { justify-content: space-between; background: linear-gradient(to bottom, rgba(255,214,230,.15), transparent 40%, rgba(255,214,230,.5)); }
.menu-logo { display: flex; flex-direction: column; align-items: center; margin-top: 2vh; }
.menu-logo img { width: min(200px, 48vw); animation: bob 3s ease-in-out infinite; filter: drop-shadow(0 10px 14px rgba(75,36,86,.3)); }
.tag { color: #fff; font-weight: 700; text-shadow: 0 1px 4px rgba(109,42,92,.6); margin-top: 2px; }
.menu-btns { display: flex; flex-direction: column; align-items: center; gap: 12px; width: 100%; max-width: 300px; }
.btn { width: 100%; max-width: 300px; min-height: 54px; border-radius: 20px; font-size: 20px; font-weight: 900; transition: transform .08s; }
.btn:active { transform: translateY(4px) scale(.98); }
.btn.primary { background: linear-gradient(#ff8fb3, #ff5a8a); color: #fff; box-shadow: 0 6px 0 #c2457a, 0 10px 20px rgba(194,69,122,.35); text-shadow: 0 2px 0 #c2457a; }
.btn.secondary { background: url(/assets/btn_secondary.webp) center/100% 100%, #7fd8f0; color: #23476b; box-shadow: 0 6px 0 #4ea6c8; }
.btn.ghost { background: transparent; color: #6d4a7a; font-size: 16px; min-height: 44px; }
.pulse { animation: pulse 1.6s ease-in-out infinite; }
.map { background: linear-gradient(to bottom, rgba(255,210,228,.75), rgba(255,240,246,.55)); }
.map-scroll { flex: 1; width: 100%; max-width: 480px; overflow-y: auto; margin-top: 10px; padding-bottom: 20px; }
.map-path { display: flex; flex-direction: column-reverse; gap: 14px; padding: 10px 0; position: relative; }
.node { display: flex; align-items: center; gap: 10px; background: url(/assets/map_level_card.webp) center/100% 100%, rgba(255,255,255,.92); padding: 8px 12px; border-radius: 20px; width: fit-content; min-width: 170px; max-width: 75%; box-shadow: 0 5px 0 #e6a8c4; color: #4b2456; text-align: start; }
.node b { font-size: 16px; display: block; }
.node small { font-size: 11px; color: #8a6597; }
.node-info { min-width: 0; overflow-wrap: anywhere; }
.node-disc { width: 48px; height: 48px; flex: none; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(#ff8fb3, #ff5a8a); color: #fff; font-weight: 900; font-size: 22px; box-shadow: inset 0 -4px 0 rgba(0,0,0,.15); }
.node.locked { opacity: .75; cursor: default; filter: grayscale(.6); }
.node.locked .node-disc { background: #b8a8c6; }
.node.current .node-disc { animation: pulse 1.4s infinite; box-shadow: 0 0 0 5px rgba(255,255,255,.8); }
.stars { display: flex; gap: 2px; }
.stars svg { fill: rgba(75,36,86,.2); }
.stars svg.on { fill: #ffc93c; stroke: #e08a12; stroke-width: 1; }
.shop-spacer { flex: 1; min-height: 120px; }
.shop-list { width: 100%; max-width: 480px; max-height: 52%; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; background: rgba(255,255,255,.55); padding: 10px; border-radius: 24px; backdrop-filter: blur(6px); }
.shop-card { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 18px; padding: 6px 10px; box-shadow: 0 3px 0 #ecc0d4; }
.shop-card.eq { outline: 3px solid #ff8fb3; }
.shop-card img { width: 56px; height: 56px; object-fit: contain; flex: none; }
.shop-info { flex: 1; min-width: 0; overflow-wrap: anywhere; line-height: 1.6; }
.shop-info b { display: block; font-size: 15px; }
.shop-info small { color: #8a6597; font-size: 12px; }
.btn.mini { width: auto; min-height: 40px; font-size: 15px; padding: 0 14px; border-radius: 14px; background: #7fd8f0; color: #23476b; box-shadow: 0 4px 0 #4ea6c8; display: flex; align-items: center; gap: 5px; flex: none; }
.btn.mini.buy { background: linear-gradient(#ffe07a, #ffc93c); color: #6b3e0a; box-shadow: 0 4px 0 #d9951a; }
.btn.mini.off { filter: grayscale(.8); opacity: .6; }
.chip { font-size: 12px; font-weight: 800; color: #c2457a; background: #ffe3ee; padding: 4px 10px; border-radius: 10px; flex: none; }
.hud { position: absolute; inset: 0; pointer-events: none; padding: max(10px, env(safe-area-inset-top)) 12px 0; }
.hud-top { display: flex; justify-content: space-between; align-items: flex-start; }
.hud-left, .hud-right { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.hud-right { flex-direction: row; align-items: center; gap: 8px; }
.lives { display: flex; gap: 3px; background: rgba(255,255,255,.75); padding: 4px 8px; border-radius: 14px; }
.lives svg.on { fill: #ff4f7b; stroke: #c2224f; stroke-width: 1; }
.lives svg.off { fill: rgba(75,36,86,.18); }
.score { font-size: 28px; font-weight: 900; color: #fff; text-shadow: 0 2px 0 #c2457a, 0 4px 10px rgba(75,36,86,.35); line-height: 1.4; }
.pause-btn { pointer-events: auto; width: 48px; height: 48px; border-radius: 16px; background: #fff; box-shadow: 0 4px 0 #e6a8c4; display: grid; place-items: center; }
.pause-btn img { width: 36px; height: 36px; }
.progress { margin-top: 6px; display: flex; align-items: center; gap: 8px; }
.lvname { font-size: 13px; font-weight: 800; color: #fff; background: rgba(75,36,86,.6); padding: 0 10px; border-radius: 10px; white-space: nowrap; }
.ptrack { flex: 1; height: 10px; background: rgba(255,255,255,.6); border-radius: 8px; position: relative; border: 2px solid #fff; }
.pfill { height: 100%; background: linear-gradient(90deg, #7fd8f0, #ff8fb3); border-radius: 8px; }
.pdot { position: absolute; top: 50%; width: 18px; height: 18px; margin-inline-start: -9px; transform: translateY(-50%); background: #ff5a8a; border: 3px solid #fff; border-radius: 50%; }
.boost { position: absolute; top: 120px; inset-inline: 0; margin: auto; width: fit-content; font-size: 22px; font-weight: 900; color: #fff; padding: 2px 18px; border-radius: 16px; background: linear-gradient(90deg, #4fc3ea, #a0e9ff); text-shadow: 0 2px 0 #2a7fa8; animation: pulse .5s infinite; }
.pops { position: absolute; top: 38%; inset-inline: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.pop { font-size: 26px; font-weight: 900; color: #fff; text-shadow: 0 3px 0 #c2457a, 0 6px 12px rgba(75,36,86,.4); animation: popup 1.1s ease-out forwards; }
.pop.boost { text-shadow: 0 3px 0 #2a7fa8, 0 6px 12px rgba(0,60,100,.4); }
.hit-flash { position: absolute; inset: 0; background: radial-gradient(transparent 40%, rgba(255,60,100,.55)); animation: fade .5s forwards; }
.hint { position: absolute; bottom: max(40px, 9vh); inset-inline: 0; display: flex; flex-direction: column; align-items: center; pointer-events: none; animation: rise .3s ease-out; }
.hint p { background: rgba(75,36,86,.78); color: #fff; font-weight: 800; font-size: 17px; padding: 8px 18px; border-radius: 18px; max-width: 88%; text-align: center; overflow-wrap: anywhere; }
.hand { margin-bottom: 8px; filter: drop-shadow(0 4px 6px rgba(0,0,0,.25)); }
.hand.drag { animation: dragx 1.4s ease-in-out infinite; }
.hand.tilt { animation: tilt 1.4s ease-in-out infinite; }
.hand.swipe { animation: swipeu 1s ease-out infinite; }
.hand.tunnel { animation: bob 1s ease-in-out infinite; }
.overlay { justify-content: center; background: rgba(75,36,86,.42); backdrop-filter: blur(3px); animation: fade-in .2s; }
.card { width: 100%; max-width: 340px; background: #fff7fb; border-radius: 28px; padding: 22px 20px; display: flex; flex-direction: column; align-items: center; gap: 10px; box-shadow: 0 8px 0 #e6a8c4, 0 20px 40px rgba(75,36,86,.35); animation: card-in .35s cubic-bezier(.2,1.4,.4,1); }
.card h2 { font-size: 32px; font-weight: 900; color: #ff5a8a; text-shadow: 0 2px 0 #ffd0e0; }
.card.lose h2 { color: #7a5a8a; }
.end-stars svg { margin: 0 2px; }
.end-stars svg.on { animation: star-pop .5s cubic-bezier(.2,1.6,.4,1) backwards; }
.end-stars svg:nth-child(2).on { animation-delay: .2s; }
.end-stars svg:nth-child(3).on { animation-delay: .4s; }
.rows { width: 100%; display: flex; flex-direction: column; gap: 4px; }
.rows > div { display: flex; justify-content: space-between; align-items: center; background: #ffe9f2; border-radius: 12px; padding: 4px 12px; font-size: 15px; }
.rows b { display: flex; align-items: center; gap: 5px; font-size: 18px; }
.rows .reward { background: #fff3c8; }
@keyframes bob { 50% { transform: translateY(-8px); } }
@keyframes pulse { 50% { transform: scale(1.05); } }
@keyframes popup { 0% { transform: scale(.4); opacity: 0; } 20% { transform: scale(1.15); opacity: 1; } 70% { opacity: 1; } 100% { transform: translateY(-50px); opacity: 0; } }
@keyframes fade { to { opacity: 0; } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(20px); opacity: 0; } }
@keyframes card-in { from { transform: scale(.7); opacity: 0; } }
@keyframes star-pop { from { transform: scale(0) rotate(-90deg); } }
@keyframes dragx { 0%,100% { transform: translateX(-50px); } 50% { transform: translateX(50px); } }
@keyframes tilt { 0%,100% { transform: rotate(-25deg); } 50% { transform: rotate(25deg); } }
@keyframes swipeu { 0% { transform: translateY(30px); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateY(-40px); opacity: 0; } }
