/* ==========================================================================
   新培教育 —— 圖示動態效果（fx-icons.css，配 fx-icons.js）
   舞台 .fxs 係 100×100，用 --k 縮放到圖示實際大小；所有發光用 screen 混合。
   ========================================================================== */
.fxi { position: relative; display: block; }
.fxi > img { display: block; width: 100%; height: 100%; }
.fxl { position: absolute; inset: 0; pointer-events: none; mix-blend-mode: screen; }
.fxs { position: absolute; left: 0; top: 0; width: 100px; height: 100px; transform: scale(var(--k, .84)); transform-origin: 0 0; }
.fxs > span, .fx-rot > span, .fx-ring8 > span, .fx-clip > span { position: absolute; display: block; }
.fxi .fxs * { animation-play-state: paused; }
.fxi.fx-on .fxs * { animation-play-state: running; }

/* ---- shared: sunrise orb pulse + ring, twinkling particles ---- */
.fx-orb { width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,240,220,.95) 0 25%, rgba(255,150,70,.55) 50%, transparent 72%);
  animation: fxOrb 3.2s ease-in-out infinite; }
.fx-orbring { width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; border: 1px solid rgba(255,140,60,.9);
  animation: fxOrbRing 3.2s ease-out infinite; }
@keyframes fxOrb { 0%,100% { transform: scale(.8); opacity: .7 } 50% { transform: scale(1.25); opacity: 1 } }
@keyframes fxOrbRing { 0% { transform: scale(.6); opacity: .9 } 100% { transform: scale(2.6); opacity: 0 } }
.fx-tw { width: 2.4px; height: 2.4px; border-radius: 50%; background: #fff; box-shadow: 0 0 4px 1px rgba(160,210,255,.9);
  animation: fxTw 3.6s ease-in-out infinite; opacity: 0; }
@keyframes fxTw { 0%,100% { opacity: 0; transform: scale(.4) } 45% { opacity: 1; transform: scale(1.3) } 60% { opacity: .2 } }

/* ---- generic glow blobs ---- */
.fx-glow { transform: translate(-50%,-50%); border-radius: 50%;
  background: radial-gradient(closest-side, rgba(var(--c),.55), rgba(var(--c),.18) 55%, transparent); }
.fx-breathe { animation: fxBreathe 2.8s ease-in-out infinite; }
@keyframes fxBreathe { 0%,100% { opacity: .35; transform: translate(-50%,-50%) scale(.85) } 50% { opacity: 1; transform: translate(-50%,-50%) scale(1.12) } }
.fx-flicker { animation: fxFlicker 5s steps(1) infinite; }
@keyframes fxFlicker { 0%,100% { opacity: .8 } 6% { opacity: .1 } 9% { opacity: .9 } 12% { opacity: .2 } 15% { opacity: 1 } 55% { opacity: .75 } 70% { opacity: 1 } }
.fx-blink { animation: fxBlink 1.8s ease-in-out infinite; }
@keyframes fxBlink { 0%,100% { opacity: .15 } 50% { opacity: 1 } }

/* ---- math: diagonal light sweep + sparkles ---- */
.fx-clip { left: 6px; top: 6px; width: 84px; height: 84px; overflow: hidden; border-radius: 8px; }
.fx-sweep { left: -40px; top: -20px; width: 22px; height: 140px; transform: rotate(25deg);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent); animation: fxSweep 4.5s ease-in-out infinite; }
@keyframes fxSweep { 0%,55% { left: -40px } 90%,100% { left: 120px } }
.fx-star { width: 7px; height: 7px; margin: -3.5px; background: #fff;
  clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%);
  filter: drop-shadow(0 0 2px #ffb366); animation: fxStar 3s ease-in-out infinite; opacity: 0; }
@keyframes fxStar { 0%,100% { opacity: 0; transform: scale(.2) rotate(0) } 40% { opacity: 1; transform: scale(1.2) rotate(45deg) } 70% { opacity: 0 } }

/* ---- english: blinking cursor + underline drawn ---- */
.fx-cursor { width: 2.5px; height: 22px; background: #eaf2ff; box-shadow: 0 0 5px 1px rgba(170,210,255,.9); animation: fxCursor 1s steps(1) infinite; }
@keyframes fxCursor { 0%,49% { opacity: 1 } 50%,100% { opacity: 0 } }
.fx-underline { height: 2px; background: linear-gradient(90deg, #ff8a3d, #ffd28a); box-shadow: 0 0 5px rgba(255,150,70,.9);
  transform-origin: left center; animation: fxUnder 3.4s ease-in-out infinite; }
@keyframes fxUnder { 0% { transform: scaleX(0); opacity: 1 } 45%,75% { transform: scaleX(1); opacity: 1 } 100% { transform: scaleX(1); opacity: 0 } }

/* ---- chinese: ink drops ---- */
.fx-drop { width: 3.5px; height: 5px; margin-left: -1.75px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  background: #ffc562; box-shadow: 0 0 4px rgba(255,170,60,.9); animation: fxDrop 3.3s ease-in infinite; opacity: 0; }
@keyframes fxDrop { 0% { opacity: 0; transform: translateY(-4px) scale(.5) } 15% { opacity: 1; transform: translateY(0) scale(1) } 70% { opacity: .9 } 100% { opacity: 0; transform: translateY(18px) scale(.6) } }

/* ---- chem: rising bubbles ---- */
.fx-bubble { width: 4px; height: 4px; border-radius: 50%; border: 1px solid rgba(255,220,170,.95); background: rgba(255,170,80,.35);
  box-shadow: 0 0 4px rgba(255,160,70,.8); offset-rotate: 0deg; animation: fxPath 3.75s linear infinite, fxBub 3.75s linear infinite; opacity: 0; }
@keyframes fxPath { from { offset-distance: 0% } to { offset-distance: 100% } }
@keyframes fxBub { 0% { opacity: 0; transform: scale(.4) } 10% { opacity: 1 } 80% { opacity: 1; transform: scale(1.3) } 92% { opacity: 1; transform: scale(1.8) } 100% { opacity: 0; transform: scale(2.2) } }

/* ---- physics: electrons on orbits ---- */
.fx-rot { left: 0; top: 0; width: 100px; height: 100px; transform-origin: 50px 50px; }
.fx-electron { width: 5px; height: 5px; margin: -2.5px; border-radius: 50%; background: #fff;
  box-shadow: 0 0 4px 2px rgba(255,150,70,.95), 0 0 9px 3px rgba(255,120,40,.5); offset-rotate: 0deg; animation: fxPath 3s linear infinite; }

/* ---- bio / econ / m12 / science: travelling sparks ---- */
.fx-spark { width: 4.5px; height: 4.5px; margin: -2.25px; border-radius: 50%; offset-rotate: 0deg; animation: fxPath 4.2s ease-in-out infinite, fxFade 4.2s ease-in-out infinite; }
.fx-o { background: #fff; box-shadow: 0 0 4px 2px rgba(255,140,50,.95); }
.fx-c { background: #fff; box-shadow: 0 0 4px 2px rgba(120,200,255,.95); }
@keyframes fxFade { 0%,100% { opacity: 0 } 10%,85% { opacity: 1 } }
.fx-runner { width: 5px; height: 5px; margin: -2.5px; border-radius: 50%; background: #fff; offset-rotate: 0deg;
  box-shadow: 0 0 4px 2px #fff, 0 0 10px 4px rgba(255,150,60,.8); animation: fxPath 2.4s ease-in infinite, fxFade 2.4s linear infinite; }
.fx-burst { width: 16px; height: 16px; margin: -8px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.95);
  box-shadow: 0 0 6px rgba(255,170,80,.9); animation: fxBurst 2.4s ease-out infinite; opacity: 0; }
@keyframes fxBurst { 0%,88% { opacity: 0; transform: scale(.2) } 92% { opacity: 1 } 100% { opacity: 0; transform: scale(1.6) } }
.fx-bar { border-radius: 2px; background: linear-gradient(0deg, rgba(255,160,70,.0), rgba(255,180,90,.45)); animation: fxBar 2.4s ease-in-out infinite; opacity: 0; }
@keyframes fxBar { 0%,100% { opacity: 0 } 30% { opacity: 1 } 60% { opacity: 0 } }
.fx-tracer { width: 4.5px; height: 4.5px; margin: -2.25px; border-radius: 50%; background: #fff; offset-rotate: 0deg;
  box-shadow: 0 0 4px 2px rgba(255,170,70,.95), 0 0 9px 3px rgba(255,120,40,.5); animation: fxPath 2.4s ease-in-out infinite, fxFade 2.4s ease-in-out infinite; }
.fx-moon { width: 6px; height: 6px; margin: -3px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff, #ffc562);
  box-shadow: 0 0 6px 2px rgba(255,190,90,.9); offset-rotate: 0deg; animation: fxPath 5s linear infinite; }

/* ---- bafs: falling coin ---- */
.fx-coin { width: 13px; height: 5px; margin-left: -6.5px; border-radius: 50%; background: linear-gradient(180deg, #fff3c4, #ffc562);
  box-shadow: 0 0 5px 1px rgba(255,190,80,.9); animation: fxCoin 2.8s cubic-bezier(.55,0,.8,.4) infinite; opacity: 0; }
@keyframes fxCoin { 0% { opacity: 0; transform: translateY(-6px) } 10% { opacity: 1 } 62% { opacity: 1; transform: translateY(55px) } 70% { transform: translateY(51px) } 78% { transform: translateY(55px); opacity: 1 } 100% { opacity: 0; transform: translateY(55px) } }
.fx-burst-gold { border-color: rgba(255,210,120,.95); animation: fxBurstGold 2.8s ease-out infinite; }
@keyframes fxBurstGold { 0%,60% { opacity: 0; transform: scale(.2) } 64% { opacity: 1 } 85%,100% { opacity: 0; transform: scale(1.8) } }

/* ---- smallclass: 8 seats orbiting ---- */
.fx-ring8 { width: 0; height: 0; animation: fxSpin 14s linear infinite; }
.fx-seat { left: -2px; top: -2px; width: 4px; height: 4px; border-radius: 50%; background: #fff; box-shadow: 0 0 4px 1px rgba(255,190,90,.95);
  animation: fxSeat 2s ease-in-out infinite; }
@keyframes fxSpin { to { transform: rotate(360deg) } }
@keyframes fxSeat { 0%,100% { opacity: .35 } 50% { opacity: 1 } }

/* ---- school: columns light up in turn ---- */
.fx-col { top: 47px; width: 3px; height: 42px; margin-left: -1.5px; border-radius: 2px;
  background: linear-gradient(0deg, transparent, rgba(255,255,255,.9), transparent); box-shadow: 0 0 6px rgba(150,210,255,.9);
  animation: fxCol 2.4s ease-in-out infinite; opacity: 0; }
@keyframes fxCol { 0%,100% { opacity: 0; transform: scaleY(.3) } 25% { opacity: 1; transform: scaleY(1) } 50% { opacity: 0 } }

/* ---- specialist: ripples from the bullseye ---- */
.fx-ripple { left: 50px; top: 50px; width: 80px; height: 80px; margin: -40px; border-radius: 50%; border: 1.5px solid rgba(255,170,80,.95);
  box-shadow: 0 0 6px rgba(255,150,60,.7); animation: fxRipple 2.7s ease-out infinite; opacity: 0; }
@keyframes fxRipple { 0% { opacity: 1; transform: scale(.08) } 100% { opacity: 0; transform: scale(1) } }
.fx-hit { animation: fxHit 2.7s ease-out infinite; }
@keyframes fxHit { 0% { opacity: 1; transform: translate(-50%,-50%) scale(1.4) } 30%,100% { opacity: .25; transform: translate(-50%,-50%) scale(.8) } }

/* ---- bank: scan line over the books + rising particles ---- */
.fx-clip-books { left: 14px; top: 34px; width: 74px; height: 56px; border-radius: 4px; }
.fx-scan { left: 0; width: 100%; height: 8px; background: linear-gradient(180deg, transparent, rgba(150,215,255,.75), transparent);
  animation: fxScan 2.6s ease-in-out infinite; }
@keyframes fxScan { 0% { top: 56px } 100% { top: -10px } }
.fx-float { width: 3px; height: 3px; border-radius: 50%; background: #fff; box-shadow: 0 0 4px 1px rgba(255,190,90,.9);
  animation: fxFloat 3s ease-out infinite; opacity: 0; }
@keyframes fxFloat { 0% { opacity: 0; transform: translateY(0) } 20% { opacity: 1 } 100% { opacity: 0; transform: translateY(-26px) } }

/* elements moving along a path: the path's coordinates start at the stage's top-left corner */
.fxs [style*="offset-path"] { left: 0; top: 0; margin: 0 !important; }
