:root {
  --bg: #08111f;
  --bg-2: #101c35;
  --panel: rgba(12, 19, 34, 0.78);
  --panel-border: rgba(255, 255, 255, 0.12);
  --text: #eef4ff;
  --muted: rgba(238, 244, 255, 0.7);
  --accent: #76e4f7;
  --accent-2: #8b5cf6;
  --success: #77f7bf;
  --warning: #ffd580;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
  --radius-xl: 32px;
  --radius-lg: 22px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background:
    radial-gradient(circle at top left, rgba(118, 228, 247, 0.16), transparent 28%),
    radial-gradient(circle at 85% 20%, rgba(139, 92, 246, 0.22), transparent 24%),
    linear-gradient(135deg, var(--bg) 0%, var(--bg-2) 100%);
  color: var(--text);
}

body {
  position: relative;
  overflow-x: hidden;
}

button,
input {
  font: inherit;
}

.bg-orb {
  position: fixed;
  border-radius: 999px;
  filter: blur(80px);
  opacity: 0.45;
  pointer-events: none;
}

.orb-a {
  width: 340px;
  height: 340px;
  background: rgba(118, 228, 247, 0.22);
  top: -80px;
  left: -60px;
}

.orb-b {
  width: 420px;
  height: 420px;
  background: rgba(139, 92, 246, 0.18);
  right: -100px;
  bottom: -120px;
}

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 24px;
  padding: 24px;
}

.panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-xl);
  background: var(--panel);
  backdrop-filter: blur(22px);
  box-shadow: var(--shadow);
}

.hero-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 36px;
}

.hero-copy {
  max-width: 540px;
  z-index: 1;
}

.badge,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  color: #d6f6ff;
  background: rgba(118, 228, 247, 0.14);
  border: 1px solid rgba(118, 228, 247, 0.2);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-copy h1,
.form-top h2 {
  margin: 18px 0 14px;
  font-size: clamp(2.4rem, 4vw, 4.8rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.hero-copy p,
.form-top p {
  margin: 0;
  max-width: 36rem;
  color: var(--muted);
  font-size: 1.03rem;
  line-height: 1.8;
}

.feature-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.feature-pills span {
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 0.9rem;
  color: rgba(238, 244, 255, 0.92);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.character-wrap {
  position: relative;
  margin-top: 24px;
  min-height: 410px;
  display: grid;
  place-items: center;
  perspective: 1200px;
}

.spotlight {
  position: absolute;
  inset: auto 50% 10px auto;
  width: 320px;
  height: 120px;
  transform: translateX(50%);
  background: radial-gradient(circle, rgba(118, 228, 247, 0.28), rgba(118, 228, 247, 0.02) 70%, transparent 72%);
  filter: blur(12px);
}

.character {
  --rotate-y: 0deg;
  --float-y: 0px;
  --tilt-x: 0deg;
  --tilt-z: 0deg;
  position: relative;
  width: 300px;
  transform-style: preserve-3d;
  transition: transform 360ms cubic-bezier(0.2, 0.8, 0.2, 1);
  transform: rotateY(var(--rotate-y)) rotateX(var(--tilt-x)) rotateZ(var(--tilt-z)) translateY(var(--float-y));
}

.character-wrap.is-engaged .character {
  --tilt-z: -3deg;
  --float-y: -4px;
}

.head {
  position: relative;
  width: 174px;
  height: 174px;
  margin: 0 auto;
  transform-style: preserve-3d;
}

.face {
  position: absolute;
  inset: 0;
  border-radius: 46% 46% 44% 44%;
  backface-visibility: hidden;
  box-shadow: inset 0 -8px 16px rgba(0, 0, 0, 0.1);
}

.face-front {
  background: linear-gradient(180deg, #ffd9b5 0%, #ffca9d 100%);
}

.face-back {
  background: linear-gradient(180deg, #232f56 0%, #19233d 100%);
  transform: rotateY(180deg);
  overflow: hidden;
}

.hair-shine {
  position: absolute;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  top: 22px;
  left: 22px;
  background: radial-gradient(circle at 35% 35%, rgba(255,255,255,0.18), transparent 45%);
}

.brow,
.blush,
.mouth {
  position: absolute;
}

.brow {
  width: 34px;
  height: 10px;
  border-top: 4px solid #5f3b24;
  border-radius: 50%;
  top: 54px;
}

.brow-left { left: 38px; }
.brow-right { right: 38px; }

.eyes {
  position: absolute;
  inset: 72px 0 auto;
  display: flex;
  justify-content: center;
  gap: 28px;
}

.eye {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: white;
  display: grid;
  place-items: center;
  box-shadow: inset 0 -3px 8px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.eyelid {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #ffd1aa 0%, #ffc698 100%);
  transform: translateY(-110%);
  transform-origin: top;
  animation: blink 6.5s infinite;
}

.pupil {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #111827;
  box-shadow: 0 0 0 3px #76e4f7;
  transform: translate(0px, 0px);
  transition: transform 80ms linear;
}

.blush {
  width: 28px;
  height: 16px;
  border-radius: 50%;
  background: rgba(255, 119, 163, 0.24);
  top: 112px;
}

.blush-left { left: 22px; }
.blush-right { right: 22px; }

.mouth {
  width: 34px;
  height: 18px;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  border-bottom: 4px solid #8c4d3a;
  border-radius: 0 0 20px 20px;
}

.body {
  position: relative;
  width: 240px;
  height: 180px;
  margin: -10px auto 0;
}

.hoodie {
  position: absolute;
  inset: 0;
  border-radius: 40px 40px 28px 28px;
  background: linear-gradient(160deg, #6d63ff 0%, #3ab8ff 100%);
  box-shadow: inset 0 -10px 18px rgba(0,0,0,0.16);
}

.hoodie::before {
  content: '';
  position: absolute;
  inset: 18px 42px auto;
  height: 80px;
  border-radius: 28px;
  background: rgba(255,255,255,0.12);
}

.arm {
  position: absolute;
  top: 28px;
  width: 58px;
  height: 120px;
  border-radius: 30px;
  background: linear-gradient(160deg, #7268ff 0%, #42bcff 100%);
  transition: transform 260ms ease;
}

.arm-left {
  left: -14px;
  transform: rotate(22deg);
}

.arm-right {
  right: -14px;
  transform: rotate(-22deg);
}

.character-wrap.is-engaged .arm-left {
  transform: rotate(12deg) translateY(-3px);
}

.character-wrap.is-engaged .arm-right {
  transform: rotate(-12deg) translateY(-3px);
}

.hint {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 14px;
  color: #d6f6ff;
  background: rgba(7, 14, 28, 0.55);
  border: 1px solid rgba(255,255,255,0.1);
  backdrop-filter: blur(12px);
  transition: color 180ms ease, border-color 180ms ease, background 180ms ease;
}

.form-panel {
  display: grid;
  place-items: center;
  padding: 24px;
}

.form-card {
  width: min(100%, 500px);
  padding: 34px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.04));
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.form-card.is-active {
  transform: translateY(-3px);
  border-color: rgba(118, 228, 247, 0.18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 20px 40px rgba(0, 0, 0, 0.16);
}

.form-top h2 {
  font-size: clamp(2rem, 3vw, 3rem);
}

.login-form {
  margin-top: 28px;
}

.field {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}

.field span {
  font-size: 0.95rem;
  color: rgba(238, 244, 255, 0.9);
  font-weight: 600;
}

.input-shell {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 18px;
  height: 62px;
  border-radius: 18px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.input-shell:focus-within {
  background: rgba(255,255,255,0.09);
  border-color: rgba(118, 228, 247, 0.72);
  box-shadow: 0 0 0 5px rgba(118, 228, 247, 0.14);
  transform: translateY(-1px);
}

.input-shell.is-valid {
  border-color: rgba(119, 247, 191, 0.4);
}

.input-shell svg,
.login-btn svg,
.password-toggle svg {
  width: 22px;
  height: 22px;
  fill: rgba(238,244,255,0.72);
  flex: none;
}

.input-shell input {
  width: 100%;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
  font-size: 1rem;
}

.input-shell input::placeholder {
  color: rgba(238, 244, 255, 0.45);
}

.input-shell-password {
  gap: 10px;
}

.password-toggle {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: rgba(255,255,255,0.06);
  cursor: pointer;
}

.password-toggle:hover {
  background: rgba(255,255,255,0.1);
}

.password-toggle .icon-eye-off {
  display: none;
}

.password-toggle.is-visible .icon-eye {
  display: none;
}

.password-toggle.is-visible .icon-eye-off {
  display: block;
}

.field-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 20px;
}

.caps-lock,
.helper-text {
  font-size: 0.82rem;
  color: rgba(238, 244, 255, 0.62);
}

.caps-lock {
  color: var(--warning);
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.meta-row {
  margin-top: 4px;
}

.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.95rem;
}

.checkbox input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.link {
  color: #b4f4ff;
  text-decoration: none;
}

.link:hover {
  text-decoration: underline;
}

.login-btn,
.social-btn {
  width: 100%;
  border: 0;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, opacity 180ms ease, filter 180ms ease;
}

.login-btn {
  margin-top: 24px;
  height: 62px;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #07111d;
  font-size: 1rem;
  font-weight: 800;
  box-shadow: 0 18px 40px rgba(118, 228, 247, 0.22);
}

.login-btn:hover,
.social-btn:hover {
  transform: translateY(-2px);
}

.login-btn:hover {
  filter: saturate(1.08);
}

.login-btn:active,
.social-btn:active {
  transform: translateY(0);
}

.divider {
  position: relative;
  margin: 28px 0 18px;
  text-align: center;
  color: rgba(238, 244, 255, 0.44);
}

.divider::before {
  content: '';
  position: absolute;
  inset: 50% 0 auto;
  height: 1px;
  background: rgba(255,255,255,0.08);
}

.divider span {
  position: relative;
  padding: 0 12px;
  background: rgba(14, 23, 41, 0.94);
}

.socials {
  display: grid;
  gap: 12px;
}

.social-btn {
  height: 54px;
  border-radius: 16px;
  color: var(--text);
  font-weight: 600;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
}

.form-card.shake {
  animation: shake 360ms ease;
}

.character.is-shy {
  --rotate-y: 180deg;
  --tilt-z: 0deg;
  --float-y: 0px;
}

.character-wrap.is-shy .hint {
  color: #ffd9f1;
  border-color: rgba(255, 158, 212, 0.18);
  background: rgba(28, 12, 24, 0.55);
}

@keyframes blink {
  0%, 45%, 47%, 100% {
    transform: translateY(-110%);
  }
  46% {
    transform: translateY(0%);
  }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

@media (max-width: 980px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    min-height: 620px;
  }
}

@media (max-width: 640px) {
  .shell {
    padding: 14px;
    gap: 14px;
  }

  .panel,
  .form-card {
    border-radius: 24px;
  }

  .hero-panel,
  .form-card {
    padding: 22px;
  }

  .feature-pills {
    gap: 8px;
  }

  .feature-pills span {
    padding: 8px 12px;
    font-size: 0.82rem;
  }

  .character {
    width: 250px;
  }

  .head {
    width: 150px;
    height: 150px;
  }

  .body {
    width: 210px;
    height: 156px;
  }

  .eyes {
    inset: 60px 0 auto;
    gap: 20px;
  }

  .eye {
    width: 34px;
    height: 34px;
  }

  .field-meta,
  .row {
    flex-direction: column;
    align-items: flex-start;
  }

  .password-toggle {
    width: 34px;
    height: 34px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
