/* ═══ Med225 Quizzes — motion layer ═══
   Everything here is decoration: remove this file and the site still works. */

/* living background */
.orb{position:fixed;border-radius:50%;filter:blur(90px);pointer-events:none;z-index:-1;opacity:.55;will-change:transform}
.orb.o1{width:520px;height:520px;background:rgba(99,102,241,.35);top:-160px;right:-120px;animation:drift1 22s ease-in-out infinite alternate}
.orb.o2{width:440px;height:440px;background:rgba(34,211,238,.20);bottom:-180px;left:-140px;animation:drift2 26s ease-in-out infinite alternate}
.orb.o3{width:300px;height:300px;background:rgba(168,85,247,.18);top:40%;left:45%;animation:drift3 30s ease-in-out infinite alternate}
@keyframes drift1{to{transform:translate(-120px,90px) scale(1.15)}}
@keyframes drift2{to{transform:translate(140px,-80px) scale(1.1)}}
@keyframes drift3{to{transform:translate(-160px,-120px) scale(.9)}}

/* entrance */
.fx-up{animation:fxUp .6s cubic-bezier(.2,.8,.2,1) backwards;animation-delay:var(--d,0ms)}
@keyframes fxUp{from{opacity:0;transform:translateY(14px)}}
.fx-pop{animation:fxPop .45s cubic-bezier(.2,1.4,.4,1) backwards;animation-delay:var(--d,0ms)}
@keyframes fxPop{from{opacity:0;transform:scale(.92)}}

/* header shrinks a touch once you scroll */
header{transition:background .3s,box-shadow .3s}
header.scrolled{box-shadow:0 10px 30px rgba(0,0,0,.35);background:rgba(11,18,32,.9)}

/* hero title shimmer */
.hero h1 span{background-size:200% 100%;animation:shine 6s linear infinite}
@keyframes shine{to{background-position:200% 0}}

/* press + ripple on everything clickable */
.btn,.chip,.qc,.op,.mode,.mli,.mixbtn,.dot,.x,.sw,.tab,.po{position:relative;overflow:hidden;transition:transform .18s cubic-bezier(.2,.8,.2,1),border-color .2s,background .25s,box-shadow .25s,color .2s}
.btn:active:not(:disabled),.chip:active,.qc:active,.op:active:not(:disabled),.mode:active,.mli:active,.mixbtn:active,.dot:active,.x:active,.tab:active,.po:active{transform:scale(.97)}
.rpl{position:absolute;border-radius:50%;background:rgba(255,255,255,.28);transform:scale(0);animation:rpl .65s ease-out forwards;pointer-events:none}
@keyframes rpl{to{transform:scale(1);opacity:0}}

/* primary buttons: soft glow + light sweep */
.btn.pri{background-size:180% 100%;transition:background-position .5s,transform .18s,box-shadow .3s}
.btn.pri:hover:not(:disabled){background-position:100% 0;box-shadow:0 12px 30px rgba(99,102,241,.5)}
.btn.pri::after{content:'';position:absolute;top:0;bottom:0;width:40%;left:-60%;background:linear-gradient(100deg,transparent,rgba(255,255,255,.28),transparent);transform:skewX(-20deg);animation:sweep 3.8s ease-in-out infinite}
@keyframes sweep{0%,70%{left:-60%}100%{left:130%}}

/* quiz cards: lift, glow border, light sheen */
.qc{transition:transform .35s cubic-bezier(.2,.8,.2,1),box-shadow .35s,border-color .35s}
.qc::before{content:'';position:absolute;inset:0;border-radius:inherit;padding:1px;pointer-events:none;
  background:linear-gradient(135deg,rgba(99,102,241,.0),rgba(99,102,241,.7),rgba(34,211,238,.6),rgba(99,102,241,0));
  -webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);-webkit-mask-composite:xor;mask-composite:exclude;opacity:0;transition:opacity .35s}
.qc::after{content:'';position:absolute;top:-50%;left:-80%;width:50%;height:200%;background:linear-gradient(100deg,transparent,rgba(255,255,255,.07),transparent);transform:rotate(12deg);transition:left .7s}
.qc:hover{transform:translateY(-4px) scale(1.01);box-shadow:0 18px 40px rgba(0,0,0,.45),0 0 0 1px rgba(99,102,241,.25)}
.qc:hover::before{opacity:1}
.qc:hover::after{left:130%}

/* chips: smooth active */
.chip.on{box-shadow:0 6px 18px rgba(79,70,229,.35)}

/* overlay + sheet */
.ov:not(.hidden){animation:ovIn .25s ease}
@keyframes ovIn{from{background:rgba(3,7,18,0);backdrop-filter:blur(0)}}
.sheet{animation:sheetIn .45s cubic-bezier(.2,1.2,.3,1)}
@keyframes sheetIn{from{transform:translateY(60px) scale(.98);opacity:0}}
.mode.on{box-shadow:0 0 0 3px rgba(99,102,241,.18)}
.mode.on .ic{animation:bob .6s cubic-bezier(.2,1.6,.4,1)}
@keyframes bob{40%{transform:scale(1.35) rotate(-8deg)}}

/* player: questions slide in, options cascade */
.q-in-n{animation:qInN .45s cubic-bezier(.2,.8,.2,1)}
.q-in-p{animation:qInP .45s cubic-bezier(.2,.8,.2,1)}
@keyframes qInN{from{opacity:0;transform:translateX(-28px)}}
@keyframes qInP{from{opacity:0;transform:translateX(28px)}}
.opts .op{animation:fxUp .45s cubic-bezier(.2,.8,.2,1) backwards}
.opts .op:nth-child(1){animation-delay:60ms}.opts .op:nth-child(2){animation-delay:110ms}
.opts .op:nth-child(3){animation-delay:160ms}.opts .op:nth-child(4){animation-delay:210ms}.opts .op:nth-child(5){animation-delay:260ms}
.opts.settled .op{animation:none}
.op:hover:not(:disabled){transform:translateX(-3px);box-shadow:0 8px 22px rgba(0,0,0,.3)}
[dir=ltr].op:hover:not(:disabled){transform:translateX(3px)}
.op.ok{animation:okPulse .6s ease}
@keyframes okPulse{0%{box-shadow:0 0 0 0 rgba(34,197,94,.55)}100%{box-shadow:0 0 0 14px rgba(34,197,94,0)}}
.op.ok .k,.op.no .k{animation:kPop .4s cubic-bezier(.2,1.6,.4,1)}
@keyframes kPop{50%{transform:scale(1.3)}}
.op.no{animation:shake .45s ease}
@keyframes shake{20%{transform:translateX(-7px)}40%{transform:translateX(6px)}60%{transform:translateX(-4px)}80%{transform:translateX(2px)}}
.exp{animation:expIn .45s cubic-bezier(.2,.8,.2,1)}
@keyframes expIn{from{opacity:0;transform:translateY(10px) scale(.98)}}
.bar i{box-shadow:0 0 12px rgba(34,211,238,.7);transition:width .5s cubic-bezier(.2,.8,.2,1)}
.timer.low{animation:tPulse 1s ease-in-out infinite}
@keyframes tPulse{50%{transform:scale(1.08);box-shadow:0 0 0 4px rgba(239,68,68,.15)}}
.dot{transition:transform .2s,background .2s,border-color .2s}
.dot.a{background:rgba(99,102,241,.18)}

/* particles */
.spark{position:fixed;width:8px;height:8px;border-radius:50%;pointer-events:none;z-index:200;animation:spark .8s cubic-bezier(.1,.7,.3,1) forwards}
@keyframes spark{to{transform:translate(var(--x),var(--y)) scale(.2);opacity:0}}
.conf{position:fixed;top:-12px;width:9px;height:14px;border-radius:2px;pointer-events:none;z-index:200;animation:fall var(--t,2.6s) cubic-bezier(.3,.6,.4,1) forwards}
@keyframes fall{to{transform:translate(var(--x),110vh) rotate(var(--r));opacity:.9}}

/* results */
.ring{transition:none}
.ring>div{box-shadow:inset 0 0 30px rgba(0,0,0,.4)}
.res .rs div,.res .acts,.res .seg,.res .rv{animation:fxUp .55s cubic-bezier(.2,.8,.2,1) backwards}
.res .rs div:nth-child(1){animation-delay:.35s}.res .rs div:nth-child(2){animation-delay:.45s}.res .rs div:nth-child(3){animation-delay:.55s}
.res .acts{animation-delay:.7s}.res .seg{animation-delay:.8s}.res .rv{animation-delay:.9s}
.rh h2{animation:fxUp .6s .2s cubic-bezier(.2,.8,.2,1) backwards}

/* admin */
.card{animation:fxUp .5s cubic-bezier(.2,.8,.2,1) backwards}
.pq{animation:fxUp .4s cubic-bezier(.2,.8,.2,1) backwards}
.tab.on{box-shadow:0 8px 20px rgba(79,70,229,.35)}

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