/* Duolingo PRO style signup */

.signup-shell {
  min-height: calc(100vh - 2rem);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem 3rem;
  background:
    radial-gradient(circle at top left, rgba(88, 204, 2, 0.10), transparent 24rem),
    radial-gradient(circle at bottom right, rgba(28, 176, 246, 0.10), transparent 24rem),
    linear-gradient(180deg, #f7f7f7 0%, #f1f7f2 100%);
}

.signup-page {
  width: 100%;
  max-width: 460px;
}

/* Hero */

.signup-hero {
  text-align: center;
  margin-bottom: 1.25rem;
}

/* Speech bubble → mascot (same pattern as login) */
.signup-hero-mascot-row {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem 0.75rem;
}

.signup-hero-mascot-slot {
  flex: 0 0 auto;
  line-height: 0;
}

.signup-hero-mascot-slot .mascot {
  margin-bottom: 0;
}

.signup-speech-bubble {
  position: relative;
  flex: 0 1 auto;
  background: linear-gradient(168deg, #ffffff 0%, #f0fdf4 45%, #ffffff 100%);
  border: 2px solid rgba(88, 204, 2, 0.38);
  border-radius: 1.75rem 1.35rem 1.65rem 1.45rem;
  padding: 1rem 1.25rem;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 2px 10px rgba(88, 204, 2, 0.14),
    0 12px 32px rgba(28, 25, 23, 0.07);
  max-width: 17rem;
  text-align: center;
  transform: rotate(-1.15deg);
  transition: transform 0.4s cubic-bezier(0.34, 1.45, 0.64, 1), box-shadow 0.35s ease;
}

.signup-speech-bubble:hover {
  transform: rotate(0deg) scale(1.04);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 4px 16px rgba(88, 204, 2, 0.2),
    0 16px 40px rgba(28, 25, 23, 0.09);
}

.signup-speech-bubble::before {
  content: "";
  position: absolute;
  right: -14px;
  top: 50%;
  transform: translateY(-50%);
  border-style: solid;
  border-width: 11px 0 11px 14px;
  border-color: transparent transparent transparent rgba(88, 204, 2, 0.38);
  z-index: 0;
}

.signup-speech-bubble::after {
  content: "";
  position: absolute;
  right: -11px;
  top: 50%;
  transform: translateY(-50%);
  border-style: solid;
  border-width: 9px 0 9px 12px;
  border-color: transparent transparent transparent #f4fdf7;
  z-index: 1;
}

.signup-speech-bubble__title {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.3;
  text-transform: uppercase;
  letter-spacing: 0.045em;
}

.signup-mascot {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.signup-mascot::before {
  content: "";
  position: absolute;
  width: 140%;
  height: 140%;
  background: radial-gradient(circle, rgba(88, 204, 2, 0.15), transparent 70%);
  border-radius: 50%;
  z-index: 0;
}

.signup-mascot__img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  animation: mascotFloat 3s ease-in-out infinite;
  filter: drop-shadow(0 12px 20px rgba(0, 0, 0, 0.12));
}

@keyframes mascotFloat {
  0% { transform: translateY(0px) scale(1); }
  50% { transform: translateY(-6px) scale(1.02); }
  100% { transform: translateY(0px) scale(1); }
}

/* Title lives in .signup-speech-bubble__title; keep for any legacy hooks */
.signup-page__title {
  margin: 0;
  font-size: 2rem;
  line-height: 1.08;
}

.signup-page__subtitle {
  margin: 0.5rem auto 0;
  max-width: 320px;
  color: #777;
  font-size: 1rem;
  line-height: 1.45;
}

/* Progress */

.signup-progress {
  margin-bottom: 1.4rem;
}

.signup-progress__track {
  height: 12px;
  background: #e9edf1;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 0.85rem;
}

.signup-progress__bar {
  height: 100%;
  background: linear-gradient(90deg, #58cc02 0%, #7ddc2b 100%);
  border-radius: 999px;
  transition: width 0.28s ease;
}

.signup-progress__steps {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}

.signup-progress__step {
  width: 38px;
  height: 38px;
  border: 2px solid #e5e7eb;
  background: #fff;
  color: #8b8b8b;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.18s ease;
}

.signup-progress__step.is-complete {
  border-color: #58cc02;
  background: #e9f9dd;
  color: #3d8f02;
}

.signup-progress__step.is-active {
  border-color: #58cc02;
  background: #58cc02;
  color: #fff;
  box-shadow: 0 6px 14px rgba(88, 204, 2, 0.22);
}

/* Form shell */

.signup-form {
  background: #fff;
  border: 1px solid #ebeff3;
  border-radius: 28px;
  box-shadow: 0 14px 40px rgba(17, 24, 39, 0.08);
  padding: 1.25rem;
}

/* Error summary */

.signup-form__errors {
  margin-bottom: 1rem;
  padding: 0.95rem 1rem;
  border: 2px solid #ffd4d4;
  border-radius: 18px;
  background: #fff1f1;
}

.signup-form__errors--summary {
  margin-top: 0.75rem;
}

.signup-form__error-title {
  margin: 0 0 0.45rem;
  font-weight: 800;
  color: #c53030;
}

.signup-form__error-list {
  margin: 0;
  padding-left: 1.2rem;
  color: #b91c1c;
}

.signup-form__error-list li + li {
  margin-top: 0.22rem;
}

.signup-form__error {
  margin: 0.45rem 0 0;
  font-size: 0.88rem;
  font-weight: 700;
  color: #d14343;
}

.signup-form__required {
  color: #dc2626;
  font-weight: 800;
}

/* Steps */

.signup-step {
  display: none;
  animation: stepIn 0.22s ease;
}

.signup-step.is-active {
  display: block;
}

@keyframes stepIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.signup-step__header {
  text-align: center;
  margin-bottom: 1rem;
}

.signup-step__eyebrow {
  margin: 0 0 0.25rem;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9ca3af;
}

.signup-step__title {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 800;
  color: #3c3c3c;
}

.signup-step__text {
  margin: 0.45rem auto 0;
  max-width: 300px;
  color: #777;
  line-height: 1.45;
}

.signup-stack {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.signup-form__group {
  display: flex;
  flex-direction: column;
}

.signup-form__label {
  margin-bottom: 0.4rem;
  font-size: 0.83rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #59616a;
}

.signup-form__input,
.signup-form__select {
  width: 100%;
  height: 56px;
  padding: 0 1rem;
  border: 2px solid #e5e5e5;
  border-radius: 16px;
  background: #fff;
  font-size: 1rem;
  color: #3c3c3c;
  font-family: inherit;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.05s ease;
}

.signup-form__input::placeholder {
  color: #9ca3af;
  font-weight: 600;
}

.signup-form__input:hover,
.signup-form__select:hover {
  border-color: #d6d6d6;
}

.signup-form__input:focus,
.signup-form__select:focus {
  outline: none;
  border-color: #84d8ff;
  box-shadow: 0 0 0 4px rgba(28, 176, 246, 0.12);
}

.signup-form__hint {
  margin: 0.45rem 0 0;
  font-size: 0.82rem;
  color: #7b8794;
}

/* DOB */

.signup-form__fieldset-dob {
  margin: 0;
  padding: 0;
  border: none;
  min-width: 0;
}

.signup-form__fieldset-legend {
  padding: 0;
}

.signup-form__dob-row {
  display: grid;
  grid-template-columns: 1fr 1.4fr 1fr;
  gap: 0.6rem;
}

.signup-form__dob-cell {
  min-width: 0;
}

.signup-form__dob-sublabel {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #94a3b8;
}

/* Password */

.password-field {
  position: relative;
}

.password-field .signup-form__input {
  padding-right: 3.25rem;
}

.password-toggle-btn {
  position: absolute;
  top: 50%;
  right: 0.75rem;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: #8b8b8b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}

.password-toggle-btn:hover {
  background: #f3f4f6;
  color: #555;
}

/* Terms */

.signup-form__section--terms {
  margin: 0;
}

.signup-form__terms-card {
  padding: 1rem;
  border: 2px solid #eef2f5;
  border-radius: 20px;
  background: #fafcfd;
}

.signup-form__terms-label {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  cursor: pointer;
  margin: 0;
  color: #475569;
  line-height: 1.5;
}

.signup-form__terms-checkbox {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.signup-form__terms-box {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border: 2px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  transition: all 0.18s ease;
}

.signup-form__terms-label:hover .signup-form__terms-box {
  border-color: #94a3b8;
}

.signup-form__terms-checkbox:focus + .signup-form__terms-box {
  box-shadow: 0 0 0 4px rgba(28, 176, 246, 0.12);
}

.signup-form__terms-checkbox:checked + .signup-form__terms-box {
  background: #58cc02;
  border-color: #46a302;
}

.signup-form__terms-checkbox:checked + .signup-form__terms-box::after {
  content: "";
  display: block;
  width: 6px;
  height: 11px;
  margin: 4px 0 0 7px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.signup-form__terms-text {
  flex: 1;
}

.signup-form__terms-link {
  color: #1cb0f6;
  font-weight: 800;
  text-decoration: none;
}

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

/* Buttons */

.signup-step__actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.signup-step__actions--single .signup-btn {
  width: 100%;
}

.signup-btn {
  height: 56px;
  border: none;
  border-radius: 16px;
  font-family: inherit;
  font-size: 0.98rem;
  font-weight: 900;
  letter-spacing: 0.03em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  cursor: pointer;
  transition: transform 0.05s ease, filter 0.15s ease, box-shadow 0.05s ease;
}

.signup-btn--primary {
  flex: 1;
  background: #58cc02;
  color: #fff;
  box-shadow: 0 5px 0 #46a302;
}

.signup-btn--primary:hover {
  filter: brightness(1.02);
}

.signup-btn--primary:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 #46a302;
}

.signup-btn--ghost {
  min-width: 110px;
  background: #fff;
  color: #6b7280;
  border: 2px solid #e5e7eb;
}

.signup-btn--ghost:hover {
  background: #f9fafb;
}

.signup-btn--submit {
  flex: 1;
}

/* Footer */

.signup-page__footer {
  margin: 1.25rem 0 0;
  text-align: center;
  font-size: 0.95rem;
  color: #777;
}

.signup-page__link {
  color: #1cb0f6;
  font-weight: 800;
  text-decoration: none;
}

.signup-page__link:hover {
  text-decoration: underline;
}

/* Mobile */

@media (max-width: 520px) {
  .signup-shell {
    align-items: flex-start;
    padding-top: 1.25rem;
  }

  .signup-form {
    border-radius: 24px;
    padding: 1rem;
  }

  .signup-page__title {
    font-size: 1.75rem;
  }

  .signup-speech-bubble {
    max-width: 100%;
  }

  .signup-hero-mascot-row {
    flex-direction: column;
    gap: 0.5rem;
  }

  .signup-speech-bubble {
    transform: none;
  }

  .signup-speech-bubble:hover {
    transform: scale(1.02);
  }

  .signup-speech-bubble::before {
    right: auto;
    left: 50%;
    top: 100%;
    transform: translateX(-50%);
    border-width: 13px 11px 0 11px;
    border-color: rgba(88, 204, 2, 0.38) transparent transparent transparent;
  }

  .signup-speech-bubble::after {
    right: auto;
    left: 50%;
    top: 100%;
    transform: translateX(-50%);
    margin-top: -2px;
    border-width: 11px 9px 0 9px;
    border-color: #f4fdf7 transparent transparent transparent;
  }

  .signup-speech-bubble__title {
    font-size: 0.98rem;
  }

  .signup-mascot {
    width: 96px;
    height: 96px;
  }

  .signup-form__dob-row {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .signup-step__actions {
    flex-direction: column;
  }

  .signup-btn--ghost,
  .signup-btn--primary {
    width: 100%;
  }
}