html,
body,
#root {
  width: 100%;
  height: 100%;
  margin: 0;
}

.osc-boot {
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  box-sizing: border-box;
  padding: 48px;
  overflow: hidden;
  color: #29263c;
  background: radial-gradient(
      circle at 52% 42%,
      rgba(128, 91, 225, 0.12),
      transparent 30%
    ),
    radial-gradient(circle at 66% 52%, rgba(73, 188, 199, 0.1), transparent 27%),
    linear-gradient(145deg, #faf9fd 0%, #f2eff9 54%, #f9fafc 100%);
  font-family: "Segoe UI Variable", "Segoe UI", "Microsoft YaHei UI", sans-serif;
}

.osc-boot-grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(
      rgba(102, 73, 184, 0.045) 1px,
      transparent 1px
    ),
    linear-gradient(90deg, rgba(102, 73, 184, 0.045) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(circle at 50% 51%, #000 4%, transparent 68%);
}

.osc-boot-spectrum {
  position: absolute;
  width: min(720px, 70vw);
  aspect-ratio: 1.45;
  top: 50%;
  left: 50%;
  border-radius: 50%;
  background: radial-gradient(
      circle at 30% 44%,
      rgba(117, 88, 224, 0.22),
      transparent 25%
    ),
    radial-gradient(
      circle at 65% 35%,
      rgba(75, 194, 201, 0.19),
      transparent 23%
    ),
    radial-gradient(
      circle at 58% 72%,
      rgba(222, 122, 196, 0.13),
      transparent 28%
    );
  filter: blur(40px);
  opacity: 0.74;
  transform: translate(-50%, -50%);
  animation: osc-spectrum-drift 5.4s ease-in-out infinite;
}

.osc-boot-core {
  position: relative;
  z-index: 2;
  width: min(560px, 78vw);
  display: flex;
  align-items: center;
  flex-direction: column;
  text-align: center;
  transform: translateY(-2.5vh);
}

.osc-boot-brand {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 36px;
  animation: osc-boot-brand-enter 600ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.osc-boot-brand img {
  width: min(228px, 58vw);
  height: 62px;
  object-fit: contain;
  object-position: center;
  filter: drop-shadow(0 9px 18px rgba(91, 67, 192, 0.12));
}

.osc-boot-brand span {
  color: #776d8c;
  font-size: 9px;
  font-weight: 720;
  letter-spacing: 0.22em;
}

.osc-boot-core > strong {
  color: transparent;
  background: linear-gradient(94deg, #392b6d 0%, #7450d7 52%, #327f8b 100%);
  background-clip: text;
  font-size: clamp(25px, 3.4vw, 40px);
  font-weight: 760;
  line-height: 1.2;
  letter-spacing: 0.02em;
  animation: osc-boot-copy-enter 540ms 140ms ease-out both;
}

.osc-boot-core > span {
  margin-top: 12px;
  color: #756f82;
  font-size: 13px;
  letter-spacing: 0.04em;
  animation: osc-boot-copy-enter 540ms 230ms ease-out both;
}

.osc-boot-progress {
  position: relative;
  width: min(440px, 72vw);
  height: 10px;
  margin-top: 58px;
  padding: 2px;
  overflow: hidden;
  border: 1px solid rgba(110, 79, 204, 0.38);
  border-radius: 999px;
  background: rgba(39, 31, 70, 0.08);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.78) inset,
    0 0 20px rgba(100, 70, 205, 0.12);
  animation: osc-boot-copy-enter 540ms 320ms ease-out both;
}

.osc-boot-progress::before,
.osc-boot-progress::after {
  position: absolute;
  top: 50%;
  width: 5px;
  height: 5px;
  content: "";
  border-radius: 50%;
  background: #70d0d5;
  box-shadow: 0 0 9px #58b9c4;
  transform: translateY(-50%);
}

.osc-boot-progress::before {
  left: -15px;
}
.osc-boot-progress::after {
  right: -15px;
}

.osc-boot-progress i {
  position: relative;
  width: 12%;
  height: 100%;
  display: block;
  overflow: hidden;
  border-radius: inherit;
  background: linear-gradient(90deg, #6c45d5 0%, #9a61e7 47%, #56c9d0 100%);
  box-shadow:
    0 0 12px rgba(111, 72, 222, 0.72),
    0 0 22px rgba(79, 199, 208, 0.34);
  transition: width 520ms cubic-bezier(0.25, 0.7, 0.2, 1);
}

.osc-boot-progress i::after {
  position: absolute;
  inset: 0;
  content: "";
  background: repeating-linear-gradient(
    112deg,
    transparent 0,
    transparent 12px,
    rgba(255, 255, 255, 0.38) 13px,
    rgba(255, 255, 255, 0.38) 14px
  );
  animation: osc-progress-scan 900ms linear infinite;
}

.osc-boot-progress b {
  position: absolute;
  width: 30%;
  height: 1px;
  top: 0;
  left: -34%;
  background: linear-gradient(90deg, transparent, #d8ffff, transparent);
  filter: drop-shadow(0 0 5px #8df5ff);
  animation: osc-progress-sweep 1.6s ease-in-out infinite;
}

.osc-boot small {
  position: absolute;
  z-index: 3;
  max-width: min(640px, 80vw);
  bottom: 34px;
  color: #9b3341;
  font-size: 12px;
  line-height: 1.6;
  overflow-wrap: anywhere;
  text-align: center;
}

.osc-boot.is-failed .osc-boot-brand,
.osc-boot.is-failed .osc-boot-core > strong {
  opacity: 0.68;
}

.osc-boot.is-failed .osc-boot-progress i {
  background: linear-gradient(90deg, #8c6f93, #b65c6c);
  box-shadow: 0 0 16px rgba(172, 70, 85, 0.3);
}

@keyframes osc-boot-brand-enter {
  from {
    opacity: 0;
    transform: translateY(9px) scale(0.975);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes osc-boot-copy-enter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes osc-spectrum-drift {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.66;
  }
  50% {
    transform: translate(-48%, -52%) scale(1.08);
    opacity: 0.82;
  }
}

@keyframes osc-progress-scan {
  from {
    transform: translateX(-15px);
  }
  to {
    transform: translateX(15px);
  }
}

@keyframes osc-progress-sweep {
  0% {
    left: -34%;
    opacity: 0;
  }
  18% {
    opacity: 1;
  }
  82% {
    opacity: 1;
  }
  100% {
    left: 108%;
    opacity: 0;
  }
}

@media (max-height: 620px) {
  .osc-boot-core {
    transform: translateY(-1vh);
  }
  .osc-boot-brand {
    margin-bottom: 22px;
  }
  .osc-boot-progress {
    margin-top: 38px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .osc-boot-spectrum,
  .osc-boot-brand,
  .osc-boot-core > strong,
  .osc-boot-core > span,
  .osc-boot-progress,
  .osc-boot-progress i::after,
  .osc-boot-progress b {
    animation: none;
  }
}
