/* === 认证页面通用样式 === */

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg);
  padding: 20px;
}

.login-auth-page {
  --cursor-x: 50vw;
  --cursor-y: 50vh;
  --cursor-dx: 0px;
  --cursor-dy: 0px;
  --tilt-x: 0deg;
  --tilt-y: 0deg;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at var(--cursor-x) var(--cursor-y), rgba(45, 212, 191, 0.28), transparent 190px),
    radial-gradient(circle at var(--cursor-x) var(--cursor-y), rgba(59, 130, 246, 0.16), transparent 390px),
    radial-gradient(circle at 24% 14%, rgba(37, 99, 235, 0.18), transparent 34vw),
    radial-gradient(circle at 76% 84%, rgba(16, 185, 129, 0.16), transparent 32vw),
    linear-gradient(135deg, #040b16 0%, #071422 52%, #050d19 100%);
  color: #e5eefb;
}

.login-auth-page::before,
.login-auth-page::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.login-auth-page::before {
  z-index: -3;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.045) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: radial-gradient(circle at center, #000 0%, transparent 78%);
}

.login-auth-page::after {
  z-index: -1;
  background:
    radial-gradient(circle at var(--cursor-x) var(--cursor-y), rgba(45, 212, 191, 0.08) 0, transparent 290px),
    radial-gradient(circle at 50% 56%, rgba(8, 21, 35, 0.1), rgba(8, 21, 35, 0.68) 58%, rgba(5, 12, 24, 0.96) 100%),
    linear-gradient(90deg, rgba(8, 21, 35, 0.78), transparent 34%, transparent 66%, rgba(8, 21, 35, 0.78));
}

.login-data-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
}

.login-terrain-shell {
  position: absolute;
  inset: 0;
}

.login-terrain-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.terrain-radar {
  position: absolute;
  left: var(--cursor-x);
  top: var(--cursor-y);
  width: 360px;
  height: 360px;
  border: 1px solid rgba(45, 212, 191, 0.22);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(45, 212, 191, 0.14), transparent 58%),
    conic-gradient(from 90deg, transparent 0deg, rgba(96, 165, 250, 0.18) 36deg, transparent 78deg);
  transform: translate(-50%, -50%);
  opacity: 0.95;
  mix-blend-mode: screen;
  animation: terrainRadar 3.2s linear infinite;
}

.terrain-scanline {
  position: absolute;
  left: -20%;
  top: 58%;
  width: 140%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(96, 165, 250, 0.1), rgba(45, 212, 191, 0.62), transparent);
  transform: rotate(-8deg);
  animation: terrainScan 5.5s ease-in-out infinite;
}

.login-signal-labels span {
  position: absolute;
  color: rgba(148, 197, 255, 0.14);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transform: translate3d(var(--cursor-dx), var(--cursor-dy), 0);
  animation: loginParticle 9s ease-in-out infinite;
}

.login-signal-labels span:nth-child(1) { left: 12%; top: 18%; animation-delay: -0.4s; }
.login-signal-labels span:nth-child(2) { right: 12%; top: 21%; animation-delay: -1.1s; }
.login-signal-labels span:nth-child(3) { left: 16%; bottom: 20%; animation-delay: -1.8s; }
.login-signal-labels span:nth-child(4) { right: 14%; bottom: 18%; animation-delay: -2.5s; }
.login-signal-labels span:nth-child(5) { left: 28%; top: 74%; animation-delay: -3.2s; }
.login-signal-labels span:nth-child(6) { right: 30%; top: 16%; animation-delay: -3.9s; }

.login-console {
  position: relative;
  z-index: 1;
  width: min(100%, 470px);
  perspective: 1200px;
}

.login-identity-node {
  position: relative;
  overflow: hidden;
  padding: 26px 34px 30px;
  border: 0;
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(7, 18, 31, 0.72), rgba(7, 18, 31, 0.42)),
    radial-gradient(circle at 18% 0%, rgba(37, 99, 235, 0.12), transparent 46%),
    radial-gradient(circle at 100% 92%, rgba(16, 185, 129, 0.12), transparent 42%);
  box-shadow:
    0 26px 86px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(14px);
  transform: rotateX(var(--tilt-x)) rotateY(var(--tilt-y));
  transition: transform 120ms ease-out, background 180ms ease;
}

.login-identity-node::before,
.login-identity-node::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.login-identity-node::before {
  background:
    linear-gradient(90deg, rgba(96, 165, 250, 0), rgba(45, 212, 191, 0.28), rgba(96, 165, 250, 0)),
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 100% 1px, 100% 30px;
  opacity: 0.55;
}

.login-identity-node::after {
  border-radius: inherit;
  background:
    linear-gradient(90deg, rgba(96, 165, 250, 0.14), transparent 26%, transparent 74%, rgba(52, 211, 153, 0.12)),
    radial-gradient(circle at 50% 50%, rgba(59, 130, 246, 0.1), transparent 180px);
  mix-blend-mode: screen;
}

.login-node-rim {
  position: absolute;
  left: 0;
  top: 22px;
  bottom: 22px;
  width: 3px;
  border: 0;
  border-radius: 0;
  background: linear-gradient(#60a5fa, #34d399);
  opacity: 0.9;
  pointer-events: none;
}

.login-node-header {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.login-brand-mark {
  position: relative;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(96, 165, 250, 0.2);
  border-radius: 12px;
  background: rgba(15, 31, 51, 0.38);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 0 22px rgba(45, 212, 191, 0.1);
}

.login-brand-mark span {
  position: absolute;
  width: 21px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, #60a5fa, #34d399);
}

.login-brand-mark span:nth-child(1) {
  transform: translateY(-8px) rotate(-18deg);
}

.login-brand-mark span:nth-child(2) {
  width: 26px;
  transform: rotate(-18deg);
}

.login-brand-mark span:nth-child(3) {
  transform: translateY(8px) rotate(-18deg);
}

.login-brand-title {
  color: #f8fbff;
  font-size: 26px;
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.login-brand-subtitle {
  margin-top: 6px;
  color: rgba(203, 213, 225, 0.62);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.login-node-status {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  padding: 7px 10px;
  margin-bottom: 20px;
  border: 1px solid rgba(148, 197, 255, 0.1);
  border-radius: 8px;
  background: rgba(15, 31, 51, 0.26);
  color: rgba(226, 237, 249, 0.64);
  font-size: 12px;
  font-weight: 600;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #34d399;
  box-shadow: 0 0 14px rgba(52, 211, 153, 0.9);
}

.status-divider {
  width: 1px;
  height: 14px;
  background: rgba(148, 163, 184, 0.24);
}

.login-node-form {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.login-auth-page .input-label {
  color: rgba(203, 213, 225, 0.78);
  font-size: 12px;
  font-weight: 800;
}

.login-auth-page .input-wrapper {
  border-color: rgba(148, 197, 255, 0.18);
  background: rgba(5, 15, 29, 0.5);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.login-auth-page .input-wrapper:focus-within {
  border-color: rgba(45, 212, 191, 0.82);
  box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.1), 0 0 24px rgba(37, 99, 235, 0.1);
}

.login-auth-page .input-control {
  color: #f8fbff;
  background: transparent;
}

.login-auth-page .input-control::placeholder {
  color: rgba(148, 163, 184, 0.48);
}

.login-node-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: -6px;
  font-size: 13px;
}

.login-node-actions a,
.login-node-footer a {
  color: #67e8f9;
  font-weight: 800;
  text-decoration: none;
}

.login-node-actions a:hover,
.login-node-footer a:hover {
  color: #93c5fd;
}

.login-submit {
  height: 46px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(90deg, #2563eb 0%, #0ea5e9 42%, #10b981 100%);
  background-size: 160% 100%;
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.22), 0 0 24px rgba(16, 185, 129, 0.12);
  font-size: 15px;
  font-weight: 900;
  animation: loginButtonFlow 5s ease-in-out infinite;
}

.login-submit:hover:not(:disabled) {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.login-node-footer {
  position: relative;
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid rgba(148, 197, 255, 0.1);
  color: rgba(203, 213, 225, 0.68);
  font-size: 13px;
  font-weight: 700;
}

@keyframes loginOrbit {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes loginStream {
  0%, 100% { opacity: 0.24; clip-path: inset(0 84% 0 0); }
  50% { opacity: 0.92; clip-path: inset(0 0 0 0); }
}

@keyframes loginParticle {
  0%, 100% { transform: translateY(0); opacity: 0.14; }
  50% { transform: translateY(-10px); opacity: 0.38; }
}

@keyframes terrainScan {
  0%, 100% { opacity: 0.12; transform: translateY(80px) rotate(-8deg); }
  50% { opacity: 0.74; transform: translateY(-90px) rotate(-8deg); }
}

@keyframes terrainRadar {
  from { rotate: 0deg; }
  to { rotate: 360deg; }
}

@keyframes loginButtonFlow {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 40px;
}

.auth-header {
  text-align: center;
  margin-bottom: 32px;
}

.auth-logo-img {
  display: block;
  width: min(220px, 78%);
  height: auto;
  max-height: 58px;
  object-fit: contain;
  margin: 0 auto 18px;
}

.auth-title {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-primary);
  margin-bottom: 4px;
}

.auth-desc {
  font-size: var(--font-size-sm);
  color: var(--color-text-tertiary);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-submit {
  width: 100%;
  margin-top: 4px;
}

.auth-inline-action {
  display: flex;
  justify-content: flex-end;
  margin-top: -8px;
  font-size: var(--font-size-sm);
}

.auth-inline-action a {
  color: var(--color-primary);
  font-weight: var(--font-weight-medium);
}

.auth-footer {
  text-align: center;
  margin-top: 24px;
  font-size: var(--font-size-sm);
  color: var(--color-text-tertiary);
}

.auth-footer-links {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.auth-footer a {
  color: var(--color-primary);
  font-weight: var(--font-weight-medium);
}

/* 验证码行 */
.verify-code-row {
  display: flex;
  gap: 8px;
}

.verify-code-row .input-group {
  flex: 1;
}

.send-code-btn {
  height: var(--control-height);
  padding: 0 12px;
  align-self: flex-end;
  white-space: nowrap;
  background: var(--color-white);
  border: 1px solid var(--color-primary);
  color: var(--color-primary);
  border-radius: var(--radius-sm);
  font-size: var(--font-size-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.send-code-btn:hover:not(:disabled) {
  background: var(--color-primary);
  color: white;
}
.send-code-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

@media (max-width: 720px) {
  .login-auth-page {
    padding: 18px;
  }

  .login-identity-node {
    padding: 26px 22px;
    border-radius: 18px;
  }

  .login-metric-node,
  .login-particle-field {
    display: none;
  }

  .login-brand-title {
    font-size: 25px;
  }

  .login-node-status {
    flex-wrap: wrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  .login-orbit,
  .login-stream,
  .login-particle-field span {
    animation: none;
  }
}
