/* =========================================
   SPLASH SCREEN
   ========================================= */

/* Splash control: prevents content flashing */
html.show-splash #app-content {
  visibility: hidden;
}

html.no-splash #app-content {
  visibility: visible;
}

/* Default hidden */
#splash-screen {
  display: none;
}

/* Visible only when html.show-splash */
html.show-splash #splash-screen {
  display: flex;
}

/* Advanced splash screen (Snow + Icon) */
#splash-screen {
  position: fixed;
  inset: 0;
  background-color: #ffffff;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  overflow: hidden;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.8s ease-out, visibility 0.8s ease-out;
}

#splash-screen.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splash-content {
  position: relative;
  z-index: 2;
  animation: pulseLogo 2s infinite ease-in-out;
}

.splash-logo {
  width: 350px;
  height: 350px;
  object-fit: contain;
  display: block;
}

#snow-container {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.snowflake {
  position: absolute;
  top: -10px;
  background-color: #fff;
  border-radius: 50%;
  pointer-events: none;
  animation: fall linear infinite;
}

@keyframes fall {
  0% {
    transform: translateY(-10vh) translateX(0);
  }
  100% {
    transform: translateY(110vh) translateX(20px);
  }
}

@keyframes pulseLogo {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.05);
    opacity: 0.9;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Hard safety: when splash is off, it must never intercept taps */
html.no-splash #splash-screen {
  display: none !important;
  pointer-events: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
}