/* =====================================================================
   RUCH – sprężyste mikroanimacje w stylu blackweek.ai (czysty CSS, oba style)
   Krzywa: cubic-bezier(.2, 1.3, .4, 1) – szybki start, lekkie „przestrzelenie”, miękkie lądowanie.
   ===================================================================== */
:root { --spr: cubic-bezier(.2, 1.3, .4, 1); --spr-mocna: cubic-bezier(.2, 1.7, .4, 1); --spr-miekka: cubic-bezier(.2, 1.1, .4, 1); }

/* przyciski, chipy, przełączniki: krótki, sprężysty dotyk */
.lg-btn { transition: transform .14s var(--spr), box-shadow .14s, background-color .15s, color .15s, filter .15s !important; }
.lg-btn:hover:not([disabled]) { transform: translateY(-1px); }
.lg-btn:active:not([disabled]) { transform: translateY(1px) scale(.97); transition-duration: .06s !important; }
.chip, .seg button, .w-kolor, .fb-gw, .check, .kw-styl { transition: transform .14s var(--spr), background-color .15s, box-shadow .14s, color .15s !important; }
.chip:active, .seg button:active, .w-kolor:active, .check:active, .kw-styl:active { transform: scale(.94); transition-duration: .06s !important; }
.chip.on, .seg button.on, .w-kolor.on { animation: r-pop .3s var(--spr-mocna); }
.sw::after { transition: left .22s var(--spr), background-color .15s !important; }
.nav button { transition: background-color .15s, color .15s, transform .14s var(--spr) !important; }
.nav button:active { transform: scale(.97); }
.nav-pill { transition: transform .45s var(--spr), height .3s var(--spr) !important; }

/* wejście strony: treść wjeżdża, karty po kolei (stagger) */
.wejscie { animation: r-wej .34s var(--spr-miekka) both !important; }
.wejscie > *, .wejscie > .siatka > * { animation: r-wej .38s var(--spr-miekka) both; }
.wejscie > *:nth-child(2), .wejscie > .siatka > *:nth-child(2) { animation-delay: .04s; }
.wejscie > *:nth-child(3), .wejscie > .siatka > *:nth-child(3) { animation-delay: .08s; }
.wejscie > *:nth-child(4), .wejscie > .siatka > *:nth-child(4) { animation-delay: .12s; }
.wejscie > *:nth-child(n+5), .wejscie > .siatka > *:nth-child(n+5) { animation-delay: .16s; }

/* okna: tło się rozjaśnia, okno lekko rośnie na sprężynie */
.modal, .porada-tlo { animation: r-tlo .2s ease both; }
.modal > .lg, .modal > .karta, .porada { animation: r-okno .26s var(--spr) both !important; }
#toasty .toast { animation: r-arkusz .32s var(--spr-miekka) both !important; }

/* potwierdzenia: ✓ wyskakuje z obrotem */
svg.ik-ok { animation: r-ok .42s var(--spr-mocna); }
.wynik-msg .ok-t, .wynik-msg .zle-t { animation: r-pop .3s var(--spr); }

/* +XP odlatuje w górę z paska */
.xp-lot { position: fixed; z-index: 80; pointer-events: none; font: 600 15px var(--w-mono, monospace); color: var(--akcent, #a78bfa);
  text-shadow: 0 0 12px color-mix(in srgb, var(--akcent, #a78bfa) 60%, transparent); animation: r-lot .9s ease-out forwards; }

/* paski postępu i wykresy rosną płynnie */
.xpbar i, .xp-pas i, .rank-p i { transition: width .7s var(--spr-miekka) !important; }
svg.wykres path[stroke] { stroke-dasharray: 4000; stroke-dashoffset: 4000; animation: r-rys 1.1s cubic-bezier(.4, 0, .2, 1) .15s forwards; }
svg.wykres path[fill^="url"], svg.radar polygon[fill^="color-mix"] { animation: r-tlo .8s ease .3s both; }
svg.radar polygon[stroke] { transform-origin: center; transform-box: fill-box; animation: r-skala .6s var(--spr) .1s both; }

/* zawieszenie nad kartą zadania / kafelkiem */
.kafel, .mini, .blok { transition: transform .2s var(--spr), box-shadow .2s, background-color .15s; }
.blok:hover, .mini:hover { transform: translateY(-1px); }

@keyframes r-wej { from { opacity: 0; transform: translateY(10px); } }
@keyframes r-tlo { from { opacity: 0; } }
@keyframes r-okno { from { opacity: 0; transform: translateY(8px) scale(.97); } }
@keyframes r-arkusz { from { opacity: .3; transform: translateY(60%); } }
@keyframes r-pop { 0% { transform: scale(.9); } 60% { transform: scale(1.04); } 100% { transform: none; } }
@keyframes r-ok { 0% { transform: scale(.2) rotate(-25deg); } 100% { transform: none; } }
@keyframes r-lot { 0% { opacity: 0; transform: translateY(6px) scale(.9); } 20% { opacity: 1; } 100% { opacity: 0; transform: translateY(-38px) scale(1.06); } }
@keyframes r-rys { to { stroke-dashoffset: 0; } }
@keyframes r-skala { from { opacity: 0; transform: scale(.6); } }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
