/* Экран загрузки: виден, пока качается и запускается Flutter (цвета — как в AppColors).
   Общий для index.html и splash-test.html. */
:root {
  --splash-bg: #FBF2F3;
  --splash-fg: #2B1E26;
  --splash-muted: #7A6470;
  --splash-track: #F2DDE1;
  --splash-accent: #C0456F;
  --splash-partner: #8C78D0;
  --splash-glow: rgba(192, 69, 111, 0.14);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-splash-theme="light"]) {
    --splash-bg: #1C1519;
    --splash-fg: #F7ECEF;
    --splash-muted: #B9A3AE;
    --splash-track: #3A2B35;
    --splash-accent: #E2729A;
    --splash-partner: #B6A6EA;
    --splash-glow: rgba(226, 114, 154, 0.10);
  }
}
/* Принудительная тёмная — для тестовой страницы. */
:root[data-splash-theme="dark"] {
  --splash-bg: #1C1519;
  --splash-fg: #F7ECEF;
  --splash-muted: #B9A3AE;
  --splash-track: #3A2B35;
  --splash-accent: #E2729A;
  --splash-partner: #B6A6EA;
  --splash-glow: rgba(226, 114, 154, 0.10);
}

html, body { margin: 0; height: 100%; background: var(--splash-bg); }

#splash {
  position: fixed; inset: 0; z-index: 10;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  background: radial-gradient(120% 60% at 50% -10%, var(--splash-glow), transparent 70%), var(--splash-bg);
  color: var(--splash-fg);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  transition: opacity .35s ease;
}
#splash.hidden { opacity: 0; pointer-events: none; }
#splash .logo {
  width: 76px; height: 76px; border-radius: 24px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--splash-accent), var(--splash-partner));
  box-shadow: 0 12px 32px var(--splash-glow);
}
#splash .logo svg { width: 38px; height: 38px; animation: splash-beat 1.25s ease-in-out infinite alternate; }
#splash .name { font-size: 24px; font-weight: 800; letter-spacing: -.4px; }
#splash .bar { width: 180px; height: 4px; border-radius: 4px; background: var(--splash-track); overflow: hidden; }
#splash .bar::after {
  content: ""; display: block; width: 40%; height: 100%; border-radius: 4px;
  background: var(--splash-accent); animation: splash-run 1.2s ease-in-out infinite;
}

/* Подпись этапа — случайная фраза. Смена — с лёгким проявлением. */
#splash .status {
  font-size: 14px; color: var(--splash-muted); min-height: 20px; text-align: center; padding: 0 24px;
  animation: splash-fade .35s ease;
}
#splash .status.swap { animation: none; }

/* Редкая "счастливая" подпись: другой шрифт, ягодный градиент, пояснение снизу. */
#splash .status.lucky {
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic; font-size: 19px; font-weight: 600;
  background: linear-gradient(90deg, var(--splash-accent), var(--splash-partner));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
#splash .lucky-note {
  display: none; margin-top: -10px;
  font-size: 12px; color: var(--splash-muted); text-align: center; padding: 0 24px;
}
#splash .lucky-note.visible { display: block; animation: splash-fade .5s ease .2s both; }

#splash .slow { font-size: 13px; color: var(--splash-muted); opacity: 0; transition: opacity .4s; max-width: 320px; text-align: center; padding: 0 24px; }
#splash .slow.visible { opacity: 1; }

@keyframes splash-run { 0% { transform: translateX(-100%); } 100% { transform: translateX(250%); } }
@keyframes splash-beat { from { transform: scale(1); } to { transform: scale(1.12); } }
@keyframes splash-fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  #splash .logo svg, #splash .bar::after, #splash .status, #splash .lucky-note.visible { animation: none; }
}
