/* ===== MODAL OVERLAY ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(5, 7, 15, 0.82);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

/* ===== MODAL BOX ===== */
.modal-box {
  background: #111827;
  border: 1px solid #1e2d45;
  border-radius: 24px;
  padding: 48px 40px 40px;
  max-width: 480px;
  width: 100%;
  position: relative;
  text-align: center;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(34,197,94,0.08);
  transform: translateY(24px) scale(0.97);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
}

.modal-overlay.active .modal-box {
  transform: translateY(0) scale(1);
}

/* ===== CLOSE BUTTON ===== */
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255,255,255,0.06);
  border: none;
  color: #8b9ab5;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}

.modal-close:hover {
  background: rgba(255,255,255,0.12);
  color: #f0f4ff;
}

/* ===== ICON ===== */
.modal-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  display: block;
  animation: bounce-icon 1s ease infinite alternate;
}

@keyframes bounce-icon {
  from { transform: translateY(0); }
  to   { transform: translateY(-6px); }
}

.modal-icon.done {
  animation: none;
}

/* ===== TITLE & SUBTITLE ===== */
.modal-title {
  font-size: 1.5rem;
  font-weight: 900;
  color: #f0f4ff;
  margin-bottom: 8px;
}

.modal-subtitle {
  font-size: 0.92rem;
  color: #8b9ab5;
  margin-bottom: 28px;
  line-height: 1.5;
}

.modal-subtitle strong {
  color: #f0f4ff;
}

/* ===== PROGRESS BAR ===== */
.modal-progress-wrap {
  margin-bottom: 28px;
}

.modal-progress-bar {
  height: 8px;
  background: rgba(255,255,255,0.07);
  border-radius: 100px;
  overflow: hidden;
  margin-bottom: 8px;
}

.modal-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #22c55e, #4ade80);
  border-radius: 100px;
  transition: width 0.4s ease;
  box-shadow: 0 0 10px rgba(34,197,94,0.5);
}

.modal-progress-label {
  font-size: 0.8rem;
  color: #8b9ab5;
}

/* ===== PASSWORD BLOCK ===== */
.modal-password-block {
  background: rgba(34,197,94,0.06);
  border: 1px solid rgba(34,197,94,0.25);
  border-radius: 14px;
  padding: 18px 20px;
  margin-bottom: 24px;
}

.modal-password-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #22c55e;
  margin-bottom: 10px;
}

.modal-password-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(34,197,94,0.2);
  border-radius: 10px;
  padding: 12px 16px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
  user-select: none;
}

.modal-password-row:hover {
  background: rgba(34,197,94,0.08);
  border-color: rgba(34,197,94,0.45);
  transform: scale(1.01);
}

.modal-password-row:active {
  transform: scale(0.98);
}

.modal-password-text {
  font-family: 'Courier New', Courier, monospace;
  font-size: 1.15rem;
  font-weight: 700;
  color: #f0f4ff;
  letter-spacing: 2px;
}

.modal-copy-icon {
  font-size: 1.1rem;
  transition: transform 0.2s;
}

.modal-password-row:hover .modal-copy-icon {
  transform: scale(1.2);
}

.modal-copy-hint {
  font-size: 0.75rem;
  color: #8b9ab5;
  margin-top: 8px;
  transition: color 0.3s;
}

.modal-copy-hint.copied {
  color: #22c55e;
  font-weight: 600;
}

/* ===== STEPS ===== */
.modal-steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 28px;
  text-align: left;
}

.modal-step {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.88rem;
  color: #8b9ab5;
}

.modal-step strong {
  color: #f0f4ff;
}

.step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(232,160,32,0.15);
  border: 1px solid rgba(232,160,32,0.35);
  color: #e8a020;
  font-size: 0.75rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ===== CLOSE BUTTON (bottom) ===== */
.modal-btn-close {
  width: 100%;
  padding: 13px;
  border-radius: 10px;
  border: none;
  background: rgba(255,255,255,0.07);
  color: #f0f4ff;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}

.modal-btn-close:hover {
  background: rgba(255,255,255,0.12);
  transform: translateY(-1px);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 520px) {
  .modal-box {
    padding: 36px 20px 28px;
  }

  .modal-password-text {
    font-size: 1rem;
    letter-spacing: 1px;
  }
}
