/* Решатели — эффекты за верные ответы и серии (js/vfx.js, Алексей 13.10.2026). Слой поверх экрана, клики проходят насквозь. */
.vfx { position: fixed; inset: 0; z-index: 9000; pointer-events: none; overflow: hidden; }

/* звёздочки и кольцо от нажатой кнопки */
.vfx-burst { position: fixed; width: 0; height: 0; }
.vfx-burst i { position: absolute; left: 0; top: 0; width: calc(14px * var(--s)); height: calc(14px * var(--s)); margin: calc(-7px * var(--s)); background: var(--c);
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); animation: vfx-star .75s cubic-bezier(.15, .75, .3, 1) both; }
@keyframes vfx-star { 0% { transform: rotate(var(--a)) translateY(0) scale(.3); opacity: 1; } 70% { opacity: 1; } 100% { transform: rotate(var(--a)) translateY(calc(-1 * var(--d))) scale(1) rotate(180deg); opacity: 0; } }
.vfx-ring { position: fixed; width: 40px; height: 40px; margin: -20px; border-radius: 50%; border: 4px solid #3ccb5a; animation: vfx-ring .6s ease-out both; }
@keyframes vfx-ring { from { transform: scale(.3); opacity: 1; } to { transform: scale(calc(4 * var(--p))); opacity: 0; } }

/* карточка задачи подпрыгивает и вспыхивает зелёным */
.task-card.vfx-win { animation: vfx-win .5s cubic-bezier(.3, 1.5, .5, 1); }
@keyframes vfx-win { 0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(60, 203, 90, .55); } 35% { transform: scale(1.025); } 100% { transform: scale(1); box-shadow: 0 0 0 18px rgba(60, 203, 90, 0); } }

/* монеты летят дугой в счётчик в шапке, счётчик подпрыгивает */
.vfx-coin { position: fixed; width: 22px; height: 22px; margin: -11px; animation: vfx-coin .7s cubic-bezier(.4, 0, .6, 1) var(--t) both; }
@keyframes vfx-coin { 0% { transform: translate(0, 0) scale(.6); opacity: 0; } 10% { opacity: 1; } 50% { transform: translate(calc(var(--dx) * .5), calc(var(--dy) * .5 + var(--arc))) scale(1.3); }
  100% { transform: translate(var(--dx), var(--dy)) scale(.8); opacity: 1; } }
.top .coins.vfx-hit, [data-vfx-coins].vfx-hit { animation: vfx-hit .4s cubic-bezier(.3, 1.8, .5, 1); }
@keyframes vfx-hit { 40% { transform: scale(1.25); } }

/* надписи серий */
.vfx-banner { position: fixed; left: 50%; top: 32%; translate: -50% -50%; white-space: nowrap; animation: vfx-banner 1.1s cubic-bezier(.3, 1.5, .5, 1) both; }
.vfx-banner b { display: block; font: 900 clamp(34px, 8vw, 72px)/1 var(--font-display); letter-spacing: -1px; color: #ffffff;
  -webkit-text-stroke: 3px #1a1a1a; paint-order: stroke fill; text-shadow: 0 6px 0 #1a1a1a; }
.vfx-banner.b3 b { background: linear-gradient(#ffe66b, #ff9f43); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(2px 0 0 #1a1a1a) drop-shadow(-2px 0 0 #1a1a1a) drop-shadow(0 2px 0 #1a1a1a) drop-shadow(0 -2px 0 #1a1a1a) drop-shadow(0 5px 0 #1a1a1a); -webkit-text-stroke: 0; text-shadow: none; }
.vfx-banner.b5 b { background: linear-gradient(#aef9ff, #7b6cf0); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(2px 0 0 #1a1a1a) drop-shadow(-2px 0 0 #1a1a1a) drop-shadow(0 2px 0 #1a1a1a) drop-shadow(0 -2px 0 #1a1a1a) drop-shadow(0 5px 0 #1a1a1a) drop-shadow(0 0 18px #7b6cf0); -webkit-text-stroke: 0; text-shadow: none; }
.vfx-banner.b10 b { font-size: clamp(38px, 10vw, 92px); background: linear-gradient(90deg, #ff4fb0, #f5d75e, #3ccb5a, #2ccbc4, #7b6cf0); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(2px 0 0 #1a1a1a) drop-shadow(-2px 0 0 #1a1a1a) drop-shadow(0 2px 0 #1a1a1a) drop-shadow(0 -2px 0 #1a1a1a) drop-shadow(0 6px 0 #1a1a1a) drop-shadow(0 0 24px #f5d75e); -webkit-text-stroke: 0; text-shadow: none; }
@keyframes vfx-banner { 0% { transform: scale(.2) rotate(-12deg); opacity: 0; } 25% { transform: scale(1.15) rotate(3deg); opacity: 1; } 40% { transform: scale(1) rotate(0); }
  80% { transform: scale(1); opacity: 1; } 100% { transform: scale(1.1) translateY(-30px); opacity: 0; } }

/* серия от 3 — свечение по краям экрана */
.vfx-edges { position: fixed; inset: 0; box-shadow: inset 0 0 0 0 rgba(123, 108, 240, 0); animation: vfx-edges .9s ease-out both; }
@keyframes vfx-edges { 30% { box-shadow: inset 0 0 80px 10px rgba(123, 108, 240, .55); } 100% { box-shadow: inset 0 0 0 0 rgba(123, 108, 240, 0); } }

/* серия 5 — молнии по краям */
.vfx-bolts i { position: fixed; top: 0; width: 60px; height: 100vh; opacity: 0; animation: vfx-bolt .5s steps(1) both;
  background: linear-gradient(transparent, #fff6a8 20%, #aef9ff 60%, transparent); clip-path: polygon(60% 0, 20% 40%, 55% 42%, 15% 100%, 85% 48%, 48% 46%, 90% 0); filter: drop-shadow(0 0 12px #aef9ff); }
.vfx-bolts i:first-child { left: 2vw; } .vfx-bolts i:last-child { right: 2vw; animation-delay: .12s; }
@keyframes vfx-bolt { 0% { opacity: 1; } 20% { opacity: 0; } 35% { opacity: 1; } 60%, 100% { opacity: 0; } }

/* конфетти сверху */
.vfx-confetti i { position: fixed; left: var(--x); top: -4vh; width: 10px; height: 16px; border-radius: 2px; background: var(--c); animation: vfx-fall 1.5s cubic-bezier(.3, .2, .6, 1) var(--t) both; }
@keyframes vfx-fall { to { transform: translateY(112vh) rotate(var(--r)) translateX(6vw); } }

/* серия 10 — дождь из монет, экран вздрагивает */
.vfx-rain img { position: fixed; left: var(--x); top: -6vh; width: calc(28px * var(--s)); animation: vfx-fall 1.6s cubic-bezier(.4, .1, .7, 1) var(--t) both; }
.wrap.vfx-shake { animation: vfx-shake .4s linear; }
@keyframes vfx-shake { 0%, 100% { transform: none; } 20% { transform: translate(-8px, 4px); } 40% { transform: translate(7px, -5px); } 60% { transform: translate(-5px, 3px); } 80% { transform: translate(3px, -2px); } }

/* огонёк серии у карточки задачи; при ошибке разбивается */
.task-card { position: relative; }
.vfx-chip { position: absolute; right: 14px; top: -14px; z-index: 2; display: inline-flex; align-items: center; gap: 5px; padding: 4px 11px 4px 8px; border-radius: 999px;
  background: linear-gradient(#ffb000, #ff6b1a); color: #ffffff; font: 800 13px/1.2 var(--font-display); box-shadow: 0 3px 0 #b8430c; }
.vfx-chip i { width: 12px; height: 15px; background: #fff1a8; clip-path: path('M6 0 C9 4 12 6 12 10 C12 13 9 15 6 15 C3 15 0 13 0 10 C0 7 3 6 4 3 C5 5 6 6 6 7 C7 5 7 3 6 0 Z'); animation: vfx-flicker .3s ease-in-out infinite alternate; }
.vfx-chip.up { animation: vfx-up .4s cubic-bezier(.3, 1.8, .5, 1); }
.vfx-chip.broke { animation: vfx-broke .55s ease-in forwards; }
@keyframes vfx-up { 40% { transform: scale(1.3) rotate(-6deg); } }
@keyframes vfx-flicker { to { transform: scale(.85, 1.1); } }
@keyframes vfx-broke { 0% { transform: none; } 30% { transform: rotate(-12deg) scale(1.1); filter: grayscale(1); } 100% { transform: translateY(40px) rotate(30deg); opacity: 0; filter: grayscale(1); } }

@media (prefers-reduced-motion: reduce) { .vfx *, .task-card.vfx-win, .top .coins.vfx-hit, .wrap.vfx-shake { animation-duration: .01s !important; } }
