body {
  margin: 0;
  background: #0b0f14;
  font-family: sans-serif;
  overflow: hidden;
}

#system-selector {
  position: relative;
  width: 100vw;
  height: 100vh;
}

.background {
  position: absolute;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, #0f1a24, #05080c);
  transition: all 0.5s ease;
}

.star-field {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.7s ease;
}

.star-field.active {
  opacity: 1;
}

.star-line {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--length);
  height: var(--thickness);
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(102, 242, 255, 0), rgba(180, 252, 255, var(--opacity)) 42%, rgba(102, 242, 255, var(--opacity)));
  box-shadow:
    0 0 8px rgba(102, 242, 255, 0.55),
    0 0 18px rgba(102, 242, 255, 0.28);
  filter: blur(0.25px) drop-shadow(0 0 10px rgba(102, 242, 255, 0.58));
  opacity: 0;
  transform-origin: left center;
}

.star-field.active .star-line {
  animation: starRush var(--duration) linear infinite;
  animation-delay: var(--delay);
}

@keyframes starRush {
  0% {
    opacity: 0;
    transform: rotate(var(--angle)) translateX(80px) scaleX(0.25);
  }
  18% {
    opacity: var(--opacity);
  }
  100% {
    opacity: 0;
    transform: rotate(var(--angle)) translateX(var(--distance)) scaleX(1);
  }
}

.floor-light {
  position: absolute;
  left: 50%;
  top: calc(50% + 84px);
  width: min(520px, 82vw);
  height: 82px;
  transform: translateX(-50%);
  background:
    radial-gradient(ellipse at center, rgba(102, 242, 255, 0.34) 0%, rgba(102, 242, 255, 0.16) 28%, rgba(102, 242, 255, 0.04) 58%, rgba(102, 242, 255, 0) 72%),
    linear-gradient(90deg, rgba(102, 242, 255, 0), rgba(102, 242, 255, 0.72), rgba(102, 242, 255, 0));
  background-size: 100% 100%, 76% 2px;
  background-position: center, center 54%;
  background-repeat: no-repeat;
  filter: blur(2px);
  opacity: 0;
  z-index: 1;
  pointer-events: none;
  transition: opacity 0.8s ease, transform 0.8s ease;
  transform: translateX(-50%) scaleX(0.72);
}

.floor-light.active {
  opacity: 0.9;
  transform: translateX(-50%) scaleX(1);
}

.login-form {
  position: absolute;
  left: 50%;
  top: calc(50% + 154px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: min(330px, 78vw);
  transform: translate(-50%, 18px);
  opacity: 0;
  z-index: 4;
  pointer-events: none;
  transition: opacity 0.75s ease, transform 0.75s ease;
}

.login-form.active {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}

.login-form.invalid input {
  border-color: rgba(255, 112, 112, 0.9);
  box-shadow:
    inset 0 0 14px rgba(255, 112, 112, 0.14),
    0 0 18px rgba(255, 112, 112, 0.34);
}

.login-form input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(102, 242, 255, 0.48);
  border-radius: 6px;
  padding: 13px 16px;
  background: rgba(5, 18, 25, 0.72);
  color: #e9feff;
  font-size: 15px;
  letter-spacing: 0.8px;
  outline: none;
  box-shadow:
    inset 0 0 14px rgba(102, 242, 255, 0.1),
    0 0 12px rgba(102, 242, 255, 0.18);
  backdrop-filter: blur(8px);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.login-form input::placeholder {
  color: rgba(233, 254, 255, 0.58);
}

.login-form input:focus {
  border-color: rgba(102, 242, 255, 0.95);
  background: rgba(8, 30, 39, 0.84);
  box-shadow:
    inset 0 0 18px rgba(102, 242, 255, 0.16),
    0 0 18px rgba(102, 242, 255, 0.42),
    0 0 34px rgba(102, 242, 255, 0.18);
}

.login-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.login-actions button {
  border: 1px solid rgba(102, 242, 255, 0.5);
  border-radius: 6px;
  padding: 12px 14px;
  background: rgba(5, 18, 25, 0.74);
  color: #e9feff;
  cursor: pointer;
  font-size: 14px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  box-shadow:
    inset 0 0 12px rgba(102, 242, 255, 0.1),
    0 0 12px rgba(102, 242, 255, 0.16);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.login-actions button:hover,
.login-actions button:focus {
  border-color: rgba(102, 242, 255, 0.95);
  background: rgba(8, 30, 39, 0.9);
  box-shadow:
    inset 0 0 16px rgba(102, 242, 255, 0.14),
    0 0 18px rgba(102, 242, 255, 0.4),
    0 0 30px rgba(102, 242, 255, 0.16);
  outline: none;
  transform: translateY(-1px);
}

.loading-panel {
  position: absolute;
  left: 50%;
  top: calc(50% + 166px);
  width: min(360px, 80vw);
  transform: translate(-50%, 18px);
  opacity: 0;
  z-index: 4;
  pointer-events: none;
  transition: opacity 0.75s ease, transform 0.75s ease;
}

.loading-panel.active {
  opacity: 1;
  transform: translate(-50%, 0);
}

.loading-track {
  width: 100%;
  height: 10px;
  overflow: hidden;
  border: 1px solid rgba(102, 242, 255, 0.46);
  border-radius: 999px;
  background: rgba(5, 18, 25, 0.76);
  box-shadow:
    inset 0 0 10px rgba(102, 242, 255, 0.12),
    0 0 16px rgba(102, 242, 255, 0.2);
}

.loading-bar {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(102, 242, 255, 0.38), rgba(220, 255, 255, 0.96), rgba(102, 242, 255, 0.72));
  box-shadow:
    0 0 12px rgba(102, 242, 255, 0.7),
    0 0 24px rgba(102, 242, 255, 0.36);
  transition: width 3.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.loading-bar.running {
  width: 100%;
}

.loading-panel p {
  margin: 13px 0 0;
  color: rgba(233, 254, 255, 0.86);
  font-size: 14px;
  letter-spacing: 0.8px;
  text-align: center;
  text-shadow: 0 0 12px rgba(102, 242, 255, 0.45);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.loading-panel p.changing {
  opacity: 0;
  transform: translateY(4px);
}

.welcome-message {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.94);
  color: #e9feff;
  font-size: clamp(34px, 7vw, 78px);
  letter-spacing: 2px;
  opacity: 0;
  z-index: 5;
  pointer-events: none;
  text-shadow:
    0 0 18px rgba(102, 242, 255, 0.74),
    0 0 42px rgba(102, 242, 255, 0.36);
  transition: opacity 0.9s ease, transform 0.9s ease;
}

.welcome-message.active {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.logo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
}

.circle {
  width: 220px;
  height: 220px;
  border: 4px solid #ccc;
  border-radius: 50%;
}

.logo-image {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 205px;
  max-width: 92%;
  height: auto;
}

.options {
  position: absolute;
  inset: 0;
  width: 100%;
}

.option {
  position: absolute;
  left: 50%;
  top: 50%;
  cursor: pointer;
  height: auto;
  transform: translate(-50%, -50%);
  will-change: transform;
}

.flow {
  width: 210px;
  filter: drop-shadow(0 0 15px #66f2ff);
}

.fix {
  width: 294px;
  filter: drop-shadow(0 0 10px #5da9ff);
}

.option:hover {
  filter: drop-shadow(0 0 22px #66f2ff);
}

.bg-flow {
  background: radial-gradient(circle, #0ff2, #000);
}

.bg-fix {
  background: repeating-linear-gradient(
    0deg,
    #0b0f14,
    #0b0f14 2px,
    #0f1a24 2px,
    #0f1a24 4px
  );
}
