:root { --ink: #2b2a33; --red: #e8402f; --cream: #fff6e6; --green: #2f8f4a; --gold: #ffd45a; --blue: #7fd3ff; --font: 'Rubik', system-ui, -apple-system, Arial, sans-serif; --head: 'Unbounded', 'Rubik', Arial, sans-serif; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #cfe8ff; font-family: var(--font); color: var(--ink); }
#c { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: crosshair; }
body:not(.in-game) #c { cursor: default; }
#ui, #hud { position: fixed; inset: 0; pointer-events: none; }
#hud { display: none; } #hud.on { display: block; }
.screen { position: absolute; inset: 0; display: none; pointer-events: auto; } .screen.on { display: flex; }
button, .btn { font-family: var(--font); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 22px; border: 0; border-radius: 16px; background: #fff; color: var(--ink); font-weight: 700; font-size: 17px; cursor: pointer; box-shadow: 0 6px 20px rgba(40, 60, 20, .18), inset 0 -3px 0 rgba(0, 0, 0, .08); transition: transform .12s, box-shadow .12s; text-decoration: none; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(40, 60, 20, .22), inset 0 -3px 0 rgba(0, 0, 0, .08); } .btn:active { transform: translateY(1px); }
.btn.big { background: var(--red); color: #fff; font-size: 22px; padding: 16px 38px; border-radius: 22px; box-shadow: 0 10px 30px rgba(232, 64, 47, .35), inset 0 -4px 0 rgba(0, 0, 0, .15); }
.btn.sm { font-size: 14px; padding: 9px 14px; border-radius: 12px; } .btn:disabled { opacity: .55; cursor: default; transform: none; }
.key { font-size: 12px; opacity: .7; border: 1px solid rgba(255, 255, 255, .5); border-radius: 6px; padding: 1px 6px; margin-left: 4px; }
/* заставка */
#title { flex-direction: column; align-items: center; justify-content: center; background: radial-gradient(ellipse at 50% 40%, rgba(255, 255, 255, .25), rgba(255, 255, 255, 0) 60%); }
.title-wrap { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; padding: 20px; max-width: 760px; width: 100%; }
.logo { display: flex; flex-direction: column; line-height: .92; font-family: var(--head); font-weight: 800; letter-spacing: -.02em; text-shadow: 0 6px 0 rgba(255, 255, 255, .6), 0 14px 40px rgba(0, 60, 0, .18); animation: float 4s ease-in-out infinite; }
.logo-a { font-size: clamp(34px, 7vw, 64px); color: #fff; -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill; text-shadow: 0 5px 0 var(--ink); }
.logo-b { font-size: clamp(52px, 11vw, 112px); color: var(--red); -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; text-shadow: 0 8px 0 var(--ink), 0 18px 40px rgba(0, 0, 0, .18); }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-8px) rotate(1deg); } }
.tagline { font-size: 18px; font-weight: 600; color: var(--ink); background: rgba(255, 255, 255, .75); padding: 6px 16px; border-radius: 30px; }
.menu { display: flex; flex-direction: column; gap: 10px; align-items: center; margin-top: 6px; } .row { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.hero-pick { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }
.hp { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; width: 92px; padding: 8px 4px; border: 2px solid transparent; border-radius: 14px; background: rgba(255, 255, 255, .78); cursor: pointer; font-size: 12px; font-weight: 600; color: var(--ink); }
.hp.on { border-color: var(--red); background: #fff; box-shadow: 0 6px 18px rgba(232, 64, 47, .25); } .hp-e { font-size: 26px; } .hp.lock { opacity: .6; cursor: default; } .hp-l { font-size: 9px; font-weight: 500; opacity: .8; line-height: 1.1; }
.name-row input { font-family: var(--font); font-size: 15px; padding: 10px 14px; border-radius: 12px; border: 2px solid rgba(0, 0, 0, .1); background: rgba(255, 255, 255, .9); text-align: center; width: 260px; outline: none; } .name-row input:focus { border-color: var(--red); }
.global { font-size: 14px; background: rgba(255, 255, 255, .6); padding: 6px 14px; border-radius: 12px; } .global:empty { display: none; } .global-all { margin-top: 4px; font-size: 13px; opacity: .85; }
.howto { font-size: 13px; opacity: .8; max-width: 520px; background: rgba(255, 255, 255, .55); padding: 6px 12px; border-radius: 10px; }
.corner { position: absolute; right: 14px; bottom: 10px; font-size: 12px; font-weight: 700; opacity: .7; }
/* модалки */
.modal { align-items: center; justify-content: center; background: rgba(20, 40, 20, .35); backdrop-filter: blur(6px); padding: 16px; }
.panel { background: rgba(255, 252, 245, .96); border-radius: 22px; padding: 20px 22px; max-width: 720px; width: 100%; max-height: 90vh; overflow: auto; display: flex; flex-direction: column; gap: 12px; box-shadow: 0 30px 80px rgba(0, 0, 0, .25); }
.panel h2 { margin: 0; font-family: var(--head); font-size: 26px; } .panel label { display: flex; align-items: center; gap: 10px; font-size: 15px; } .panel input[type=range] { flex: 1; } .panel select { font-family: var(--font); padding: 6px 10px; border-radius: 8px; }
.hint { font-size: 13px; opacity: .8; }
.hero-list { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.tabs { display: flex; gap: 6px; } .tab { border: 0; background: rgba(0, 0, 0, .06); border-radius: 10px; padding: 8px 14px; font-weight: 700; cursor: pointer; } .tab.on { background: var(--red); color: #fff; }
.lb { display: flex; flex-direction: column; gap: 4px; max-height: 50vh; overflow: auto; } .lb-row { display: grid; grid-template-columns: 34px 1fr auto auto 24px; gap: 8px; align-items: center; padding: 7px 10px; border-radius: 10px; background: rgba(0, 0, 0, .04); font-size: 14px; } .lb-row.me { background: rgba(232, 64, 47, .12); } .lb-i { font-weight: 800; opacity: .6; } .lb-d { font-weight: 700; } .lb-s { opacity: .7; font-size: 13px; } .dim { opacity: .55; }
.atlas { display: flex; flex-direction: column; gap: 10px; max-height: 60vh; overflow: auto; } .at-hero { background: rgba(0, 0, 0, .04); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; } .at-hero.lock { opacity: .75; } .at-head { font-size: 16px; } .at-head i { font-weight: 400; opacity: .7; } .at-desc { font-size: 14px; } .at-ab { font-size: 13px; color: var(--green); font-weight: 600; } .at-facts { display: flex; flex-direction: column; gap: 4px; } .at-f { font-size: 13px; line-height: 1.35; padding-left: 10px; border-left: 3px solid rgba(47, 143, 74, .5); } .at-f.dim { opacity: .5; border-color: rgba(0, 0, 0, .1); }
.disclaimer { font-size: 11px; opacity: .7; line-height: 1.35; }
.d-link { color: var(--red); font-weight: 700; text-decoration: none; font-size: 14px; }
/* карточки */
#cards { background: rgba(255, 250, 235, .35); backdrop-filter: blur(3px); flex-direction: column; }
.cards-wrap { display: flex; flex-direction: column; align-items: center; gap: 14px; width: 100%; padding: 10px; }
.cards-title { font-family: var(--head); font-size: clamp(22px, 4vw, 36px); color: var(--ink); text-shadow: 0 3px 0 #fff, 0 8px 24px rgba(0, 0, 0, .15); } .cards-title span { font-family: var(--font); font-size: 16px; opacity: .8; }
.cards { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; width: 100%; max-width: 920px; }
.card { position: relative; width: 270px; min-height: 250px; background: #fff; border-radius: 22px; padding: 18px 16px 44px; box-shadow: 0 16px 40px rgba(30, 60, 20, .22), inset 0 -5px 0 rgba(0, 0, 0, .06); cursor: pointer; display: flex; flex-direction: column; gap: 6px; transition: transform .12s; animation: cardIn .35s cubic-bezier(.2, 1.4, .4, 1) both; }
.card:nth-child(2) { animation-delay: .07s; } .card:nth-child(3) { animation-delay: .14s; } .card:hover { transform: translateY(-6px) scale(1.02); }
@keyframes cardIn { from { transform: translateY(40px) scale(.9); opacity: 0; } to { transform: none; opacity: 1; } }
.card.evo { background: linear-gradient(160deg, #fff7d6, #ffe0e6); border: 2px solid var(--gold); } .c-tag { font-size: 11px; font-weight: 800; letter-spacing: .1em; color: #b8860b; }
.c-ic { font-size: 38px; } .c-name { font-family: var(--head); font-size: 19px; line-height: 1.1; } .c-lvl { font-size: 12px; font-weight: 700; color: var(--green); } .c-t { font-size: 15px; font-weight: 600; } .c-fact { font-size: 12px; opacity: .7; line-height: 1.35; margin-top: auto; } .c-key { position: absolute; right: 14px; bottom: 12px; width: 26px; height: 26px; border-radius: 8px; background: var(--ink); color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; font-size: 13px; }
.cards-hint { font-size: 13px; opacity: .7; }
/* HUD */
.hud-top { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 2px; }
.hud-dist { font-family: var(--head); font-size: clamp(30px, 5vw, 46px); font-weight: 800; color: #fff; -webkit-text-stroke: 1.5px var(--ink); paint-order: stroke fill; text-shadow: 0 4px 0 var(--ink), 0 10px 24px rgba(0, 0, 0, .2); line-height: 1; } .hud-dist .unit { font-size: .45em; margin-left: 4px; }
.hud-mult { font-weight: 800; font-size: 18px; color: var(--ink); background: rgba(255, 255, 255, .8); padding: 2px 12px; border-radius: 20px; transition: transform .1s; } .hud-mult.hot { background: var(--gold); transform: scale(1.12); }
.combo-bar { width: 120px; height: 5px; border-radius: 4px; background: rgba(255, 255, 255, .5); overflow: hidden; } .combo-bar i { display: block; height: 100%; background: var(--red); width: 0; transition: width .1s linear; }
.hud-left { position: absolute; top: 14px; left: 16px; display: flex; flex-direction: column; gap: 6px; }
.leaves { display: flex; gap: 2px; font-size: 22px; } .leaf { opacity: .25; filter: grayscale(1); transition: all .2s; } .leaf.on { opacity: 1; filter: none; }
.hud-score { font-weight: 800; font-size: 20px; color: var(--ink); text-shadow: 0 2px 0 #fff; } .hud-dew { font-weight: 700; font-size: 15px; color: #1a6fa8; text-shadow: 0 2px 0 #fff; }
.hud-right { position: absolute; top: 14px; right: 16px; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.ability { position: relative; width: 74px; height: 74px; display: flex; flex-direction: column; align-items: center; justify-content: center; background: rgba(255, 255, 255, .85); border-radius: 50%; box-shadow: 0 6px 18px rgba(0, 0, 0, .15); opacity: .6; transition: opacity .2s, transform .2s; }
.ability.ready { opacity: 1; } .ability.active { transform: scale(1.1); background: var(--gold); }
.ab-ring { position: absolute; inset: 0; } .ab-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); } .ab-ring circle { fill: none; stroke: var(--red); stroke-width: 3; stroke-dasharray: 107; stroke-dashoffset: 0; transition: stroke-dashoffset .1s linear; }
.ab-name { font-size: 12px; font-weight: 800; text-align: center; line-height: 1; } .ab-key { font-size: 9px; opacity: .6; } body.mobile .ab-key::before { content: 'второй палец'; } body.mobile .ab-key { font-size: 0; } body.mobile .ab-key::before { font-size: 8px; }
.fairies { display: flex; gap: 4px; } .fairy-ic { font-size: 22px; filter: drop-shadow(0 0 6px var(--c)); }
.hud-bottom { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); width: min(420px, 70vw); display: flex; align-items: center; gap: 10px; }
.xp { flex: 1; height: 10px; border-radius: 6px; background: rgba(255, 255, 255, .55); overflow: hidden; box-shadow: inset 0 1px 3px rgba(0, 0, 0, .15); } .xp i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #ffd45a, #ff9a2e); transition: width .15s; }
.lvl { font-weight: 800; font-size: 14px; color: var(--ink); background: rgba(255, 255, 255, .8); padding: 3px 10px; border-radius: 12px; }
.hud-pause { position: absolute; right: 16px; bottom: 14px; pointer-events: auto; width: 40px; height: 40px; border-radius: 12px; border: 0; background: rgba(255, 255, 255, .8); font-weight: 900; cursor: pointer; }
/* попапы и тосты */
#pops { position: fixed; left: 50%; top: 38%; transform: translateX(-50%); pointer-events: none; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.pop { font-family: var(--head); font-weight: 800; font-size: 26px; color: #fff; -webkit-text-stroke: 1.2px var(--ink); paint-order: stroke fill; text-shadow: 0 3px 0 var(--ink); animation: popUp .9s ease-out forwards; }
.pop.graze { color: hsl(calc(45 - var(--k, 0) * 45), 100%, 70%); font-size: calc(24px + var(--k, 0) * 14px); } .pop.ring { color: #bfffff; } .pop.ability { color: #ffd45a; } .pop.evo { color: #ffd45a; font-size: 34px; } .pop.biome { color: #fff; font-size: 20px; opacity: .9; animation-duration: 1.6s; }
@keyframes popUp { 0% { transform: translateY(10px) scale(.7); opacity: 0; } 15% { transform: translateY(0) scale(1.1); opacity: 1; } 70% { opacity: 1; } 100% { transform: translateY(-40px) scale(1); opacity: 0; } }
#toasts { position: fixed; left: 50%; bottom: 60px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none; }
.toast { background: rgba(255, 255, 255, .92); color: var(--ink); padding: 8px 16px; border-radius: 14px; font-size: 14px; font-weight: 600; box-shadow: 0 6px 20px rgba(0, 0, 0, .15); animation: toastIn .3s ease-out; max-width: 80vw; text-align: center; } .toast.out { opacity: 0; transition: opacity .5s; } .toast.good { background: #e6ffe9; } .toast.fairy { background: #fff0f6; } .toast.shield { background: #e0fff4; }
@keyframes toastIn { from { transform: translateY(10px); opacity: 0; } }
#flash { position: fixed; inset: 0; pointer-events: none; opacity: 0; }
#flash.hit { animation: fl .45s ease-out; background: radial-gradient(ellipse at center, rgba(255, 80, 60, 0) 40%, rgba(255, 80, 60, .55)); }
#flash.level { animation: fl .6s ease-out; background: radial-gradient(ellipse at center, rgba(255, 240, 180, 0) 30%, rgba(255, 220, 120, .5)); }
#flash.land { animation: fl 1.6s ease-out; background: rgba(255, 255, 255, .7); } #flash.tree { animation: fl 2.5s ease-out; background: rgba(255, 245, 200, .9); }
@keyframes fl { 0% { opacity: 1; } 100% { opacity: 0; } }
/* итоги */
#over { align-items: center; justify-content: center; background: rgba(255, 250, 240, .18); backdrop-filter: blur(2px); padding: 12px; overflow: auto; }
.over-wrap { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; background: rgba(255, 252, 246, .94); border-radius: 26px; padding: 22px 24px; max-width: 640px; width: 100%; box-shadow: 0 30px 80px rgba(0, 0, 0, .25); max-height: 96vh; overflow: auto; animation: cardIn .4s cubic-bezier(.2, 1.4, .4, 1); }
.over-title { font-family: var(--head); font-size: 22px; } .over-dist { font-family: var(--head); font-size: 56px; color: var(--red); line-height: 1; } .over-dist b { font-size: 68px; }
.over-stats { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; font-size: 14px; font-weight: 600; } .over-stats .bi { font-size: 18px; }
.over-events { display: flex; flex-direction: column; gap: 4px; } .ev { font-size: 14px; font-weight: 700; padding: 4px 12px; border-radius: 10px; background: #fff3c4; } .ev.hero { background: #ffe0e0; } .ev.record { background: #e0ffe6; }
.share { display: flex; flex-direction: column; gap: 8px; align-items: center; width: 100%; } .rank { font-size: 16px; } .rank.dim { font-size: 13px; opacity: .7; } .share-line { font-size: 13px; background: rgba(0, 0, 0, .05); padding: 8px 12px; border-radius: 12px; max-width: 100%; word-break: break-word; } .share-btns { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.over-btns { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; align-items: center; }
.dossier { display: flex; flex-direction: column; gap: 4px; font-size: 13px; background: rgba(232, 64, 47, .06); border-radius: 14px; padding: 10px 14px; width: 100%; } .d-head { font-weight: 800; font-size: 14px; } .d-head i { font-weight: 400; opacity: .7; } .d-note { font-size: 10px; opacity: .65; line-height: 1.3; }
/* древо */
#tree { align-items: center; justify-content: center; pointer-events: none; } .tree-wrap { text-align: center; animation: treeIn 4s ease-out both; } .tree-title { font-family: var(--head); font-size: clamp(50px, 12vw, 120px); color: #fff; -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; text-shadow: 0 8px 0 var(--ink), 0 20px 60px rgba(255, 200, 80, .8); } .tree-sub { font-size: 18px; font-weight: 700; background: rgba(255, 255, 255, .85); padding: 8px 18px; border-radius: 20px; display: inline-block; }
@keyframes treeIn { 0% { transform: scale(.6); opacity: 0; } 12% { transform: scale(1.05); opacity: 1; } 80% { opacity: 1; } 100% { opacity: 0; } }
#loading { position: fixed; inset: 0; background: #cfe8ff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; z-index: 10; font-weight: 700; } .ld-logo { font-size: 64px; animation: float 1.6s ease-in-out infinite; }
@media (max-width: 640px) { .card { width: 100%; max-width: 340px; min-height: 0; padding-bottom: 40px; } .cards { gap: 8px; } .c-fact { display: none; } .hud-left { top: 10px; left: 10px; } .hud-right { top: 10px; right: 10px; } .ability { width: 60px; height: 60px; } .hp { width: 80px; } .howto { display: none; } .logo-b { -webkit-text-stroke: 2px var(--ink); } }

.hero-card { background: rgba(0, 0, 0, .04); border-radius: 16px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; border: 2px solid transparent; } .hero-card.on { border-color: var(--red); background: #fff; } .hero-card.lock { opacity: .7; }
.hc-top { display: flex; gap: 10px; align-items: center; } .hc-e { font-size: 34px; } .hc-name { font-family: var(--head); font-size: 17px; } .hc-name i { font-family: var(--font); font-weight: 400; font-size: 12px; opacity: .7; } .hc-role { font-size: 13px; opacity: .8; }
.hc-desc { font-size: 13px; line-height: 1.35; } .hc-stats { display: flex; gap: 10px; flex-wrap: wrap; font-size: 13px; font-weight: 700; } .hc-ab { font-size: 13px; color: var(--green); } .hc-best { font-size: 12px; font-weight: 700; } .hc-lock { font-size: 12px; font-weight: 700; opacity: .8; }

/* OG-режим: логотип поверх кадра для превью ссылки */
body.og #ui::before { content: 'ЛЕТИ, МУХОМОР!'; position: fixed; left: 50%; top: 34%; transform: translate(-50%, -50%); font-family: var(--head); font-weight: 800; font-size: 86px; color: var(--red); -webkit-text-stroke: 4px var(--ink); paint-order: stroke fill; text-shadow: 0 10px 0 var(--ink), 0 22px 50px rgba(0, 0, 0, .2); white-space: nowrap; letter-spacing: -.02em; }
body.og #ui::after { content: 'Маленькая доза. Большой полёт. · muhomorspace.ru/games/leti'; position: fixed; left: 50%; top: 82%; transform: translateX(-50%); font-size: 30px; font-weight: 700; color: var(--ink); background: rgba(255, 255, 255, .85); padding: 8px 22px; border-radius: 30px; white-space: nowrap; }
body.og .screen { display: none !important; } body.og #hud { display: none !important; } body.og #toasts, body.og #pops { display: none; }
