/* ============================================================
   Lighthouse — Loading Screen & Profile Glow
   ============================================================ */

/* ----- Loading Screen Overlay ----- */
.lighthouse-loading {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--color-white, #ffffff);
  transition: opacity 0.5s ease;
}

.lighthouse-loading.fade-out {
  opacity: 0;
  pointer-events: none;
}

.lighthouse-loading .lighthouse-icon {
  width: 120px;
  height: 120px;
}

/* Beam element that sweeps left to right */
.lighthouse-loading .beam {
  position: absolute;
  top: 30%;
  left: 0;
  width: 120px;
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(90deg, transparent, var(--color-primary, #00e5c8), transparent);
  opacity: 0.7;
  animation: beam-sweep 1.5s ease-in-out infinite;
}

@keyframes beam-sweep {
  0% {
    transform: translateX(-120px);
    opacity: 0;
  }
  20% {
    opacity: 0.7;
  }
  80% {
    opacity: 0.7;
  }
  100% {
    transform: translateX(calc(100vw + 120px));
    opacity: 0;
  }
}

/* ----- Profile Lighthouse ----- */
.lighthouse-profile {
  position: relative;
  width: 120px;
  margin: 0 auto;
  text-align: center;
}

.lighthouse-profile img,
.lighthouse-profile svg {
  width: 100%;
  height: auto;
  display: block;
}

/* Glow overlay — radial gold gradient */
.lighthouse-profile .glow {
  position: absolute;
  inset: -20%;
  border-radius: 50%;
  background: radial-gradient(circle, var(--color-xp, #eab308) 0%, transparent 70%);
  pointer-events: none;
  opacity: 0.1;
  transition: opacity 0.4s ease;
}

/* Data-level driven opacity (levels 1–8) */
.lighthouse-profile[data-level="1"] .glow { opacity: 0.1; }
.lighthouse-profile[data-level="2"] .glow { opacity: 0.23; }
.lighthouse-profile[data-level="3"] .glow { opacity: 0.36; }
.lighthouse-profile[data-level="4"] .glow { opacity: 0.49; }
.lighthouse-profile[data-level="5"] .glow { opacity: 0.61; }
.lighthouse-profile[data-level="6"] .glow { opacity: 0.74; }
.lighthouse-profile[data-level="7"] .glow { opacity: 0.87; }
.lighthouse-profile[data-level="8"] .glow { opacity: 1.0; }
