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

/* ── Success Modal ── */

#success-modal {
  position: fixed;
  inset: 0;
  background: rgba(10, 12, 18, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1000;
}

#success-modal[hidden] { display: none !important; }

#success-modal.is-closing {
  animation: modalOverlayOut 0.35s cubic-bezier(0.4, 0, 1, 1) both;
}

#success-modal.is-closing .modal {
  animation: modalSlideDown 0.35s cubic-bezier(0.4, 0, 1, 1) both;
}

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

@keyframes modalSlideDown {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to   { opacity: 0; transform: translateY(16px) scale(0.97); }
}

#success-modal .modal {
  --blue-ribbon:    #0172fd;
  --surface-card:   #1f2430;
  --surface-raised: #252b38;
  --border-subtle:  rgba(255,255,255,0.07);
  --border-mid:     rgba(255,255,255,0.1);
  --text-primary:   #eceef6;
  --text-secondary: #a8b2c8;
  --text-muted:     #7282a0;

  font-family: 'DM Sans', sans-serif;

  position: relative;
  background: var(--surface-card);
  border: 1px solid var(--border-mid);
  border-radius: 20px;
  max-width: clamp(520px, 33vw, 680px);
  width: 100%;
  overflow: hidden;
  animation: modalSlideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
  box-shadow:
    0 0 0 1px rgba(1, 114, 253, 0.06),
    0 20px 60px rgba(0, 0, 0, 0.45),
    0 4px 16px rgba(0, 0, 0, 0.25);
}

@keyframes modalSlideUp {
  from { opacity: 0; transform: translateY(20px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

#success-modal .modal::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--blue-ribbon);
  border-radius: 20px 20px 0 0;
}

#success-modal .modal::after {
  content: '';
  position: absolute;
  top: -50px; right: -50px;
  width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(1, 114, 253, 0.08) 0%, transparent 65%);
  pointer-events: none;
}

/* ── Header ── */

#success-modal .modal-header {
  padding: 44px 44px 0;
  position: relative;
  z-index: 1;
}

#success-modal .success-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(1, 114, 253, 0.1);
  border: 1px solid rgba(1, 114, 253, 0.22);
  border-radius: 100px;
  padding: 5px 13px 5px 10px;
  margin-bottom: 18px;
  animation: modalFadeUp 0.4s 0.25s both;
}

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

#success-modal .badge-icon {
  width: 18px; height: 18px;
  background: #0172fd;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

#success-modal .badge-icon svg { display: block; }

#success-modal .badge-text {
  font-family: 'Syne', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #4fa3ff;
}

#success-modal .modal-title {
  font-family: 'Syne', sans-serif;
  font-size: 25px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
  animation: modalFadeUp 0.4s 0.35s both;
}

#success-modal .modal-subtitle {
  margin-top: 12px;
  font-size: 17px;
  color: var(--text-secondary);
  line-height: 1.7;
  animation: modalFadeUp 0.4s 0.45s both;
}

/* ── Divider ── */

#success-modal .divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 28px 44px;
  animation: modalFadeUp 0.4s 0.5s both;
}

/* ── Body ── */

#success-modal .modal-body {
  padding: 0 44px;
  position: relative;
  z-index: 1;
}

#success-modal .next-label {
  font-family: 'Syne', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 14px;
  animation: modalFadeUp 0.4s 0.55s both;
}

#success-modal .steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#success-modal .step {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
  background: var(--surface-raised);
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  animation: modalFadeUp 0.4s both;
  transition: border-color 0.2s;
}

#success-modal .step:hover { border-color: rgba(1, 114, 253, 0.2); }

#success-modal .step:nth-child(1) { animation-delay: 0.6s; }
#success-modal .step:nth-child(2) { animation-delay: 0.7s; }
#success-modal .step:nth-child(3) { animation-delay: 0.8s; }

#success-modal .step-num {
  flex-shrink: 0;
  width: 28px; height: 28px;
  border-radius: 8px;
  background: #0172fd;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Syne', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  margin-top: 1px;
}

#success-modal .step-text {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.65;
  padding-top: 5px;
}

/* ── Footer ── */

#success-modal .modal-footer {
  padding: 26px 44px 38px;
  position: relative;
  z-index: 1;
  animation: modalFadeUp 0.4s 0.85s both;
}

#success-modal .btn-modal {
  display: block;
  width: 100%;
  padding: 15px 28px;
  background: #0172fd;
  border: none;
  border-radius: 12px;
  font-family: 'Syne', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: background 0.18s, transform 0.15s, box-shadow 0.18s;
  box-shadow: 0 2px 16px rgba(1, 114, 253, 0.35);
}

#success-modal .btn-modal:hover {
  background: #0161dc;
  transform: translateY(-1px);
  box-shadow: 0 4px 24px rgba(1, 114, 253, 0.45);
}

#success-modal .btn-modal:active { transform: translateY(0); }

/* ── Close button ── */

#success-modal .close-btn {
  position: absolute;
  top: 16px; right: 16px;
  width: 34px; height: 34px;
  background: var(--surface-raised);
  border: 1px solid var(--border-subtle);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: background 0.15s, border-color 0.15s;
  color: var(--text-muted);
}

#success-modal .close-btn:hover {
  background: rgba(255,255,255,0.07);
  border-color: var(--border-mid);
  color: var(--text-secondary);
}
