/* ============================================================
   登录 / 注册页（login.html / register.html）
   ============================================================ */

.auth-body { position: relative; min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 32px 20px; }
.auth-canvas { position: fixed; inset: 0; width: 100%; height: 100%; }
.auth-body::after {
  content: ''; position: fixed; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 58% 46% at 50% 40%, rgba(79, 124, 255, 0.16), transparent 70%);
}

.auth-wrap {
  position: relative; z-index: 2;
  width: min(920px, 100%);
  display: grid; grid-template-columns: 1.1fr 1fr;
  border-radius: var(--r-xl); overflow: hidden;
  background: var(--bg-glass); border: 1px solid var(--line-1);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow-2);
  animation: scaleIn 0.55s var(--ease) both;
}

/* 品牌区 */
.auth-brand {
  position: relative; padding: 52px 44px;
  display: flex; flex-direction: column; justify-content: center; gap: 18px;
  background: linear-gradient(160deg, rgba(0, 229, 255, 0.09), rgba(139, 92, 246, 0.12));
  border-right: 1px solid var(--line-1);
  overflow: hidden;
}
.auth-brand::before {
  content: ''; position: absolute; width: 320px; height: 320px; border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 229, 255, 0.22), transparent 68%);
  top: -90px; right: -90px; animation: auroraDrift 12s ease-in-out infinite;
}
.auth-logo { display: flex; align-items: center; gap: 12px; font-size: var(--fs-2xl); font-weight: 800; letter-spacing: 1px; }
.auth-logo .logo-orb {
  width: 44px; height: 44px; border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  background: var(--grad-brand); color: var(--tx-on-neon);
  box-shadow: var(--glow-brand);
}
.auth-slogan { font-size: var(--fs-xl); font-weight: 700; line-height: 1.5; margin-top: 10px; }
.auth-desc { color: var(--tx-2); line-height: 1.9; font-size: var(--fs-sm); }
.auth-points { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.auth-points li { display: flex; align-items: center; gap: 10px; color: var(--tx-2); font-size: var(--fs-sm); }
.auth-points .i { color: var(--neon-green); width: 16px; height: 16px; }
.auth-ver { margin-top: auto; color: var(--tx-3); font-size: var(--fs-xs); letter-spacing: 1px; }

/* 表单区 */
.auth-panel { padding: 52px 44px; display: flex; flex-direction: column; justify-content: center; }
.auth-panel h1 { font-size: var(--fs-2xl); margin-bottom: 8px; }
.auth-panel .auth-tip { color: var(--tx-3); font-size: var(--fs-sm); margin-bottom: 20px; }
.auth-mode-switch { display: flex; gap: 8px; margin-bottom: 20px; }
.auth-mode { flex: 1; padding: 8px 10px; font-size: var(--fs-sm); }
.auth-mode.active { color: var(--tx-on-neon); background: var(--grad-brand); }
.auth-form { display: flex; flex-direction: column; }
.code-input-group { display: flex; align-items: center; }
.code-input-group .input { min-width: 0; }
.code-send { flex: 0 0 auto; white-space: nowrap; padding: 7px 10px; font-size: var(--fs-xs); }
.field-label-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.text-button, .terms-link { border: 0; background: transparent; color: var(--neon-cyan); cursor: pointer; padding: 0; font: inherit; }
.text-button { font-size: var(--fs-xs); }
.field-hint { color: var(--tx-3); font-size: var(--fs-xs); margin-top: 6px; }
.terms-check { display: flex; align-items: flex-start; gap: 9px; color: var(--tx-3); font-size: var(--fs-xs); line-height: 1.6; margin: 4px 0 12px; }
.terms-check input { accent-color: var(--neon-cyan); margin-top: 3px; }
.terms-link { text-align: left; }
.auth-submit { margin-top: 6px; padding: 12px; font-size: var(--fs-lg); border-radius: var(--r-md); width: 100%; }
.auth-alt { margin-top: 22px; text-align: center; color: var(--tx-3); font-size: var(--fs-sm); }
.auth-back { position: absolute; top: 20px; left: 20px; z-index: 3; }

.btn-loading { pointer-events: none; opacity: 0.85; }
.btn-loading::before {  content: ''; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(4, 18, 26, 0.35); border-top-color: var(--tx-on-neon);
  animation: spin 0.8s linear infinite;
}

@media (max-width: 760px) {
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
  .auth-panel { padding: 42px 28px; }
}

/* ---- 图形验证码 ---- */
.captcha-row { display: flex; gap: 10px; align-items: stretch; }
.captcha-row .input-group { flex: 1; min-width: 0; }
.captcha-img {
  flex: 0 0 auto; width: 126px; height: 42px; border-radius: var(--r-md);
  border: 1px solid var(--line-1); overflow: hidden; cursor: pointer;
  background: #f4f7fb; display: flex; align-items: center; justify-content: center;
  transition: border-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.captcha-img:hover { border-color: var(--line-glow); transform: translateY(-1px); }
.captcha-img svg { width: 100%; height: 100%; display: block; }
.captcha-img .captcha-fail {
  color: #8a5a5a; font-size: 11px; text-align: center; line-height: 1.4; padding: 2px;
}
.captcha-tip { color: var(--tx-3); font-size: var(--fs-xs); margin-top: 6px; }

/* ---- 认证弹窗 / 条款 / 密码重置 ---- */
body.dialog-open { overflow: hidden; }
.auth-dialog-backdrop { position: fixed; z-index: 20; inset: 0; display: grid; place-items: center; padding: 24px; background: rgba(3, 8, 20, 0.72); backdrop-filter: blur(10px); }
.auth-dialog-backdrop[hidden] { display: none; }
.auth-dialog { width: min(620px, 100%); max-height: min(760px, calc(100vh - 48px)); display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line-1); border-radius: var(--r-xl); background: var(--bg-2); box-shadow: var(--shadow-2), var(--glow-brand); animation: scaleIn .25s var(--ease) both; }
.auth-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 24px 26px 16px; border-bottom: 1px solid var(--line-1); }
.auth-dialog-head h2 { font-size: var(--fs-xl); margin-top: 4px; }
.auth-dialog-head .btn-icon { font-size: 24px; color: var(--tx-2); }
.dialog-kicker { color: var(--neon-cyan); font-size: 10px; letter-spacing: 2px; }
.auth-dialog-body { overflow-y: auto; padding: 22px 26px; }
.auth-dialog-body section + section { margin-top: 20px; }
.auth-dialog-body h3 { color: var(--tx-1); font-size: var(--fs-md); margin-bottom: 7px; }
.auth-dialog-body p { color: var(--tx-2); font-size: var(--fs-sm); line-height: 1.8; }
.auth-dialog-actions { display: flex; justify-content: flex-end; padding: 16px 26px 22px; border-top: 1px solid var(--line-1); }
.reset-dialog { width: min(520px, 100%); }
.reset-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 18px 26px 0; }
.reset-steps span { position: relative; color: var(--tx-3); font-size: var(--fs-xs); text-align: center; padding-bottom: 10px; border-bottom: 2px solid var(--line-1); }
.reset-steps span.active { color: var(--neon-cyan); border-color: var(--neon-cyan); }
.reset-intro { margin-bottom: 18px; }
.reset-success { text-align: center; padding-block: 38px; }
.reset-success h3 { font-size: var(--fs-xl); margin: 16px 0 8px; }
.reset-success p { margin-bottom: 24px; }
.success-orb { width: 58px; height: 58px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; color: var(--tx-on-neon); background: var(--neon-green); box-shadow: 0 0 24px rgba(57, 255, 136, .25); }
.success-orb .i { width: 28px; height: 28px; }

@media (max-width: 520px) {
  .auth-dialog-backdrop { padding: 12px; align-items: end; }
  .auth-dialog { max-height: calc(100vh - 24px); border-radius: var(--r-xl) var(--r-xl) 0 0; }
  .auth-dialog-head, .auth-dialog-body { padding-left: 20px; padding-right: 20px; }
  .code-send { padding-inline: 8px; }
}
