:root {
  color-scheme: dark;
  --bg: #0a0f16;
  --panel: rgba(18, 26, 38, 0.82);
  --border: rgba(96, 165, 250, 0.22);
  --text: #eef4fb;
  --muted: #93a6bb;
  --blue: #60a5fa;
  --orange: #f97316;
  --danger: #ff7b7b;
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

body {
  font-family: "Segoe UI", Inter, 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(96, 165, 250, 0.16), transparent 55%),
    radial-gradient(900px 500px at 110% 10%, rgba(249, 115, 22, 0.12), transparent 50%),
    #0a0f16;
}

.grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(148, 176, 204, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 176, 204, 0.04) 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: #1e3a5f; }
.orb-b { width: 280px; height: 280px; right: 6%; bottom: 8%; background: #7c2d12; animation-delay: -6s; }

.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(#60a5fa, #f97316);
  animation: bar 1.4s ease-in-out infinite;
}

.wave span:nth-child(1) { height: 14px; }
.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; }

.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);
  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(--orange);
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 0 0 rgba(249, 115, 22, 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(96, 165, 250, 0.8);
  box-shadow: 0 0 0 4px rgba(96, 165, 250, 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;
}

.primary {
  margin-top: 4px;
  border: 0;
  border-radius: 12px;
  padding: 13px 16px;
  background: linear-gradient(135deg, #60a5fa, #f97316);
  color: #0f1419;
  font-weight: 700;
  cursor: pointer;
  font-size: 0.98rem;
}

.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 bar {
  0%, 100% { transform: scaleY(0.45); }
  50% { transform: scaleY(1); }
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(249, 115, 22, 0.65); }
  70% { box-shadow: 0 0 0 10px rgba(249, 115, 22, 0); }
  100% { box-shadow: 0 0 0 0 rgba(249, 115, 22, 0); }
}

@keyframes shake {
  25% { transform: translateX(-5px); }
  50% { transform: translateX(5px); }
  75% { transform: translateX(-3px); }
}

@media (max-width: 560px) {
  body { overflow: auto; }
  .card { padding: 26px 20px 18px; }
  footer { flex-direction: column; }
}
