﻿/* UfoneCoin Auth — V3 Duolingo-clean (light, phone-only flow) */

html.dp-auth-page,
html.dp-auth-page body,
body.dp-auth-body {
  margin: 0;
  min-height: 100dvh;
  background: var(--dp-v3-bg, #f4f7fb);
  color: var(--dp-v3-ink, #0f172a);
  color-scheme: light;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

html.dp-auth-page *,
html.dp-auth-page *::before,
html.dp-auth-page *::after { box-sizing: border-box; }

.dp-auth-page-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 60% at 0% 0%, rgba(255, 121, 0, 0.09), transparent 55%),
    radial-gradient(ellipse 70% 50% at 100% 10%, rgba(13, 148, 136, 0.07), transparent 50%),
    var(--dp-v3-bg, #f4f7fb);
}

.dp-auth-page-grid { display: none; }

.dp-auth-shell {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  max-width: 420px;
  margin: 0 auto;
  padding:
    max(16px, env(safe-area-inset-top))
    max(20px, env(safe-area-inset-right))
    max(24px, env(safe-area-inset-bottom))
    max(20px, env(safe-area-inset-left));
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.dp-auth-header {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 8px;
}

.dp-auth-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--dp-v3-ink, #0f172a);
}

.dp-auth-logo img {
  width: 132px;
  height: auto;
  max-height: 48px;
  border-radius: 0;
  box-shadow: none;
  object-fit: contain;
}

.dp-auth-logo-text {
  display: none;
}

.dp-auth-logo-text span { color: #006837; }

/* Step progress (signup flow) */
.dp-auth-steps {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dp-auth-steps__track {
  height: 10px;
  border-radius: 999px;
  background: #e8edf5;
  overflow: hidden;
}

.dp-auth-steps__fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #FF7900, #E56A00);
  transition: width 0.35s ease;
}

.dp-auth-steps__text {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--dp-v3-ink-muted, #94a3b8);
  text-align: center;
}

.dp-auth-card {
  background: #fff;
  border: 2px solid rgba(15, 23, 42, 0.06);
  border-radius: 24px;
  padding: 28px 22px 26px;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.06);
}

.dp-auth-kicker {
  display: inline-block;
  margin: 0 0 6px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--dp-v3-indigo-soft, #FFF4E8);
  color: var(--dp-v3-indigo, #FF7900);
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dp-auth-title {
  margin: 0 0 6px;
  font-size: 1.625rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--dp-v3-ink, #0f172a);
}

.dp-auth-lead {
  margin: 0 0 22px;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--dp-v3-ink-soft, #475569);
}

.dp-auth-greet {
  margin: 0 0 20px;
  font-size: 0.9375rem;
  color: var(--dp-v3-ink-soft, #475569);
}

.dp-auth-greet strong {
  color: var(--dp-v3-ink, #0f172a);
  font-weight: 800;
}

.dp-auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dp-auth-field label,
.dp-auth-field-label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--dp-v3-ink-soft, #64748b);
}

.dp-auth-field label .optional {
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  color: var(--dp-v3-ink-muted, #94a3b8);
}

.dp-auth-field input,
.dp-auth-field select {
  width: 100%;
  height: 52px;
  padding: 0 16px;
  border: 2px solid #e2e8f0;
  border-radius: 16px;
  background: #f8fafc;
  color: var(--dp-v3-ink, #0f172a);
  font-size: 1rem;
  font-weight: 600;
  outline: none;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.dp-auth-field input::placeholder { color: #94a3b8; font-weight: 500; }

.dp-auth-field input:focus,
.dp-auth-field select:focus {
  border-color: var(--dp-v3-indigo, #FF7900);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(255, 121, 0, 0.12);
}

.dp-auth-pw-wrap {
  position: relative;
}

.dp-auth-pw-wrap input { padding-right: 72px; }

.dp-auth-pw-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: var(--dp-v3-indigo, #FF7900);
  font-size: 0.8125rem;
  font-weight: 800;
  cursor: pointer;
  padding: 6px 8px;
}

.dp-auth-row {
  display: flex;
  justify-content: flex-end;
  margin-top: -6px;
}

.dp-auth-link {
  color: var(--dp-v3-indigo, #FF7900);
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
}

.dp-auth-error .dp-auth-link {
  font-size: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

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

.dp-auth-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 54px;
  margin-top: 4px;
  padding: 14px 20px;
  border: 0;
  border-radius: 18px;
  background: linear-gradient(180deg, #8b5cf6 0%, #FF7900 45%, #E56A00 100%);
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 8px 0 #CC6A00, 0 14px 28px rgba(255, 121, 0, 0.28);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.dp-auth-submit:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 9px 0 #CC6A00, 0 16px 32px rgba(255, 121, 0, 0.32);
}

.dp-auth-submit:active:not(:disabled) {
  transform: translateY(4px);
  box-shadow: 0 4px 0 #CC6A00, 0 8px 16px rgba(255, 121, 0, 0.22);
}

.dp-auth-submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: 0 4px 0 #33A866, 0 8px 16px rgba(255, 121, 0, 0.12);
}

.dp-auth-submit--ghost {
  background: #fff;
  color: var(--dp-v3-indigo, #FF7900);
  border: 2px solid #e2e8f0;
  box-shadow: none;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 700;
}

.dp-auth-submit--ghost:hover:not(:disabled) {
  border-color: #c4b5fd;
  box-shadow: none;
  transform: none;
}

.dp-auth-error {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #fff1f2;
  border: 2px solid #fecdd3;
  color: #be123c;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.45;
}

.dp-auth-error[hidden] { display: none !important; }

.dp-auth-switch {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 2px solid #f1f5f9;
  text-align: center;
}

.dp-auth-switch p {
  margin: 0 0 6px;
  font-size: 0.875rem;
  color: var(--dp-v3-ink-muted, #94a3b8);
}

.dp-auth-switch a {
  font-size: 0.9375rem;
  font-weight: 800;
  color: var(--dp-v3-indigo, #FF7900);
  text-decoration: none;
}

.dp-auth-switch a:hover { text-decoration: underline; }

.dp-auth-meta {
  margin: auto 0 0;
  text-align: center;
  font-size: 0.75rem;
  color: var(--dp-v3-ink-muted, #94a3b8);
}

.dp-auth-meta a {
  color: var(--dp-v3-ink-soft, #64748b);
  text-decoration: none;
  font-weight: 600;
}

/* Gender picker */
.dp-auth-gender-pick {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.dp-auth-gender-opt {
  position: relative;
  cursor: pointer;
}

.dp-auth-gender-opt input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.dp-auth-gender-opt span {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  border: 2px solid #e2e8f0;
  border-radius: 16px;
  background: #f8fafc;
  font-weight: 800;
  color: var(--dp-v3-ink-soft, #475569);
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.dp-auth-gender-opt input:checked + span {
  border-color: var(--dp-v3-indigo, #FF7900);
  background: var(--dp-v3-indigo-soft, #FFF4E8);
  color: var(--dp-v3-indigo, #FF7900);
}

/* Terms */
.dp-auth-terms label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--dp-v3-ink-soft, #475569);
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
}

.dp-auth-terms input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: var(--dp-v3-indigo, #FF7900);
  flex-shrink: 0;
}

.dp-auth-terms a {
  color: var(--dp-v3-indigo, #FF7900);
  font-weight: 700;
}

.dp-auth-field-hint {
  display: block;
  margin-top: 8px;
  font-size: 0.75rem;
  color: var(--dp-v3-ink-muted, #94a3b8);
}

.dp-auth-field-hint.is-error { color: #be123c; }

/* City */
.dp-city-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.dp-city-autocomplete { flex: 1; position: relative; }

.dp-city-auto-btn {
  flex-shrink: 0;
  min-width: 56px;
  height: 52px;
  border: 2px solid #e2e8f0;
  border-radius: 16px;
  background: #fff;
  color: var(--dp-v3-indigo, #FF7900);
  font-weight: 800;
  font-size: 0.8125rem;
  cursor: pointer;
}

.dp-city-auto-btn:hover:not(:disabled) {
  border-color: #c4b5fd;
  background: var(--dp-v3-indigo-soft, #FFF4E8);
}

.dp-city-suggest {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 20;
  margin: 0;
  padding: 6px;
  list-style: none;
  max-height: 200px;
  overflow-y: auto;
  background: #fff;
  border: 2px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.1);
}

.dp-city-suggest li {
  padding: 10px 12px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
}

.dp-city-suggest li:hover,
.dp-city-suggest li.is-active {
  background: var(--dp-v3-indigo-soft, #FFF4E8);
  color: var(--dp-v3-indigo, #FF7900);
}

/* Welcome page */
.dp-auth-shell--welcome { justify-content: center; }

.dp-welcome-celebration {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.dp-auth-card--welcome { text-align: center; }

.dp-welcome-gift {
  margin-bottom: 20px;
  padding: 20px;
  border-radius: 20px;
  background: linear-gradient(135deg, #FFF4E8, #ecfdf5);
  border: 2px solid rgba(255, 121, 0, 0.12);
}

.dp-welcome-gift-tag {
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dp-v3-indigo, #FF7900);
}

.dp-welcome-gift-amount {
  margin: 8px 0 4px;
  font-size: 2rem;
  font-weight: 800;
  color: var(--dp-v3-ink, #0f172a);
}

.dp-welcome-gift-note {
  margin: 0;
  font-size: 0.875rem;
  color: var(--dp-v3-ink-muted, #94a3b8);
}

.dp-welcome-hello {
  margin: 0 0 4px;
  font-size: 1.25rem;
  font-weight: 800;
}

.dp-welcome-hello span { color: var(--dp-v3-indigo, #FF7900); }

.dp-welcome-sub {
  margin: 0 0 20px;
  color: var(--dp-v3-ink-soft, #475569);
}

.dp-welcome-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Modals */
.dp-existing-account-modal,
.dp-account-not-found-modal {
  position: fixed;
  inset: 0;
  z-index: 10060;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.dp-existing-account-modal[hidden],
.dp-account-not-found-modal[hidden] { display: none !important; }

.dp-existing-account-modal__backdrop,
.dp-account-not-found-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}

.dp-existing-account-modal__card,
.dp-account-not-found-modal__card {
  position: relative;
  width: min(100%, 380px);
  padding: 24px 22px;
  border-radius: 24px;
  background: #fff;
  border: 2px solid rgba(15, 23, 42, 0.06);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
  text-align: center;
}

.dp-existing-account-modal__icon,
.dp-account-not-found-modal__icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 12px;
  border-radius: 16px;
  background: var(--dp-v3-indigo-soft, #FFF4E8);
  display: grid;
  place-items: center;
  font-size: 1.5rem;
}

.dp-existing-account-modal__title,
.dp-account-not-found-modal__title {
  margin: 0 0 8px;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--dp-v3-ink, #0f172a);
}

.dp-existing-account-modal__text,
.dp-existing-account-modal__hint,
.dp-account-not-found-modal__text,
.dp-account-not-found-modal__hint {
  margin: 0 0 10px;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--dp-v3-ink-soft, #475569);
}

.dp-existing-account-modal__identity {
  margin: 12px 0;
  font-size: 1.125rem;
  font-weight: 800;
  color: var(--dp-v3-indigo, #FF7900);
}

.dp-existing-account-modal__actions,
.dp-account-not-found-modal__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 18px;
}

.dp-existing-account-modal__btn,
.dp-account-not-found-modal__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 16px;
  border-radius: 16px;
  font-weight: 800;
  font-size: 0.9375rem;
  text-decoration: none;
  cursor: pointer;
  border: 0;
}

.dp-existing-account-modal__btn--primary,
.dp-account-not-found-modal__btn--primary {
  background: linear-gradient(180deg, #8b5cf6, #E56A00);
  color: #fff;
}

.dp-existing-account-modal__btn--ghost,
.dp-account-not-found-modal__btn--ghost {
  background: #f8fafc;
  color: var(--dp-v3-ink-soft, #475569);
  border: 2px solid #e2e8f0;
}

html.dp-existing-account-open,
html.dp-account-not-found-open { overflow: hidden; }

/* Toast */
.dp-toast {
  position: fixed;
  top: max(16px, env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  z-index: 10070;
  max-width: min(92vw, 360px);
  padding: 12px 16px;
  border-radius: 14px;
  background: #fff;
  border: 2px solid #e2e8f0;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.dp-toast-show { opacity: 1; }
.dp-toast-success { border-color: #86efac; color: #166534; }
.dp-toast-error { border-color: #fecdd3; color: #be123c; }

html.dp-has-app-download-top .dp-auth-shell {
  padding-top: calc(68px + env(safe-area-inset-top));
}
