/* ==========================================================================
   INALIVE Unified App Startup & Transition Splash Screen
   Used across Portal Hub, autodocsAI, inaliveTrade, and Komadori!
   ========================================================================== */

.app-splash-screen {
  position: fixed;
  inset: 0;
  background-color: #080b12;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.5s;
}

.app-splash-screen.fade-out {
  opacity: 0;
  transform: scale(1.04);
  visibility: hidden;
  pointer-events: none;
}

.splash-backdrop {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.splash-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.35;
  animation: splashPulse 6s ease-in-out infinite alternate;
}

/* Default Theme: Portal Hub (Emerald & Violet) */
.splash-glow-1 {
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, #10b981 0%, transparent 70%);
  top: 15%;
  left: 20%;
}

.splash-glow-2 {
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, #8b5cf6 0%, transparent 70%);
  bottom: 10%;
  right: 20%;
  animation-delay: -3s;
}

/* Theme: autodocsAI (Indigo & Pink) */
.theme-autodocs .splash-glow-1 {
  background: radial-gradient(circle, #6366f1 0%, transparent 70%);
}
.theme-autodocs .splash-glow-2 {
  background: radial-gradient(circle, #ec4899 0%, transparent 70%);
}

/* Theme: inaliveTrade (Amber Gold & Electric Cyan) */
.theme-trade .splash-glow-1 {
  background: radial-gradient(circle, #f59e0b 0%, transparent 70%);
}
.theme-trade .splash-glow-2 {
  background: radial-gradient(circle, #06b6d4 0%, transparent 70%);
}

/* Theme: Komadori! (Sky Blue & Cobalt Violet) */
.theme-komadori .splash-glow-1 {
  background: radial-gradient(circle, #38bdf8 0%, transparent 70%);
}
.theme-komadori .splash-glow-2 {
  background: radial-gradient(circle, #6366f1 0%, transparent 70%);
}

@keyframes splashPulse {
  0% { transform: scale(0.9) translate(0, 0); opacity: 0.25; }
  100% { transform: scale(1.15) translate(20px, -20px); opacity: 0.45; }
}

.splash-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 440px;
  width: 90%;
  padding: 2.2rem;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 28px;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.7), 0 0 30px rgba(16, 185, 129, 0.15);
  animation: splashAppear 0.5s ease-out;
}

.theme-autodocs .splash-content {
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.7), 0 0 30px rgba(99, 102, 241, 0.2);
}
.theme-trade .splash-content {
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.7), 0 0 30px rgba(245, 158, 11, 0.2);
}
.theme-komadori .splash-content {
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.7), 0 0 30px rgba(56, 189, 248, 0.25);
}

@keyframes splashAppear {
  from { opacity: 0; transform: translateY(20px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.splash-logo-wrapper {
  position: relative;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.splash-ring {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, #10b981, #06b6d4, #8b5cf6, #ec4899, #10b981);
  animation: splashSpin 3s linear infinite;
  mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
}

.theme-autodocs .splash-ring {
  background: conic-gradient(from 0deg, #6366f1, #a855f7, #ec4899, #06b6d4, #6366f1);
}
.theme-trade .splash-ring {
  background: conic-gradient(from 0deg, #f59e0b, #eab308, #06b6d4, #3b82f6, #f59e0b);
}
.theme-komadori .splash-ring {
  background: conic-gradient(from 0deg, #38bdf8, #818cf8, #c084fc, #0284c7, #38bdf8);
}

@keyframes splashSpin {
  100% { transform: rotate(360deg); }
}

.splash-logo {
  width: 72px;
  height: 72px;
  background: linear-gradient(135deg, #064e3b, #022c22);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 25px rgba(16, 185, 129, 0.45);
  animation: splashBob 2.5s ease-in-out infinite;
  font-size: 32px;
  color: #fff;
}

.theme-autodocs .splash-logo {
  background: linear-gradient(135deg, #1e1b4b, #312e81);
  box-shadow: 0 0 25px rgba(99, 102, 241, 0.45);
}
.theme-trade .splash-logo {
  background: linear-gradient(135deg, #451a03, #78350f);
  box-shadow: 0 0 25px rgba(245, 158, 11, 0.5);
}
.theme-komadori .splash-logo {
  background: linear-gradient(135deg, #082f49, #0c4a6e);
  box-shadow: 0 0 25px rgba(56, 189, 248, 0.5);
}

.splash-emblem-icon {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.splash-banner-box {
  margin: 0.5rem 0 0.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.splash-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
  margin: 0;
}

.splash-title span {
  background: linear-gradient(135deg, #34d399 0%, #a78bfa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.theme-autodocs .splash-title span {
  background: linear-gradient(135deg, #818cf8 0%, #f472b6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.theme-trade .splash-title span {
  background: linear-gradient(135deg, #fbbf24 0%, #38bdf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.theme-komadori .splash-title span {
  background: linear-gradient(135deg, #38bdf8 0%, #a855f7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.splash-subtitle {
  font-size: 0.825rem;
  color: #94a3b8;
  font-weight: 500;
  margin-bottom: 1.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.splash-loader-box {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

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

.splash-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #10b981, #8b5cf6);
  border-radius: 999px;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.6);
  transition: width 0.35s ease-out;
  position: relative;
}

.theme-autodocs .splash-progress-bar {
  background: linear-gradient(90deg, #6366f1, #ec4899);
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.6);
}
.theme-trade .splash-progress-bar {
  background: linear-gradient(90deg, #f59e0b, #06b6d4);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.6);
}
.theme-komadori .splash-progress-bar {
  background: linear-gradient(90deg, #0284c7, #38bdf8);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.6);
}

.splash-progress-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
  animation: splashShimmer 1.5s infinite;
}

@keyframes splashShimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.splash-status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: #94a3b8;
  font-family: 'JetBrains Mono', monospace;
}

.splash-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #34d399;
  box-shadow: 0 0 8px #34d399;
  animation: splashDotPulse 1.2s infinite;
}

.theme-autodocs .splash-status-dot {
  background-color: #818cf8;
  box-shadow: 0 0 8px #818cf8;
}
.theme-trade .splash-status-dot {
  background-color: #fbbf24;
  box-shadow: 0 0 8px #fbbf24;
}
.theme-komadori .splash-status-dot {
  background-color: #38bdf8;
  box-shadow: 0 0 8px #38bdf8;
}

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

.splash-footer-badge {
  font-size: 0.725rem;
  color: #64748b;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 1rem;
  width: 100%;
}

@keyframes splashBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}
