:root {
  --bg: #070b16;
  --bg2: #0d1430;
  --ink: #eaf1ff;
  --muted: #8f9bbd;
  --line: rgba(160, 190, 255, .18);
  --card: rgba(16, 24, 52, .55);
  --cyan: #7cf3ff;
  --violet: #7a5cff;
  --pink: #ff5ca8;
  --err: #ff6b81;
  --ok: #4be3a4;
  --radius: 22px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  overflow: hidden;
  background: radial-gradient(1200px 800px at 70% -10%, #1b2560 0%, transparent 60%),
              radial-gradient(900px 700px at -10% 110%, #2a1450 0%, transparent 55%),
              linear-gradient(180deg, var(--bg2), var(--bg));
  color: var(--ink);
  font: 16px/1.45 "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ---------- background ---------- */
#sky { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; }

.aurora { position: fixed; inset: 0; z-index: 0; filter: blur(70px); opacity: .55; pointer-events: none; }
.aurora span { position: absolute; border-radius: 50%; mix-blend-mode: screen; }
.aurora .a1 { width: 46vmax; height: 46vmax; left: -12vmax; top: -14vmax; background: #2d6bff; animation: drift1 22s ease-in-out infinite alternate; }
.aurora .a2 { width: 40vmax; height: 40vmax; right: -14vmax; top: 10vmax; background: #8a3dff; animation: drift2 26s ease-in-out infinite alternate; }
.aurora .a3 { width: 34vmax; height: 34vmax; left: 30vmax; bottom: -20vmax; background: #00c2d9; animation: drift3 30s ease-in-out infinite alternate; }
@keyframes drift1 { to { transform: translate(14vmax, 10vmax) scale(1.15); } }
@keyframes drift2 { to { transform: translate(-12vmax, 8vmax) scale(.9); } }
@keyframes drift3 { to { transform: translate(-10vmax, -12vmax) scale(1.2); } }

.road {
  position: fixed; left: 50%; bottom: 0; width: 220vmax; height: 46vh; z-index: 0;
  transform: translateX(-50%) perspective(420px) rotateX(62deg); transform-origin: bottom;
  background:
    linear-gradient(90deg, transparent 49.4%, rgba(124, 243, 255, .0) 49.4%, rgba(124, 243, 255, .0) 50.6%, transparent 50.6%),
    repeating-linear-gradient(90deg, rgba(122, 92, 255, .14) 0 1px, transparent 1px 90px),
    repeating-linear-gradient(0deg, rgba(124, 243, 255, .10) 0 1px, transparent 1px 90px);
  mask-image: linear-gradient(to top, #000 10%, transparent 95%);
  -webkit-mask-image: linear-gradient(to top, #000 10%, transparent 95%);
  pointer-events: none;
}
.road .lines {
  position: absolute; left: 50%; top: 0; bottom: 0; width: 14px; transform: translateX(-50%);
  background: repeating-linear-gradient(0deg, rgba(124, 243, 255, .75) 0 60px, transparent 60px 140px);
  animation: drive 1.6s linear infinite; filter: drop-shadow(0 0 8px rgba(124, 243, 255, .8));
}
@keyframes drive { from { background-position-y: 0; } to { background-position-y: 140px; } }

/* ---------- card ---------- */
.wrap { position: relative; z-index: 1; min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }

.card {
  position: relative; width: min(420px, 100%); padding: 38px 34px 26px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  backdrop-filter: blur(22px) saturate(140%); -webkit-backdrop-filter: blur(22px) saturate(140%);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .06);
  transform-style: preserve-3d; transition: transform .25s ease-out;
  animation: rise .9s cubic-bezier(.2, .9, .25, 1.15) both;
}
@keyframes rise { from { opacity: 0; transform: translateY(26px) scale(.97); } }

.card .glow {
  position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none;
  background: conic-gradient(from var(--ang, 0deg), transparent 0 60%, var(--cyan) 70%, var(--violet) 80%, var(--pink) 88%, transparent 96%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  animation: spinglow 6s linear infinite; opacity: .9;
}
@property --ang { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
@keyframes spinglow { to { --ang: 360deg; } }

.brand { text-align: center; margin-bottom: 26px; }
.logo { width: 74px; height: 74px; margin: 0 auto 14px; display: grid; place-items: center; border-radius: 22px;
  background: radial-gradient(circle at 30% 25%, rgba(124, 243, 255, .25), rgba(122, 92, 255, .12) 60%, transparent 70%);
  box-shadow: 0 0 40px rgba(122, 92, 255, .35); }
.wheel { width: 52px; height: 52px; animation: roll 9s linear infinite; filter: drop-shadow(0 0 6px rgba(124, 243, 255, .6)); }
@keyframes roll { to { transform: rotate(360deg); } }
.brand h1 { margin: 0; font-size: 30px; letter-spacing: .5px; font-weight: 700; }
.brand h1 span { background: linear-gradient(90deg, var(--cyan), var(--violet), var(--pink)); -webkit-background-clip: text; background-clip: text; color: transparent;
  background-size: 200% 100%; animation: shine 5s ease-in-out infinite alternate; }
@keyframes shine { to { background-position: 100% 0; } }
.sub { margin: 6px 0 0; color: var(--muted); font-size: 14px; letter-spacing: .3px; }

/* ---------- notice ---------- */
.notice { margin: 0 0 18px; padding: 11px 14px; border-radius: 12px; font-size: 14px; display: flex; gap: 10px; align-items: center;
  animation: pop .35s ease-out both; }
.notice.err { background: rgba(255, 107, 129, .12); border: 1px solid rgba(255, 107, 129, .35); color: #ffd1d8; }
.notice.ok { background: rgba(75, 227, 164, .10); border: 1px solid rgba(75, 227, 164, .35); color: #c9ffe8; }
.notice::before { content: ""; width: 8px; height: 8px; border-radius: 50%; flex: none; background: currentColor; box-shadow: 0 0 10px currentColor; }
@keyframes pop { from { opacity: 0; transform: translateY(-6px); } }

/* ---------- fields ---------- */
.field { position: relative; margin-bottom: 16px; }
.field input {
  width: 100%; height: 56px; padding: 22px 46px 8px 46px; border-radius: 14px;
  background: rgba(8, 12, 30, .55); border: 1px solid var(--line); color: var(--ink);
  font: inherit; font-size: 16px; outline: none; transition: border-color .2s, box-shadow .2s, background .2s;
}
.field input:hover { border-color: rgba(160, 190, 255, .32); }
.field input:focus { border-color: var(--cyan); background: rgba(8, 12, 30, .75); box-shadow: 0 0 0 4px rgba(124, 243, 255, .12), 0 0 24px rgba(124, 243, 255, .15); }
.field label { position: absolute; left: 46px; top: 17px; color: var(--muted); pointer-events: none; transition: all .18s ease; font-size: 16px; }
.field input:focus + label, .field input:not(:placeholder-shown) + label { top: 7px; font-size: 11.5px; letter-spacing: .6px; text-transform: uppercase; color: var(--cyan); }
.field .icon { position: absolute; left: 15px; top: 17px; width: 22px; height: 22px; fill: var(--muted); transition: fill .2s, transform .2s; }
.field .icon svg { width: 22px; height: 22px; fill: inherit; }
.field:focus-within .icon { fill: var(--cyan); transform: scale(1.08); }
.field input:-webkit-autofill { -webkit-text-fill-color: var(--ink); -webkit-box-shadow: 0 0 0 40px #0c1330 inset; caret-color: var(--ink); }

.eye { position: absolute; right: 8px; top: 8px; width: 40px; height: 40px; border: 0; border-radius: 10px; background: transparent; cursor: pointer; display: grid; place-items: center; }
.eye:hover { background: rgba(160, 190, 255, .08); }
.eye:focus-visible { outline: 2px solid var(--cyan); outline-offset: 1px; }
.eye svg { width: 22px; height: 22px; fill: var(--muted); }
.eye .eye-shut { display: none; }
.eye[aria-pressed="true"] .eye-open { display: none; }
.eye[aria-pressed="true"] .eye-shut { display: block; }

.caps { margin: -6px 0 14px 4px; font-size: 13px; color: #ffd27a; }

/* ---------- button ---------- */
.go {
  position: relative; width: 100%; height: 54px; margin-top: 6px; border: 0; border-radius: 14px; cursor: pointer; overflow: hidden;
  color: #06101f; font: inherit; font-weight: 700; font-size: 16px; letter-spacing: .4px;
  background: linear-gradient(100deg, var(--cyan), #8fb5ff 45%, var(--violet));
  background-size: 180% 100%; box-shadow: 0 12px 30px rgba(122, 92, 255, .35);
  transition: transform .15s, box-shadow .2s, background-position .5s;
}
.go:hover { background-position: 100% 0; box-shadow: 0 16px 38px rgba(122, 92, 255, .5); transform: translateY(-1px); }
.go:active { transform: translateY(1px) scale(.99); }
.go:focus-visible { outline: 3px solid rgba(124, 243, 255, .6); outline-offset: 3px; }
.go::after { content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .55), transparent); transform: skewX(-20deg); animation: sweep 3.8s ease-in-out infinite; }
@keyframes sweep { 0%, 60% { left: -60%; } 100% { left: 130%; } }
.go .spin { position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%;
  border: 3px solid rgba(6, 16, 31, .25); border-top-color: #06101f; opacity: 0; animation: turn .8s linear infinite; }
@keyframes turn { to { transform: rotate(360deg); } }
.go.busy .txt { opacity: 0; }
.go.busy .spin { opacity: 1; }
.go .ripple { position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .45); transform: scale(0); animation: ripple .6s ease-out forwards; pointer-events: none; }
@keyframes ripple { to { transform: scale(4); opacity: 0; } }

a.go { display: grid; place-items: center; text-decoration: none; }
.brand h1 + .sub { line-height: 1.6; }
.safe .link { color: var(--muted); text-decoration: none; }
.safe .link:hover { color: var(--ink); }
.safe { margin-top: 22px; display: flex; gap: 8px; align-items: center; justify-content: center; color: var(--muted); font-size: 12.5px; }
.safe svg { width: 16px; height: 16px; fill: var(--ok); filter: drop-shadow(0 0 6px rgba(75, 227, 164, .5)); }

/* ---------- states ---------- */
.card.shake { animation: shake .5s cubic-bezier(.36, .07, .19, .97) both; }
@keyframes shake {
  10%, 90% { transform: translateX(-2px); } 20%, 80% { transform: translateX(4px); }
  30%, 50%, 70% { transform: translateX(-8px); } 40%, 60% { transform: translateX(8px); }
}
.card.done { animation: leave .5s ease-in forwards; }
@keyframes leave { to { opacity: .0; transform: translateY(-14px) scale(.98); filter: blur(4px); } }

@media (max-width: 420px) {
  .card { padding: 30px 20px 22px; border-radius: 18px; }
  .brand h1 { font-size: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  #sky { display: none; }
}
