:root {
  --bg: #071229;
  --bg-2: #0d1f45;
  --panel: rgba(14, 31, 66, 0.72);
  --line: rgba(111, 155, 255, 0.22);
  --line-strong: rgba(111, 155, 255, 0.5);
  --ink: #eaf1ff;
  --ink-2: #9fb3d9;
  --ink-3: #6b7fa8;
  --accent: #4d7cff;
  --accent-2: #3366f0;
  --lamp: #ffd76e;
  --error: #ff8080;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  color: var(--ink);
  font: 15px/1.5 Inter, system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(ellipse 70% 55% at 50% 22%, rgba(255, 215, 110, 0.07), transparent 60%),
    radial-gradient(ellipse 90% 70% at 50% 25%, var(--bg-2), transparent 70%),
    var(--bg);
  display: grid;
  place-items: center;
  padding: 32px 16px;
  overflow-x: hidden;
}
/* faint pixel grid, a nod to the pixel wordmark */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: radial-gradient(rgba(111, 155, 255, 0.12) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: radial-gradient(ellipse at 50% 35%, #000 10%, transparent 65%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 35%, #000 10%, transparent 65%);
  pointer-events: none;
}
.shell {
  position: relative;
  width: 100%;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  animation: rise .6s cubic-bezier(.2, .8, .2, 1) both;
}
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
.logo {
  width: 132px;
  height: 132px;
  filter: drop-shadow(0 12px 36px rgba(77, 124, 255, 0.35));
}
.name {
  margin: 22px 0 0;
  font: 400 30px/1 Silkscreen, monospace;
  letter-spacing: 0.02em;
  color: var(--ink);
}
.name span { color: var(--lamp); }
.tagline {
  margin: 10px 0 30px;
  font: 400 11px/1 Silkscreen, monospace;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.card {
  width: 100%;
  display: grid;
  gap: 16px;
  padding: 24px;
  text-align: left;
  border-radius: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.field { display: grid; gap: 7px; }
.field > span { font-size: 12.5px; font-weight: 500; color: var(--ink-2); }
.field input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: rgba(7, 18, 41, 0.75);
  color: var(--ink);
  font: inherit;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(77, 124, 255, 0.25); }
.field input[aria-invalid='true'] { border-color: var(--error); }
.pw { position: relative; display: block; }
.pw input { padding-right: 46px; }
.reveal {
  position: absolute; right: 6px; top: 6px; width: 32px; height: 32px;
  display: grid; place-items: center; border: 0; border-radius: 8px;
  background: transparent; color: var(--ink-3); cursor: pointer;
}
.reveal:hover, .reveal[aria-pressed='true'] { color: var(--ink); }
.reveal:focus-visible { outline: 2px solid var(--accent); }
.error { margin: -4px 0 0; font-size: 13px; color: var(--error); }
.submit {
  height: 46px;
  margin-top: 4px;
  border: 0;
  border-radius: 11px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  color: #fff;
  font: 400 14px/1 Silkscreen, monospace;
  letter-spacing: .06em;
  cursor: pointer;
  box-shadow: 0 8px 24px -8px rgba(77, 124, 255, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  transition: transform .12s, filter .15s;
}
.submit:hover { filter: brightness(1.08); }
.submit:active { transform: translateY(1px); }
.submit:focus-visible { outline: 2px solid var(--lamp); outline-offset: 2px; }
.submit[aria-busy='true'] { cursor: progress; filter: saturate(.7); }
.submit[aria-busy='true'] span::after { content: '…'; }
.shake { animation: shake .35s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
@media (prefers-reduced-motion: reduce) { *, *::before { animation: none !important; transition: none !important; } }
