/* =========================================================
   SPLASH SCREEN MODULE (Odizolowany kontener)
   ========================================================= */

#app-splash-screen {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background-color: #ffffff;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  isolation: isolate;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

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

#app-splash-screen .splash-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
}

#app-splash-screen .splash-logo {
  max-width: 190px;
  height: auto;
  margin-bottom: 34px;
  animation: splashPulse 2s ease-in-out infinite alternate;
}

/* Serca MedTech */
#app-splash-screen .infinity-spinner {
  position: relative;
  width: 110px;
  height: 48px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#app-splash-screen .heart-spinner {
  position: absolute;
  width: 36px;
  height: 36px;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#app-splash-screen .heart-spinner.left-heart {
  stroke: #2563eb;
  animation: dynamicOrbitLeft 2.2s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
}

#app-splash-screen .heart-spinner.right-heart {
  stroke: #e11d48;
  animation: dynamicOrbitRight 2.2s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
}

@keyframes dynamicOrbitLeft {
  0% { transform: translateX(-24px) translateY(0px) rotate(0deg) scale(0.92); }
  25% { transform: translateX(-12px) translateY(-8px) rotate(45deg) scale(1.05); }
  50% { transform: translateX(0px) translateY(0px) rotate(180deg) scale(1.15); }
  75% { transform: translateX(-12px) translateY(8px) rotate(270deg) scale(1.05); }
  100% { transform: translateX(-24px) translateY(0px) rotate(360deg) scale(0.92); }
}

@keyframes dynamicOrbitRight {
  0% { transform: translateX(24px) translateY(0px) rotate(0deg) scale(0.92); }
  25% { transform: translateX(12px) translateY(8px) rotate(-45deg) scale(1.05); }
  50% { transform: translateX(0px) translateY(0px) rotate(-180deg) scale(1.15); }
  75% { transform: translateX(12px) translateY(-8px) rotate(-270deg) scale(1.05); }
  100% { transform: translateX(24px) translateY(0px) rotate(-360deg) scale(0.92); }
}

/* Gradientowy pasek postępu */
#app-splash-screen .splash-progress-track {
  width: 140px;
  height: 3px;
  background-color: #f1f5f9;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}

#app-splash-screen .splash-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #2563eb, #8b5cf6, #e11d48);
  border-radius: 6px;
  animation: progressFill 3.8s ease-in-out forwards;
}

@keyframes progressFill {
  0% { width: 0%; }
  35% { width: 45%; }
  75% { width: 85%; }
  100% { width: 100%; }
}

@keyframes splashPulse {
  0% { transform: scale(0.98); opacity: 0.92; }
  100% { transform: scale(1.02); opacity: 1; }
}