:root {
  --purple: #3d0191;
  --purple-2: #5c0fbd;
  --magenta: #800182;
  --yellow: #f7c600;
  --yellow-soft: #fff6c7;
  --ink: #24005f;
  --muted: #75688a;
  --lavender: #f6f1ff;
  --line: #e8ddf8;
  --white: #ffffff;
  --danger: #b43778;
  --success: #3d8b72;
  --shadow: 0 28px 80px rgba(61, 1, 145, 0.16);
  --font-sans: "SF Pro Text", "SF Pro Display", Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: "SF Pro Display", Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; }
body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 18%, rgba(247, 198, 0, 0.16), transparent 26%),
    radial-gradient(circle at 88% 12%, rgba(128, 1, 130, 0.13), transparent 29%),
    linear-gradient(145deg, #ffffff 0%, #fbf8ff 58%, #fffdf5 100%);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-synthesis: none;
  font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
}

.auth-legal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  max-width: 1180px;
  margin: 22px auto 0;
  padding: 0 4px 18px;
  color: var(--muted);
  font-size: 11px;
}

.auth-legal-footer p { margin: 0; }
.auth-legal-footer nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 18px; }
.auth-legal-footer a { color: var(--muted); font-weight: 800; }
.auth-legal-footer a:hover { color: var(--purple); }

h1, h2, h3 { font-family: var(--font-display); text-wrap: balance; }
p { text-wrap: pretty; }

a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button { color: inherit; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.auth-shell { min-height: 100vh; padding: 24px; }
.auth-topbar {
  width: min(1180px, 100%);
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 0 auto 24px;
}
.auth-logo img { width: 172px; height: 46px; object-fit: contain; }
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: var(--purple);
  background: rgba(255,255,255,.82);
  font-size: 14px;
  font-weight: 800;
}
.back-link svg { width: 17px; height: 17px; }

.auth-card {
  width: min(1180px, 100%);
  min-height: 650px;
  display: grid;
  grid-template-columns: .93fr 1.07fr;
  margin: 0 auto;
  border: 1px solid rgba(61, 1, 145, 0.1);
  border-radius: 34px;
  overflow: hidden;
  background: var(--white);
  box-shadow: var(--shadow);
}

.auth-showcase {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 44px;
  color: var(--white);
  overflow: hidden;
  background:
    radial-gradient(circle at 88% 20%, rgba(247, 198, 0, .2), transparent 24%),
    linear-gradient(145deg, #300070 0%, var(--purple) 54%, var(--magenta) 100%);
}
.auth-showcase::before,
.auth-showcase::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.auth-showcase::before {
  width: 280px;
  height: 280px;
  right: -120px;
  top: -120px;
  border: 46px solid rgba(255,255,255,.07);
}
.auth-showcase::after {
  width: 180px;
  height: 180px;
  left: -90px;
  bottom: -90px;
  border: 36px solid rgba(247,198,0,.12);
}
.showcase-copy, .showcase-bottom { position: relative; z-index: 2; }
.showcase-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  color: var(--yellow);
  background: rgba(255,255,255,.08);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.showcase-badge span { width: 7px; height: 7px; border-radius: 50%; background: var(--yellow); }
.auth-showcase h1 {
  max-width: 430px;
  margin: 22px 0 18px;
  font-size: clamp(40px, 4.5vw, 62px);
  line-height: 1.05;
  letter-spacing: -.045em;
}
.auth-showcase h1 em { color: var(--yellow); font-style: normal; }
.auth-showcase p { max-width: 440px; margin: 0; color: rgba(255,255,255,.78); font-size: 16px; line-height: 1.7; }
.showcase-list { display: grid; gap: 12px; margin-top: 32px; }
.showcase-item {
  display: grid;
  grid-template-columns: 40px 1fr;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 16px;
  background: rgba(255,255,255,.07);
  backdrop-filter: blur(10px);
}
.showcase-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; color: var(--yellow); background: rgba(255,255,255,.1); }
.showcase-icon svg { width: 20px; height: 20px; }
.showcase-item strong, .showcase-item small { display: block; }
.showcase-item strong { font-size: 14px; }
.showcase-item small { margin-top: 3px; color: rgba(255,255,255,.68); font-size: 12px; }
.showcase-bottom { display: flex; align-items: center; gap: 10px; color: rgba(255,255,255,.68); font-size: 12px; }
.showcase-bottom svg { width: 20px; height: 20px; color: var(--yellow); }

.auth-panel { display: flex; align-items: center; padding: 38px clamp(28px, 5vw, 68px); }
.auth-form-wrap { width: 100%; max-width: 510px; margin: auto; }
.step-label { color: var(--magenta); font-size: 11px; font-weight: 900; letter-spacing: .11em; text-transform: uppercase; }
.auth-form-wrap h2 { margin: 9px 0 8px; color: var(--purple); font-size: clamp(30px, 4vw, 42px); line-height: 1.16; letter-spacing: -.03em; }
.auth-intro { margin: 0 0 26px; color: var(--muted); font-size: 15px; line-height: 1.7; }

.network-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--lavender);
}
.network-chip > span { display: flex; align-items: center; gap: 9px; color: var(--purple); font-size: 13px; font-weight: 800; }
.network-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 0 5px rgba(247,198,0,.18); }
.network-chip small { color: var(--muted); font-size: 11px; font-weight: 700; }

.wallet-box { padding: 18px; border: 1px solid var(--line); border-radius: 19px; background: #fdfbff; }
.wallet-box.connected { border-color: rgba(61,1,145,.35); background: linear-gradient(145deg, var(--lavender), #fff); }
.wallet-box-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wallet-symbol { width: 48px; height: 48px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 15px; color: var(--purple); background: var(--yellow-soft); }
.wallet-symbol svg { width: 24px; height: 24px; }
.wallet-meta { flex: 1; min-width: 0; }
.wallet-meta strong, .wallet-meta small { display: block; }
.wallet-meta strong { color: var(--purple); font-size: 14px; }
.wallet-meta small { margin-top: 3px; color: var(--muted); font-size: 12px; }
.wallet-status { padding: 6px 10px; border-radius: 999px; color: var(--purple); background: var(--yellow-soft); font-size: 10px; font-weight: 900; text-transform: uppercase; }
.wallet-address {
  display: none;
  margin-top: 14px;
  padding: 11px 12px;
  border: 1px dashed rgba(61,1,145,.23);
  border-radius: 12px;
  color: var(--purple);
  background: var(--white);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.connected .wallet-address { display: block; }

.auth-buttons { display: grid; gap: 10px; margin-top: 16px; }
.auth-button {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 18px;
  border: 1px solid transparent;
  border-radius: 15px;
  cursor: pointer;
  font-weight: 900;
  font-size: 14px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.auth-button:hover { transform: translateY(-2px); }
.auth-button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid rgba(247,198,0,.4); outline-offset: 2px; }
.auth-button svg { width: 19px; height: 19px; }
.auth-button.primary { color: var(--white); background: linear-gradient(135deg, var(--purple), var(--magenta)); box-shadow: 0 14px 30px rgba(61,1,145,.2); }
.auth-button.secondary { color: var(--purple); border-color: var(--line); background: var(--white); }
.auth-button.yellow { color: var(--purple); background: var(--yellow); box-shadow: 0 14px 28px rgba(247,198,0,.2); }
.auth-button[disabled] { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.separator { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: #8f81a4; font-size: 11px; font-weight: 800; text-transform: uppercase; }
.separator::before, .separator::after { content: ""; height: 1px; flex: 1; background: var(--line); }

.security-note { display: flex; gap: 11px; margin-top: 18px; padding: 14px; border-radius: 14px; color: var(--muted); background: var(--lavender); font-size: 12px; font-weight: 650; line-height: 1.6; }
.security-note svg { width: 19px; height: 19px; flex: 0 0 auto; color: var(--purple); }
.auth-switch { margin-top: 22px; color: var(--muted); text-align: center; font-size: 13px; }
.auth-switch a { color: var(--purple); font-weight: 900; }
.auth-message { min-height: 21px; margin: 13px 0 0; color: var(--danger); font-size: 12px; font-weight: 800; }
.auth-message.success { color: var(--success); }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 20px; }
.field { display: grid; gap: 7px; }
.field.full { grid-column: 1 / -1; }
.field label { color: var(--purple); font-size: 13px; font-weight: 800; }
.field input, .field select {
  width: 100%;
  min-height: 48px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: var(--ink);
  background: var(--white);
  font-size: 15px;
}
.field input::placeholder { color: #b2a7bf; }
.terms { display: flex; align-items: flex-start; gap: 10px; margin: 18px 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.terms input { width: 16px; height: 16px; margin-top: 1px; accent-color: var(--purple); }
.terms a { color: var(--purple); font-weight: 900; }

.stepper { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 24px; }
.step { height: 5px; border-radius: 99px; background: var(--line); }
.step.active { background: linear-gradient(90deg, var(--purple), var(--magenta)); }

@media (max-width: 920px) {
  .auth-card { grid-template-columns: 1fr; }
  .auth-showcase { min-height: 340px; padding: 36px; }
  .auth-showcase h1 { max-width: 600px; font-size: 48px; }
  .auth-showcase p { max-width: 650px; }
  .showcase-list { grid-template-columns: repeat(3, 1fr); }
  .showcase-item { grid-template-columns: 1fr; align-content: start; }
  .showcase-bottom { margin-top: 30px; }
  .auth-panel { padding: 42px 34px; }
}

@media (max-width: 620px) {
  .auth-shell { padding: 12px; }
  .auth-topbar { min-height: 52px; margin-bottom: 12px; }
  .auth-logo img { width: 142px; height: 38px; }
  .back-link { padding: 9px 11px; font-size: 12px; }
  .auth-card { border-radius: 25px; }
  .auth-showcase { min-height: 215px; padding: 26px 22px; }
  .auth-showcase h1 { font-size: 39px; }
  .auth-showcase p { font-size: 15px; }
  .showcase-list { display: none; }
  .showcase-bottom { display: none; }
  .auth-panel { padding: 32px 20px calc(32px + env(safe-area-inset-bottom)); }
  .auth-form-wrap h2 { font-size: 32px; }
  .form-grid { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  .auth-button, .field input, .field select { min-height: 50px; }
  .wallet-box-head { align-items: flex-start; flex-wrap: wrap; }
  .wallet-meta { min-width: 160px; }
  .wallet-status { margin-left: auto; }
  .wallet-address { font-size: 10px; }
  .auth-legal-footer { flex-direction: column; gap: 10px; margin-top: 18px; text-align: center; }
  .auth-legal-footer nav { justify-content: center; gap: 10px 16px; }
}

@media (max-width: 390px) {
  .auth-shell { padding: 8px; }
  .auth-card { border-radius: 22px; }
  .auth-showcase { min-height: 205px; padding: 24px 18px; }
  .auth-showcase h1 { font-size: 35px; }
  .auth-panel { padding: 28px 16px calc(28px + env(safe-area-inset-bottom)); }
  .back-link { padding-inline: 9px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition-duration: .01ms !important; }
}
