/* ===================================
   Smart One-Time 3D Splash Screen
   Shows only on first visit
   =================================== */

#smart-splash {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  background: radial-gradient(circle at top, rgba(0, 180, 255, 0.12), transparent 55%),
              #ffffff;
  opacity: 1;
  transition: opacity 0.9s ease;
}

/* Dark theme variant - uncomment if needed */
/*
#smart-splash {
  background: radial-gradient(circle at top, rgba(0, 180, 255, 0.15), transparent 55%),
              #0a0a0a;
}
*/

.splash-scene {
  perspective: 900px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.splash-card {
  position: relative;
  width: 240px;
  height: 240px;
  border-radius: 28px;
  transform-style: preserve-3d;
  animation: float3d 2.6s ease-in-out infinite;
  display: flex;
  align-items: center;
  justify-content: center;
}

.splash-logo {
  width: 150px;
  height: auto;
  transform: translateZ(35px);
  filter: drop-shadow(0 16px 22px rgba(0, 140, 255, 0.25));
  animation: logoRotate 3s ease-in-out infinite;
}

.splash-glow {
  position: absolute;
  inset: -25px;
  border-radius: 40px;
  background: radial-gradient(circle, rgba(0, 190, 255, 0.30), transparent 60%);
  transform: translateZ(5px);
  animation: pulseGlow 1.8s ease-in-out infinite;
}

.splash-subtext {
  font-size: 14px;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  opacity: 0.75;
  color: #333;
  font-weight: 600;
  transform: translateZ(20px);
  animation: fadeInOut 2s ease-in-out infinite;
}

/* Animated particles background */
.splash-particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.splash-particle {
  position: absolute;
  width: 2px;
  height: 2px;
  background: rgba(0, 174, 239, 0.4);
  border-radius: 50%;
  animation: particleFloat 4s ease-in-out infinite;
}

.splash-particle:nth-child(1) { left: 10%; top: 20%; animation-delay: 0s; }
.splash-particle:nth-child(2) { left: 20%; top: 80%; animation-delay: 0.5s; }
.splash-particle:nth-child(3) { left: 80%; top: 30%; animation-delay: 1s; }
.splash-particle:nth-child(4) { left: 70%; top: 70%; animation-delay: 1.5s; }
.splash-particle:nth-child(5) { left: 40%; top: 10%; animation-delay: 2s; }
.splash-particle:nth-child(6) { left: 60%; top: 90%; animation-delay: 2.5s; }

/* Animations */
@keyframes float3d {
  0% {
    transform: rotateX(10deg) rotateY(-14deg) translateY(0px);
  }
  50% {
    transform: rotateX(-10deg) rotateY(14deg) translateY(-10px);
  }
  100% {
    transform: rotateX(10deg) rotateY(-14deg) translateY(0px);
  }
}

@keyframes logoRotate {
  0% {
    transform: translateZ(35px) rotateZ(0deg);
  }
  50% {
    transform: translateZ(40px) rotateZ(5deg);
  }
  100% {
    transform: translateZ(35px) rotateZ(0deg);
  }
}

@keyframes pulseGlow {
  0% {
    opacity: 0.35;
    transform: translateZ(5px) scale(1);
  }
  50% {
    opacity: 0.75;
    transform: translateZ(8px) scale(1.05);
  }
  100% {
    opacity: 0.35;
    transform: translateZ(5px) scale(1);
  }
}

@keyframes fadeInOut {
  0%, 100% {
    opacity: 0.5;
  }
  50% {
    opacity: 0.9;
  }
}

@keyframes particleFloat {
  0% {
    transform: translateY(0) translateX(0);
    opacity: 0;
  }
  50% {
    opacity: 0.6;
  }
  100% {
    transform: translateY(-100px) translateX(20px);
    opacity: 0;
  }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .splash-card {
    width: 200px;
    height: 200px;
  }
  
  .splash-logo {
    width: 120px;
  }
  
  .splash-subtext {
    font-size: 12px;
    letter-spacing: 1.5px;
  }
}

@media (max-width: 480px) {
  .splash-card {
    width: 180px;
    height: 180px;
  }
  
  .splash-logo {
    width: 100px;
  }
  
  .splash-subtext {
    font-size: 11px;
    letter-spacing: 1.2px;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .splash-card,
  .splash-logo,
  .splash-glow,
  .splash-subtext,
  .splash-particle {
    animation: none !important;
  }
  
  .splash-card {
    transform: none;
  }
}