/* ═══════════════════════════════════════════════════════════
   PWA SPLASH SCREEN — Clean & Professional
   ═══════════════════════════════════════════════════════════ */

#splash-screen {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: #0b0f19;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.4s ease-out, visibility 0.4s ease-out;
  overflow: hidden;
  -webkit-user-select: none;
  user-select: none;
}

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

/* ── Subtle Ambient Glow ── */
#splash-screen::before {
  content: "";
  position: absolute;
  top: 20%;
  left: 50%;
  transform: translateX(-50%);
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

/* ── Logo ── */
.splash-logo {
  position: relative;
  z-index: 2;
  width: 72px;
  height: 72px;
  margin-bottom: 28px;
  opacity: 0;
  animation: splash-logo-in 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.1s forwards;
}

.splash-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 18px;
}

@keyframes splash-logo-in {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

/* ── App Title ── */
.splash-title {
  position: relative;
  z-index: 2;
  text-align: center;
  opacity: 0;
  animation: splash-fade-up 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.25s forwards;
}

.splash-title h1 {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: #f1f5f9;
  letter-spacing: -0.02em;
  margin: 0 0 4px;
}

.splash-title p {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: #475569;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0;
}

@keyframes splash-fade-up {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Loading ── */
.splash-loading {
  position: relative;
  z-index: 2;
  margin-top: 40px;
  opacity: 0;
  animation: splash-fade-up 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.4s forwards;
}

.splash-loader {
  width: 120px;
  height: 2px;
  background: rgba(99, 102, 241, 0.08);
  border-radius: 2px;
  overflow: hidden;
}

.splash-loader::after {
  content: "";
  display: block;
  width: 40%;
  height: 100%;
  border-radius: 2px;
  background: #6366f1;
  animation: splash-slide 1.2s ease-in-out infinite;
}

@keyframes splash-slide {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(350%); }
}

/* ── Footer ── */
.splash-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px;
  text-align: center;
  z-index: 2;
  opacity: 0;
  animation: splash-fade-up 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.55s forwards;
}

.splash-footer span {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 11px;
  font-weight: 500;
  color: #334155;
  letter-spacing: 0.04em;
}

/* ── Safe Area ── */
@supports (padding: env(safe-area-inset-top)) {
  .splash-footer {
    padding-bottom: calc(20px + env(safe-area-inset-bottom));
  }
}

/* ── Responsive ── */
@media (max-width: 380px) {
  .splash-logo { width: 60px; height: 60px; }
  .splash-title h1 { font-size: 20px; }
}

@media (min-width: 768px) {
  .splash-logo { width: 88px; height: 88px; }
  .splash-title h1 { font-size: 26px; }
}
