:root {
  color-scheme: dark;
  --bg: #070b11;
  --panel: rgba(16, 24, 36, 0.78);
  --border: rgba(125, 168, 214, 0.22);
  --text: #eef4fb;
  --muted: #93a6bb;
  --blue: #4da3ff;
  --mint: #3ddc84;
  --danger: #ff7b7b;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: Inter, "Segoe UI", ui-sans-serif, system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
}

.stage {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(77, 163, 255, 0.18), transparent 55%),
    radial-gradient(900px 500px at 110% 10%, rgba(61, 220, 132, 0.12), transparent 50%),
    #070b11;
}

.grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(148, 176, 204, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 176, 204, 0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at 50% 40%, #000 35%, transparent 78%);
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.7;
  animation: drift 16s ease-in-out infinite;
}

.orb-a { width: 340px; height: 340px; left: 8%; top: 12%; background: #1d4e86; }
.orb-b { width: 280px; height: 280px; right: 6%; bottom: 8%; background: #18563a; animation-delay: -6s; }
.orb-c { width: 180px; height: 180px; left: 42%; bottom: 18%; background: #31486c; animation-delay: -11s; }

.scan {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(77, 163, 255, 0.05), transparent);
  background-size: 100% 220%;
  animation: scan 9s linear infinite;
}

.wave {
  position: absolute;
  left: 50%;
  bottom: 7%;
  display: flex;
  gap: 7px;
  align-items: flex-end;
  height: 54px;
  transform: translateX(-50%);
  opacity: 0.55;
}

.wave span {
  width: 5px;
  border-radius: 99px;
  background: linear-gradient(#7ec8ff, #3ddc84);
  animation: bar 1.4s ease-in-out infinite;
}

.wave span:nth-child(1) { height: 14px; animation-delay: 0s; }
.wave span:nth-child(2) { height: 28px; animation-delay: .1s; }
.wave span:nth-child(3) { height: 42px; animation-delay: .2s; }
.wave span:nth-child(4) { height: 22px; animation-delay: .3s; }
.wave span:nth-child(5) { height: 48px; animation-delay: .15s; }
.wave span:nth-child(6) { height: 18px; animation-delay: .25s; }
.wave span:nth-child(7) { height: 36px; animation-delay: .05s; }
.wave span:nth-child(8) { height: 26px; animation-delay: .35s; }
.wave span:nth-child(9) { height: 44px; animation-delay: .12s; }
.wave span:nth-child(10) { height: 16px; animation-delay: .22s; }
.wave span:nth-child(11) { height: 32px; animation-delay: .08s; }
.wave span:nth-child(12) { height: 20px; animation-delay: .3s; }

.shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px 16px 72px;
  position: relative;
  z-index: 1;
}

.card {
  width: min(440px, 100%);
  padding: 32px 30px 22px;
  border-radius: 24px;
  border: 1px solid var(--border);
  background: var(--panel);
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(22px);
}

.brand {
  display: flex;
  gap: 14px;
  align-items: center;
}

.mark svg { display: block; width: 48px; height: 48px; }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 4px;
  color: var(--mint);
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 0 rgba(61, 220, 132, 0.7);
  animation: pulse 1.8s infinite;
}

h1 {
  margin: 0;
  font-size: 1.7rem;
  letter-spacing: -0.03em;
}

.lede {
  margin: 18px 0 22px;
  color: var(--muted);
  line-height: 1.5;
}

form { display: grid; gap: 14px; }

label { display: grid; gap: 7px; }

label span {
  color: #c5d4e4;
  font-size: 0.86rem;
}

input {
  width: 100%;
  border: 1px solid var(--border);
  background: rgba(8, 13, 20, 0.75);
  color: var(--text);
  border-radius: 12px;
  padding: 12px 14px;
  outline: none;
  font-size: 1rem;
}

input:focus {
  border-color: rgba(77, 163, 255, 0.8);
  box-shadow: 0 0 0 4px rgba(77, 163, 255, 0.14);
}

.secret { position: relative; }

.secret input { padding-right: 72px; }

.secret button {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  padding: 6px 8px;
  font-size: 0.8rem;
}

.secret button:hover { color: var(--text); }

.primary {
  margin-top: 4px;
  border: 0;
  border-radius: 12px;
  padding: 13px 16px;
  background: linear-gradient(135deg, #6bb6ff, #3ddc84);
  color: #041018;
  font-weight: 700;
  cursor: pointer;
  font-size: 0.98rem;
}

.primary:hover { filter: brightness(1.05); }
.primary:disabled { opacity: 0.65; cursor: wait; }

.error {
  margin: 0;
  color: var(--danger);
  font-size: 0.88rem;
}

.card.shake { animation: shake 0.36s ease; }

footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  color: #7f93a8;
  font-size: 0.75rem;
}

@keyframes drift {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(24px, -18px, 0) scale(1.08); }
}

@keyframes scan {
  0% { background-position: 0 -40%; }
  100% { background-position: 0 140%; }
}

@keyframes bar {
  0%, 100% { transform: scaleY(0.45); }
  50% { transform: scaleY(1); }
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(61, 220, 132, 0.65); }
  70% { box-shadow: 0 0 0 10px rgba(61, 220, 132, 0); }
  100% { box-shadow: 0 0 0 0 rgba(61, 220, 132, 0); }
}

@keyframes shake {
  25% { transform: translateX(-5px); }
  50% { transform: translateX(5px); }
  75% { transform: translateX(-3px); }
}

@media (prefers-reduced-motion: reduce) {
  .orb, .scan, .wave span, .pulse { animation: none; }
}

@media (max-width: 560px) {
  body { overflow: auto; }
  .card { padding: 26px 20px 18px; }
  footer { flex-direction: column; }
}
