:root {
  /* Pascaline colors */
  --bg-color: #fafafc;
  --text-color: #1a1c20;
  --bar-color: #2f5da8;
  --track-color: #e8eaf1;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-color: #111318;
    --text-color: #e3e5ec;
    --bar-color: #adc6ff;
    --track-color: #1e2026;
  }
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background-color: var(--bg-color);
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
  font-family:
    system-ui,
    -apple-system,
    sans-serif;
}

.loading-text {
  color: var(--text-color);
  font-size: 1.5rem;
  margin-bottom: 1rem;
  text-align: center;
}

.progress-track {
  width: min(60vw, 800px);
  height: 20px;
  background-color: var(--track-color);
  border-radius: 6px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background-color: var(--bar-color);
  animation: fakeLoading 30s infinite ease-in-out;
}

@keyframes fakeLoading {
  0% {
    width: 0%;
  }
  10% {
    width: 80%;
  }
  50% {
    width: 90%;
  }
  100% {
    width: 100%;
  }
}

/* Shown instead of a white page when the app can't start */
.start-error {
  position: fixed;
  inset: auto 16px 16px 16px;
  z-index: 2147483647;
  padding: 16px;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  background-color: var(--track-color);
  color: var(--text-color);
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.95rem;
}

.start-error code {
  display: block;
  margin: 8px 0 12px;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.8rem;
  max-height: 40vh;
  overflow: auto;
}

.start-error a {
  color: var(--bar-color);
  font-weight: 600;
}
