/* ==========================================================================
   门户端 - 登录 / 注册（渐变背景 + 居中弹窗，弹窗内左右分栏）
   沿用平台主色 #4B3FE3 与强调色 #32F08C
   ========================================================================== */

/* ===== 整页渐变背景 ===== */
.auth-page.pauth-page {
  position: relative;
  overflow: hidden;
  padding: 32px 24px;
  isolation: isolate;
  background: linear-gradient(135deg, #4B3FE3 0%, #6366f1 55%, #32F08C 100%);
  background-size: 170% 170%;
  animation: pauth-bg-shift 24s ease-in-out infinite alternate;
}

@keyframes pauth-bg-shift {
  0% { background-position: 0% 30%; }
  50% { background-position: 70% 0%; }
  100% { background-position: 100% 70%; }
}

/* 背景中缓慢游走的柔和色云 */
.pauth-page::before,
.pauth-page::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.pauth-page::before {
  top: -34%;
  left: -12%;
  width: 72%;
  height: 88%;
  background: radial-gradient(ellipse at center, rgba(99, 102, 241, 0.55) 0%, rgba(99, 102, 241, 0) 68%);
  filter: blur(36px);
  opacity: 0.65;
  animation: pauth-cloud-1 26s ease-in-out infinite alternate;
}

.pauth-page::after {
  right: -14%;
  bottom: -36%;
  width: 68%;
  height: 84%;
  background: radial-gradient(ellipse at center, rgba(50, 240, 140, 0.42) 0%, rgba(50, 240, 140, 0) 68%);
  filter: blur(48px);
  opacity: 0.55;
  animation: pauth-cloud-2 32s ease-in-out infinite alternate-reverse;
}

@keyframes pauth-cloud-1 {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(10%, 8%, 0) scale(1.18); }
}

@keyframes pauth-cloud-2 {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(-9%, -7%, 0) scale(1.15); }
}

.pauth-page-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1500px;
  height: 1500px;
  margin: -750px 0 0 -750px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(50, 240, 140, 0.22), rgba(99, 102, 241, 0.18), rgba(75, 63, 227, 0.26), rgba(50, 240, 140, 0.22));
  filter: blur(80px);
  opacity: 0.55;
  animation: pauth-glow-spin 36s linear infinite;
  pointer-events: none;
}

@keyframes pauth-glow-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.pauth-particle {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.65);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.35);
  pointer-events: none;
  animation: pauth-particle-float 12s ease-in-out infinite;
}

.pauth-particle-1 { top: 16%; left: 12%; width: 5px; height: 5px; animation-duration: 11s; }
.pauth-particle-2 { top: 28%; right: 15%; width: 4px; height: 4px; animation-duration: 14s; animation-delay: -3s; }
.pauth-particle-3 { bottom: 18%; left: 20%; width: 3px; height: 3px; animation-duration: 9s; animation-delay: -5s; }
.pauth-particle-4 { bottom: 26%; right: 10%; width: 6px; height: 6px; background: rgba(50, 240, 140, 0.55); box-shadow: 0 0 14px rgba(50, 240, 140, 0.4); animation-duration: 16s; animation-delay: -2s; }
.pauth-particle-5 { top: 10%; left: 42%; width: 3px; height: 3px; animation-duration: 13s; animation-delay: -7s; }
.pauth-particle-6 { bottom: 8%; right: 32%; width: 4px; height: 4px; animation-duration: 15s; animation-delay: -4s; }

@keyframes pauth-particle-float {
  0%, 100% { transform: translate3d(0, 0, 0); opacity: 0.35; }
  50% { transform: translate3d(14px, -26px, 0); opacity: 0.9; }
}

.pauth-page-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(circle at 50% 45%, #000 0%, transparent 78%);
  mask-image: radial-gradient(circle at 50% 45%, #000 0%, transparent 78%);
  animation: pauth-grid-drift 32s linear infinite;
  pointer-events: none;
}

@keyframes pauth-grid-drift {
  from { background-position: 0 0, 0 0; }
  to { background-position: 64px 64px, 64px 64px; }
}

.pauth-page-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.pauth-page-orb-1 {
  top: -160px;
  left: -120px;
  width: 440px;
  height: 440px;
  background: radial-gradient(circle, rgba(50, 240, 140, 0.24) 0%, transparent 68%);
  animation: pauth-orb-drift-1 18s ease-in-out infinite alternate;
}

.pauth-page-orb-2 {
  right: -140px;
  bottom: -180px;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.16) 0%, transparent 66%);
  animation: pauth-orb-drift-2 22s ease-in-out infinite alternate;
}

.pauth-page-orb-3 {
  top: 12%;
  right: 9%;
  width: 160px;
  height: 160px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  animation: pauth-ring-drift 26s ease-in-out infinite;
}

@keyframes pauth-orb-drift-1 {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(60px, 40px, 0) scale(1.15); }
}

@keyframes pauth-orb-drift-2 {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(-70px, -50px, 0) scale(1.1); }
}

@keyframes pauth-ring-drift {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg); opacity: 0.55; }
  50% { transform: translate3d(-24px, 22px, 0) rotate(180deg); opacity: 0.9; }
}

/* ===== 居中弹窗 ===== */
.pauth-modal {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: stretch;
  width: 1140px;
  max-width: 100%;
  margin: auto;
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 40px 110px rgba(16, 14, 55, 0.4), 0 2px 8px rgba(16, 14, 55, 0.12);
  animation: pauth-modal-in 0.65s cubic-bezier(0.2, 0.8, 0.25, 1) both;
}

@keyframes pauth-modal-in {
  from { opacity: 0; transform: translateY(22px) scale(0.985); }
  to { opacity: 1; transform: none; }
}

/* ===== 弹窗左侧：品牌推广 ===== */
.pauth-visual {
  position: relative;
  flex: 0 0 45%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 22px;
  padding: 40px 42px;
  overflow: hidden;
  color: #ffffff;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at 0% 100%, rgba(50, 240, 140, 0.24) 0%, transparent 46%),
    radial-gradient(circle at 100% 0%, rgba(255, 255, 255, 0.12) 0%, transparent 42%),
    linear-gradient(158deg, #2f279e 0%, #4B3FE3 52%, #4437cf 100%);
}

.pauth-visual::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(18, 16, 60, 0.18) 0%, rgba(18, 16, 60, 0.03) 52%, rgba(12, 34, 26, 0.18) 100%);
  pointer-events: none;
}

.pauth-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(circle at 30% 40%, #000 0%, transparent 76%);
  mask-image: radial-gradient(circle at 30% 40%, #000 0%, transparent 76%);
  pointer-events: none;
}

.pauth-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.pauth-orb-1 {
  right: -130px;
  bottom: -120px;
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, rgba(50, 240, 140, 0.4) 0%, transparent 66%);
  animation: pauth-visual-orb 14s ease-in-out infinite alternate;
}

.pauth-orb-2 {
  top: 22%;
  left: -100px;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.14) 0%, transparent 68%);
  animation: pauth-visual-orb 18s ease-in-out infinite alternate-reverse;
}

@keyframes pauth-visual-orb {
  from { transform: translate3d(0, 0, 0) scale(1); opacity: 0.7; }
  to { transform: translate3d(-34px, -30px, 0) scale(1.16); opacity: 1; }
}

.pauth-brand {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 11px;
}

.pauth-logo {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.pauth-logo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.18) 0%, transparent 55%);
  pointer-events: none;
}

.pauth-logo img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  padding: 4px;
  background: #fff;
  object-fit: contain;
}

.pauth-brand-full {
  max-height: 46px;
  max-width: 240px;
  padding: 7px 12px;
  background: #ffffff;
  object-fit: contain;
}

.pauth-brand-text {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.4px;
  color: #ffffff;
}

.pauth-brand-text span { color: #32F08C; }

.pauth-visual-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1;
  min-height: 0;
}

.pauth-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: max-content;
  max-width: 100%;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.08);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.86);
}

.pauth-eyebrow::before {
  content: '';
  width: 5px;
  height: 5px;
  flex: 0 0 5px;
  background: #32F08C;
}

.pauth-headline {
  margin: 22px 0 14px;
  font-size: 38px;
  line-height: 1.26;
  font-weight: 700;
  letter-spacing: -1.1px;
  color: #ffffff;
}

.pauth-headline em {
  font-style: normal;
  color: #32F08C;
}

.pauth-lead {
  margin: 0;
  font-size: 14px;
  line-height: 1.85;
  color: rgba(255, 255, 255, 0.8);
}

.pauth-features {
  list-style: none;
  margin: 26px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.pauth-feature {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.pauth-feature-icon {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.13);
  color: #ffffff;
}

.pauth-feature strong {
  display: block;
  margin-bottom: 2px;
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
}

.pauth-feature span {
  display: block;
  font-size: 12px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.68);
}

.pauth-promo {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.pauth-promo-tag {
  flex: 0 0 auto;
  padding: 3px 7px;
  margin-top: 1px;
  background: #32F08C;
  color: #171717;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.pauth-promo strong {
  display: block;
  margin-bottom: 2px;
  font-size: 12px;
  font-weight: 600;
  color: #ffffff;
}

.pauth-promo p {
  margin: 0;
  font-size: 11px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.68);
}

/* ===== 弹窗右侧：登录 / 注册 ===== */
.pauth-main {
  flex: 1 1 auto;
  min-height: 720px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 46px 58px;
  background:
    radial-gradient(circle at 100% 0, rgba(75, 63, 227, 0.05) 0%, transparent 38%),
    radial-gradient(circle at 0 100%, rgba(50, 240, 140, 0.07) 0%, transparent 34%),
    #ffffff;
}

.pauth-card {
  width: 100%;
  max-width: 430px;
}

.pauth-mobile-brand {
  display: none;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
}

.pauth-mobile-logo {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #4B3FE3 0%, #6366f1 55%, #32F08C 100%);
}

.pauth-mobile-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.pauth-mobile-name {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: #171717;
}

.pauth-mobile-name span { color: #4B3FE3; }

.pauth-mobile-brand-full {
  max-height: 40px;
  max-width: 220px;
  object-fit: contain;
}

.pauth-head { margin-bottom: 22px; }

.pauth-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: #9a97b5;
  text-transform: uppercase;
}

.pauth-kicker::before {
  content: '';
  width: 22px;
  height: 2px;
  background: linear-gradient(90deg, #4B3FE3, #32F08C);
}

.pauth-title {
  margin: 0 0 8px;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.6px;
  color: #171717;
}

.pauth-desc {
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
  color: #8b8b9b;
}

.pauth-tabs {
  display: flex;
  gap: 26px;
  margin-bottom: 22px;
  border-bottom: 1px solid #ececf3;
}

.pauth-tab {
  position: relative;
  padding: 0 0 11px;
  border: none;
  background: none;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  color: #9a9aac;
  cursor: pointer;
  transition: color 0.18s;
}

.pauth-tab:hover { color: #4B3FE3; }

.pauth-tab.is-active {
  color: #4B3FE3;
  font-weight: 600;
}

.pauth-tab.is-active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: #4B3FE3;
}

.pauth-panel { display: none; }

.pauth-panel.is-active {
  display: block;
  animation: pauth-fade 0.26s ease;
}

@keyframes pauth-fade {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.pauth-field {
  position: relative;
  margin-bottom: 14px;
}

.pauth-field .form-control {
  height: 48px;
  padding-left: 43px;
  font-size: 14px;
  border: 1px solid #e6e6ef;
  border-radius: 7px;
  background: #fafafd;
}

.pauth-field .form-control:focus {
  background: #ffffff;
  border-color: #4B3FE3;
  box-shadow: 0 0 0 3px rgba(75, 63, 227, 0.09);
}

.pauth-field-icon {
  position: absolute;
  top: 50%;
  left: 15px;
  transform: translateY(-50%);
  display: flex;
  color: #9a9aac;
  pointer-events: none;
}

.pauth-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
}

.pauth-captcha-row {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin-bottom: 16px;
}

.pauth-captcha-row .pauth-field {
  flex: 1;
  min-width: 0;
  margin-bottom: 0;
}

.pauth-captcha-img {
  width: 116px;
  height: 48px;
  flex: 0 0 116px;
  display: block;
  object-fit: cover;
  border: 1px solid #e6e6ef;
  border-radius: 7px;
  background: #f7f7fb;
  cursor: pointer;
}

.pauth-submit {
  width: 100%;
  height: 50px;
  border: none;
  border-radius: 7px;
  background: #32F08C;
  color: #171717;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: background 0.18s, box-shadow 0.18s, transform 0.18s;
}

.pauth-submit:hover {
  background: #26d17a;
  box-shadow: 0 8px 22px rgba(50, 240, 140, 0.26);
}

.pauth-submit:active { transform: translateY(1px); }

.pauth-submit:disabled {
  background: #a7f3d0;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.pauth-submit .spinner-sm {
  border-color: rgba(23, 23, 23, 0.25);
  border-top-color: #171717;
}

.pauth-switch {
  margin-top: 15px;
  font-size: 12.5px;
  color: #9a9aac;
  text-align: center;
}

.pauth-link {
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  font-weight: 500;
  color: #4B3FE3;
  cursor: pointer;
}

.pauth-link:hover { text-decoration: underline; }

.pauth-switch .pauth-link { margin-left: 2px; }

.pauth-divider {
  height: 1px;
  margin: 22px 0 14px;
  background: #f0f0f5;
}

.pauth-footer {
  font-size: 12px;
  line-height: 1.7;
  color: #a3a3b3;
  text-align: center;
}

/* ===== 自适应 ===== */
@media (max-width: 1024px) {
  .pauth-visual {
    flex-basis: 42%;
    padding: 34px 32px;
  }

  .pauth-headline { font-size: 32px; }

  .pauth-main {
    min-height: 680px;
    padding: 38px 36px;
  }
}

@media (max-width: 900px) {
  .auth-page.pauth-page { padding: 24px 16px; }

  .pauth-modal {
    width: 100%;
    max-width: 470px;
    flex-direction: column;
  }

  .pauth-visual { display: none; }

  .pauth-main {
    min-height: 0;
    display: block;
    padding: 30px 28px 34px;
  }

  .pauth-mobile-brand { display: flex; }

  .pauth-card { max-width: 100%; }
}

@media (max-width: 480px) {
  .auth-page.pauth-page { padding: 16px 12px; }

  .pauth-modal { border-radius: 8px; }

  .pauth-main { padding: 26px 20px 30px; }

  .pauth-title { font-size: 24px; }

  .pauth-captcha-img {
    width: 104px;
    flex-basis: 104px;
  }

  .pauth-grid-2 { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .pauth-page,
  .pauth-page::before,
  .pauth-page::after,
  .pauth-page-glow,
  .pauth-page-grid,
  .pauth-page-orb,
  .pauth-particle,
  .pauth-orb,
  .pauth-modal,
  .pauth-panel.is-active {
    animation: none !important;
  }
}
