@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap");

:root {
  color-scheme: dark;
  --bg-0: #050510;
  --bg-1: #0a0b22;
  --ink: #0f1226;
  --muted: rgba(15, 18, 38, 0.72);
  --muted-2: rgba(15, 18, 38, 0.52);
  --card: rgba(244, 246, 255, 0.92);
  --card-border: rgba(255, 255, 255, 0.55);
  --accent-0: #6d5cff;
  --accent-1: #2ea7ff;
  --accent-2: #b65cff;
  --shadow: 0 70px 180px rgba(0, 0, 0, 0.58), 0 30px 80px rgba(0, 0, 0, 0.38);
  --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto,
    Helvetica, Arial;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  min-height: 100svh;
  background: var(--bg-0);
  color: var(--ink);
  overflow: hidden;
  font-family: var(--font-sans);
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Background */
.gradient-bg {
  position: fixed;
  inset: 0;
  overscroll-behavior: none;
  background: linear-gradient(135deg, var(--bg-0), var(--bg-1), #05051a);
}

.gradient-bg::after {
  content: "";
  position: absolute;
  inset: -10%;
  background:
    radial-gradient(60% 55% at 50% 40%, rgba(255, 255, 255, 0.06), transparent 60%),
    radial-gradient(55% 50% at 50% 120%, rgba(0, 0, 0, 0.55), transparent 70%);
  pointer-events: none;
}

.blob {
  position: absolute;
  width: 620px;
  height: 620px;
  border-radius: 9999px;
  filter: blur(70px);
  opacity: 0.55;
  transform: translateZ(0);
  will-change: transform;
  mix-blend-mode: screen;
}

.blob-violet {
  background: radial-gradient(
    circle,
    rgba(182, 92, 255, 0.55) 0%,
    rgba(182, 92, 255, 0.18) 45%,
    transparent 72%
  );
}

.blob-blue {
  background: radial-gradient(
    ellipse,
    rgba(46, 167, 255, 0.55) 0%,
    rgba(46, 167, 255, 0.2) 48%,
    transparent 76%
  );
}

.blob-indigo {
  background: radial-gradient(
    circle,
    rgba(109, 92, 255, 0.42) 0%,
    rgba(109, 92, 255, 0.16) 55%,
    transparent 78%
  );
}

.blob-cyan {
  background: radial-gradient(
    ellipse,
    rgba(80, 220, 255, 0.32) 0%,
    rgba(80, 220, 255, 0.12) 50%,
    transparent 78%
  );
}

.blob-pink {
  background: radial-gradient(
    circle,
    rgba(255, 120, 220, 0.25) 0%,
    rgba(255, 120, 220, 0.1) 55%,
    transparent 78%
  );
}

.blob-mixed {
  background: radial-gradient(
    circle,
    rgba(182, 92, 255, 0.28) 0%,
    rgba(46, 167, 255, 0.2) 42%,
    rgba(109, 92, 255, 0.14) 68%,
    transparent 84%
  );
}

.blob-pos-1 {
  top: 16%;
  left: 6%;
}

.blob-pos-2 {
  top: 58%;
  right: 10%;
}

.blob-pos-3 {
  bottom: 8%;
  left: 16%;
}

.blob-pos-4 {
  top: 6%;
  right: 20%;
}

.blob-pos-5 {
  bottom: 26%;
  right: 6%;
}

.blob-pos-6 {
  top: 40%;
  left: -6%;
  animation-delay: 10s;
}

.animate-floatOne {
  animation: floatOne 45s ease-in-out infinite;
}

.animate-floatTwo {
  animation: floatTwo 50s ease-in-out infinite;
}

.animate-floatThree {
  animation: floatThree 40s ease-in-out infinite;
}

.animate-floatFour {
  animation: floatFour 48s ease-in-out infinite;
}

.animate-floatFive {
  animation: floatFive 42s ease-in-out infinite;
}

.animate-floatSix {
  animation: floatSix 55s ease-in-out infinite;
}

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.08;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}

/* Layout */
.container {
  position: relative;
  z-index: 1;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px 22px;
}

/* Card */
.card {
  width: min(860px, 100%);
  padding: 64px 68px 54px;
  border-radius: 36px;
  background: linear-gradient(180deg, var(--card), rgba(224, 227, 243, 0.9));
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.72);
  animation: card-in 720ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .card {
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
  }
}

.header {
  text-align: center;
}

.logo {
  display: inline-block;
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background: rgba(15, 18, 38, 0.04);
  border: 1px solid rgba(15, 18, 38, 0.08);
  box-shadow: 0 16px 40px rgba(109, 92, 255, 0.22);
  margin-bottom: 12px;
}

h1 {
  margin: 14px 0 12px;
  font-size: clamp(34px, 4vw, 46px);
  line-height: 1.06;
  letter-spacing: -0.03em;
  font-weight: 800;
  color: var(--ink);
}

p {
  margin: 0 auto;
  max-width: 52ch;
  font-size: 16px;
  line-height: 1.55;
  color: var(--muted);
}

/* Form */
.form {
  margin: 34px auto 0;
  max-width: 560px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.field {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(15, 18, 38, 0.06);
  border: 1px solid rgba(15, 18, 38, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7),
    0 14px 40px rgba(15, 18, 38, 0.08);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.field:focus-within {
  border-color: rgba(109, 92, 255, 0.6);
  box-shadow: 0 0 0 6px rgba(109, 92, 255, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.field-icon {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  color: rgba(15, 18, 38, 0.55);
}

input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 0;
  outline: none;
  font-size: 16px;
  color: var(--ink);
}

input::placeholder {
  color: var(--muted-2);
}

button {
  width: 100%;
  padding: 14px 18px;
  border: none;
  border-radius: 18px;
  cursor: pointer;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: rgba(255, 255, 255, 0.95);
  background: linear-gradient(135deg, var(--accent-0), var(--accent-1));
  box-shadow: 0 18px 45px rgba(46, 167, 255, 0.22),
    0 12px 35px rgba(109, 92, 255, 0.18);
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
  user-select: none;
}

button:hover {
  transform: translateY(-1px);
  filter: saturate(1.06);
  box-shadow: 0 22px 60px rgba(46, 167, 255, 0.28),
    0 16px 45px rgba(182, 92, 255, 0.24);
}

button:active {
  transform: translateY(0);
}

button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 6px rgba(46, 167, 255, 0.22),
    0 22px 60px rgba(46, 167, 255, 0.18), 0 16px 45px rgba(182, 92, 255, 0.16);
}

button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  box-shadow: none;
  filter: none;
}

#message {
  display: block;
  margin-top: 14px;
  min-height: 1.3em;
  text-align: center;
  font-size: 14px;
  color: var(--muted);
}

#message[data-variant="info"] {
  color: var(--muted);
}

#message[data-variant="success"] {
  color: rgba(42, 96, 255, 0.92);
}

#message[data-variant="error"] {
  color: rgba(220, 54, 82, 0.92);
}

/* Responsive */
@media (max-width: 560px) {
  .card {
    padding: 44px 22px 34px;
    border-radius: 28px;
  }
}

/* Motion preferences */
@media (prefers-reduced-motion: reduce) {
  .gradient-bg,
  .gradient-bg::after,
  .blob,
  .card {
    animation: none !important;
  }

  button,
  .field {
    transition: none !important;
  }
}

@keyframes floatOne {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(120px, -90px, 0) scale(1.12);
  }
  100% {
    transform: translate3d(-60px, 60px, 0) scale(1.03);
  }
}

@keyframes floatTwo {
  0% {
    transform: translate3d(0, 0, 0) scale(1.05);
  }
  50% {
    transform: translate3d(-140px, -60px, 0) scale(1.16);
  }
  100% {
    transform: translate3d(70px, 80px, 0) scale(1.06);
  }
}

@keyframes floatThree {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(90px, 110px, 0) scale(1.14);
  }
  100% {
    transform: translate3d(-90px, -70px, 0) scale(1.02);
  }
}

@keyframes floatFour {
  0% {
    transform: translate3d(0, 0, 0) scale(1.08);
  }
  50% {
    transform: translate3d(-80px, 120px, 0) scale(1.18);
  }
  100% {
    transform: translate3d(90px, -90px, 0) scale(1.08);
  }
}

@keyframes floatFive {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(130px, 40px, 0) scale(1.12);
  }
  100% {
    transform: translate3d(-110px, -40px, 0) scale(1.02);
  }
}

@keyframes floatSix {
  0% {
    transform: translate3d(0, 0, 0) scale(1.1);
  }
  50% {
    transform: translate3d(150px, -120px, 0) scale(1.22);
  }
  100% {
    transform: translate3d(-120px, 110px, 0) scale(1.12);
  }
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
