:root {
  --preboot-bg: #f8fbff;
  --preboot-surface: #ffffff;
  --preboot-surface-soft: #fbfcfe;
  --preboot-border: #dfe7f1;
  --preboot-border-soft: #dde8f5;
  --preboot-text: #163152;
  --preboot-text-secondary: #5f6f86;
  --preboot-primary: #0070f3;
  --preboot-radius-card: 28px;
  --preboot-radius-pill: 999px;
}

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

body {
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

#root {
  min-height: 100dvh;
}

.prebootLoader {
  position: fixed;
  inset: 0;
  z-index: 99999;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 20px;
  background: rgba(248, 251, 255, 0.9);

  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.prebootLoaderCard {
  position: relative;

  display: flex;
  flex-direction: column;
  gap: 14px;

  width: min(330px, calc(100vw - 40px));
  padding: 24px;

  overflow: hidden;
  box-sizing: border-box;

  border: 1px solid var(--preboot-border);
  border-radius: var(--preboot-radius-card);
  background: linear-gradient(
    180deg,
    var(--preboot-surface) 0%,
    var(--preboot-surface-soft) 100%
  );
  box-shadow:
    0 22px 60px rgba(15, 23, 42, 0.09),
    0 5px 16px rgba(15, 23, 42, 0.035);
}

.prebootLoaderCard::before {
  content: "";
  position: absolute;
  top: 0;
  right: 24px;
  left: 24px;

  height: 1px;

  background: linear-gradient(
    90deg,
    rgba(0, 112, 243, 0) 0%,
    rgba(0, 112, 243, 0.22) 48%,
    rgba(0, 112, 243, 0) 100%
  );

  pointer-events: none;
}

.prebootLoaderHeader {
  position: relative;
  z-index: 1;

  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.prebootLoaderDot {
  position: relative;

  width: 7px;
  height: 7px;

  border-radius: var(--preboot-radius-pill);
  background: var(--preboot-primary);
  box-shadow: 0 0 0 3px rgba(0, 112, 243, 0.05);

  animation: prebootPulse 1.35s ease-in-out infinite;
}

.prebootLoaderDot::after {
  content: "";
  position: absolute;
  inset: -3px;

  border: 1px solid rgba(0, 112, 243, 0.1);
  border-radius: inherit;
}

.prebootLoaderEyebrow {
  color: var(--preboot-text-secondary);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.prebootLoaderContent {
  position: relative;
  z-index: 1;

  display: flex;
  flex-direction: column;
  gap: 6px;
}

.prebootLoaderTitle {
  color: var(--preboot-text);
  font-size: 19px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.03em;
}

.prebootLoaderSubtitle {
  color: var(--preboot-text-secondary);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
}

.prebootLoaderProgress {
  position: relative;
  z-index: 1;

  height: 8px;
  margin-top: 2px;

  overflow: hidden;
  box-sizing: border-box;

  border: 1px solid var(--preboot-border-soft);
  border-radius: var(--preboot-radius-pill);
  background: linear-gradient(180deg, #f7faff 0%, #eef4fb 100%);
}

.prebootLoaderBar {
  position: absolute;
  inset: 1px auto 1px 1px;

  width: 42%;

  border-radius: inherit;
  background: linear-gradient(
    90deg,
    rgba(0, 112, 243, 0.08) 0%,
    rgba(0, 112, 243, 0.5) 50%,
    rgba(0, 112, 243, 0.08) 100%
  );
  box-shadow: 0 2px 8px rgba(0, 112, 243, 0.07);

  animation: prebootProgressMove 1.4s ease-in-out infinite;
}

@keyframes prebootProgressMove {
  0% {
    transform: translateX(-36%);
  }

  50% {
    transform: translateX(145%);
  }

  100% {
    transform: translateX(-36%);
  }
}

@keyframes prebootPulse {
  0%,
  100% {
    transform: scale(0.94);
    box-shadow: 0 0 0 3px rgba(0, 112, 243, 0.05);
  }

  50% {
    transform: scale(1);
    box-shadow: 0 0 0 5px rgba(0, 112, 243, 0.025);
  }
}

@media (prefers-reduced-motion: reduce) {
  .prebootLoaderDot,
  .prebootLoaderBar {
    animation: none;
  }

  .prebootLoaderBar {
    transform: translateX(45%);
  }
}

@media (max-width: 460px) {
  .prebootLoaderCard {
    width: min(310px, calc(100vw - 32px));
    padding: 22px;
    border-radius: 24px;
  }

  .prebootLoaderTitle {
    font-size: 18px;
  }
}