/* 登录/注册弹窗：H5 45207:31364 注册 / 45207:31498 已填写 / 45207:36269 登录；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;
  -webkit-tap-highlight-color: transparent;
}

.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: 490px;
  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(155deg, #ff5412 0%, rgba(255, 255, 255, 0) 48.56%, #ffd301 99.52%) border-box;
  box-shadow: inset 0 2px 8px rgba(255, 207, 189, 0.4);
  color: #fff;
  scrollbar-width: none;
}

.login-pop--register .login-pop__panel {
  min-height: 566px;
  background:
    linear-gradient(#010406, #010406) padding-box,
    linear-gradient(155deg, #ff5412 0%, rgba(255, 84, 18, 0.1) 45.19%, #ffd301 99.52%) border-box;
}

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

.login-pop__glow {
  position: absolute;
  z-index: 0;
  display: block;
  width: 95px;
  height: 95px;
  max-width: none;
  border-radius: 50%;
  pointer-events: none;
  user-select: none;
  filter: blur(150px);
}

/* H5 45207:31433 四角光斑：左上青 / 右上橙 / 右下白 / 左下橙 */
.login-pop__glow--orange-tl {
  display: none;
}

.login-pop__glow--cyan {
  top: -75px;
  left: -25px;
  background: rgba(0, 208, 255, 0.6);
}

.login-pop__glow--orange-top {
  top: -66px;
  left: 241px;
  background: #ffa24b;
}

.login-pop__glow--white-bottom {
  top: 486.5px;
  left: 238px;
  background: rgba(255, 255, 255, 0.3);
}

.login-pop__glow--orange-bottom {
  top: 469.5px;
  left: -80px;
  background: #ffa24b;
}

.login-pop--register .login-pop__glow--orange-bottom {
  top: 545.5px;
  left: -80px;
}

.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: 72px;
  height: 34px;
  object-fit: contain;
}

.login-pop__brand-logo--pc {
  display: none;
}

.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: #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: 16px;
  height: 6px;
  border-radius: 3px;
  background: #ff5412;
  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 #ff5412;
  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: 54px;
  outline: none;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  line-height: 18px;
  caret-color: #ff5412;
}

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

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

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

.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;
  display: flex;
  width: 36px;
  height: 100%;
  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 #ff5412;
  outline-offset: -2px;
  border-radius: 6px;
}

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

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

.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: 60px;
  background: #ff5412;
  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: #ff6a30;
}

.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：45835:209951 登录 400×508 / 45835:209599 注册 400×586 */
@media (min-width: 769px) {
  .login-pop__backdrop {
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
  }

  .login-pop__inner {
    transform: none;
  }

  .login-pop__panel {
    width: 400px;
    min-height: 508px;
    box-shadow: none;
    background:
      linear-gradient(#010406, #010406) padding-box,
      linear-gradient(138deg, #ff5412 0%, rgba(255, 255, 255, 0) 50%, #fcc100 100%) border-box;
  }

  .login-pop--register .login-pop__panel {
    min-height: 586px;
    background:
      linear-gradient(#010406, #010406) padding-box,
      linear-gradient(138deg, #ff5412 0%, rgba(255, 255, 255, 0) 50%, #fcc100 100%) border-box;
  }

  /* 四角光斑：95 圆 + blur，面板 overflow 裁切 */
  .login-pop__glow {
    width: 95px;
    height: 95px;
    border-radius: 50%;
    background-image: none;
    filter: blur(75px);
  }

  .login-pop__glow--orange-tl {
    display: block;
    top: -75px;
    left: -25px;
    background: rgba(255, 89, 0, 0.6);
  }

  .login-pop__glow--cyan {
    display: block;
    top: -66px;
    left: 241px;
    background: #4b66ff;
  }

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

  .login-pop__glow--white-bottom {
    top: 486.5px;
    left: 238px;
    background: rgba(255, 255, 255, 0.3);
  }

  .login-pop__glow--orange-bottom {
    top: 487px;
    left: -39px;
    background: #ffa24b;
  }

  .login-pop--register .login-pop__glow--orange-bottom {
    top: 545.5px;
    left: -80px;
    background: #ff4b4e;
  }

  .login-pop__brand-logo--h5 {
    display: none;
  }

  .login-pop__brand-logo--pc {
    display: block;
    width: 72px;
    height: 34px;
  }

  .login-pop__form {
    transform: none;
  }

  .login-pop__tab:focus-visible,
  .login-pop__close:focus-visible,
  .login-pop__submit:focus-visible,
  .login-pop__password-toggle:focus-visible {
    outline-color: #ff5412;
  }

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

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

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

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

  .login-pop__input {
    padding: 10px 16px;
    border-radius: 64px;
    font-size: 14px;
    line-height: 20px;
    caret-color: #ff5412;
  }

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

  .login-pop__submit {
    border-radius: 70px;
    background: #ff5412;
    color: rgba(0, 0, 0, 0.9);
  }

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

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