:root {
  --cyan: #63ddff;
  --blue: #4d8cff;
  --violet: #8455ff;
  --bg: #02040b;
}

* { box-sizing: border-box; }

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  background: var(--bg);
}

body {
  min-height: 100svh;
  overflow: hidden;
  font-family: Arial, sans-serif;
}

.scene {
  position: relative;
  width: 100vw;
  height: 100svh;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(ellipse at 14% 34%, rgba(28, 173, 224, .13), transparent 33%),
    radial-gradient(ellipse at 84% 58%, rgba(118, 65, 225, .13), transparent 34%),
    radial-gradient(circle at 50% 55%, rgba(32, 62, 145, .10), transparent 30%),
    linear-gradient(180deg, #02050c 0%, #030511 50%, #010208 100%);
}

/* هالتان ثابتتان بدل طبقات الضباب والفلاتر الثقيلة */
.scene::before,
.scene::after {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: -3;
  border-radius: 50%;
}

.scene::before {
  width: 48vw;
  height: 48vw;
  left: -20vw;
  top: -14vw;
  background: radial-gradient(circle, rgba(68, 199, 255, .08), transparent 68%);
}

.scene::after {
  width: 54vw;
  height: 54vw;
  right: -22vw;
  bottom: -24vw;
  background: radial-gradient(circle, rgba(128, 72, 255, .08), transparent 68%);
}


.nebula,
.aurora {
  position: absolute;
  pointer-events: none;
  z-index: -2;
}

.nebula {
  border-radius: 50%;
  mix-blend-mode: screen;
  filter: blur(42px);
  opacity: .18;
}

.nebula-1 {
  width: 38vw;
  height: 38vw;
  left: -8vw;
  top: 10vh;
  background: radial-gradient(circle, rgba(79, 219, 255, .78), transparent 66%);
  animation: nebulaFloat1 16s ease-in-out infinite alternate;
}

.nebula-2 {
  width: 34vw;
  height: 34vw;
  right: -8vw;
  bottom: 8vh;
  background: radial-gradient(circle, rgba(137, 83, 255, .72), transparent 68%);
  animation: nebulaFloat2 19s ease-in-out infinite alternate;
}

.aurora {
  inset: -10% -8%;
  z-index: -1;
  opacity: .22;
  background:
    radial-gradient(ellipse at 20% 30%, rgba(77, 213, 255, .22), transparent 28%),
    radial-gradient(ellipse at 78% 62%, rgba(133, 83, 255, .20), transparent 30%),
    linear-gradient(105deg, transparent 28%, rgba(95, 215, 255, .12) 45%, rgba(126, 82, 255, .13) 55%, transparent 72%);
  animation: auroraShift 14s ease-in-out infinite alternate;
}

/* نجوم خفيفة: طبقتان فقط وبدون شهب */
.stars,
.stars::before {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  background-repeat: repeat;
}

.stars-near {
  z-index: -2;
  opacity: .60;
  background-image:
    radial-gradient(circle, rgba(255,255,255,.88) 0 1px, transparent 1.6px),
    radial-gradient(circle, rgba(87,213,255,.78) 0 .8px, transparent 1.45px),
    radial-gradient(circle, rgba(135,98,255,.70) 0 .8px, transparent 1.45px);
  background-size: 190px 190px, 255px 255px, 335px 335px;
  background-position: 18px 42px, 104px 130px, 194px 54px;
  animation: starDrift 72s linear infinite;
}

.stars-near::before {
  opacity: .46;
  background-image:
    radial-gradient(circle, rgba(255,255,255,.72) 0 .65px, transparent 1.2px),
    radial-gradient(circle, rgba(83,139,255,.56) 0 .65px, transparent 1.25px);
  background-size: 128px 128px, 226px 226px;
  background-position: 48px 15px, 142px 92px;
}

.stars-far {
  z-index: -1;
  opacity: .24;
  background-image:
    radial-gradient(circle, rgba(255,255,255,.92) 0 1.2px, transparent 1.9px),
    radial-gradient(circle, rgba(150,94,255,.78) 0 1px, transparent 1.8px);
  background-size: 470px 470px, 630px 630px;
  background-position: 160px 210px, 390px 100px;
  animation: starDriftFar 105s linear infinite;
}

.logo-stage {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

.logo-stage::before {
  content: "";
  position: absolute;
  width: min(58vw, 690px);
  aspect-ratio: 1;
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
  background: radial-gradient(circle,
    rgba(83, 196, 255, .12) 0%,
    rgba(93, 91, 255, .07) 33%,
    rgba(128, 75, 255, .025) 51%,
    transparent 68%);
  animation: aura 6s ease-in-out infinite;
}

.logo-wrap {
  position: relative;
  width: min(62vw, 700px);
  max-width: 88vw;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  animation: float 7.5s ease-in-out infinite;
}

.logo-base {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
  filter:
    drop-shadow(0 0 9px rgba(88, 205, 255, .30))
    drop-shadow(0 0 22px rgba(100, 86, 255, .22));
  animation: logoGlow 4.6s ease-in-out infinite;
}


.logo-color-flow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(115deg,
    rgba(99, 221, 255, .10) 0%,
    rgba(99, 221, 255, .22) 18%,
    rgba(77, 140, 255, .30) 36%,
    rgba(132, 85, 255, .34) 56%,
    rgba(99, 221, 255, .22) 78%,
    rgba(99, 221, 255, .10) 100%);
  background-size: 260% 100%;
  background-position: 180% 50%;
  -webkit-mask: url("logo.png") center / contain no-repeat;
          mask: url("logo.png") center / contain no-repeat;
  mix-blend-mode: screen;
  opacity: .88;
  animation: colorSweep 5.5s linear infinite;
}

/* لمعة واحدة فوق الصورة الأصلية فقط؛ لا نسخ شفافة ولا ظل نص خلفي */
.logo-light {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(110deg,
      transparent 34%,
      rgba(89, 213, 255, .13) 42%,
      rgba(255,255,255,.52) 49%,
      rgba(125, 89, 255, .16) 56%,
      transparent 64%);
  background-size: 250% 100%;
  background-position: 180% 0;
  -webkit-mask: url("logo.png") center / contain no-repeat;
          mask: url("logo.png") center / contain no-repeat;
  mix-blend-mode: screen;
  opacity: 0;
  animation: shine 6.5s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(0, -8px, 0); }
}

@keyframes aura {
  0%, 100% { transform: scale(.96); opacity: .60; }
  50% { transform: scale(1.04); opacity: .92; }
}

@keyframes shine {
  0%, 14% { background-position: 180% 0; opacity: 0; }
  22% { opacity: .72; }
  42% { background-position: -80% 0; opacity: .55; }
  48%, 100% { background-position: -80% 0; opacity: 0; }
}

@keyframes starDrift {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(30px, 20px, 0); }
}

@keyframes starDriftFar {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-20px, 12px, 0); }
}


@keyframes logoGlow {
  0%, 100% {
    filter:
      drop-shadow(0 0 10px rgba(88, 205, 255, .32))
      drop-shadow(0 0 24px rgba(100, 86, 255, .24));
  }
  50% {
    filter:
      drop-shadow(0 0 15px rgba(99, 221, 255, .52))
      drop-shadow(0 0 34px rgba(132, 85, 255, .36));
  }
}

@keyframes colorSweep {
  0% { background-position: 220% 50%; filter: hue-rotate(0deg) saturate(1.02); }
  50% { background-position: 30% 50%; filter: hue-rotate(12deg) saturate(1.18); }
  100% { background-position: -190% 50%; filter: hue-rotate(0deg) saturate(1.02); }
}

@keyframes nebulaFloat1 {
  from { transform: translate3d(-1vw, -1vh, 0) scale(.97); }
  to { transform: translate3d(8vw, 4vh, 0) scale(1.09); }
}

@keyframes nebulaFloat2 {
  from { transform: translate3d(1vw, 1vh, 0) scale(1); }
  to { transform: translate3d(-8vw, -5vh, 0) scale(1.1); }
}

@keyframes auroraShift {
  from { transform: translate3d(-1vw, 0, 0) scale(1); opacity: .18; }
  to { transform: translate3d(2vw, -3vh, 0) scale(1.06); opacity: .32; }
}

/* الجوال: تقليل الحركة والمؤثرات أكثر لتخفيف GPU والبطارية */
@media (max-width: 700px) {
  .logo-wrap { width: min(94vw, 620px); }
  .logo-stage::before { width: 94vw; }

  .stars-far { display: none; }
  .stars-near { animation-duration: 90s; opacity: .52; }

  .scene::before,
  .scene::after { opacity: .72; }

  .nebula { opacity: .13; filter: blur(32px); }
  .aurora { opacity: .17; animation-duration: 16s; }

  .logo-base {
    animation-duration: 6.6s;
    filter: drop-shadow(0 0 12px rgba(91, 126, 255, .20));
  }

  .logo-color-flow { animation-duration: 6.8s; opacity: .72; }
  .logo-light { animation-duration: 8.5s; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
  }
}
