:root {
  color-scheme: dark;
  --design-w: 1672;
  --design-h: 941;
  --stage-ratio: 1.7768331562;
  --page-gutter: clamp(6px, 0.55vmin, 10px);
  --edge-feather: clamp(14px, 1.35vmin, 24px);
  --gold: #f2c875;
  --font-ui: "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body {
  display: grid;
  place-items: center;
  position: relative;
  margin: 0;
  width: 100vw;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  background: #080604 url("./assets/登录/登录背景-纯净版.png?v=20260822-clean-login-bg-1") center / cover no-repeat;
  font-family: var(--font-ui);
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body::before {
  z-index: -2;
  background: url("./assets/登录/登录背景-纯净版.png?v=20260822-clean-login-bg-1") center / cover no-repeat;
  filter: brightness(0.86) saturate(1.08);
  transform: scale(1.02);
}

body::after {
  z-index: -1;
  background:
    radial-gradient(ellipse at 100% 44%, rgba(236, 183, 88, 0.12), transparent 22rem),
    linear-gradient(90deg, rgba(8, 5, 2, 0.18), transparent 12%, transparent 88%, rgba(8, 5, 2, 0.18));
}

.stage {
  position: fixed;
  left: 50%;
  top: 50%;
  width: max(
    calc(100vw - (var(--page-gutter) * 2)),
    calc((100svh - (var(--page-gutter) * 2)) * var(--stage-ratio))
  );
  height: max(
    calc(100svh - (var(--page-gutter) * 2)),
    calc((100vw - (var(--page-gutter) * 2)) / var(--stage-ratio))
  );
  transform: translate(-50%, -50%);
  overflow: visible;
  isolation: isolate;
  background: transparent;
  box-shadow:
    0 0 32px 8px rgba(0, 0, 0, 0.1),
    0 0 60px 18px rgba(221, 158, 58, 0.1);
}

.stage::before {
  content: "";
  position: absolute;
  inset: calc(var(--edge-feather) * -2.2);
  z-index: 0;
  pointer-events: none;
  background: url("./assets/登录/登录背景-纯净版.png?v=20260822-clean-login-bg-1") center / cover no-repeat;
  filter: blur(20px) brightness(0.86) saturate(1.08);
  opacity: 0.92;
}

.stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.08), transparent 4.5%, transparent 95.5%, rgba(0, 0, 0, 0.1)),
    linear-gradient(180deg, rgba(0, 0, 0, 0.1), transparent 5%, transparent 94%, rgba(0, 0, 0, 0.1));
}

.visual-frame {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: url("./assets/登录/登录背景-纯净版.png?v=20260822-clean-login-bg-1") center / 100% 100% no-repeat;
  -webkit-mask-image: linear-gradient(
    90deg,
    transparent 0,
    #000 var(--edge-feather),
    #000 calc(100% - var(--edge-feather)),
    transparent 100%
  );
  mask-image: linear-gradient(
    90deg,
    transparent 0,
    #000 var(--edge-feather),
    #000 calc(100% - var(--edge-feather)),
    transparent 100%
  );
}

.login-orbit-logo-replacement {
  position: absolute;
  left: 1.85%;
  top: 28.55%;
  z-index: 3;
  width: 16.9%;
  aspect-ratio: 144 / 104;
  pointer-events: none;
}

.login-orbit-logo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  filter: drop-shadow(0 0 14px rgba(216, 168, 80, 0.2));
  user-select: none;
  -webkit-user-drag: none;
}

.login-brand-replacement {
  position: absolute;
  left: 20.1%;
  top: 23.2%;
  z-index: 3;
  width: 27.4%;
  height: 31.5%;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.login-feiyu-wordmark {
  position: relative;
  z-index: 1;
  display: block;
  width: 76%;
  aspect-ratio: 1.92 / 1;
  transform: translateX(-14%);
  background-image: url("./assets/项目空间/飞语.png?v=20260816-feiyu-wordmark-1");
  background-repeat: no-repeat;
  background-position: 50% 52%;
  background-size: 215% auto;
  filter: drop-shadow(0 0 18px rgba(238, 191, 103, 0.25));
}

.camera-title-replacement {
  position: absolute;
  left: 64.2%;
  top: 16.45%;
  z-index: 3;
  width: 20.55%;
  height: 15.55%;
  overflow: visible;
  pointer-events: none;
}

.camera-title-art {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  transform: scale(1.18);
  transform-origin: center;
  opacity: 0.98;
  filter: saturate(0.98) brightness(0.96);
  user-select: none;
  -webkit-user-drag: none;
}

.login-form {
  position: absolute;
  inset: 0;
  z-index: 4;
}

.login-form::before,
.login-form::after {
  content: "";
  position: absolute;
  left: 56.25%;
  z-index: 1;
  width: 31.65%;
  height: 5.2%;
  pointer-events: none;
  border-radius: 2px;
  background: rgba(7, 6, 4, 0.985);
  box-shadow: 0 0 10px 5px rgba(7, 6, 4, 0.72);
}

.login-form::before {
  top: 46.82%;
}

.login-form::after {
  top: 61.48%;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hotspot-input {
  position: absolute;
  z-index: 2;
  border: 0;
  outline: 0;
  background: transparent;
  color: rgba(255, 236, 194, 0.94);
  caret-color: var(--gold);
  font: 700 clamp(14px, 1.28vw, 25px) / 1 var(--font-ui);
  padding: 0 clamp(54px, 4.6vw, 88px) 0 clamp(24px, 1.9vw, 38px);
  margin: 0;
  border-radius: 0;
  box-shadow: none;
  opacity: 1;
  appearance: none;
  -webkit-appearance: none;
  -webkit-text-fill-color: rgba(255, 236, 194, 0.94);
}

.hotspot-input::placeholder {
  color: rgba(187, 157, 104, 0.52);
  -webkit-text-fill-color: rgba(187, 157, 104, 0.52);
}

.submit-hotspot:focus-visible,
.register-hotspot:focus-visible,
.forgot-hotspot:focus-visible,
.password-visibility-toggle:focus-visible,
.remember-hotspot:focus-within {
  outline: 2px solid rgba(255, 225, 151, 0.85);
  outline-offset: 4px;
}

.hotspot-input:focus,
.hotspot-input:focus-visible {
  outline: 0;
  box-shadow: none;
}

/* Keep the cinematic dark fields when Safari/Chrome fills credentials via Touch ID. */
.login-form {
  color-scheme: dark;
}

.hotspot-input:-webkit-autofill,
.hotspot-input:-webkit-autofill:hover,
.hotspot-input:-webkit-autofill:focus,
.hotspot-input:-webkit-autofill:active {
  border: 0 !important;
  background-color: #080704 !important;
  color: rgba(255, 236, 194, 0.94) !important;
  caret-color: var(--gold) !important;
  -webkit-text-fill-color: rgba(255, 236, 194, 0.94) !important;
  -webkit-box-shadow: 0 0 0 1000px #080704 inset !important;
  box-shadow: 0 0 0 1000px #080704 inset !important;
  transition: background-color 999999s ease-out 0s;
}

.hotspot-input::selection {
  color: #fff4d3;
  background: rgba(216, 166, 70, 0.42);
  -webkit-text-fill-color: #fff4d3;
}

.hotspot-input::-webkit-credentials-auto-fill-button,
.hotspot-input::-webkit-contacts-auto-fill-button,
.hotspot-input::-webkit-calendar-picker-indicator {
  visibility: hidden;
  display: none !important;
  pointer-events: none;
}

.hotspot-input::-ms-clear,
.hotspot-input::-ms-reveal {
  display: none;
}

.email-input {
  left: 55.44%;
  top: 45.59%;
  width: 37.32%;
  height: 7.65%;
}

.password-input {
  left: 55.44%;
  top: 60.26%;
  width: 37.38%;
  height: 7.65%;
}

.password-visibility-toggle {
  z-index: 5;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  color: rgba(238, 202, 132, 0.82);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.password-visibility-toggle:hover {
  color: #ffe3a0;
}

.password-eye {
  position: relative;
  z-index: 1;
  display: block;
  width: clamp(18px, 1.55vw, 29px);
  height: clamp(14px, 1.15vw, 22px);
}

.password-eye::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 72%;
  height: 72%;
  border: clamp(1.25px, 0.11vw, 2px) solid currentColor;
  border-radius: 72% 18%;
  transform: translate(-50%, -50%) rotate(45deg);
  box-shadow: 0 0 0.5rem rgba(223, 167, 67, 0.18);
}

.password-eye::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 24%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: currentColor;
  transform: translate(-50%, -50%);
}

.password-visibility-toggle::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: clamp(22px, 1.8vw, 34px);
  height: clamp(1.2px, 0.11vw, 2px);
  border-radius: 999px;
  background: currentColor;
  opacity: 0;
  transform: translate(-50%, -50%) rotate(-42deg);
  transition: opacity 120ms ease;
  z-index: 2;
}

.password-visibility-toggle[aria-pressed="true"]::after {
  opacity: 0.95;
}

.login-password-toggle {
  position: absolute;
  left: 88.72%;
  top: 61.38%;
  width: 2.85%;
  height: 5.35%;
  border-radius: 4px;
  background: transparent;
  text-shadow: 0 0 0.65rem rgba(226, 170, 70, 0.42);
}

.login-password-toggle::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 0;
  width: 178%;
  height: 118%;
  border-radius: 4px;
  background: rgba(7, 6, 4, 0.995);
  box-shadow: 0 0 9px 4px rgba(7, 6, 4, 0.88);
  transform: translate(-50%, -50%);
}

.remember-hotspot,
.submit-hotspot {
  position: absolute;
  display: block;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.remember-hotspot {
  left: 55.44%;
  top: 71.31%;
  width: 20%;
  height: 4.35%;
}

.remember-hotspot input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.forgot-hotspot {
  text-decoration: none;
}

.account-actions {
  position: absolute;
  left: 79.28%;
  top: 70.57%;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(7px, 0.65vw, 13px);
  width: 13.7%;
  height: 4.35%;
}

.account-actions::before {
  content: "";
  position: absolute;
  inset: 0.34em -0.9em 0.24em 39%;
  z-index: 0;
  pointer-events: none;
  border-radius: 4px;
  background: linear-gradient(90deg, rgba(8, 6, 4, 0.92), rgba(8, 6, 4, 0.995) 14%, rgba(8, 6, 4, 0.995) 88%, rgba(8, 6, 4, 0.9));
  box-shadow: 0 0 12px 5px rgba(8, 6, 4, 0.84);
}

.register-hotspot,
.forgot-hotspot {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(246, 198, 105, 0.94);
  cursor: pointer;
  font: 700 clamp(12px, 1.08vw, 20px) / 1 var(--font-ui);
  white-space: nowrap;
  text-shadow: 0 0 0.75rem rgba(238, 166, 53, 0.7);
  appearance: none;
  -webkit-appearance: none;
}

.register-hotspot:hover {
  color: #ffe7a8;
}

.forgot-hotspot:hover {
  color: #ffe7a8;
}

.submit-hotspot {
  left: 55.44%;
  top: 77.9%;
  width: 37.32%;
  height: 9.25%;
  border-radius: 0.5rem;
}

.submit-hotspot:hover {
  box-shadow:
    inset 0 0 2rem rgba(255, 248, 206, 0.12),
    0 0 1.8rem rgba(241, 181, 67, 0.2);
}

.submit-hotspot:disabled {
  cursor: wait;
}

.status {
  position: absolute;
  left: 56%;
  top: 88.2%;
  width: 35%;
  margin: 0;
  color: rgba(255, 225, 151, 0.86);
  font-size: 0.88rem;
  line-height: 1.4;
  text-align: center;
  text-shadow: 0 0 0.8rem rgba(230, 167, 55, 0.65);
}

.register-panel {
  position: absolute;
  left: 56.1%;
  top: 14.5%;
  z-index: 8;
  width: 35.4%;
  max-height: 78%;
  overflow: auto;
  padding: clamp(18px, 1.7vw, 32px);
  border: 1px solid rgba(224, 174, 90, 0.58);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(32, 24, 12, 0.95), rgba(5, 4, 3, 0.96)),
    rgba(8, 6, 4, 0.96);
  box-shadow:
    inset 0 0 0 1px rgba(255, 226, 154, 0.12),
    0 0 2.4rem rgba(230, 167, 55, 0.2),
    0 1rem 4rem rgba(0, 0, 0, 0.62);
  color: rgba(255, 235, 190, 0.94);
}

.register-panel[hidden] {
  display: none;
}

.register-panel h2 {
  margin: 0 0 clamp(8px, 0.7vw, 13px);
  color: #ffe6aa;
  font: 700 clamp(22px, 2.1vw, 38px) / 1 var(--font-ui);
  text-align: center;
  text-shadow: 0 0 1rem rgba(235, 168, 56, 0.65);
}

.register-description {
  margin: 0 0 clamp(15px, 1.25vw, 23px);
  color: rgba(224, 193, 136, 0.72);
  font-size: clamp(11px, 0.82vw, 15px);
  line-height: 1.45;
  text-align: center;
}

.register-panel label {
  display: block;
  margin: 0 0 0.45rem;
  color: rgba(255, 226, 164, 0.82);
  font: 700 clamp(12px, 0.95vw, 18px) / 1 var(--font-ui);
}

.register-panel input {
  display: block;
  width: 100%;
  height: clamp(42px, 4vw, 68px);
  margin: 0 0 clamp(10px, 1vw, 18px);
  padding: 0 clamp(14px, 1.2vw, 22px);
  border: 1px solid rgba(199, 145, 54, 0.5);
  border-radius: 6px;
  outline: 0;
  background: rgba(4, 4, 3, 0.82);
  color: rgba(255, 239, 203, 0.96);
  font: 700 clamp(13px, 1.1vw, 20px) / 1 var(--font-ui);
}

.register-panel input::placeholder {
  color: rgba(186, 151, 91, 0.52);
}

.register-panel input:focus {
  border-color: rgba(255, 210, 123, 0.86);
  box-shadow: 0 0 1.2rem rgba(225, 155, 42, 0.18);
}

.register-password-field {
  position: relative;
}

.register-password-field input {
  padding-right: clamp(52px, 4vw, 72px);
}

.register-password-toggle {
  position: absolute;
  right: clamp(5px, 0.42vw, 8px);
  top: 2px;
  width: clamp(38px, 3.6vw, 62px);
  height: calc(clamp(42px, 4vw, 68px) - 4px);
  border-radius: 4px;
  background: transparent;
}

.password-requirements {
  margin: clamp(-12px, -0.65vw, -6px) 0 clamp(11px, 0.9vw, 17px);
  color: rgba(213, 181, 122, 0.62);
  font-size: clamp(10px, 0.74vw, 14px);
  line-height: 1.4;
}

.register-panel .terms-consent {
  display: flex;
  align-items: center;
  gap: clamp(8px, 0.65vw, 12px);
  margin: clamp(3px, 0.4vw, 7px) 0 clamp(13px, 1.05vw, 20px);
  color: rgba(235, 206, 151, 0.76);
  cursor: pointer;
  font-size: clamp(10px, 0.78vw, 14px);
  font-weight: 500;
  line-height: 1.45;
}

.register-panel .terms-consent input {
  flex: 0 0 auto;
  width: clamp(16px, 1.15vw, 21px);
  height: clamp(16px, 1.15vw, 21px);
  margin: 0;
  padding: 0;
  accent-color: #d3943c;
}

.register-panel .terms-consent a {
  color: #e0b866;
  text-decoration-color: rgba(224, 184, 102, 0.48);
  text-underline-offset: 3px;
}

.register-panel .terms-consent a:hover,
.register-panel .terms-consent a:focus-visible {
  color: #f4d693;
}

.register-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(10px, 0.9vw, 16px);
  margin-top: clamp(4px, 0.5vw, 10px);
}

.register-submit,
.register-cancel,
.register-close {
  border: 0;
  cursor: pointer;
  font-family: var(--font-ui);
}

.register-submit,
.register-cancel {
  height: clamp(38px, 3.4vw, 58px);
  border-radius: 6px;
  font-weight: 800;
}

.register-submit {
  background: linear-gradient(180deg, #efca7b, #af651e);
  color: #090500;
  box-shadow: inset 0 0 0 1px rgba(255, 242, 181, 0.45);
}

.register-submit:disabled,
.register-cancel:disabled {
  cursor: wait;
  opacity: 0.58;
}

.register-cancel {
  border: 1px solid rgba(220, 169, 82, 0.54);
  background: rgba(8, 6, 4, 0.72);
  color: rgba(255, 224, 161, 0.9);
}

.register-close {
  position: absolute;
  right: clamp(10px, 0.95vw, 18px);
  top: clamp(8px, 0.85vw, 16px);
  width: clamp(26px, 2.1vw, 38px);
  height: clamp(26px, 2.1vw, 38px);
  padding: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.24);
  color: rgba(255, 226, 166, 0.82);
  font-size: clamp(18px, 1.5vw, 27px);
  line-height: 1;
}

.register-status {
  min-height: 1.3em;
  margin: clamp(10px, 0.9vw, 16px) 0 0;
  color: rgba(255, 225, 151, 0.86);
  font-size: clamp(11px, 0.82vw, 15px);
  text-align: center;
}

.register-status[data-state="error"],
.status[data-state="error"] {
  color: #ffb29f;
}

.register-status[data-state="success"],
.status[data-state="success"] {
  color: #ffe2a0;
}

@media (max-width: 760px) {
  body {
    overflow: auto;
  }

  .stage {
    width: 100vw;
    height: calc(100vw / var(--stage-ratio));
    min-height: 0;
  }

  .status {
    font-size: 0.65rem;
  }

  .register-panel {
    left: 5%;
    top: -63%;
    width: 90%;
    max-height: 225%;
    padding: 18px;
  }

  .register-actions {
    grid-template-columns: 1fr;
  }
}
