/* Xcloudmultipro global loading system */
#xm-boot {
  position: fixed; inset: 0; z-index: 2147483000;
  background: #000; display: flex; align-items: center; justify-content: center;
  flex-direction: column; transition: opacity 0.45s ease, visibility 0.45s ease;
}
#xm-boot.is-done {
  opacity: 0; visibility: hidden; pointer-events: none;
}
#xm-boot video {
  width: min(92vw, 520px); height: auto; max-height: 40vh;
  object-fit: contain; background: #000;
}
#xm-boot .xm-boot-logo {
  width: min(70vw, 280px); height: auto; opacity: 0.95;
  animation: xmPulse 1.6s ease-in-out infinite;
}
#xm-boot .xm-boot-label {
  margin-top: 18px; font-family: Inter, system-ui, sans-serif;
  font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: #666;
}
#xm-boot .xm-boot-bar {
  width: min(200px, 50vw); height: 2px; background: #1a1a1a;
  margin-top: 16px; border-radius: 2px; overflow: hidden;
}
#xm-boot .xm-boot-bar > i {
  display: block; height: 100%; width: 40%; background: #fff;
  animation: xmBar 1.1s ease-in-out infinite;
}
@keyframes xmPulse {
  0%, 100% { opacity: 0.85; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.02); }
}
@keyframes xmBar {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(250%); }
}
@media (prefers-reduced-motion: reduce) {
  #xm-boot .xm-boot-logo { animation: none; }
  #xm-boot .xm-boot-bar > i { animation: none; width: 100%; opacity: 0.5; }
}
/* Route transition bar (lightweight) */
#xm-route-bar {
  position: fixed; top: 0; left: 0; height: 2px; width: 0;
  background: linear-gradient(90deg, #fff, #888); z-index: 2147482999;
  transition: width 0.25s ease, opacity 0.3s ease; pointer-events: none;
  opacity: 0;
}
#xm-route-bar.is-on { opacity: 1; width: 78%; }
#xm-route-bar.is-done { width: 100%; opacity: 0; }
/* Section skeleton */
.xm-skel {
  background: linear-gradient(90deg, #111 25%, #1a1a1a 50%, #111 75%);
  background-size: 200% 100%; animation: xmShimmer 1.2s linear infinite;
  border-radius: 12px; min-height: 80px;
}
@keyframes xmShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .xm-skel { animation: none; background: #151515; }
}
.xm-error-boundary {
  padding: 24px; text-align: center; color: #ccc;
  border: 1px solid #2a2a2a; border-radius: 14px; margin: 16px 0;
}
.xm-error-boundary button {
  margin: 8px 6px 0; padding: 10px 16px; border-radius: 10px;
  border: 1px solid #333; background: #111; color: #fff; cursor: pointer;
}
