/* ═══════════════════════════════════════════════════════════════════════════════
   HelixJumPAY — Shared Components
   ═══════════════════════════════════════════════════════════════════════════════ */

/* ─── Global Loading ─────────────────────────────────────────────────────────── */
.global-loading {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(13,0,32,0.7);
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(4px);
}
.global-loading.hidden { display: none; }
.loading-spinner {
  width: 48px; height: 48px;
  border: 4px solid var(--pink-light);
  border-top-color: var(--pink);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ─── Toast ──────────────────────────────────────────────────────────────────── */
.toast-container {
  position: fixed; top: 20px; right: 20px; z-index: 8888;
  display: flex; flex-direction: column; gap: 10px;
}
.toast {
  padding: 14px 20px; border-radius: var(--radius-sm);
  color: #fff; font-size: 14px; font-weight: 600;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  animation: toastIn 0.3s ease both;
  max-width: 320px; display: flex; align-items: center; gap: 10px;
}
.toast.out   { animation: toastOut 0.3s ease both; }
.toast.success { background: var(--green); }
.toast.error   { background: var(--red); }
.toast.info    { background: var(--blue); }
.toast.warning { background: var(--orange); }

/* ─── Buttons ────────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 28px; border-radius: var(--radius-btn);
  border: none; cursor: pointer; font-weight: 700; font-size: 15px;
  transition: var(--transition); user-select: none; white-space: nowrap;
  position: relative; overflow: hidden;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

.btn-primary {
  background: linear-gradient(135deg, var(--pink) 0%, var(--pink-light) 100%);
  color: #fff; box-shadow: 0 4px 16px rgba(255,107,157,0.4);
}
.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--pink-dark) 0%, var(--pink) 100%);
  box-shadow: 0 8px 24px rgba(255,107,157,0.5);
  transform: translateY(-1px);
}
.btn-green {
  background: linear-gradient(135deg, var(--green) 0%, #00e68a 100%);
  color: #fff; box-shadow: 0 4px 16px rgba(0,201,122,0.4);
}
.btn-green:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--green-dark) 0%, var(--green) 100%);
  box-shadow: 0 8px 24px rgba(0,201,122,0.5);
  transform: translateY(-1px);
}
.btn-outline {
  background: transparent; border: 2px solid var(--pink);
  color: var(--pink);
}
.btn-outline:hover:not(:disabled) { background: var(--pink); color: #fff; }
.btn-dark { background: var(--dark); color: #fff; }
.btn-sm  { padding: 8px 18px; font-size: 13px; }
.btn-lg  { padding: 18px 40px; font-size: 17px; }
.btn-full { width: 100%; }

/* ─── Cards ──────────────────────────────────────────────────────────────────── */
.card {
  background: var(--card-bg); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow);
  transition: box-shadow var(--transition), transform var(--transition);
}
.card:hover { box-shadow: var(--shadow-hover); }
.card-sm { padding: 18px; }
.card-title { font-size: 18px; font-weight: 700; color: var(--dark); margin-bottom: 6px; }
.card-sub   { font-size: 14px; color: #8a3050; }

/* ─── Forms ──────────────────────────────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.form-label { font-size: 13px; font-weight: 600; color: rgba(255,255,255,0.7); }
.form-input {
  padding: 13px 16px; border-radius: var(--radius-sm);
  border: 2px solid rgba(255,255,255,0.15); background: rgba(255,255,255,0.06);
  font-size: 15px; color: #fff; transition: border-color var(--transition);
  outline: none; width: 100%;
}
.form-input:focus  { border-color: var(--pink); }
.form-input.error  { border-color: var(--red); }
.form-input.valid  { border-color: var(--green); }
.form-error { font-size: 12px; color: var(--red); font-weight: 600; }
.input-wrap { position: relative; }
.input-wrap .form-input { padding-right: 44px; }
.input-icon {
  position: absolute; right: 14px; top: 50%;
  transform: translateY(-50%); cursor: pointer; font-size: 18px; color: #c0748f;
}

/* ─── Modal (Landing) ────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(0,0,0,0.65); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.modal-overlay.hidden { display: none; }
.modal-box {
  background: #fff; border-radius: var(--radius); padding: 32px;
  width: 100%; max-width: 460px; max-height: 90vh; overflow-y: auto;
  animation: popIn 0.3s ease both;
  position: relative; color: #2d0014;
}
.modal-title {
  font-size: 20px; font-weight: 800; color: var(--dark);
  margin-bottom: 20px; display: flex; align-items: center; gap: 10px;
}
.modal-close {
  position: absolute; top: 16px; right: 16px;
  background: #ffedf4; border: none; border-radius: 50%;
  width: 32px; height: 32px; cursor: pointer; font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  color: var(--pink); transition: var(--transition);
}
.modal-close:hover { background: var(--pink); color: #fff; }

/* ─── QR Code ────────────────────────────────────────────────────────────────── */
.qr-area { text-align: center; }
.qr-area img { margin: 0 auto 12px; border-radius: 12px; border: 3px solid var(--pink-light); }
.qr-copy-box {
  background: #ffedf4; border-radius: var(--radius-sm);
  padding: 12px 16px; font-size: 13px; word-break: break-all;
  font-family: monospace; color: var(--dark); cursor: pointer;
  border: 1px dashed var(--pink); margin-bottom: 10px;
}
.qr-timer { font-size: 13px; color: var(--red); font-weight: 700; text-align: center; }

/* ─── Progress Bar ───────────────────────────────────────────────────────────── */
.progress-bar { background: rgba(255,255,255,0.1); border-radius: 50px; height: 12px; overflow: hidden; }
.progress-fill {
  height: 100%; border-radius: 50px;
  background: linear-gradient(90deg, var(--green) 0%, #00e68a 100%);
  transition: width 0.4s ease;
}

/* ─── Confetti ───────────────────────────────────────────────────────────────── */
.confetti-container {
  position: fixed; inset: 0; pointer-events: none; z-index: 300; overflow: hidden;
}
.confetti-piece {
  position: absolute; top: -10px;
  width: 10px; height: 10px; border-radius: 2px;
  animation: confetti 2.5s ease-out forwards;
}

/* ─── Presell (Landing version) ──────────────────────────────────────────────── */
.presell-card { text-align: center; }
.presell-card.is-win .presell-amount { color: var(--green); }
.presell-card.is-loss .presell-amount { color: var(--red); }
.presell-amount { font-size: 42px; font-weight: 800; margin: 16px 0; }
.presell-title { font-size: 28px; font-weight: 800; color: var(--dark); margin-bottom: 8px; }
.presell-message { font-size: 15px; color: #666; margin-bottom: 8px; }
.presell-desc { font-size: 14px; color: #888; line-height: 1.6; margin-bottom: 24px; }
.presell-confetti { position: fixed; inset: 0; pointer-events: none; z-index: 600; overflow: hidden; }
.presell-dot {
  position: absolute; top: -10px; border-radius: 50%;
  animation: confetti 2.2s ease-out forwards;
}

/* ─── PIX Payment ────────────────────────────────────────────────────────────── */
.pix-modal-content { text-align: center; }
.pix-amount-display {
  font-size: 32px; font-weight: 800; color: var(--green);
  margin: 16px 0;
}
.pix-qr-placeholder {
  width: 200px; height: 200px; margin: 20px auto;
  background: #f0f0f0; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  border: 3px solid var(--pink-light);
}
.pix-code-box {
  background: #ffedf4; border-radius: var(--radius-sm);
  padding: 12px 16px; font-size: 13px; word-break: break-all;
  font-family: monospace; color: var(--dark); cursor: pointer;
  border: 1px dashed var(--pink); margin: 16px 0;
}
.pix-status {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 14px; font-weight: 600; color: var(--orange);
  margin: 16px 0;
}
.pix-status .spinner {
  width: 16px; height: 16px; border: 2px solid var(--orange);
  border-top-color: transparent; border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
