/* ============================
   PLATFORM+ LOADER — soft gradient ring
   ============================ */
#page-preloader {
  position: fixed;
  inset: 0;
  display: none;          /* скрыт по умолчанию */
  justify-content: center;
  align-items: center;
  background: rgba(10, 12, 20, 0.85); /* легкий тёмный фон */
  backdrop-filter: blur(6px);
  z-index: 99999;

  opacity: 0;
  transition: opacity 0.3s ease;
}

#page-preloader.visible {
  display: flex;
  opacity: 1;
}

.preloader-ring {
  position: relative;
  width: 72px;
  height: 72px;
  display: flex;
  justify-content: center;
  align-items: center;
  isolation: isolate;
}

/* ---- ВНЕШНИЙ РИНГ ---- */
.preloader-ring::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  padding: 4px; /* толщина кольца */

  background: conic-gradient(
    from 0deg,
    #00B0FF,
    #8A2BE2,
    #00B0FF
  );

  -webkit-mask:
      radial-gradient(farthest-side, transparent calc(100% - 6px), black 0)
      content-box;
  mask:
      radial-gradient(farthest-side, transparent calc(100% - 6px), black 0)
      content-box;

  animation: spin-outer 1.1s linear infinite;
}

/* ---- ВНУТРЕННИЙ РИНГ ---- */
.preloader-ring::after {
  content: "";
  position: absolute;
  inset: 18px; /* уменьшенный размер */
  border-radius: 50%;
  padding: 4px;

  background: conic-gradient(
    from 0deg,
    #8A2BE2,
    #00B0FF,
    #8A2BE2
  );

  -webkit-mask:
      radial-gradient(farthest-side, transparent calc(100% - 6px), black 0)
      content-box;
  mask:
      radial-gradient(farthest-side, transparent calc(100% - 6px), black 0)
      content-box;

  animation:
    spin-inner 2.2s linear infinite;
}

/* ---------- Анимации ---------- */

@keyframes spin-outer {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@keyframes spin-inner {
  from { transform: rotate(0deg); }
  to   { transform: rotate(-360deg); } /* обратное вращение — красиво */
}