/* ==========================================================================
   维盾 VProtector — 登录 / 注册页
   ========================================================================== */

.auth-page {
  min-height: 100vh;
  background:
    radial-gradient(1000px 650px at 86% -18%, rgba(184, 246, 94, 0.1), transparent 62%),
    radial-gradient(720px 580px at -8% 88%, rgba(184, 246, 94, 0.045), transparent 66%),
    var(--bg);
}

.auth-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ---------- 顶部 ---------- */
.auth-header {
  position: sticky;
  top: 0;
  z-index: 80;
  border-bottom: 1px solid var(--line);
  background: rgba(6, 9, 6, 0.82);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.auth-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
}

.auth-top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted-2);
  font-size: 12px;
}

.auth-top-actions a {
  color: var(--text-soft);
  transition: color 0.2s ease;
}

.auth-top-actions a:hover {
  color: var(--lime);
}

.auth-top-actions .auth-back {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.auth-top-actions .auth-switch-link {
  color: var(--lime);
  font-weight: 600;
}

/* ---------- 主体 ---------- */
.auth-main {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  padding: 58px 0 70px;
}

.auth-main::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(184, 246, 94, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(184, 246, 94, 0.045) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 78% 72% at 50% 30%, #000, transparent 76%);
  mask-image: radial-gradient(ellipse 78% 72% at 50% 30%, #000, transparent 76%);
  pointer-events: none;
}

.auth-main::after {
  content: "";
  position: absolute;
  width: 640px;
  height: 640px;
  right: 0;
  bottom: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(184, 246, 94, 0.08), transparent 64%);
  filter: blur(30px);
  pointer-events: none;
}

.auth-layout {
  position: relative;
  z-index: 1;
  width: min(calc(100% - 48px), 1100px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 460px;
  align-items: center;
  gap: 84px;
}

/* ---------- 左侧信息 ---------- */
.auth-info {
  animation: authRise 0.8s var(--ease) both;
}

@keyframes authRise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.auth-info .eyebrow {
  margin-bottom: 20px;
}

.auth-info h1 {
  margin-bottom: 20px;
  font-size: clamp(2.3rem, 4vw, 3.35rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.025em;
}

.auth-info h1 span {
  color: var(--lime);
  text-shadow: 0 0 44px rgba(184, 246, 94, 0.22);
}

.auth-info > p:not(.eyebrow) {
  max-width: 500px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.95;
}

.auth-features {
  margin-top: 36px;
  border-top: 1px solid var(--line);
}

.auth-feature {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.auth-feature-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border: 1px solid rgba(184, 246, 94, 0.18);
  border-radius: 8px;
  background: rgba(184, 246, 94, 0.045);
  color: var(--lime);
}

.auth-feature-icon svg {
  width: 16px;
  height: 16px;
}

.auth-feature h3 {
  margin-bottom: 3px;
  color: var(--text-soft);
  font-size: 12.5px;
  font-weight: 600;
}

.auth-feature p {
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.75;
}

/* ---------- 表单卡片 ---------- */
.auth-card {
  position: relative;
  padding: 30px;
  border: 1px solid rgba(184, 246, 94, 0.16);
  border-radius: 18px;
  background: linear-gradient(165deg, rgba(18, 24, 17, 0.94), rgba(8, 11, 8, 0.97));
  box-shadow: 0 44px 100px -54px rgba(0, 0, 0, 0.98),
    0 0 80px -48px rgba(184, 246, 94, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  animation: authRise 0.8s var(--ease) 0.1s both;
}

.auth-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 24px;
  right: 24px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(184, 246, 94, 0.45), transparent);
  opacity: 0.7;
}

.auth-card-head {
  margin-bottom: 24px;
}

.auth-kicker {
  display: block;
  margin-bottom: 10px;
  color: var(--lime);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.18em;
}

.auth-card-title {
  margin-bottom: 7px;
  font-size: 24px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

.auth-card-sub {
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.75;
}

/* ---------- 登录方式切换 ---------- */
.auth-mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin: -2px 0 22px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 9px;
  background: #070a07;
}

.auth-mode-btn {
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.auth-mode-btn:hover {
  color: var(--text-soft);
}

.auth-mode-btn.is-active {
  border-color: rgba(184, 246, 94, 0.2);
  background: rgba(184, 246, 94, 0.08);
  color: var(--lime);
}

.auth-code-row {
  display: flex;
  gap: 8px;
}

.auth-code-row .input-shell {
  flex: 1;
  min-width: 0;
}

.auth-code-send {
  flex-shrink: 0;
  height: 46px;
  padding: 0 14px;
  font-size: 11.5px;
}

.auth-code-send[disabled] {
  opacity: 0.55;
  cursor: wait;
}

.auth-form {
  display: grid;
  gap: 15px;
}

/* ---------- 表单字段 ---------- */
.form-field {
  min-width: 0;
}

.form-field > label:not(.check),
.field-label {
  display: block;
  margin-bottom: 7px;
  color: var(--text-soft);
  font-size: 11px;
  letter-spacing: 0.02em;
}

.input-shell {
  position: relative;
  display: flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  background: #080b08;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-shell:focus-within {
  border-color: rgba(184, 246, 94, 0.5);
  box-shadow: 0 0 0 3px rgba(184, 246, 94, 0.06);
}

.input-icon {
  position: absolute;
  left: 12px;
  width: 15px;
  height: 15px;
  color: var(--muted-2);
  pointer-events: none;
  transition: color 0.2s ease;
}

.input-shell:focus-within .input-icon {
  color: var(--lime);
}

.input-shell input {
  width: 100%;
  height: 46px;
  padding: 0 14px 0 37px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-family: var(--sans);
  font-size: 13px;
}

.input-shell input::placeholder {
  color: var(--muted-2);
}

.input-shell input[type="password"] {
  padding-right: 54px;
}

.input-toggle {
  position: absolute;
  right: 7px;
  padding: 5px 7px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 10.5px;
  cursor: pointer;
  transition: color 0.2s ease;
}

.input-toggle:hover {
  color: var(--lime);
}

.field-error {
  display: none;
  margin-top: 5px;
  color: #ff9a86;
  font-size: 10.5px;
  line-height: 1.6;
}

.field-error.is-visible {
  display: block;
}

.form-field.has-error .input-shell {
  border-color: rgba(255, 130, 105, 0.5);
  box-shadow: 0 0 0 3px rgba(255, 120, 100, 0.05);
}

.form-field.has-error .field-error {
  display: block;
}

.field-hint {
  margin-top: 5px;
  color: var(--muted-2);
  font-size: 9.5px;
  line-height: 1.6;
}

/* ---------- 记住我 / 忘记密码 ---------- */
.form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: -2px;
}

.check {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.65;
  cursor: pointer;
}

.check input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.check-box {
  position: relative;
  display: inline-block;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 1px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.02);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.check input:checked + .check-box {
  border-color: var(--lime);
  background: var(--lime);
}

.check input:checked + .check-box::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 5px;
  width: 4px;
  height: 8px;
  border: solid #0a0e07;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.check input:focus-visible + .check-box {
  outline: 2px solid var(--lime);
  outline-offset: 2px;
}

.check a {
  color: var(--lime);
  border-bottom: 1px solid rgba(184, 246, 94, 0.25);
}

.check a:hover {
  color: var(--lime-soft);
}

.check-text a {
  white-space: nowrap;
}

.check-compact {
  align-items: center;
}

.check-compact .check-box {
  margin-top: 0;
}

.auth-link-btn {
  padding: 0;
  border: 0;
  background: none;
  color: var(--lime);
  font-family: var(--sans);
  font-size: 11px;
  cursor: pointer;
  transition: color 0.2s ease;
}

.auth-link-btn:hover {
  color: var(--lime-soft);
}

/* ---------- 密码强度 ---------- */
.strength {
  display: none;
  align-items: center;
  gap: 9px;
  margin-top: 8px;
}

.strength.is-visible {
  display: flex;
}

.strength-bar {
  height: 4px;
  flex: 1;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
}

.strength-bar i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: #ff8a7a;
  transition: width 0.3s ease, background 0.3s ease;
}

.strength[data-level="medium"] .strength-bar i {
  background: #e4c66d;
}

.strength[data-level="strong"] .strength-bar i {
  background: var(--lime);
}

.strength-label {
  min-width: 30px;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 9px;
  text-align: right;
}

/* ---------- 滑块验证 ---------- */
.captcha-track {
  position: relative;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  overflow: hidden;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.captcha-fill {
  position: absolute;
  z-index: 0;
  top: 0;
  bottom: 0;
  left: 0;
  width: 0;
  background: rgba(184, 246, 94, 0.1);
  border-right: 1px solid rgba(184, 246, 94, 0.24);
  transition: width 0.18s ease;
}

.captcha-track.is-dragging .captcha-fill {
  transition: none;
}

.captcha-target {
  position: absolute;
  z-index: 1;
  top: 4px;
  bottom: 4px;
  left: 0;
  width: 26px;
  border: 1px dashed rgba(184, 246, 94, 0.55);
  border-radius: 5px;
  background: rgba(184, 246, 94, 0.08);
  opacity: 0;
  pointer-events: none;
  transition: left 0.2s ease, width 0.2s ease, opacity 0.2s ease;
}

.captcha-label {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 12px 0 52px;
  color: var(--muted-2);
  font-size: 10.5px;
  letter-spacing: 0.02em;
  text-align: left;
  pointer-events: none;
}

.captcha-handle {
  position: absolute;
  top: 3px;
  left: 3px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 40px;
  height: 38px;
  border: 1px solid rgba(184, 246, 94, 0.32);
  border-radius: 6px;
  background: var(--lime);
  color: #0a0e07;
  cursor: grab;
  touch-action: none;
  transition: left 0.18s ease, background 0.2s ease, border-color 0.2s ease;
}

.captcha-handle:active {
  cursor: grabbing;
}

.captcha-handle.is-dragging {
  transition: none;
}

.captcha-handle:focus-visible {
  outline: 2px solid var(--lime-soft);
  outline-offset: 2px;
}

.captcha-handle svg {
  width: 16px;
  height: 16px;
  pointer-events: none;
}

.captcha-track.is-verified {
  border-color: rgba(184, 246, 94, 0.42);
  background: rgba(184, 246, 94, 0.04);
}

.captcha-track.is-verified .captcha-fill {
  background: rgba(184, 246, 94, 0.08);
  border-right-color: transparent;
}

.captcha-track.is-verified .captcha-label {
  color: var(--lime);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.captcha-track.is-verified .captcha-handle {
  border-color: rgba(184, 246, 94, 0.5);
  background: rgba(184, 246, 94, 0.16);
  color: var(--lime);
  cursor: default;
}

.captcha-track.is-verified .captcha-target {
  opacity: 0 !important;
}

.captcha-track.is-loading .captcha-handle {
  opacity: 0.55;
  cursor: wait;
  pointer-events: none;
}

.captcha-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 6px;
}

.captcha-note {
  margin-top: 6px;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.02em;
  line-height: 1.6;
}

.captcha-meta .captcha-note {
  margin-top: 0;
}

.captcha-retry {
  padding: 0;
  border: 0;
  background: none;
  color: var(--lime);
  font-family: var(--sans);
  font-size: 9.5px;
  white-space: nowrap;
  cursor: pointer;
}

.captcha-retry:hover {
  color: var(--lime-soft);
}

.captcha-retry[hidden] {
  display: none;
}

/* ---------- 提示与按钮 ---------- */
.form-alert {
  display: none;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(184, 246, 94, 0.03);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}

.form-alert.is-visible {
  display: block;
}

.form-alert.is-error {
  border-color: rgba(255, 130, 105, 0.28);
  background: rgba(255, 110, 90, 0.05);
  color: #ffb3a3;
}

.form-alert.is-success {
  border-color: rgba(184, 246, 94, 0.28);
  background: rgba(184, 246, 94, 0.05);
  color: var(--lime-soft);
}

.auth-submit {
  width: 100%;
  justify-content: center;
  margin-top: 2px;
  padding: 13px 18px;
  font-size: 13.5px;
}

.auth-submit[disabled] {
  opacity: 0.65;
  cursor: wait;
  transform: none;
}

.auth-switch {
  margin-top: 18px;
  padding-top: 17px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-size: 11.5px;
  text-align: center;
}

.auth-switch a {
  margin-left: 4px;
  color: var(--lime);
  font-weight: 600;
}

.auth-switch a:hover {
  color: var(--lime-soft);
}

.auth-note {
  margin-top: 14px;
  color: var(--muted-2);
  font-size: 9.5px;
  line-height: 1.75;
  text-align: center;
}

/* ---------- 页脚 ---------- */
.auth-footer {
  border-top: 1px solid var(--line);
  background: rgba(6, 9, 6, 0.6);
}

.auth-footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 20px 0;
  color: var(--muted-2);
  font-size: 10px;
}

.auth-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.auth-footer a {
  transition: color 0.2s ease;
}

.auth-footer a:hover {
  color: var(--lime);
}

/* ---------- 响应式 ---------- */
@media (max-width: 1080px) {
  .auth-layout {
    grid-template-columns: minmax(0, 1fr) 430px;
    gap: 52px;
  }

  .auth-info h1 {
    font-size: clamp(2.2rem, 3.8vw, 3rem);
  }
}

@media (max-width: 900px) {
  .auth-main {
    padding: 38px 0 52px;
    align-items: flex-start;
  }

  .auth-layout {
    grid-template-columns: 1fr;
    width: min(calc(100% - 36px), 520px);
    gap: 40px;
  }

  .auth-card {
    order: 1;
  }

  .auth-info {
    display: none;
  }
}

@media (max-width: 680px) {
  .auth-header-inner {
    min-height: 64px;
  }

  .auth-header .brand-mark {
    width: 30px;
    height: 30px;
  }

  .auth-header .brand-cn {
    font-size: 17px;
  }

  .auth-top-actions {
    gap: 10px;
    font-size: 11px;
  }

  .auth-top-actions > span {
    display: none;
  }

  .auth-main {
    padding: 24px 0 42px;
  }

  .auth-layout {
    width: calc(100% - 32px);
    gap: 32px;
  }

  .auth-card {
    padding: 22px 18px;
    border-radius: 14px;
  }

  .auth-card-title {
    font-size: 21px;
  }

  .auth-form {
    gap: 13px;
  }

  .auth-footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .form-row {
    flex-wrap: wrap;
    gap: 6px 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-info,
  .auth-card {
    animation: none;
  }
}

/* ---------- 找回密码 ---------- */
.auth-form[hidden],
.auth-success[hidden] {
  display: none;
}

.auth-steps {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: -4px 0 18px;
}

.auth-step-dot {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  background: #080b08;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
}

.auth-step-dot.is-active {
  border-color: var(--lime);
  background: rgba(184, 246, 94, 0.12);
  color: var(--lime);
  box-shadow: 0 0 0 3px rgba(184, 246, 94, 0.06);
}

.auth-step-dot.is-done {
  border-color: rgba(184, 246, 94, 0.45);
  background: rgba(184, 246, 94, 0.16);
  color: var(--lime);
}

.auth-step-line {
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
}

.auth-sent-line {
  margin-bottom: -2px;
  padding: 9px 11px;
  border: 1px solid rgba(184, 246, 94, 0.16);
  border-radius: 7px;
  background: rgba(184, 246, 94, 0.035);
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.7;
}

.auth-sent-line strong {
  color: var(--text-soft);
  font-weight: 600;
}

.auth-inline-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: -2px;
}

a.auth-link-btn {
  text-decoration: none;
}

.auth-link-btn[disabled] {
  color: var(--muted-2);
  cursor: not-allowed;
}

.code-shell input {
  padding-left: 14px;
  padding-right: 14px;
  font-family: var(--font-mono);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.32em;
  text-align: center;
}

.code-shell input::placeholder {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0;
}

.auth-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 0 4px;
  text-align: center;
}

.auth-success-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin-bottom: 14px;
  border: 1px solid rgba(184, 246, 94, 0.3);
  border-radius: 50%;
  background: rgba(184, 246, 94, 0.07);
  color: var(--lime);
}

.auth-success-icon svg {
  width: 28px;
  height: 28px;
}

.auth-success h3 {
  margin-bottom: 7px;
  color: var(--text-soft);
  font-size: 17px;
  font-weight: 700;
}

.auth-success p {
  max-width: 300px;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.8;
}

.auth-success .auth-submit {
  text-decoration: none;
}
