/* 登录/注册弹窗：H5 45207:31433；PC 45835:209951 登录 / 45835:209599 注册 */

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: flex-start;
  gap: 18px;
  overflow: hidden auto;
  padding: 24px 20px;
  border: 1px solid transparent;
  border-radius: 20px;
  background:
    linear-gradient(#010406, #010406) padding-box,
    linear-gradient(140.45deg, rgba(255, 63, 124, 0.2) 0%, rgba(255, 155, 79, 0.2) 49.519%, rgba(255, 63, 124, 0.2) 100%) border-box;
  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;
}

/* H5 左上橙光 / PC 青光共用锚点；默认显橙隐青，≥769 对调 */
.login-pop__glow--orange-tl,
.login-pop__glow--cyan {
  top: -225px;
  left: -175px;
}

.login-pop__glow--cyan {
  display: none;
}

.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;
  justify-content: center;
  overflow: visible;
}

.login-pop__brand-logo {
  display: block;
  width: 111px;
  height: 32px;
  object-fit: contain;
}

.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: #989898;
  font: inherit;
  font-size: 16px;
  font-weight: 500;
  line-height: 22px;
  cursor: pointer;
}

.login-pop__tab::after {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 17.58px;
  height: 3.9px;
  background: url("/static/images/login-pop-tab-underline.svg") center / contain no-repeat;
  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 #e5365c;
  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: 500;
  line-height: 18px;
  white-space: nowrap;
}

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

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

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

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

.login-pop__error {
  display: none;
  margin: 0;
  color: #ff272b;
  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: #ff272b;
}

.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: #e5365c;
  color: #fff;
  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: #f04b70;
}

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

.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：400×517 登录 / 400×595 注册（含邀请码） */
@media (min-width: 769px) {
  .login-pop__inner {
    transform: none;
  }

  .login-pop__panel {
    width: 400px;
    min-height: 517px;
    background:
      linear-gradient(#010406, #010406) padding-box,
      linear-gradient(140.45deg, #ff3f7c 0%, #fcc100 51.923%, #c70000 100%) border-box;
  }

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

  .login-pop__glow--orange-tl {
    display: none;
  }

  .login-pop__glow--cyan {
    display: block;
  }

  .login-pop__brand-logo {
    width: 149px;
    height: 43px;
  }

  .login-pop__form {
    transform: none;
  }

  /* PC：实心粉胶囊下划线（覆盖 H5 波浪 SVG） */
  .login-pop__tab::after {
    width: 16px;
    height: 6px;
    border-radius: 3px;
    background: #e5365c;
  }

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

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

  .login-pop__input {
    padding: 10px 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, 0.65);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.login-pop__password-toggle:focus-visible {
  outline: 2px solid #e5365c;
  outline-offset: -2px;
  border-radius: 6px;
}

.login-pop__password-toggle:active {
  color: #e5365c;
}

.login-pop__password-toggle[aria-pressed="true"] .login-pop__eye-slash {
  display: none;
}
