/*
 * The Mini App's one screen (launcher.js): the ATLET logo while Telegram
 * gets ready and the web app opens, or a plain word when Telegram does
 * not answer. The same dark and red as the web app (webapp/styles/auth.css).
 * The system's Persian font: this page shows for a moment, and a font
 * file would cost more time than it is on screen.
 */

:root {
  --bg: #0A0A0B;
  --surface: #111318;
  --border: #262A32;
  --red: #DC2626;
  --text: #F3F4F6;
  --muted: #9DA6B0;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Vazirmatn, Tahoma, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.launch {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 32px 24px calc(32px + env(safe-area-inset-bottom, 0px));
  text-align: center;
  background: radial-gradient(90% 55% at 50% 0%, rgba(220, 38, 38, .14), transparent 70%), var(--bg);
}

.logo { width: min(268px, 70vw); height: auto; }

.slogan {
  margin: 0;
  font-family: Inter, system-ui, sans-serif;
  font-size: 11px;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--muted);
}

.loader {
  width: 120px;
  height: 3px;
  margin-top: 22px;
  border-radius: 2px;
  background: var(--border);
  overflow: hidden;
}

.loader i {
  display: block;
  width: 40%;
  height: 100%;
  border-radius: 2px;
  background: var(--red);
  animation: slide 1.1s ease-in-out infinite;
}

@keyframes slide {
  from { transform: translateX(170%); }
  to { transform: translateX(-120%); }
}

@media (prefers-reduced-motion: reduce) {
  .loader i { animation: none; width: 100%; }
}

.status { margin: 0; font-size: 13px; color: var(--muted); }

[hidden] { display: none !important; }

.problem {
  width: min(360px, 100%);
  margin-top: 18px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
}

.problem h1 { margin: 0 0 8px; font-size: 18px; font-weight: 800; }

.problem p { margin: 0 0 16px; font-size: 14px; line-height: 1.9; color: var(--muted); }

.retry {
  width: 100%;
  height: 48px;
  border: 0;
  border-radius: 14px;
  background: var(--red);
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
}

.call {
  display: inline-block;
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted);
  text-underline-offset: 5px;
}
