/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --purple:      #7c3aed;
  --purple-light:#ede9fe;
  --purple-mid:  #a78bfa;
  --purple-dark: #5b21b6;
  --text:        #1e1b2e;
  --muted:       #6b7280;
  --border:      #e5e0f5;
  --bg:          #faf9ff;
  --white:       #ffffff;
  --success:     #059669;
  --radius:      12px;
  --shadow:      0 4px 24px rgba(124,58,237,.10);
}

body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

/* ── Header ── */
header {
  background: var(--white);
  border-bottom: 2px solid var(--purple-light);
  padding: 18px 32px;
  text-align: center;
}

.logo {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.5px;
}

.logo span { color: var(--purple); }

.tagline {
  color: var(--muted);
  font-size: .9rem;
  margin-top: 2px;
}

/* ── Main container ── */
main {
  max-width: 660px;
  margin: 40px auto 60px;
  padding: 0 16px;
}

/* ── Step indicators ── */
.steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 6px;
}

.step {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--border);
  color: var(--muted);
  font-weight: 700;
  font-size: .9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .3s, color .3s;
  flex-shrink: 0;
}

.step.active {
  background: var(--purple);
  color: var(--white);
  box-shadow: 0 0 0 4px var(--purple-light);
}

.step.done {
  background: var(--purple-dark);
  color: var(--white);
}

.step-line {
  flex: 1;
  height: 3px;
  background: var(--border);
  max-width: 120px;
  transition: background .3s;
}

.step-line.done { background: var(--purple-dark); }

.step-labels {
  display: flex;
  justify-content: space-between;
  font-size: .75rem;
  color: var(--muted);
  margin-bottom: 28px;
  padding: 0 4px;
}

/* ── Form card ── */
.form-section {
  display: none;
  background: var(--white);
  border-radius: var(--radius);
  padding: 36px 40px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  animation: fadeIn .3s ease;
}

.form-section.active { display: block; }

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

h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--purple-dark);
  margin-bottom: 6px;
}

.section-desc {
  color: var(--muted);
  font-size: .88rem;
  margin-bottom: 24px;
}

/* ── Fields ── */
.field { margin-bottom: 18px; }

.field-group.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

label {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

input[type="text"],
input[type="number"],
input[type="email"],
input[type="tel"],
input[type="date"],
select {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: .95rem;
  color: var(--text);
  background: var(--white);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}

input:focus, select:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(124,58,237,.12);
}

input.error { border-color: #dc2626; }

small {
  display: block;
  font-size: .75rem;
  color: var(--muted);
  margin-top: 4px;
}

/* ── Radio group ── */
.radio-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 4px;
}

.radio-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: background .2s, border-color .2s;
  font-weight: 400;
  font-size: .92rem;
}

.radio-option:hover { background: var(--purple-light); border-color: var(--purple-mid); }

.radio-option input[type="radio"] {
  width: 16px;
  height: 16px;
  accent-color: var(--purple);
  flex-shrink: 0;
}

.radio-option input[type="radio"]:checked + span { color: var(--purple-dark); font-weight: 600; }

.radio-option:has(input:checked) {
  background: var(--purple-light);
  border-color: var(--purple);
}

/* ── Upload boxes ── */
.upload-card { margin-bottom: 16px; }

.upload-box {
  border: 2px dashed var(--purple-mid);
  border-radius: var(--radius);
  background: var(--purple-light);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: background .2s, border-color .2s;
  position: relative;
  overflow: hidden;
}

.upload-box:hover { background: #ddd6fe; border-color: var(--purple); }
.upload-box.has-file { border-style: solid; border-color: var(--purple); background: #f3f0ff; }

.upload-icon { font-size: 2rem; margin-bottom: 6px; }

.upload-box p { font-weight: 600; font-size: .95rem; color: var(--purple-dark); margin-bottom: 4px; }
.upload-box span { font-size: .8rem; color: var(--muted); }

.preview {
  display: none;
  width: 100%;
  max-height: 160px;
  object-fit: cover;
  border-radius: 8px;
  margin-top: 12px;
}

/* ── Loading overlay ── */
.loading-overlay {
  background: var(--white);
  border-radius: var(--radius);
  padding: 60px 40px;
  text-align: center;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.loading-spinner {
  width: 56px;
  height: 56px;
  border: 5px solid var(--purple-light);
  border-top-color: var(--purple);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
  margin: 0 auto 22px;
}

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

.loading-msg {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--purple-dark);
  margin-bottom: 28px;
}

.loading-bar-track {
  background: var(--purple-light);
  border-radius: 99px;
  height: 8px;
  width: 100%;
  max-width: 340px;
  margin: 0 auto;
  overflow: hidden;
}

.loading-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--purple-dark), var(--purple-mid));
  border-radius: 99px;
  width: 0%;
  transition: width linear;
}

/* ── Deposit option cards ── */
.deposit-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 24px;
}

.deposit-card {
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 16px;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background .2s, box-shadow .2s;
  user-select: none;
}

.deposit-card input[type="radio"] { display: none; }

.deposit-card:hover { border-color: var(--purple-mid); background: var(--purple-light); }

.deposit-card.selected {
  border-color: var(--purple);
  background: var(--purple-light);
  box-shadow: 0 0 0 3px rgba(124,58,237,.15);
}

/* Coming Soon card */
.coming-soon-card {
  opacity: .55;
  cursor: not-allowed;
  position: relative;
}

.coming-soon-card:hover { background: var(--white); border-color: var(--border); }

.coming-soon-badge {
  display: inline-block;
  margin-top: 8px;
  background: var(--muted);
  color: var(--white);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 99px;
}

.deposit-icon { font-size: 2rem; margin-bottom: 8px; }
.deposit-title { font-weight: 700; font-size: 1rem; color: var(--purple-dark); }
.deposit-sub   { font-size: .78rem; color: var(--muted); margin-top: 4px; }

.deposit-fields { margin-bottom: 20px; }

/* ── Summary box ── */
.summary-box {
  background: var(--purple-light);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin-bottom: 24px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: .9rem;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
}

.summary-row:last-child { border-bottom: none; }
.summary-row span:first-child { color: var(--muted); }
.summary-row .highlight { color: var(--purple-dark); font-weight: 700; font-size: 1rem; }

/* ── Buttons ── */
.btn-row {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 8px;
}

.btn-next, .btn-submit {
  background: var(--purple);
  color: var(--white);
  border: none;
  padding: 12px 28px;
  min-height: 44px;
  border-radius: 8px;
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s, transform .1s;
}

.btn-next:hover, .btn-submit:hover { background: var(--purple-dark); }
.btn-next:active, .btn-submit:active { transform: scale(.98); }

.btn-back {
  background: transparent;
  color: var(--purple);
  border: 1.5px solid var(--purple-mid);
  padding: 12px 24px;
  min-height: 44px;
  border-radius: 8px;
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s;
}

.btn-back:hover { background: var(--purple-light); }

.btn-submit {
  background: linear-gradient(135deg, var(--purple-dark), var(--purple));
  padding: 12px 36px;
  font-size: 1rem;
}

/* ── Success screen ── */
.success-screen {
  background: var(--white);
  border-radius: var(--radius);
  padding: 60px 40px;
  text-align: center;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.success-icon {
  width: 72px;
  height: 72px;
  background: var(--success);
  color: white;
  border-radius: 50%;
  font-size: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.success-screen h2 { color: var(--success); margin-bottom: 12px; font-size: 1.6rem; }
.success-screen p  { color: var(--muted); line-height: 1.7; margin-bottom: 10px; }

.success-amount {
  display: block;
  margin: 20px auto 20px;
  background: linear-gradient(135deg, var(--purple-dark), var(--purple));
  color: var(--white);
  font-size: 2rem;
  font-weight: 800;
  padding: 22px 40px;
  border-radius: var(--radius);
  max-width: 340px;
}

.success-amount .label {
  font-size: .78rem;
  font-weight: 400;
  opacity: .8;
  text-transform: uppercase;
  letter-spacing: .08em;
  display: block;
  margin-bottom: 6px;
}

.success-sub {
  font-size: .82rem !important;
  margin-top: 16px;
}

/* ── Footer ── */
footer {
  text-align: center;
  padding: 28px 16px;
  color: var(--muted);
  font-size: .82rem;
  border-top: 1px solid var(--border);
}

.footer-note { margin-top: 4px; font-size: .75rem; opacity: .7; }

/* ── Responsive ── */

/* Prevent iOS Safari from zooming into inputs */
@media (max-width: 768px) {
  input[type="text"],
  input[type="number"],
  input[type="email"],
  input[type="tel"],
  input[type="date"],
  select {
    font-size: 16px;
  }
}

@media (max-width: 600px) {
  header { padding: 14px 16px; }
  .logo  { font-size: 1.5rem; }

  main { margin: 20px auto 40px; }

  .form-section        { padding: 22px 18px; }
  .loading-overlay     { padding: 40px 20px; }
  .success-screen      { padding: 36px 20px; }

  .field-group.two-col { grid-template-columns: 1fr; }
  .deposit-options     { grid-template-columns: 1fr; }

  /* Bigger touch targets */
  .btn-next, .btn-submit, .btn-back {
    width: 100%;
    text-align: center;
    padding: 14px 20px;
    font-size: 1rem;
    min-height: 48px;
  }

  .btn-row { flex-direction: column-reverse; gap: 10px; }

  .success-amount {
    font-size: 1.5rem;
    padding: 18px 20px;
    max-width: 100%;
  }

  .summary-row {
    font-size: .82rem;
    flex-wrap: wrap;
    gap: 2px;
  }

  .step-labels { font-size: .68rem; }

  h2 { font-size: 1.15rem; }
}

@media (max-width: 400px) {
  .form-section    { padding: 18px 14px; }
  .step            { width: 30px; height: 30px; font-size: .78rem; }
  .step-labels     { font-size: .62rem; gap: 0; }
  .deposit-icon    { font-size: 1.5rem; }
  .upload-box      { padding: 18px 12px; }
  .loading-spinner { width: 44px; height: 44px; }
  .loading-msg     { font-size: .92rem; }
  .success-amount  { font-size: 1.25rem; padding: 14px 16px; }
  .success-icon    { width: 58px; height: 58px; font-size: 1.6rem; }
}
