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

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #0a0a0f;
  --surface:   #12121a;
  --surface2:  #1a1a26;
  --border:    #2a2a3d;
  --accent:    #6c63ff;
  --accent2:   #a78bfa;
  --success:   #22d3a0;
  --error:     #ff5c5c;
  --text:      #e8e8f0;
  --muted:     #6b6b8a;
  --radius:    12px;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ── Hero ─────────────────────────────────────────── */
.hero {
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(108,99,255,.35) 0%, transparent 70%),
    var(--bg);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(108,99,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(108,99,255,.04) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: rgba(108,99,255,.15);
  border: 1px solid rgba(108,99,255,.35);
  border-radius: 999px;
  padding: .35rem 1rem;
  font-size: .78rem;
  font-weight: 600;
  color: var(--accent2);
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  max-width: 800px;
  margin-bottom: 1.25rem;
  background: linear-gradient(135deg, #fff 30%, var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 520px;
  line-height: 1.7;
  margin-bottom: 2.5rem;
}

.info-chips {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 2.5rem;
}

.chip {
  display: flex;
  align-items: center;
  gap: .4rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: .4rem .9rem;
  font-size: .82rem;
  color: var(--muted);
}

.chip span { color: var(--text); font-weight: 600; }

/* ── Register Button ──────────────────────────────── */
.btn-register {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  color: #fff;
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  padding: 1rem 2.4rem;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 0 40px rgba(108,99,255,.5);
  transition: transform .2s, box-shadow .2s;
  z-index: 1;
}

.btn-register::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), #a78bfa);
  z-index: -1;
  opacity: 0;
  transition: opacity .2s;
}

.btn-register:hover { transform: translateY(-3px); box-shadow: 0 0 60px rgba(108,99,255,.7); }
.btn-register:active { transform: translateY(0); }
.btn-register svg { width: 20px; height: 20px; }

/* ── Modal Overlay ────────────────────────────────── */
.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.75);
  backdrop-filter: blur(6px);
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.overlay.open { display: flex; }

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  width: 100%;
  max-width: 620px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2rem;
  position: relative;
  animation: slideUp .3s cubic-bezier(.16,1,.3,1);
}

@keyframes slideUp {
  from { opacity:0; transform: translateY(24px) scale(.97); }
  to   { opacity:1; transform: none; }
}

/* ── Progress ─────────────────────────────────────── */
.progress-bar {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 2rem;
}

.step-dot {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: .78rem; font-weight: 700;
  color: var(--muted);
  background: var(--surface2);
  flex-shrink: 0;
  transition: all .3s;
}

.step-dot.active { border-color: var(--accent); background: var(--accent); color: #fff; box-shadow: 0 0 12px rgba(108,99,255,.5); }
.step-dot.done   { border-color: var(--success); background: var(--success); color: #fff; }

.step-line {
  flex: 1;
  height: 2px;
  background: var(--border);
  transition: background .3s;
}
.step-line.done { background: var(--success); }

/* ── Form ─────────────────────────────────────────── */
.step { display: none; }
.step.active { display: block; }

.step-title { font-size: 1.3rem; font-weight: 700; margin-bottom: .35rem; }
.step-sub   { color: var(--muted); font-size: .88rem; margin-bottom: 1.5rem; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }
.full      { grid-column: 1/-1; }

label { display: block; font-size: .8rem; font-weight: 600; color: var(--muted); margin-bottom: .4rem; letter-spacing: .04em; text-transform: uppercase; }

input, select {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: inherit;
  font-size: .95rem;
  padding: .7rem 1rem;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}

input:focus, select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(108,99,255,.2);
}

input::placeholder { color: var(--muted); }

/* ── Member Cards ─────────────────────────────────── */
.member-count-row { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.25rem; }
.member-count-row label { margin:0; }

.member-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: .9rem;
}

.member-card h4 {
  font-size: .88rem;
  font-weight: 600;
  color: var(--accent2);
  margin-bottom: .75rem;
  display: flex; align-items: center; gap: .4rem;
}

/* ── Navigation buttons ───────────────────────────── */
.btn-row { display: flex; gap: .75rem; margin-top: 1.5rem; }

.btn {
  flex: 1;
  padding: .75rem 1.5rem;
  border-radius: 999px;
  font-family: inherit;
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all .2s;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
}
.btn-outline:hover { border-color: var(--accent); color: var(--text); }

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  color: #fff;
  box-shadow: 0 4px 20px rgba(108,99,255,.4);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(108,99,255,.5); }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.btn-close {
  position: absolute;
  top: 1.2rem; right: 1.2rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 32px; height: 32px;
  color: var(--muted);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .2s;
}
.btn-close:hover { color: var(--text); border-color: var(--accent); }

/* ── Fee Banner ───────────────────────────────────── */
.fee-banner {
  background: linear-gradient(135deg, rgba(108,99,255,.15), rgba(139,92,246,.1));
  border: 1px solid rgba(108,99,255,.3);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}
.fee-label { font-size: .82rem; color: var(--muted); }
.fee-amount { font-size: 1.4rem; font-weight: 800; color: var(--accent2); }

/* ── Status screen ────────────────────────────────── */
.status-screen {
  text-align: center;
  padding: 2rem 0;
}
.status-icon { font-size: 3.5rem; margin-bottom: 1rem; }
.status-screen h2 { font-size: 1.4rem; font-weight: 700; margin-bottom: .5rem; }
.status-screen p  { color: var(--muted); font-size: .9rem; line-height: 1.6; }

.spinner {
  width: 48px; height: 48px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Toast ────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 1.5rem; right: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .85rem 1.25rem;
  font-size: .88rem;
  max-width: 320px;
  z-index: 999;
  transform: translateY(100px);
  opacity: 0;
  transition: all .35s cubic-bezier(.16,1,.3,1);
  display: flex; align-items: center; gap: .6rem;
}
.toast.show { transform: none; opacity: 1; }
.toast.error { border-color: var(--error); }
.toast.success { border-color: var(--success); }

/* ── Scrollbar ────────────────────────────────────── */
.modal::-webkit-scrollbar { width: 4px; }
.modal::-webkit-scrollbar-track { background: transparent; }
.modal::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

@media (max-width: 480px) {
  .form-grid { grid-template-columns: 1fr; }
  .modal { padding: 1.25rem; }
  .fee-banner { flex-direction: column; gap: .4rem; text-align: center; }
}
