@font-face {
  font-family: "CenturyGothic";
  src: url("assets/assets/fonts/Century-Gothic.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "LemonMilk";
  src: url("assets/assets/fonts/LEMONMILK-Regular.otf") format("opentype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --auth-background: #05070d;
  --auth-surface: rgb(13 18 27 / 75%);
  --auth-text: #e6eef8;
  --auth-muted: #afbdce;
  --auth-accent: #00c8e8;
  --auth-glow: rgb(0 200 232 / 13%);
  --auth-border: rgb(129 161 193 / 24%);
  --auth-shadow: rgb(0 0 0 / 22%);
}

:root[data-theme="light"] {
  color-scheme: light;
  --auth-background: #eaf1f8;
  --auth-surface: rgb(255 255 255 / 75%);
  --auth-text: #18212f;
  --auth-muted: #526477;
  --auth-accent: #087a90;
  --auth-glow: rgb(0 169 196 / 12%);
  --auth-border: rgb(97 131 163 / 24%);
  --auth-shadow: rgb(54 88 121 / 12%);
}

:root[data-theme="grey"] {
  --auth-background: #10141a;
  --auth-surface: rgb(23 29 37 / 75%);
}

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--auth-background);
  color: var(--auth-text);
  font-family: "CenturyGothic", "Century Gothic", "Segoe UI", Arial, sans-serif;
}

#loading {
  box-sizing: border-box;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px 20px;
  background:
    radial-gradient(ellipse at 18% 16%, var(--auth-glow), transparent 57%),
    radial-gradient(ellipse at 88% 83%, rgb(111 96 218 / 8%), transparent 50%);
}

.auth-startup-card {
  box-sizing: border-box;
  width: min(100%, 460px);
  padding: 38px 32px 25px;
  text-align: center;
  border: 1px solid var(--auth-border);
  border-radius: 28px;
  background: var(--auth-surface);
  box-shadow: 0 22px 70px var(--auth-shadow);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.auth-startup-logo {
  display: block;
  margin: 0 auto 24px;
  object-fit: contain;
  border-radius: 20px;
  filter: drop-shadow(0 5px 18px var(--auth-glow));
}

.auth-startup-eyebrow {
  margin: 0 0 12px;
  color: var(--auth-accent);
  font-size: 10px;
  letter-spacing: 2px;
}

#auth-startup-title {
  margin: 0;
  font-family: "LemonMilk", "CenturyGothic", "Segoe UI", Arial, sans-serif;
  font-size: clamp(18px, 4.4vw, 23px);
  font-weight: 400;
  line-height: 1.45;
}

.auth-startup-description {
  margin: 14px 0 25px;
  color: var(--auth-muted);
  font-size: 14px;
  line-height: 1.6;
}

.auth-startup-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 24px;
  font-size: 12px;
  line-height: 1.6;
}

.auth-startup-spinner {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  border: 2px solid var(--auth-border);
  border-top-color: var(--auth-accent);
  border-radius: 50%;
  animation: auth-startup-turn 1s linear infinite;
}

#auth-startup-retry {
  margin: 18px 0 0;
  min-height: 44px;
  padding: 10px 18px;
  color: var(--auth-text);
  border: 1px solid var(--auth-accent);
  border-radius: 24px;
  background: transparent;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

#auth-startup-retry:hover { background: var(--auth-glow); }
#auth-startup-retry:focus-visible { outline: 3px solid var(--auth-accent); outline-offset: 3px; }

.auth-startup-footer {
  margin: 26px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--auth-border);
  color: var(--auth-muted);
  font-size: 11px;
  line-height: 1.6;
}

#loading noscript { max-width: 440px; margin-top: 20px; text-align: center; }
@keyframes auth-startup-turn { to { transform: rotate(360deg); } }

@media (max-width: 380px) {
  #loading { padding: 20px 14px; }
  .auth-startup-card { padding: 30px 20px 22px; }
}

@media (prefers-reduced-motion: reduce) {
  .auth-startup-spinner { animation: none; }
}
