:root {
  --pink: #fbd3f0;
  --aqua: #c4f7ff;
  --lav: #d9c7ff;
  --blue: #d3e8ff;

  --bg1: #ecf8ff;
  --bg2: #d8f0ff;
  --bg3: #cde7f7;
  --bg4: #bbe2fa;

  --ink: #07041b;
  --muted: rgba(7, 4, 27, 0.62);
  --glass: rgba(255, 255, 255, 0.34);
  --glass-strong: rgba(255, 255, 255, 0.5);
  --glass-border: rgba(7, 4, 27, 0.12);
}

* {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

*::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100%;
  font-family: "Quicksand", system-ui, sans-serif;
  color: var(--ink);
  background: radial-gradient(
    circle at 50% 30%,
    var(--bg1) 0%,
    var(--bg2) 35%,
    var(--bg3) 65%,
    var(--bg4) 100%
  );
}

body {
  min-height: 100vh;
  min-height: 100svh;
  overflow-x: hidden;
  overflow-y: auto;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 22%, rgba(251, 211, 240, 0.5), transparent 32%),
    radial-gradient(circle at 82% 18%, rgba(196, 247, 255, 0.62), transparent 34%),
    radial-gradient(circle at 52% 86%, rgba(217, 199, 255, 0.34), transparent 34%);
  z-index: 0;
}

.signup-header {
  position: relative;
  top: auto;
  left: auto;
  transform: none;
  z-index: 20;
  width: min(1240px, calc(100% - 48px));
  margin: clamp(10px, 1.8vw, 24px) auto 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  opacity: 0;
  animation: fadeInSoft 0.75s ease forwards 0.2s;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  white-space: nowrap;
}

.brand img {
  width: 32px;
  height: 32px;
  display: block;
}

.brand span {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.back-home-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--ink);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.back-home-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -7px;
  width: 100%;
  height: 1.5px;
  border-radius: 999px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: center;
  opacity: 0;
  transition:
    transform 0.7s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.3s ease;
}

.back-home-link:hover::after {
  transform: scaleX(1);
  opacity: 1;
}

.signup-page {
  position: relative;
  z-index: 1;
  min-height: calc(100vh - 64px);
  min-height: calc(100svh - 64px);
  width: min(560px, calc(100% - 48px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(28px, 5svh, 56px) 0 clamp(20px, 4svh, 40px);
}

.signup-panel {
  width: 100%;
  position: relative;
  opacity: 0;
  transform: translateY(16px);
  animation: panelIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards 0.35s;
}

.form-card {
  width: 100%;
  padding: clamp(20px, 2.5vw, 30px);
  border-radius: 34px;
  border: 1px solid rgba(7, 4, 27, 0.12);
  background: rgba(255, 255, 255, 0.42);
  box-shadow: 0 24px 74px rgba(7, 4, 27, 0.12);
  backdrop-filter: blur(22px);
}

.form-heading {
  margin-bottom: 22px;
}

.form-heading h2 {
  margin: 0;
  font-size: clamp(30px, 3vw, 44px);
  line-height: 0.98;
  letter-spacing: -0.06em;
  font-weight: 700;
}

.signup-form {
  display: grid;
  gap: 12px;
}

.field-group {
  display: grid;
  gap: 12px;
}

.two-column {
  grid-template-columns: 1fr 1fr;
}

.form-field {
  position: relative;
  display: grid;
  gap: 8px;
}

.form-field > span,
.checkbox-field > span,
.plan-field legend {
  color: rgba(7, 4, 27, 0.66);
  font-size: 12px;
  line-height: 1.4;
  font-weight: 700;
}

.form-field input,
.form-field select {
  width: 100%;
  height: 48px;
  border: 1px solid rgba(7, 4, 27, 0.13);
  border-radius: 18px;
  padding: 0 15px;
  background: rgba(255, 255, 255, 0.42);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  outline: none;
  transition:
    border-color 0.3s ease,
    box-shadow 0.3s ease,
    background 0.3s ease;
}

.form-field select {
  appearance: none;
  cursor: pointer;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(7, 4, 27, 0.62) 50%),
    linear-gradient(135deg, rgba(7, 4, 27, 0.62) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 22px,
    calc(100% - 13px) 22px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.form-field input::placeholder {
  color: rgba(7, 4, 27, 0.36);
}

.form-field input:focus,
.form-field select:focus {
  border-color: rgba(7, 4, 27, 0.32);
  background: rgba(255, 255, 255, 0.58);
  box-shadow: 0 0 0 4px rgba(196, 247, 255, 0.36);
}

.plan-field {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.plan-field legend {
  margin-bottom: 8px;
  padding: 0;
}

.plan-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.plan-option {
  position: relative;
  min-width: 0;
  cursor: pointer;
}

.plan-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.plan-option-content {
  min-height: 104px;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(7, 4, 27, 0.13);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.34);
  transition:
    transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.3s ease,
    box-shadow 0.3s ease,
    background 0.3s ease;
}

.plan-option:hover .plan-option-content {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.5);
}

.plan-option input:focus-visible + .plan-option-content {
  border-color: rgba(7, 4, 27, 0.36);
  box-shadow: 0 0 0 4px rgba(196, 247, 255, 0.46);
}

.plan-option input:checked + .plan-option-content {
  border-color: rgba(7, 4, 27, 0.38);
  background:
    linear-gradient(135deg, rgba(196, 247, 255, 0.58), rgba(217, 199, 255, 0.4)),
    rgba(255, 255, 255, 0.5);
  box-shadow: 0 12px 28px rgba(7, 4, 27, 0.1);
}

.plan-option-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.plan-option-topline strong {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.2;
  font-weight: 700;
}

.plan-badge {
  flex: 0 0 auto;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(7, 4, 27, 0.08);
  color: rgba(7, 4, 27, 0.68);
  font-size: 9px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.plan-description {
  color: rgba(7, 4, 27, 0.58);
  font-size: 11px;
  line-height: 1.45;
  font-weight: 600;
}

.plan-field.has-error .plan-option-content {
  border-color: rgba(138, 35, 56, 0.44);
  box-shadow: 0 0 0 4px rgba(138, 35, 56, 0.08);
}

.password-field input {
  padding-right: 72px;
}

.password-toggle {
  position: absolute;
  right: 8px;
  bottom: 7px;
  height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(7, 4, 27, 0.08);
  color: rgba(7, 4, 27, 0.7);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.3s ease;
}

.password-toggle:hover {
  transform: translateY(-1px);
  background: rgba(7, 4, 27, 0.12);
}


.field-help {
  margin-top: -2px;
  color: rgba(7, 4, 27, 0.5);
  font-size: 11px;
  line-height: 1.4;
  font-weight: 600;
}

.field-error {
  min-height: 16px;
  color: #8a2338;
  font-size: 11px;
  line-height: 1.35;
  font-weight: 700;
  opacity: 0;
  transform: translateY(-2px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.field-error:not(:empty) {
  opacity: 1;
  transform: translateY(0);
}

.plan-error {
  display: block;
  margin-top: 6px;
}

.form-field.has-error input,
.form-field.has-error select {
  border-color: rgba(138, 35, 56, 0.44);
  box-shadow: 0 0 0 4px rgba(138, 35, 56, 0.08);
}

.password-checklist {
  display: none;
  gap: 7px;
  margin: -2px 0 2px;
  padding: 12px 13px;
  border-radius: 18px;
  border: 1px solid rgba(7, 4, 27, 0.1);
  background: rgba(255, 255, 255, 0.26);
  list-style: none;
}

.password-checklist.is-visible {
  display: grid;
}

.password-checklist li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: #8a2338;
  font-size: 11px;
  line-height: 1.35;
  font-weight: 700;
}

.password-checklist li::before {
  content: "";
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  margin-top: 5px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.72;
}

.password-checklist li.is-valid {
  display: none;
}

.checkbox-field {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 2px;
}

.checkbox-field input {
  width: 17px;
  height: 17px;
  margin: 2px 0 0;
  accent-color: var(--ink);
  flex: 0 0 auto;
}

.checkbox-field a {
  position: relative;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
}

.checkbox-field a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 100%;
  height: 1.5px;
  border-radius: 999px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: center;
  opacity: 0;
  transition:
    transform 0.7s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.3s ease;
}

.checkbox-field a:hover::after {
  transform: scaleX(1);
  opacity: 1;
}

.form-message {
  min-height: 18px;
  margin: 0;
  color: rgba(7, 4, 27, 0.72);
  font-size: 12px;
  line-height: 1.4;
  font-weight: 700;
}

.form-message.is-error {
  color: #8a2338;
}

.form-message.is-success {
  color: #145948;
}

.submit-btn {
  width: 100%;
  min-height: 52px;
  margin-top: 2px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg1);
  box-shadow: 0 18px 38px rgba(7, 4, 27, 0.2);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition:
    transform 0.45s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.45s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.3s ease;
}

.submit-btn:hover:not(:disabled) {
  transform: translateY(-3px);
  box-shadow: 0 24px 52px rgba(7, 4, 27, 0.26);
}

.submit-btn:disabled {
  cursor: wait;
  opacity: 0.7;
  box-shadow: 0 12px 24px rgba(7, 4, 27, 0.14);
}

.switch-link {
  margin: 18px 0 0;
  text-align: center;
  color: rgba(7, 4, 27, 0.62);
  font-size: 13px;
  font-weight: 600;
}

.switch-link a {
  position: relative;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
}

.switch-link a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 100%;
  height: 1.5px;
  border-radius: 999px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: center;
  opacity: 0;
  transition:
    transform 0.7s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.3s ease;
}

.switch-link a:hover::after {
  transform: scaleX(1);
  opacity: 1;
}

@keyframes fadeInSoft {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes panelIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 700px) {
  .signup-header {
    width: min(100%, calc(100% - 32px));
    gap: 14px;
  }

  .back-home-link {
    font-size: 13px;
  }

  .signup-page {
    width: min(100%, calc(100% - 28px));
    min-height: calc(100svh - 62px);
    padding-top: 28px;
    padding-bottom: 18px;
  }

  .two-column,
  .plan-options {
    grid-template-columns: 1fr;
  }

  .plan-option-content {
    min-height: 0;
  }
}

@media (max-width: 480px) {
  .brand img {
    width: 30px;
    height: 30px;
  }

  .brand span {
    font-size: 15px;
  }

  .back-home-link {
    font-size: 12px;
  }

  .form-card {
    border-radius: 28px;
    padding: 20px;
  }

  .form-heading h2 {
    font-size: 30px;
  }

  .form-field input,
  .form-field select {
    height: 48px;
    border-radius: 16px;
  }

  .plan-option-content {
    border-radius: 18px;
  }
}

.auth-legal {
  position: relative;
  z-index: 1;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 6px 0 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 9px;
  color: rgba(7, 4, 27, 0.5);
  font-size: 12px;
  text-align: center;
}

.auth-legal a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.25s ease, border-color 0.25s ease;
}

.auth-legal a:hover,
.auth-legal a:focus-visible {
  color: #07041b;
  border-color: currentColor;
}

.checkbox-field a {
  color: inherit;
  font-weight: 700;
  text-underline-offset: 3px;
}

@media (max-width: 560px) {
  .auth-legal {
    width: min(100%, calc(100% - 28px));
    padding: 6px 0 18px;
  }
}



.submit-btn.is-loading {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.submit-btn.is-loading::before {
  content: "";
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  border: 2px solid rgba(236, 248, 255, 0.34);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: signupButtonSpin 0.75s linear infinite;
}

@keyframes signupButtonSpin {
  to { transform: rotate(360deg); }
}
