/* YalaBobo - Premium Animated Splash Screen CSS */

.splash-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: radial-gradient(circle at center, #128C7E 0%, #0B1120 70%, #060914 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.6s;
  overflow: hidden;
}

.splash-overlay.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splash-glow {
  position: absolute;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(0, 229, 168, 0.15) 0%, rgba(37, 211, 102, 0.05) 50%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  filter: blur(40px);
  animation: pulseGlow 4s infinite ease-in-out;
  pointer-events: none;
}

.splash-logo-container {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  animation: logoScale 1.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.splash-logo-ring {
  position: absolute;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  border: 2px dashed rgba(0, 229, 168, 0.3);
  animation: spinRing 12s linear infinite;
}

.splash-logo-icon {
  width: 90px;
  height: 90px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  border-radius: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 15px 35px rgba(37, 211, 102, 0.4), inset 0 2px 2px rgba(255, 255, 255, 0.2);
  transform: rotate(-10deg);
  animation: floatLogo 3s ease-in-out infinite alternate;
  z-index: 2;
}

.splash-logo-icon svg {
  width: 48px;
  height: 48px;
  fill: #FFFFFF;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.2));
}

.splash-title {
  margin-top: 30px;
  font-family: var(--font-cairo);
  font-weight: 800;
  font-size: 36px;
  letter-spacing: 1.5px;
  background: linear-gradient(to right, #FFFFFF, var(--accent), var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  opacity: 0;
  transform: translateY(20px);
  animation: textReveal 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.5s forwards;
  text-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.splash-subtitle {
  margin-top: 10px;
  font-family: var(--font-tajawal);
  font-weight: 500;
  font-size: 16px;
  color: var(--text-muted);
  opacity: 0;
  transform: translateY(15px);
  animation: textReveal 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.8s forwards;
  letter-spacing: 0.5px;
}

.splash-loader-bar {
  position: absolute;
  bottom: 80px;
  width: 180px;
  height: 4px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.splash-loader-progress {
  height: 100%;
  width: 0%;
  background: linear-gradient(to right, var(--secondary), var(--primary), var(--accent));
  border-radius: 10px;
  box-shadow: 0 0 8px var(--accent);
  animation: fillProgress 2.5s cubic-bezier(0.1, 0.8, 0.3, 1) forwards;
}

/* Animations */
@keyframes pulseGlow {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.15; }
  50% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.25; }
}

@keyframes logoScale {
  0% { transform: scale(0.5) rotate(-30deg); opacity: 0; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

@keyframes spinRing {
  100% { transform: rotate(360deg); }
}

@keyframes floatLogo {
  0% { transform: translateY(0) rotate(-10deg); }
  100% { transform: translateY(-10px) rotate(-5deg); }
}

@keyframes textReveal {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fillProgress {
  0% { width: 0%; }
  30% { width: 45%; }
  60% { width: 75%; }
  100% { width: 100%; }
}
