.app-splash {
  --splash-accent: #6366f1;
  --splash-accent-soft: rgb(99 102 241 / 18%);
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 32%, var(--splash-accent-soft), transparent 58%),
    radial-gradient(circle at 82% 88%, rgb(255 255 255 / 4%), transparent 42%),
    #222431;
  font-family:
    -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB',
    'Microsoft YaHei', sans-serif;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition:
    opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1),
    visibility 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

html[data-app='tenant'] .app-splash {
  --splash-accent: #3b82f6;
  --splash-accent-soft: rgb(59 130 246 / 16%);
}

.app-splash.is-leaving {
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
}

.app-splash.is-leaving .app-splash__content {
  opacity: 0;
  transform: translateY(-8px) scale(0.985);
}

.app-splash__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  transition:
    opacity 0.38s ease,
    transform 0.38s ease;
  animation: app-splash-enter 0.62s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.app-splash__stage {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  perspective: 900px;
}

.app-splash__block {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  background: linear-gradient(145deg, #fff 0%, #eef2ff 100%);
  box-shadow:
    0 14px 28px rgb(0 0 0 / 22%),
    inset 0 1px 0 rgb(255 255 255 / 85%);
  transform-style: preserve-3d;
  animation: app-splash-flip 1.15s ease-in-out infinite;
}

.app-splash__title {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 42px;
  max-width: min(86vw, 540px);
}

.app-splash__line {
  flex-shrink: 0;
  width: 20px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, #fff, transparent);
  opacity: 0;
  transform: scaleX(0.4);
  animation: app-splash-line 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.18s forwards;
}

.app-splash__line--right {
  animation-delay: 0.28s;
}

.app-splash__name {
  overflow: hidden;
  font-family: inherit;
  font-size: clamp(24px, 5.6vw, 36px) !important;
  font-weight: 600 !important;
  font-synthesis: none !important;
  line-height: 1.25;
  color: #fff;
  letter-spacing: 0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(8px);
  animation: app-splash-title 0.62s cubic-bezier(0.22, 1, 0.36, 1) 0.12s forwards;
}

.app-splash__hint {
  margin: 16px 0 0;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.28em;
  color: rgb(255 255 255 / 42%);
  opacity: 0;
  animation: app-splash-hint 0.55s ease 0.34s forwards;
}

@keyframes app-splash-enter {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes app-splash-flip {
  0% {
    transform: rotateX(0deg) rotateY(0deg);
  }

  50% {
    transform: rotateX(180deg) rotateY(0deg);
  }

  100% {
    transform: rotateX(360deg) rotateY(0deg);
  }
}

@keyframes app-splash-line {
  to {
    opacity: 1;
    transform: scaleX(1);
  }
}

@keyframes app-splash-title {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes app-splash-hint {
  to {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .app-splash__block,
  .app-splash__content,
  .app-splash__line,
  .app-splash__name,
  .app-splash__hint {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}
