/* ==========================================================================
   NDTechHub - 3D Holographic Splash Screen (2026 Liquid Glassmorphism & Cyber 3D)
   ========================================================================== */

#nd-splash-screen {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  z-index: 999999;
  background: #080c14;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  user-select: none;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  color: #f3f4f6;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              filter 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.8s ease;
}

/* Background Cosmic Radial Glows */
#nd-splash-screen::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 800px;
  height: 800px;
  max-width: 95vw;
  max-height: 95vw;
  background: radial-gradient(
    circle,
    rgba(0, 242, 254, 0.12) 0%,
    rgba(127, 0, 255, 0.08) 45%,
    rgba(8, 12, 20, 0) 75%
  );
  pointer-events: none;
  z-index: 1;
  animation: splashGlowPulse 4s infinite ease-in-out alternate;
}

@keyframes splashGlowPulse {
  0% { transform: translate(-50%, -50%) scale(0.92); opacity: 0.7; }
  100% { transform: translate(-50%, -50%) scale(1.15); opacity: 1; }
}

/* Canvas 3D Viewport */
#splash-canvas-container {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: auto;
  cursor: grab;
}

#splash-canvas-container:active {
  cursor: grabbing;
}

#splash-canvas-container canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

/* Bento Glass HUD Overlay */
.splash-hud {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 24px 32px;
  background: rgba(14, 20, 32, 0.65);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-top: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 28px;
  box-shadow: 0 24px 50px -12px rgba(0, 0, 0, 0.75),
              0 0 35px -5px rgba(0, 242, 254, 0.18),
              inset 0 1px 0 rgba(255, 255, 255, 0.2);
  max-width: 480px;
  width: 90%;
  pointer-events: auto;
  margin-top: 260px; /* Positions HUD gracefully below the 3D hologram */
  animation: splashHudFloat 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes splashHudFloat {
  0% { opacity: 0; transform: translateY(20px) scale(0.96); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* Brand Identity in Splash */
.splash-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.splash-logo-box {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, rgba(0, 242, 254, 0.2) 0%, rgba(127, 0, 255, 0.2) 100%);
  border: 1px solid rgba(0, 242, 254, 0.4);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 16px rgba(0, 242, 254, 0.35);
  animation: splashLogoRotate 8s linear infinite;
}

@keyframes splashLogoRotate {
  0% { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(360deg); }
}

.splash-logo-svg {
  width: 22px;
  height: 22px;
}

.splash-title {
  font-family: 'Outfit', sans-serif;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #ffffff 30%, #00f2fe 75%, #4facfe 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0;
  line-height: 1.1;
}

.splash-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #00f2fe;
  background: rgba(0, 242, 254, 0.1);
  border: 1px solid rgba(0, 242, 254, 0.3);
  padding: 3px 8px;
  border-radius: 20px;
  margin-left: 4px;
}

.splash-tagline {
  font-size: 13px;
  font-weight: 400;
  color: #9ca3af;
  margin: 0 0 16px 0;
  letter-spacing: -0.1px;
}

/* Progress Container */
.splash-progress-wrapper {
  width: 100%;
  margin-bottom: 14px;
}

.splash-progress-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.splash-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #7f00ff 0%, #4facfe 50%, #00f2fe 100%);
  border-radius: 999px;
  box-shadow: 0 0 14px rgba(0, 242, 254, 0.8), 0 0 6px #00f2fe;
  transition: width 0.15s ease-out;
  position: relative;
}

.splash-progress-bar::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 12px;
  background: #ffffff;
  border-radius: 50%;
  filter: blur(2px);
  opacity: 0.9;
}

/* Telemetry & Stats Readout */
.splash-telemetry-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  font-family: 'JetBrains Mono', 'Plus Jakarta Sans', monospace;
  font-size: 11px;
}

.splash-status-text {
  color: #00f2fe;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  letter-spacing: 0.3px;
}

.splash-status-dot {
  width: 6px;
  height: 6px;
  background: #00f2fe;
  border-radius: 50%;
  box-shadow: 0 0 8px #00f2fe;
  animation: splashDotPulse 1.2s infinite ease-in-out;
}

@keyframes splashDotPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.6); opacity: 0.4; }
}

.splash-percent-text {
  color: #f3f4f6;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.5px;
}

/* Action Controls (Skip / Enter button) */
.splash-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.splash-hint {
  font-size: 11px;
  color: #6b7280;
  display: flex;
  align-items: center;
  gap: 5px;
}

.splash-key {
  display: inline-block;
  padding: 1px 5px;
  font-size: 9px;
  font-family: monospace;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  color: #d1d5db;
}

.splash-skip-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #e5e7eb;
  padding: 5px 14px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.splash-skip-btn:hover {
  background: rgba(0, 242, 254, 0.15);
  border-color: rgba(0, 242, 254, 0.45);
  color: #00f2fe;
  box-shadow: 0 0 12px rgba(0, 242, 254, 0.25);
  transform: translateY(-1px);
}

/* 3D Core Interactive Hint Pill */
.splash-3d-hint {
  position: absolute;
  top: calc(50% - 150px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  font-size: 11px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.4);
  background: rgba(8, 12, 20, 0.4);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 4px 12px;
  border-radius: 20px;
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 6px;
  animation: splashFadeHint 3s ease forwards;
}

@keyframes splashFadeHint {
  0% { opacity: 0; transform: translate(-50%, 10px); }
  25% { opacity: 1; transform: translate(-50%, 0); }
  75% { opacity: 1; }
  100% { opacity: 0; pointer-events: none; }
}

/* Cinematic Exit Transitions */
#nd-splash-screen.splash-exit {
  opacity: 0;
  transform: scale(1.08);
  filter: blur(8px);
  pointer-events: none;
  visibility: hidden;
}

#nd-splash-screen.splash-exit #splash-canvas-container {
  transform: scale(1.35);
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

#nd-splash-screen.splash-hidden {
  display: none !important;
}

/* Mobile Responsive Optimizations */
@media (max-width: 640px) {
  .splash-hud {
    margin-top: 220px;
    padding: 18px 20px;
    border-radius: 22px;
  }
  
  .splash-title {
    font-size: 22px;
  }
  
  .splash-tagline {
    font-size: 12px;
    margin-bottom: 12px;
  }
  
  .splash-hint {
    display: none;
  }
  
  .splash-actions {
    justify-content: center;
  }
}
