/* Figma: PC 登录/注册 45835:209213；H5 登录 45207:36269 / 注册 45207:31364 */

body.login-pop-open {
  overflow: hidden;
}

.login-pop {
  position: fixed;
  inset: 0;
  z-index: 10002;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.login-pop--open {
  display: flex;
}

.login-pop__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.login-pop__inner {
  position: relative;
  z-index: 1;
  display: flex;
  max-height: calc(100dvh - 48px);
  flex-direction: column;
  align-items: center;
  gap: 24px;
  transform: translateY(12px);
}

.login-pop__panel {
  position: relative;
  display: flex;
  width: 300px;
  min-height: 486px;
  max-width: calc(100vw - 32px);
  max-height: calc(100dvh - 108px);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  overflow: hidden auto;
  padding: 24px 20px;
  border: 0;
  border-radius: 20px;
  background: #010406;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  color: #fff;
  scrollbar-width: none;
}

.login-pop--register .login-pop__panel {
  min-height: 562px;
}

.login-pop__panel::-webkit-scrollbar {
  display: none;
}

.login-pop__glow {
  position: absolute;
  z-index: 0;
  display: block;
  width: 395px;
  height: 395px;
  max-width: none;
  pointer-events: none;
  user-select: none;
}

.login-pop__glow--cyan {
  top: -225px;
  left: -175px;
}

.login-pop__glow--orange-top {
  top: -216px;
  left: 91px;
}

.login-pop__glow--white-bottom {
  top: 336.5px;
  left: 88px;
}

.login-pop__glow--orange-bottom {
  top: 395.5px;
  left: -230px;
}

.login-pop__brand,
.login-pop__form {
  position: relative;
  z-index: 1;
}

.login-pop__brand {
  display: flex;
  align-items: center;
  overflow: hidden;
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  line-height: 24px;
  letter-spacing: 1.8px;
  white-space: nowrap;
}

.login-pop__brand-accent {
  color: #f1a100;
}

.login-pop__form {
  display: flex;
  width: 100%;
  flex-direction: column;
  align-items: stretch;
  gap: 18px;
  transform: translateY(3px);
}

.login-pop__auth-content {
  display: flex;
  width: 100%;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}

.login-pop__tabs {
  display: flex;
  align-items: flex-start;
  gap: 24px;
}

.login-pop__tab {
  position: relative;
  display: flex;
  height: 34px;
  align-items: flex-start;
  justify-content: center;
  padding: 0 0 10px;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.55);
  font: inherit;
  font-size: 16px;
  font-weight: 500;
  line-height: 22px;
  cursor: pointer;
}

.login-pop__tab::after {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 16px;
  height: 6px;
  border-radius: 3px;
  background: #f7c96b;
  content: "";
  opacity: 0;
  transform: translateX(-50%);
}

.login-pop__tab.is-active {
  color: #fff;
  font-size: 18px;
  font-weight: 400;
  line-height: 24px;
}

.login-pop__tab.is-active::after {
  opacity: 1;
}

.login-pop__tab:focus-visible,
.login-pop__close:focus-visible,
.login-pop__submit:focus-visible {
  outline: 2px solid #f7c96b;
  outline-offset: 2px;
}

.login-pop__fields {
  display: flex;
  width: 100%;
  flex-direction: column;
  gap: 12px;
}

.login-pop__field {
  display: flex;
  width: 100%;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.login-pop__field[hidden] {
  display: none;
}

.login-pop__label {
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  line-height: 18px;
  white-space: nowrap;
}

.login-pop__input {
  display: block;
  width: 100%;
  height: 40px;
  padding: 11px 16px;
  border: 1px solid rgba(255, 255, 255, 0.02);
  border-radius: 6px;
  outline: none;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font: inherit;
  font-size: 12px;
  font-weight: 400;
  line-height: 18px;
  caret-color: #f7c96b;
}

.login-pop__input::placeholder {
  color: rgba(255, 255, 255, 0.55);
  opacity: 1;
}

.login-pop__input:focus {
  border-color: #f7c96b;
}

.login-pop__input[aria-invalid="true"] {
  border-color: #ff5a5f;
}

.login-pop__error {
  display: none;
  margin: 0;
  color: #ff7276;
  font-size: 12px;
  font-weight: 400;
  line-height: 18px;
}

.login-pop__error--visible {
  display: block;
}

.login-pop__form-message {
  width: 100%;
  margin: -6px 0;
  font-size: 12px;
  line-height: 18px;
  text-align: center;
}

.login-pop__form-message--error {
  color: #ff7276;
}

.login-pop__form-message--success {
  color: #74d99f;
}

.login-pop__submit {
  display: flex;
  width: 100%;
  height: 44px;
  flex: none;
  align-items: center;
  justify-content: center;
  padding: 11px 16px;
  border: 0;
  border-radius: 12px;
  background: #f7c96b;
  color: rgba(0, 0, 0, 0.9);
  font: inherit;
  font-size: 16px;
  font-weight: 500;
  line-height: 22px;
  text-align: center;
  cursor: pointer;
}

.login-pop__submit-group {
  display: contents;
}

.login-pop__submit:hover {
  background: #ffd57f;
}

.login-pop__submit:active {
  transform: translateY(1px);
}

.login-pop--submitting .login-pop__submit {
  cursor: wait;
  opacity: 0.7;
}

.login-pop__tips {
  display: flex;
  width: 100%;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.login-pop__tips-title,
.login-pop__tips-text {
  width: 100%;
  margin: 0;
}

.login-pop__tips-title {
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
}

.login-pop__tips-text {
  color: rgba(255, 255, 255, 0.55);
  font-size: 12px;
  font-weight: 400;
  line-height: 18px;
  white-space: nowrap;
}

.login-pop__close {
  display: flex;
  width: 36px;
  height: 36px;
  flex: none;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.login-pop__close:hover {
  opacity: 0.85;
}

.login-pop__close-icon {
  display: block;
  width: 36px;
  height: 36px;
}

@media (max-height: 680px) {
  .login-pop {
    align-items: flex-start;
    overflow-y: auto;
  }

  .login-pop__inner {
    max-height: none;
    transform: translateY(0);
  }

  .login-pop__panel {
    max-height: none;
  }
}

@media (max-height: 680px) and (prefers-reduced-motion: no-preference) {
  .login-pop--open .login-pop__inner {
    animation-name: login-pop-enter-short;
  }

  @keyframes login-pop-enter-short {
    from {
      opacity: 0;
      transform: translateY(8px) scale(0.98);
    }
    to {
      opacity: 1;
      transform: translateY(0) scale(1);
    }
  }
}

@media (prefers-reduced-motion: no-preference) {
  .login-pop--open .login-pop__inner {
    animation: login-pop-enter 180ms ease-out both;
  }

  @keyframes login-pop-enter {
    from {
      opacity: 0;
      transform: translateY(20px) scale(0.98);
    }
    to {
      opacity: 1;
      transform: translateY(12px) scale(1);
    }
  }
}

/* PC Figma 45835:209951（登录）/ 45835:209599（注册） */
@media (min-width: 769px) {
  .login-pop__inner {
    transform: none;
  }

  .login-pop__panel {
    width: 400px;
    min-height: 504px;
  }

  .login-pop--register .login-pop__panel {
    min-height: 582px;
  }

  .login-pop__brand {
    font-size: 18px;
    font-weight: 600;
    line-height: normal;
    letter-spacing: 0;
  }

  .login-pop__form {
    transform: none;
  }

  .login-pop__tab.is-active {
    font-weight: 600;
  }

  .login-pop__label {
    font-size: 14px;
    line-height: 20px;
  }

  .login-pop__input {
    padding: 9px 16px;
    font-size: 14px;
    line-height: 20px;
  }

  .login-pop__tips {
    gap: 8px;
  }

  .login-pop__tips-title {
    font-size: 16px;
    line-height: 22px;
  }

  .login-pop__tips-text {
    font-size: 14px;
    line-height: 20px;
  }
}

@media (min-width: 769px) and (prefers-reduced-motion: no-preference) {
  .login-pop--open .login-pop__inner {
    animation-name: login-pop-desktop-enter;
  }

  @keyframes login-pop-desktop-enter {
    from {
      opacity: 0;
      transform: translateY(8px) scale(0.98);
    }
    to {
      opacity: 1;
      transform: translateY(0) scale(1);
    }
  }
}
