/* v144 · ✨ efectos de la app (botones, pantallas, ventanas, números). Livianos: solo transform/opacity.
   Si el celular tiene «reducir movimiento», se apagan solos (al final del archivo). */

/* ---------- 1 · botón que se hunde al tocarlo ---------- */
.btn,.qbtn,.ctrow,.hdrbtn,.x,.coinpill,.ctseg button,.ctcats button,.qseg button,.qchips button,.qnav button,nav button,.chip,.ctsubseg button{transition:transform .14s cubic-bezier(.3,.7,.4,1.4),filter .14s,box-shadow .2s,background-color .2s,border-color .2s,color .2s}
.btn:active,.qbtn:active,.hdrbtn:active,.x:active,.coinpill:active,.ctseg button:active,.ctcats button:active,.qseg button:active,.qchips button:active,.chip:active{transform:translateY(1px) scale(.96);filter:brightness(.93)}
.ctrow:active{transform:scale(.985);background:#ffffff08}
.qnav button:active,nav button:active{transform:scale(.9)}
.btn:disabled:active,.qbtn:disabled:active{transform:none;filter:none}

/* ---------- 2 · onda de luz donde tocás ---------- */
.btn,.qbtn{position:relative;overflow:hidden;isolation:isolate}
fx-r{position:absolute;border-radius:50%;background:currentColor;opacity:.22;transform:scale(0);pointer-events:none;z-index:-1;animation:fxrip .55s cubic-bezier(.2,.7,.3,1) forwards}
@keyframes fxrip{to{transform:scale(1);opacity:0}}

/* ---------- 3 · rayitas mientras espera al servidor ---------- */
.fxld{pointer-events:none}
.fxld::before{content:'';position:absolute;inset:0;z-index:1;background:repeating-linear-gradient(-45deg,#ffffff00 0 10px,#ffffff38 10px 20px);background-size:28px 28px;animation:fxld .6s linear infinite;border-radius:inherit}
.btn.secondary.fxld::before,.qbtn.qghost.fxld::before{background-image:repeating-linear-gradient(-45deg,#8882 0 10px,#8884 10px 20px)}
@keyframes fxld{to{background-position:28px 0}}

/* ---------- 4 · listo: el botón que tocaste festeja con un anillo verde ---------- */
.fxdone{animation:fxdone .8s ease-out}
@keyframes fxdone{0%{box-shadow:0 0 0 0 #22c55eaa}35%{transform:scale(1.04)}100%{box-shadow:0 0 0 14px #22c55e00;transform:none}}

/* ---------- 5 · avisos que entran con rebote ---------- */
.fxon .toast{animation:fxtoast .5s cubic-bezier(.2,1.5,.4,1) both}
.fxon .toast.fxok{border-color:#22c55e}.fxon .toast.fxbad{border-color:#ef4444;animation:fxtoast .5s cubic-bezier(.2,1.5,.4,1) both,fxshake .4s .45s}
@keyframes fxtoast{from{opacity:0;transform:translate(-50%,24px) scale(.85)}to{opacity:1;transform:translate(-50%,0) scale(1)}}
@keyframes fxshake{0%,100%{transform:translate(-50%,0)}25%{transform:translate(calc(-50% - 6px),0)}75%{transform:translate(calc(-50% + 6px),0)}}

/* ---------- 6 · ventanas que suben deslizando (solo al abrirse, no al tocar adentro) ---------- */
.fxon .modalback:not(.fxkeep){animation:fxfade .2s ease var(--fxd,0ms) both}
.fxon .modalback:not(.fxkeep)>.modal{animation:fxsheet .38s cubic-bezier(.2,.9,.25,1.04) var(--fxd,0ms) both}
.fxon .qmback:not(.fxkeep){animation:fxfade .2s ease var(--fxd,0ms) both}
.fxon .qmback.fxkeep .qmodal{animation:none}
.fxon .qmback:not(.fxkeep) .qmodal{animation:fxsheet .38s cubic-bezier(.2,.9,.25,1.04) var(--fxd,0ms) both}
@keyframes fxfade{from{opacity:0}}
@keyframes fxsheet{from{transform:translateY(60px);opacity:.3}to{transform:none;opacity:1}}

/* ---------- 7 · interruptores con resorte ---------- */
.sw::after{transition:left .34s cubic-bezier(.45,1.65,.5,.8),width .16s ease}
.sw:active::after{width:25px}.sw:checked:active::after{left:16px}
.switch i{transition:left .34s cubic-bezier(.45,1.65,.5,.8),width .16s ease}
.switch:active i{width:30px}.switch.on:active i{left:17px}

/* ---------- 8 · cambio de pantalla: fundido y tarjetas escalonadas ---------- */
.fxa{animation:fxup .42s cubic-bezier(.2,.8,.2,1) both;animation-delay:calc(min(var(--fxi,0),8) * 45ms)}
@keyframes fxup{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:none}}

/* ---------- 9 · dibujitos de pantallas vacías que flotan ---------- */
.uiill,.uiempty svg{animation:fxbob 3.4s ease-in-out infinite}
@keyframes fxbob{50%{transform:translateY(-6px)}}

/* ---------- 10 · número que se actualiza ---------- */
.fxnum{display:inline-block;animation:fxnum .5s ease}
@keyframes fxnum{40%{transform:scale(1.08)}}

@media (prefers-reduced-motion:reduce){
  .btn,.qbtn,.ctrow,.sw::after,.switch i{transition:none!important}
  fx-r,.fxld::before,.fxdone,.fxon .toast,.fxon .modalback,.fxon .modalback>.modal,.fxon .qmback,.fxon .qmback .qmodal,.fxa,.uiill,.uiempty svg,.fxnum{animation:none!important}
}
