/* TradePlexa 3.5.63 — UFO animation refinement
   - flash fully covers the ship on entry and exit
   - ship appears only after the entry flash retracts
   - ship is already gone before the exit flash retracts
   - longer visible time and slightly wider movement in the upper-left quadrant
   - no changes to chart logic or other dashboard panels
*/

/* Keep the ship in the upper-left quadrant but allow a broader path */
html body #dashboard .tp68-analytics .ref-middle > .ref-panel.tp3337-equity-milkyway > .tp3561-space .tp3561-ufo-flight {
  left:18.5%!important;
  top:31.5%!important;
  width:clamp(84px,8.2vw,126px)!important;
  opacity:0;
  transform:translate3d(-18px,12px,0) scale(.84) rotate(-8deg);
  animation:tp3563-ufo-journey 34s linear infinite!important;
}

/* Ship itself: invisible during both flashes, visible only between them */
html body #dashboard .tp68-analytics .ref-middle > .ref-panel.tp3337-equity-milkyway > .tp3561-space .tp3561-ufo-art {
  opacity:0;
  filter:drop-shadow(0 0 3px rgba(48,214,246,.34)) drop-shadow(0 0 12px rgba(168,97,255,.12));
  animation:tp3563-ufo-body 34s linear infinite!important;
}

/* Bigger local flash that fully hides the ship silhouette */
html body #dashboard .tp68-analytics .ref-middle > .ref-panel.tp3337-equity-milkyway > .tp3561-space .tp3561-ufo-local-flash {
  left:50%!important;
  top:49%!important;
  width:178%!important;
  height:205%!important;
  opacity:0;
  transform:translate3d(-50%,-50%,0) scale(.10);
  background:radial-gradient(ellipse at 50% 50%,
    rgba(255,255,255,1) 0%,
    rgba(246,253,255,.99) 12%,
    rgba(150,246,255,.95) 24%,
    rgba(132,202,255,.66) 36%,
    rgba(186,116,255,.42) 49%,
    rgba(0,162,255,.16) 62%,
    rgba(4,40,92,0) 76%)!important;
  filter:drop-shadow(0 0 10px rgba(88,236,255,.74)) blur(.1px);
  animation:tp3563-local-flash 34s linear infinite!important;
}
html body #dashboard .tp68-analytics .ref-middle > .ref-panel.tp3337-equity-milkyway > .tp3561-space .tp3561-ufo-local-flash::before {
  width:108%!important;
  height:7%!important;
  background:linear-gradient(90deg,transparent,rgba(120,244,255,.38),rgba(255,255,255,.98),rgba(227,148,255,.58),transparent)!important;
}
html body #dashboard .tp68-analytics .ref-middle > .ref-panel.tp3337-equity-milkyway > .tp3561-space .tp3561-ufo-local-flash::after {
  width:5%!important;
  height:88%!important;
  background:linear-gradient(180deg,transparent,rgba(118,242,255,.30),rgba(255,255,255,.96),rgba(179,128,255,.30),transparent)!important;
}

@keyframes tp3563-ufo-journey {
  /* hidden idle */
  0%,14.8% {
    opacity:0;
    transform:translate3d(-18px,12px,0) scale(.84) rotate(-8deg);
  }
  /* entry flash zone; parent visible so flash can be seen */
  15%,18.9% {
    opacity:1;
    transform:translate3d(-14px,10px,0) scale(.88) rotate(-6deg);
  }
  /* ship already revealed after flash */
  21% {
    opacity:1;
    transform:translate3d(-6px,6px,0) scale(.96) rotate(-3deg);
  }
  28% {
    opacity:1;
    transform:translate3d(12px,-2px,0) scale(1) rotate(-1deg);
  }
  37% {
    opacity:1;
    transform:translate3d(34px,-14px,0) scale(1.02) rotate(1deg);
  }
  46% {
    opacity:1;
    transform:translate3d(58px,-10px,0) scale(1.01) rotate(2deg);
  }
  54% {
    opacity:1;
    transform:translate3d(78px,-22px,0) scale(.99) rotate(1deg);
  }
  60% {
    opacity:1;
    transform:translate3d(94px,-18px,0) scale(.98) rotate(3deg);
  }
  /* exit flash zone at final position */
  61.5%,64.7% {
    opacity:1;
    transform:translate3d(102px,-26px,0) scale(.95) rotate(3deg);
  }
  /* hidden again after flash */
  65%,100% {
    opacity:0;
    transform:translate3d(104px,-27px,0) scale(.90) rotate(3deg);
  }
}

@keyframes tp3563-ufo-body {
  /* invisible before and during entry flash */
  0%,19.6% { opacity:0; }
  /* appears immediately after flash clears */
  20.2%,58.6% { opacity:1; }
  /* already gone before exit flash retracts */
  59.1%,100% { opacity:0; }
}

@keyframes tp3563-local-flash {
  /* entry flash fully covering ship */
  0%,15.1% {
    opacity:0;
    transform:translate3d(-50%,-50%,0) scale(.08);
  }
  15.8% {
    opacity:1;
    transform:translate3d(-50%,-50%,0) scale(1.20);
  }
  17.2% {
    opacity:.98;
    transform:translate3d(-50%,-50%,0) scale(1.42);
  }
  19.2% {
    opacity:0;
    transform:translate3d(-50%,-50%,0) scale(.58);
  }
  /* quiet middle section */
  19.3%,58.3% {
    opacity:0;
    transform:translate3d(-50%,-50%,0) scale(.24);
  }
  /* exit flash fully covering ship */
  58.8% {
    opacity:1;
    transform:translate3d(-50%,-50%,0) scale(1.12);
  }
  60.2% {
    opacity:1;
    transform:translate3d(-50%,-50%,0) scale(1.34);
  }
  62.3% {
    opacity:0;
    transform:translate3d(-50%,-50%,0) scale(.44);
  }
  62.4%,100% {
    opacity:0;
    transform:translate3d(-50%,-50%,0) scale(.10);
  }
}

@media(max-width:700px) {
  html body #dashboard .tp68-analytics .ref-middle > .ref-panel.tp3337-equity-milkyway > .tp3561-space .tp3561-ufo-flight {
    display:none!important;
  }
}
@media(prefers-reduced-motion:reduce) {
  html body #dashboard .tp68-analytics .ref-middle > .ref-panel.tp3337-equity-milkyway > .tp3561-space .tp3561-ufo-flight,
  html body #dashboard .tp68-analytics .ref-middle > .ref-panel.tp3337-equity-milkyway > .tp3561-space .tp3561-ufo-art,
  html body #dashboard .tp68-analytics .ref-middle > .ref-panel.tp3337-equity-milkyway > .tp3561-space .tp3561-ufo-local-flash {
    animation:none!important;
  }
}
