@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Space+Grotesk:wght@500;700&display=swap');

:root {
  --bg-0: #030712;
  --bg-1: #091120;
  --bg-2: #101a31;
  --panel: rgba(10, 18, 35, 0.7);
  --panel-strong: rgba(8, 15, 30, 0.86);
  --line: rgba(154, 176, 255, 0.2);
  --line-strong: rgba(154, 176, 255, 0.34);
  --text: #f8fbff;
  --muted: #93a5c9;
  --muted-strong: #c9d6f3;
  --blue: #57a1ff;
  --purple: #7c71ff;
  --emerald: #3fe0bb;
  --danger: #ff6b8d;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.46);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  position: relative;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 32px 16px 20px;
  font-family: 'Manrope', sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(87, 161, 255, 0.22), transparent 32%),
    radial-gradient(circle at 85% 15%, rgba(124, 113, 255, 0.18), transparent 30%),
    radial-gradient(circle at 74% 78%, rgba(63, 224, 187, 0.14), transparent 26%),
    linear-gradient(155deg, var(--bg-0), var(--bg-1) 42%, var(--bg-2));
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: auto;
  z-index: 0;
  pointer-events: none;
  filter: blur(24px);
}

body::before {
  top: -120px;
  right: -90px;
  width: min(42vw, 420px);
  height: min(42vw, 420px);
  border-radius: 38% 62% 64% 36% / 36% 36% 64% 64%;
  background:
    radial-gradient(circle at 30% 30%, rgba(87, 161, 255, 0.42), transparent 48%),
    radial-gradient(circle at 70% 62%, rgba(124, 113, 255, 0.34), transparent 44%);
  opacity: 0.95;
}

body::after {
  left: -120px;
  bottom: -140px;
  width: min(46vw, 480px);
  height: min(40vw, 360px);
  border-radius: 55% 45% 57% 43% / 41% 57% 43% 59%;
  background:
    radial-gradient(circle at 42% 40%, rgba(63, 224, 187, 0.26), transparent 42%),
    radial-gradient(circle at 68% 56%, rgba(87, 161, 255, 0.22), transparent 46%);
  opacity: 0.9;
}

.auth-shell {
  position: relative;
  z-index: 1;
  width: min(1180px, 100%);
  overflow: hidden;
  border: 1px solid rgba(167, 184, 255, 0.16);
  border-radius: 30px;
  background:
    linear-gradient(140deg, rgba(8, 14, 27, 0.9), rgba(8, 16, 30, 0.72)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0));
  box-shadow: var(--shadow);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
}

.auth-shell::before,
.auth-shell::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.auth-shell::before {
  inset: 0;
  background:
    radial-gradient(circle at 16% 22%, rgba(87, 161, 255, 0.18), transparent 28%),
    radial-gradient(circle at 86% 18%, rgba(124, 113, 255, 0.16), transparent 26%),
    radial-gradient(circle at 74% 84%, rgba(63, 224, 187, 0.12), transparent 24%);
}

.auth-shell::after {
  top: 18px;
  right: -72px;
  width: 320px;
  height: 170px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(87, 161, 255, 0.24), rgba(124, 113, 255, 0.18), rgba(63, 224, 187, 0.14));
  filter: blur(12px);
  opacity: 0.9;
  transform: rotate(-14deg);
}

.auth-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
  min-height: 720px;
}

.auth-brand,
.auth-content {
  position: relative;
  z-index: 1;
  padding: 40px;
}

.auth-brand {
  border-right: 1px solid rgba(167, 184, 255, 0.12);
}

.logo {
  width: 88px;
  height: 88px;
  object-fit: contain;
  border-radius: 24px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(167, 184, 255, 0.16);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 18px 40px rgba(0, 0, 0, 0.2);
}

.auth-kicker,
.auth-panel-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  color: var(--muted-strong);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.72rem;
  font-weight: 700;
}

.auth-kicker::before,
.auth-panel-kicker::before {
  content: "";
  width: 38px;
  height: 1px;
  background: linear-gradient(90deg, rgba(87, 161, 255, 0.95), rgba(124, 113, 255, 0));
}

.auth-title,
.auth-section-title {
  margin: 14px 0 0;
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2.1rem, 4.3vw, 4.5rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.auth-section-title {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  line-height: 1.02;
}

.auth-subtitle,
.auth-copy {
  max-width: 56ch;
  margin-top: 18px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

.auth-chip-row,
.auth-pillars,
.auth-status-grid,
.auth-mini-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.auth-chip-row {
  margin-top: 24px;
}

.auth-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(167, 184, 255, 0.16);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted-strong);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.auth-chip::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--blue), var(--emerald));
  box-shadow: 0 0 16px rgba(87, 161, 255, 0.55);
}

.flow-list {
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 14px;
}

.flow-list li {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 64px;
  padding: 16px 18px 16px 52px;
  border: 1px solid rgba(167, 184, 255, 0.14);
  border-radius: 22px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)),
    var(--panel);
  color: #edf3ff;
  font-size: 0.97rem;
  line-height: 1.4;
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

.flow-list li::before {
  content: "";
  position: absolute;
  left: 20px;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 1px solid rgba(167, 184, 255, 0.36);
  background: rgba(255, 255, 255, 0.03);
  box-shadow: inset 0 0 0 4px rgba(5, 10, 22, 0.9);
}

.flow-list li.is-active {
  border-color: rgba(87, 161, 255, 0.32);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 20px 36px rgba(4, 10, 22, 0.34);
}

.flow-list li.is-active::before {
  background: linear-gradient(135deg, var(--blue), var(--purple));
  box-shadow: 0 0 20px rgba(87, 161, 255, 0.44);
}

.auth-pillars {
  margin-top: 32px;
}

.auth-pillar {
  flex: 1 1 180px;
  min-width: 0;
  padding: 20px;
  border-radius: 24px;
  border: 1px solid rgba(167, 184, 255, 0.12);
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015)),
    rgba(9, 17, 32, 0.54);
}

.auth-pillar strong,
.auth-status-card strong,
.auth-mini-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 0.95rem;
  font-weight: 800;
  color: #f4f8ff;
}

.auth-pillar span,
.auth-status-card span,
.auth-mini-card span,
.auth-notice,
.auth-meta,
.muted {
  color: var(--muted);
}

.auth-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
}

.auth-panel {
  position: relative;
  overflow: hidden;
  padding: 28px;
  border-radius: 26px;
  border: 1px solid rgba(167, 184, 255, 0.16);
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.025)),
    var(--panel);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 18px 34px rgba(4, 10, 22, 0.26);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

.auth-panel::before {
  content: "";
  position: absolute;
  inset: auto -18% 68% 46%;
  height: 180px;
  background: radial-gradient(circle, rgba(87, 161, 255, 0.18), transparent 60%);
  pointer-events: none;
}

.auth-panel--primary {
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03)),
    var(--panel-strong);
}

.verify-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px;
  border: 1px solid rgba(167, 184, 255, 0.14);
  border-radius: 22px;
  background: rgba(5, 11, 22, 0.34);
}

.avatar-lg {
  width: 72px;
  height: 72px;
  flex: 0 0 auto;
  border-radius: 22px;
  object-fit: cover;
  border: 1px solid rgba(167, 184, 255, 0.2);
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.24);
}

.label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(167, 184, 255, 0.14);
  background: rgba(87, 161, 255, 0.14);
  color: #edf4ff;
  font-size: 0.69rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.label.warn {
  background: rgba(255, 107, 141, 0.14);
}

.label.success {
  background: rgba(63, 224, 187, 0.14);
}

.username {
  display: block;
  margin-top: 10px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.16rem;
  font-weight: 700;
  line-height: 1.2;
}

.auth-meta,
.small {
  display: block;
  margin-top: 6px;
  font-size: 0.88rem;
}

.auth-cta-group,
.auth-action-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.auth-form-stack,
.auth-provider-form {
  display: grid;
  gap: 14px;
}

.auth-provider-form {
  width: 100%;
}

.auth-remember {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
  max-width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(167, 184, 255, 0.14);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted-strong);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.4;
  cursor: pointer;
}

.auth-remember input {
  appearance: none;
  width: 18px;
  height: 18px;
  margin: 0;
  border: 1px solid rgba(167, 184, 255, 0.4);
  border-radius: 6px;
  background: rgba(5, 10, 20, 0.9);
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
}

.auth-remember input::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 3px;
  background: linear-gradient(135deg, var(--blue), var(--emerald));
  transform: scale(0);
  transition: transform 120ms ease;
}

.auth-remember input:checked {
  border-color: rgba(87, 161, 255, 0.72);
  box-shadow: 0 0 0 3px rgba(87, 161, 255, 0.14);
}

.auth-remember input:checked::after {
  transform: scale(1);
}

.button,
.panel-btn,
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 14px 20px;
  border-radius: 16px;
  border: 1px solid rgba(167, 184, 255, 0.2);
  background:
    linear-gradient(135deg, rgba(87, 161, 255, 0.96), rgba(124, 113, 255, 0.88) 54%, rgba(63, 224, 187, 0.82));
  color: #f8fbff;
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  font-family: inherit;
  box-shadow:
    0 16px 30px rgba(65, 112, 255, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
  cursor: pointer;
  appearance: none;
}

.button:hover,
.panel-btn:hover,
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow:
    0 22px 36px rgba(65, 112, 255, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.auth-button-secondary {
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.03)),
    rgba(8, 15, 28, 0.76);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 16px 28px rgba(0, 0, 0, 0.2);
}

.auth-notice {
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px solid rgba(167, 184, 255, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.9rem;
  line-height: 1.6;
}

.auth-status-grid,
.auth-mini-grid {
  margin-top: 18px;
}

.auth-status-card,
.auth-mini-card {
  flex: 1 1 160px;
  min-width: 0;
  padding: 16px 18px;
  border-radius: 20px;
  border: 1px solid rgba(167, 184, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
}

.discord-logo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 88px;
  border-radius: 22px;
  border: 1px solid rgba(111, 132, 255, 0.28);
  background:
    linear-gradient(160deg, rgba(88, 101, 242, 0.24), rgba(88, 101, 242, 0.12)),
    rgba(6, 12, 24, 0.52);
  padding: 0;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 16px 28px rgba(20, 32, 85, 0.22);
  transition: transform 160ms ease, box-shadow 160ms ease;
  cursor: pointer;
}

.discord-logo-btn img {
  width: 74px;
  height: 74px;
  object-fit: contain;
}

.discord-logo-btn:hover {
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 22px 34px rgba(20, 32, 85, 0.28);
}

.auth-provider-card {
  margin-top: 20px;
  display: grid;
  gap: 16px;
}

.auth-provider-text {
  display: grid;
  gap: 10px;
}

.auth-provider-text .auth-copy {
  margin-top: 0;
}

.auth-bg {
  min-height: 100vh;
}

.auth-card {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  padding: 28px;
  border-radius: 24px;
  border: 1px solid rgba(167, 184, 255, 0.16);
  background: var(--panel);
  box-shadow: var(--shadow);
}

textarea,
input,
select {
  width: 100%;
  border-radius: 18px;
  border: 1px solid rgba(167, 184, 255, 0.18);
  background: rgba(4, 9, 18, 0.6);
  color: var(--text);
  font: inherit;
}

textarea::placeholder,
input::placeholder {
  color: rgba(147, 165, 201, 0.78);
}

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

  .auth-brand {
    border-right: 0;
    border-bottom: 1px solid rgba(167, 184, 255, 0.12);
  }
}

@media (max-width: 640px) {
  body {
    padding: 18px 12px 16px;
  }

  .auth-brand,
  .auth-content {
    padding: 24px 20px;
  }

  .auth-shell {
    border-radius: 24px;
  }

  .auth-panel,
  .verify-card,
  .flow-list li,
  .auth-pillar,
  .auth-status-card,
  .auth-mini-card {
    border-radius: 20px;
  }

  .auth-title {
    font-size: clamp(1.9rem, 11vw, 3rem);
  }

  .auth-section-title {
    font-size: clamp(1.5rem, 8vw, 2rem);
  }

  .button,
  .panel-btn,
  .btn-primary,
  .discord-logo-btn {
    width: 100%;
  }

  .avatar-lg {
    width: 64px;
    height: 64px;
  }
}
