/* WYDSP: PC 弹窗 5–7；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(4px);
  -webkit-backdrop-filter: blur(4px);
}

.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: 438px;
  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: 0 0 0 1px rgba(0, 0, 0, .2);
  color: #fff;
  scrollbar-width: none;
}

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

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

.login-pop__decoration {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: inherit;
  pointer-events: 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__form {
  position: relative;
  z-index: 1;
}

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

.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: #fd2d55;
  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 #fd2d55;
  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: #fd2d55;
}

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

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

.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: 999px;
  background: rgba(253, 45, 85, .4);
  color: rgba(255, 255, 255, .4);
  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: #fd2d55;
  color: #fff;
}

.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;
  overflow-wrap: anywhere;
}

.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 (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 的登录、注册采用无光晕的深色面板。 */
@media (min-width: 769px) {
  .login-pop__backdrop {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
  }

  .login-pop__inner {
    transform: none;
  }

  .login-pop__panel {
    width: 400px;
    min-height: 456px;
    background: #0d0e0f;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .2);
  }

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

  .login-pop__glow { display: none; }

  .login-pop__submit { border-radius: 12px; background: #fe617f; color: rgba(0, 0, 0, .9); }
  .login-pop__submit:hover { background: #fd2d55; color: rgba(0, 0, 0, .9); }

  .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);
    }
  }
}

.login-pop__password-wrap { position: relative; width: 100%; }
.login-pop .login-pop__password-wrap .login-pop__input { padding-right: 44px; }
.login-pop__password-toggle { position: absolute; right: 4px; top: 0; height: 100%; width: 36px; display: flex; align-items: center; justify-content: center; padding: 0; border: 0; background: transparent; color: rgba(255,255,255,.65); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.login-pop__password-toggle:focus-visible { outline: 2px solid #fd2d55; outline-offset: -2px; border-radius: 6px; }
.login-pop__password-toggle:active { color: #fd2d55; }
.login-pop__password-toggle[aria-pressed="true"] .login-pop__eye-slash { display: none; }

/* Keep the close control visible while the form scrolls in a short viewport. */
@media (max-height: 680px) {
  .login-pop__inner { transform: none; }
  .login-pop .login-pop__panel {
    min-height: 0;
    max-height: calc(100dvh - 108px);
    justify-content: flex-start;
    overflow: hidden;
  }
  .login-pop__form { min-height: 0; overflow-y: auto; scrollbar-width: none; }
  .login-pop__form > * { flex-shrink: 0; }
  .login-pop__form::-webkit-scrollbar { display: none; }
  .login-pop__form :focus-visible { outline-offset: -2px; }
}

@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); }
  }
}
