/* ================================================
   HotSpot Manager — Premium Splash Screen v2
   Soft, elegant, eye-pleasing
   ================================================ */

#hotspot-splash {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #0d0f1a;
  overflow: hidden;
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  transition: opacity 0.7s ease, transform 0.7s ease;
}

/* Soft ambient glow background */
#hotspot-splash::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 25% 35%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 75% 65%, rgba(139, 92, 246, 0.10) 0%, transparent 45%),
    radial-gradient(circle at 50% 90%, rgba(59, 130, 246, 0.07) 0%, transparent 40%);
  pointer-events: none;
}

/* Subtle grid pattern */
#hotspot-splash::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(99,102,241,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99,102,241,.04) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}

#hotspot-splash.fade-out {
  opacity: 0;
  transform: scale(1.03);
  pointer-events: none;
}

/* ── Floating orbs ─────────────────────────── */
.splash-orbs {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.splash-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0;
  animation: orbFloat ease-in-out infinite;
}

.splash-orb:nth-child(1) {
  width: 300px; height: 300px;
  background: rgba(99, 102, 241, 0.12);
  top: -80px; left: -60px;
  animation-duration: 8s; animation-delay: 0s;
}
.splash-orb:nth-child(2) {
  width: 250px; height: 250px;
  background: rgba(139, 92, 246, 0.10);
  bottom: -60px; right: -40px;
  animation-duration: 9s; animation-delay: 1.5s;
}
.splash-orb:nth-child(3) {
  width: 180px; height: 180px;
  background: rgba(59, 130, 246, 0.08);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  animation-duration: 7s; animation-delay: 0.8s;
}

@keyframes orbFloat {
  0%   { opacity: 0; transform: scale(0.8) translateY(10px); }
  25%  { opacity: 1; }
  75%  { opacity: 0.8; }
  100% { opacity: 0; transform: scale(1.1) translateY(-10px); }
}

/* ── Main content ──────────────────────────── */
.splash-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

/* Logo container with ring animations */
.splash-logo-container {
  position: relative;
  width: 140px;
  height: 140px;
  margin-bottom: 2rem;
}

/* Pulsing rings */
.splash-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(99, 102, 241, 0.2);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0);
  animation: ringExpand 3s ease-out infinite;
}
.splash-ring:nth-child(1) { width: 100px; height: 100px; animation-delay: 0s; }
.splash-ring:nth-child(2) { width: 130px; height: 130px; animation-delay: 0.5s; }
.splash-ring:nth-child(3) { width: 160px; height: 160px; animation-delay: 1s; }

@keyframes ringExpand {
  0%   { transform: translate(-50%, -50%) scale(0.6); opacity: 0.8; }
  100% { transform: translate(-50%, -50%) scale(1.2); opacity: 0; }
}

/* Logo icon */
.splash-logo-icon {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 84px; height: 84px;
  background: linear-gradient(135deg, #4338ca 0%, #6366f1 50%, #7c3aed 100%);
  border-radius: 26px;
  display: flex; align-items: center; justify-content: center;
  box-shadow:
    0 0 0 2px rgba(99,102,241,.3),
    0 8px 32px rgba(99,102,241,.4),
    0 2px 8px rgba(0,0,0,.4);
  animation: logoAppear 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.4s forwards;
}

@keyframes logoAppear {
  0%  { transform: translate(-50%, -50%) scale(0); opacity: 0; }
  60% { transform: translate(-50%, -50%) scale(1.06); opacity: 1; }
  100%{ transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

.splash-logo-icon svg {
  width: 52px; height: 52px;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.3));
}

/* WiFi arcs draw-on */
.logo-wifi-arc {
  stroke-dasharray: 200;
  stroke-dashoffset: 200;
  animation: drawArc 0.45s ease forwards;
}
.logo-wifi-arc:nth-child(1) { animation-delay: 1.1s; }
.logo-wifi-arc:nth-child(2) { animation-delay: 1.4s; }
.logo-wifi-arc:nth-child(3) { animation-delay: 1.7s; }

@keyframes drawArc {
  to { stroke-dashoffset: 0; }
}

.logo-dot {
  transform-origin: center;
  animation: dotPop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) 2s forwards;
  opacity: 0;
}
@keyframes dotPop {
  0%  { transform: scale(0); opacity: 0; }
  100%{ transform: scale(1); opacity: 1; }
}

.logo-coin {
  animation: coinIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) 2.2s forwards;
  opacity: 0;
}
@keyframes coinIn {
  0%  { transform: translateY(8px) scale(0); opacity: 0; }
  100%{ transform: translateY(0) scale(1); opacity: 1; }
}

/* ── App name ───────────────────────────────── */
.splash-title {
  font-size: 1.85rem;
  font-weight: 800;
  color: #f1f5f9;
  letter-spacing: -0.03em;
  margin-bottom: 0.35rem;
  opacity: 0;
  animation: fadeSlideUp 0.6s ease 1.6s forwards;
}

.splash-subtitle {
  font-size: 0.85rem;
  color: #6475a0;
  font-weight: 400;
  direction: rtl;
  opacity: 0;
  animation: fadeSlideUp 0.6s ease 1.9s forwards;
}

@keyframes fadeSlideUp {
  0%  { transform: translateY(16px); opacity: 0; }
  100%{ transform: translateY(0);    opacity: 1; }
}

/* ── Progress bar ──────────────────────────── */
.splash-loader-wrap {
  position: absolute;
  bottom: 48px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  opacity: 0;
  animation: fadeSlideUp 0.5s ease 2.1s forwards;
}

.splash-loader {
  width: 180px;
  height: 2px;
  background: rgba(255,255,255,.08);
  border-radius: 2px;
  overflow: hidden;
}

.splash-loader-bar {
  height: 100%;
  background: linear-gradient(90deg, #6366f1, #818cf8, #a78bfa);
  border-radius: 2px;
  width: 0%;
  animation: loadProgress 1.4s cubic-bezier(0.4, 0, 0.2, 1) 2.2s forwards;
}

@keyframes loadProgress {
  0%  { width: 0%; }
  50% { width: 70%; }
  85% { width: 90%; }
  100%{ width: 100%; }
}

.splash-loader-text {
  font-size: 0.68rem;
  color: #3d4a62;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ── Tiny stars ─────────────────────────────── */
.splash-star {
  position: absolute;
  background: rgba(255,255,255,.6);
  border-radius: 50%;
  animation: starTwinkle ease-in-out infinite;
}
@keyframes starTwinkle {
  0%, 100%{ opacity: 0; transform: scale(0); }
  50%     { opacity: 1; transform: scale(1); }
}
