/* Yaloo front page (logged-out auth screen) — dynamic, futuristic treatment.
   Scoped to .x-auth-wrap so the logged-in shell is never affected. Plus a
   futuristic glow for the Yaloo logo badge in the sidebar. Additive overrides
   only; respects prefers-reduced-motion. */

/* ── Dynamic futuristic backdrop ── */
.x-auth-wrap {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 15% 20%, rgba(120, 86, 255, 0.30), transparent 42%),
    radial-gradient(circle at 85% 18%, rgba(29, 155, 240, 0.28), transparent 40%),
    radial-gradient(circle at 50% 95%, rgba(240, 36, 155, 0.24), transparent 48%),
    radial-gradient(circle at 78% 72%, rgba(56, 189, 248, 0.20), transparent 52%),
    #04010d;
  background-size: 200% 200%, 220% 220%, 210% 210%, 240% 240%, auto;
  animation: yfp-nebula 20s ease-in-out infinite;
}

/* Futuristic perspective grid that drifts upward. */
.x-auth-wrap::before {
  content: "";
  position: absolute;
  inset: -50% -10% -10%;
  background-image:
    linear-gradient(rgba(120, 160, 255, 0.10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 160, 255, 0.10) 1px, transparent 1px);
  background-size: 46px 46px;
  transform: perspective(520px) rotateX(62deg);
  transform-origin: 50% 100%;
  mask-image: linear-gradient(to top, #000 0%, transparent 72%);
  -webkit-mask-image: linear-gradient(to top, #000 0%, transparent 72%);
  animation: yfp-grid 7s linear infinite;
  pointer-events: none;
  z-index: 0;
}

/* Sweeping scanline shimmer across the whole page. */
.x-auth-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 38%, rgba(180, 200, 255, 0.07) 50%, transparent 62%);
  background-size: 280% 280%;
  animation: yfp-scan 9s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

/* ── Glassmorphic, glowing auth card ── */
.x-auth-wrap .x-auth-card {
  position: relative;
  z-index: 1;
  background: rgba(8, 5, 20, 0.55);
  border: 1px solid rgba(140, 130, 220, 0.28);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 24px 70px rgba(80, 40, 200, 0.35),
    0 0 60px rgba(29, 155, 240, 0.18);
  animation: yfp-card-in 0.8s cubic-bezier(0.18, 1.3, 0.4, 1) both, yfp-float 7s ease-in-out 0.8s infinite;
}

/* Rotating conic gradient ring framing the card. */
.x-auth-wrap .x-auth-card::before {
  content: "";
  position: absolute;
  inset: -1.5px;
  border-radius: inherit;
  padding: 1.5px;
  background: conic-gradient(from 0deg, #1d9bf0, #8a63ff, #f0249b, #38bdf8, #1d9bf0);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.85;
  animation: yfp-spin 8s linear infinite;
  pointer-events: none;
}

/* ── Futuristic animated "Yaloo" wordmark ── */
.x-auth-wrap .x-auth-title {
  font-size: 3.6rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  background: linear-gradient(100deg, #38bdf8, #8a63ff, #f0249b, #1d9bf0, #38bdf8);
  background-size: 300% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  filter: drop-shadow(0 0 26px rgba(138, 99, 255, 0.6));
  animation: yfp-text-flow 5s linear infinite, yfp-text-glow 3.4s ease-in-out infinite;
}

/* ── Futuristic Yaloo logo badge (sidebar + anywhere it appears) ── */
.x-logo-badge {
  position: relative;
  border-radius: 14px !important;
  box-shadow: 0 0 18px rgba(120, 86, 255, 0.55), 0 0 40px rgba(29, 155, 240, 0.25);
  animation: yfp-logo-pulse 3.6s ease-in-out infinite;
}

.x-logo-badge::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  padding: 2px;
  background: conic-gradient(from 0deg, #1d9bf0, #8a63ff, #f0249b, #38bdf8, #1d9bf0);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: yfp-spin 5s linear infinite;
  pointer-events: none;
}

.x-logo-image {
  transition: transform 0.3s ease;
}

.x-logo-badge:hover .x-logo-image {
  transform: scale(1.08);
}

/* ── Keyframes ── */
@keyframes yfp-nebula {
  0%, 100% { background-position: 0% 0%, 100% 0%, 50% 100%, 78% 72%, 0 0; }
  50% { background-position: 100% 100%, 0% 100%, 50% 0%, 22% 28%, 0 0; }
}

@keyframes yfp-grid {
  0% { background-position: 0 0, 0 0; }
  100% { background-position: 0 46px, 46px 0; }
}

@keyframes yfp-scan {
  0%, 100% { background-position: 0% 0%; }
  50% { background-position: 100% 100%; }
}

@keyframes yfp-card-in {
  0% { opacity: 0; transform: translateY(26px) scale(0.94); filter: blur(8px); }
  100% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

@keyframes yfp-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

@keyframes yfp-spin {
  to { transform: rotate(360deg); }
}

@keyframes yfp-text-flow {
  0% { background-position: 0% center; }
  100% { background-position: 300% center; }
}

@keyframes yfp-text-glow {
  0%, 100% { filter: drop-shadow(0 0 18px rgba(138, 99, 255, 0.45)); }
  50% { filter: drop-shadow(0 0 34px rgba(56, 189, 248, 0.75)); }
}

@keyframes yfp-logo-pulse {
  0%, 100% { box-shadow: 0 0 16px rgba(120, 86, 255, 0.45), 0 0 34px rgba(29, 155, 240, 0.2); }
  50% { box-shadow: 0 0 26px rgba(138, 99, 255, 0.8), 0 0 54px rgba(56, 189, 248, 0.4); }
}

@media (max-width: 640px) {
  .x-auth-wrap .x-auth-title { font-size: 2.8rem; }
}

@media (prefers-reduced-motion: reduce) {
  .x-auth-wrap,
  .x-auth-wrap::before,
  .x-auth-wrap::after,
  .x-auth-wrap .x-auth-card,
  .x-auth-wrap .x-auth-card::before,
  .x-auth-wrap .x-auth-title,
  .x-logo-badge,
  .x-logo-badge::after {
    animation: none;
  }
}
