/* Màn hình chờ: hiện từ lúc mở trang đến khung hình đầu tiên của Flutter (theo màn hình chờ mdc) */
html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #0f172a;
}

#splash, #splash * { box-sizing: border-box; }

#splash {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: max(20px, env(safe-area-inset-top)) 16px max(20px, env(safe-area-inset-bottom));
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: #f8fafc;
  background: radial-gradient(circle at 50% 40%, #1e3a8a 0%, #0f172a 62%);
  user-select: none;
  -webkit-user-select: none;
  transition: opacity .4s ease-out;
}
#splash.splash-hide { opacity: 0; pointer-events: none; }

.splash-logo {
  width: 168px;
  height: 168px;
  filter: drop-shadow(0 12px 28px rgba(37, 99, 235, .45));
  animation: splash-float 3s ease-in-out infinite;
}
.splash-title {
  margin: 4px 0 0;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: .5px;
}
.splash-title span { color: #fbbf24; }
.splash-tagline { margin: 0; font-size: 15px; color: #cbd5e1; }

.splash-dots { display: flex; gap: 8px; margin-top: 10px; }
.splash-dots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #60a5fa;
  animation: splash-dot 1.2s ease-in-out infinite;
}
.splash-dots i:nth-child(2) { animation-delay: .15s; }
.splash-dots i:nth-child(3) { animation-delay: .3s; }

#splash-status, #splash-slow, .splash-noscript { margin: 0; font-size: 13px; color: #94a3b8; }

.splash-foot {
  position: absolute;
  bottom: max(18px, env(safe-area-inset-bottom));
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 3px;
  color: #64748b;
}

@keyframes splash-float { 50% { transform: translateY(-8px); } }
@keyframes splash-dot { 0%, 80%, 100% { opacity: .3; transform: scale(.8); } 40% { opacity: 1; transform: scale(1); } }

@media (prefers-reduced-motion: reduce) {
  .splash-logo, .splash-dots i { animation: none; }
}
