:root {
  --gold: #d4af7a;
  --gold-light: #e8cfa0;
  --gold-deep: #b08d4f;
  --ink: #0b1020;
  --ink-2: #121a30;
  --ink-3: #1a2440;
  --line: rgba(212, 175, 122, 0.22);
  --text: #e9edf5;
  --muted: #8d98ad;
}

body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 24px;
  background:
    linear-gradient(160deg, #080c18 0%, #0b1020 45%, #10162b 100%);
  font-family: "Segoe UI", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  color: var(--text);
  overflow: hidden;
}

.bg-stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  mix-blend-mode: screen;
  will-change: transform;
}

.orb-a {
  width: 480px;
  height: 480px;
  top: -120px;
  right: -100px;
  background: radial-gradient(circle, rgba(212, 175, 122, 0.5), transparent 68%);
  animation: drift-a 14s ease-in-out infinite alternate;
}

.orb-b {
  width: 560px;
  height: 560px;
  bottom: -180px;
  left: -140px;
  background: radial-gradient(circle, rgba(59, 85, 217, 0.6), transparent 70%);
  animation: drift-b 16s ease-in-out infinite alternate;
}

.orb-c {
  width: 320px;
  height: 320px;
  top: 52%;
  left: 48%;
  background: radial-gradient(circle, rgba(180, 83, 230, 0.4), transparent 70%);
  animation: drift-c 18s ease-in-out infinite alternate;
}

.star {
  position: absolute;
  border-radius: 50%;
  background: #fff;
  opacity: 0.4;
  animation: twinkle var(--tw-dur, 4s) ease-in-out infinite;
  animation-delay: var(--tw-delay, 0s);
}

.particle {
  position: absolute;
  bottom: -20px;
  left: var(--p-left, 50%);
  width: var(--p-size, 4px);
  height: var(--p-size, 4px);
  border-radius: 50%;
  background: rgba(232, 207, 160, 0.9);
  box-shadow: 0 0 10px 2px rgba(212, 175, 122, 0.45);
  opacity: 0;
  animation: rise var(--p-dur, 12s) linear infinite;
  animation-delay: var(--p-delay, 0s);
}

.shooting {
  position: absolute;
  top: 8%;
  left: var(--sh-left, 0%);
  width: 180px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(232, 207, 160, 0.95));
  opacity: 0;
  filter: blur(0.4px);
  animation: shoot var(--sh-dur, 9s) ease-in infinite;
  animation-delay: var(--sh-delay, 0s);
}

@keyframes drift-a {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(-80px, 90px, 0) scale(1.15); }
}

@keyframes drift-b {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(70px, -70px, 0) scale(1.12); }
}

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

@keyframes twinkle {
  0%, 100% { opacity: 0.12; }
  50% { opacity: 0.75; }
}

@keyframes rise {
  0% {
    transform: translate3d(0, 0, 0) scale(0.6);
    opacity: 0;
  }
  12% { opacity: 0.8; }
  85% { opacity: 0.35; }
  100% {
    transform: translate3d(var(--p-drift, 40px), -105vh, 0) scale(1.1);
    opacity: 0;
  }
}

@keyframes shoot {
  0% {
    transform: translate3d(0, 0, 0) rotate(-24deg);
    opacity: 0;
  }
  4% { opacity: 1; }
  14% {
    transform: translate3d(72vw, 48vh, 0) rotate(-24deg);
    opacity: 0;
  }
  100% {
    transform: translate3d(72vw, 48vh, 0) rotate(-24deg);
    opacity: 0;
  }
}

.login-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  background: linear-gradient(165deg, rgba(26, 36, 64, 0.9), rgba(13, 18, 35, 0.94));
  backdrop-filter: blur(18px);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(232, 207, 160, 0.08);
}

.login-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-light), transparent);
}

.login-brand {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(212, 175, 122, 0.18), rgba(212, 175, 122, 0.04));
  border: 1px solid var(--line);
  color: var(--gold-light);
  font-size: 1.7rem;
  text-shadow: 0 0 18px rgba(212, 175, 122, 0.45);
}

.login-title {
  letter-spacing: 0.35em;
  text-indent: 0.35em;
  color: var(--text);
}

.login-subtitle {
  letter-spacing: 0.08em;
  color: var(--muted);
}

.form-label {
  color: #c3cad8;
}

.form-control,
.input-group-text {
  background: rgba(9, 14, 28, 0.72);
  border: 1px solid rgba(212, 175, 122, 0.16);
  color: var(--text);
  border-radius: 10px;
}

.form-control::placeholder {
  color: #5c6678;
}

.input-group .form-control {
  border-top-left-radius: 10px;
  border-bottom-left-radius: 10px;
}

.input-group .btn {
  border-top-right-radius: 10px;
  border-bottom-right-radius: 10px;
}

.form-control:focus {
  background: rgba(9, 14, 28, 0.85);
  border-color: var(--gold);
  color: var(--text);
  box-shadow: 0 0 0 0.25rem rgba(212, 175, 122, 0.12);
}

.input-group-text {
  color: var(--gold-light);
}

.input-group > .form-control:not(:last-child),
.input-group > .input-group-text {
  border-right: 0;
}

.captcha-img {
  height: 46px;
  width: 110px;
  border: 1px solid rgba(212, 175, 122, 0.16);
  border-radius: 10px;
  cursor: pointer;
  background: #10182b;
  object-fit: cover;
}

.btn-login {
  background: linear-gradient(135deg, #c9a45f, #a9823f);
  border: 1px solid rgba(232, 207, 160, 0.35);
  color: #17110a;
  font-weight: 700;
  letter-spacing: 0.45em;
  text-indent: 0.45em;
}

.btn-login:hover,
.btn-login:focus {
  background: linear-gradient(135deg, #d4af7a, #b08d4f);
  color: #17110a;
  box-shadow: 0 10px 28px rgba(212, 175, 122, 0.28);
}

.btn-outline-secondary {
  color: var(--gold-light);
  border-color: rgba(212, 175, 122, 0.16);
  background: rgba(9, 14, 28, 0.72);
}

.btn-outline-secondary:hover {
  background: rgba(212, 175, 122, 0.12);
  color: var(--gold-light);
  border-color: rgba(212, 175, 122, 0.35);
}

.form-check-label {
  color: var(--text);
}

.form-check-input {
  background-color: rgba(9, 14, 28, 0.72);
  border-color: rgba(212, 175, 122, 0.3);
}

.form-check-input:checked {
  background-color: var(--gold);
  border-color: var(--gold);
}

.text-link {
  color: var(--gold);
  text-decoration: none;
}

.text-link:hover {
  color: var(--gold-light);
  text-decoration: underline;
}

.login-footer {
  color: var(--muted);
  background: transparent;
  border-top: 1px solid rgba(212, 175, 122, 0.12);
}

.invalid-feedback {
  color: #e58f8f;
}
