/* ========================================
   Design system — modern, professional
   ======================================== */

:root {
  /* Brand */
  --brand-50:  #eef2ff;
  --brand-100: #e0e7ff;
  --brand-500: #6366f1;
  --brand-600: #4f46e5;
  --brand-700: #4338ca;

  /* Neutrals */
  --gray-50:  #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;

  /* Semantic */
  --success: #10b981;
  --success-bg: #ecfdf5;
  --error: #ef4444;
  --error-bg: #fef2f2;
  --warning: #f59e0b;

  /* Layout */
  --radius-sm: 8px;
  --radius:    12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow:    0 4px 12px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 24px 48px -12px rgba(15, 23, 42, 0.18), 0 2px 4px rgba(15, 23, 42, 0.04);
  --shadow-xl: 0 32px 64px -16px rgba(99, 102, 241, 0.25);

  /* Transitions */
  --t-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --t:      220ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   Reset
   ======================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-feature-settings: "cv11", "ss01", "ss03";
  font-size: 16px;
  line-height: 1.5;
  color: var(--gray-900);
  background: var(--gray-50);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   Animated gradient background
   ======================================== */
.bg-canvas {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: linear-gradient(135deg, #f5f3ff 0%, #eef2ff 50%, #fdf2f8 100%);
}
.bg-canvas::before,
.bg-canvas::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.55;
  animation: float 18s ease-in-out infinite;
}
.bg-canvas::before {
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, #a78bfa, transparent 70%);
  top: -120px;
  left: -120px;
}
.bg-canvas::after {
  width: 540px;
  height: 540px;
  background: radial-gradient(circle, #f0abfc, transparent 70%);
  bottom: -160px;
  right: -160px;
  animation-delay: -9s;
}
@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(40px, -30px) scale(1.08); }
}

/* ========================================
   Layout
   ======================================== */
.shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem 1.25rem;
}
.container {
  width: 100%;
  max-width: 460px;
}

/* ========================================
   Header
   ======================================== */
.header {
  text-align: center;
  margin-bottom: 1rem;
}
.brand-logo {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-500) 0%, #8b5cf6 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.65rem;
  font-size: 1.5rem;
  box-shadow: 0 10px 24px rgba(99, 102, 241, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  position: relative;
}
.brand-logo--photo {
  padding: 4px;
  overflow: hidden;
}
.brand-logo--photo img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  background: white;
}
.header h1 {
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--gray-900);
  margin-bottom: 0.25rem;
}
.header .tagline {
  color: var(--gray-500);
  font-size: 0.88rem;
  max-width: 360px;
  margin: 0 auto;
}

/* Trust pills */
.trust {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.6rem;
  flex-wrap: wrap;
}
.trust-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.7rem;
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: 999px;
  font-size: 0.78rem;
  color: var(--gray-600);
  font-weight: 500;
  box-shadow: var(--shadow-sm);
}
.trust-pill svg { width: 12px; height: 12px; color: var(--success); }

/* ========================================
   Card
   ======================================== */
.card {
  background: white;
  border-radius: var(--radius-xl);
  padding: 1.25rem 1.25rem 1.1rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.6);
  position: relative;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-900);
}
.card-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.65rem;
  background: var(--brand-50);
  color: var(--brand-700);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.card-badge .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--brand-500);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18);
}

/* ========================================
   Form
   ======================================== */
.field {
  margin-bottom: 0.75rem;
}
.field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--gray-700);
  margin-bottom: 0.4rem;
}
.field-input {
  position: relative;
  display: flex;
  align-items: center;
}
.field-input .prefix {
  position: absolute;
  left: 0.95rem;
  font-weight: 600;
  color: var(--gray-400);
  font-size: 0.95rem;
  pointer-events: none;
}
.field input,
.field textarea {
  width: 100%;
  padding: 0.6rem 0.9rem;
  background: var(--gray-50);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.92rem;
  color: var(--gray-900);
  transition: border-color var(--t-fast), background var(--t-fast), box-shadow var(--t-fast);
}
.field input.has-prefix { padding-left: 2.3rem; }
.field textarea { resize: vertical; min-height: 52px; }
.field input::placeholder,
.field textarea::placeholder { color: var(--gray-400); }
.field input:hover,
.field textarea:hover { border-color: var(--gray-300); background: white; }
.field input:focus,
.field textarea:focus {
  outline: none;
  background: white;
  border-color: var(--brand-500);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12);
}

/* Quick amounts */
.quick-amounts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.amount-chip {
  padding: 0.5rem 0.4rem;
  background: white;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gray-600);
  cursor: pointer;
  transition: all var(--t-fast);
}
.amount-chip:hover {
  border-color: var(--brand-500);
  color: var(--brand-700);
  transform: translateY(-1px);
}
.amount-chip.active {
  background: var(--brand-50);
  border-color: var(--brand-500);
  color: var(--brand-700);
}

/* ========================================
   Button
   ======================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.75rem 1.25rem;
  border: none;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
  text-decoration: none;
  position: relative;
  overflow: hidden;
}
.btn-primary {
  background: linear-gradient(135deg, var(--brand-600) 0%, #7c3aed 100%);
  color: white;
  box-shadow: 0 8px 20px -6px rgba(79, 70, 229, 0.5);
  margin-top: 0.5rem;
}
.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px -6px rgba(79, 70, 229, 0.55);
}
.btn-primary:active:not(:disabled) { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.65; cursor: not-allowed; }

.btn-secondary {
  background: white;
  color: var(--gray-800);
  border: 1.5px solid var(--gray-200);
}
.btn-secondary:hover { border-color: var(--gray-300); background: var(--gray-50); }

/* Loader */
.btn .spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ========================================
   Payment methods row
   ======================================== */
.methods-row {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--gray-100);
  text-align: center;
}
.methods-row .label {
  font-size: 0.72rem;
  color: var(--gray-500);
  margin-bottom: 0.5rem;
  font-weight: 500;
}
.methods-list {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.method-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--gray-700);
}
.method-chip-dot {
  width: 8px; height: 8px; border-radius: 50%;
}
.method-logo {
  width: 18px;
  height: 18px;
  object-fit: contain;
  flex-shrink: 0;
}
.method-chip svg.method-logo { color: var(--gray-700); }

/* ========================================
   Footer
   ======================================== */
.footer {
  text-align: center;
  margin-top: 0.9rem;
  font-size: 0.74rem;
  color: var(--gray-500);
}
.footer a {
  color: var(--brand-600);
  text-decoration: none;
  font-weight: 500;
}
.footer a:hover { text-decoration: underline; }

/* ========================================
   Success / Error pages
   ======================================== */
.status-card {
  text-align: center;
  padding: 2rem 1.75rem;
}
.status-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  position: relative;
  animation: pop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.status-icon::before {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  opacity: 0.15;
}
.status-icon.success {
  background: var(--success);
  color: white;
}
.status-icon.success::before { background: var(--success); }
.status-icon.error {
  background: var(--error);
  color: white;
}
.status-icon.error::before { background: var(--error); }
.status-icon svg { width: 40px; height: 40px; }
@keyframes pop {
  0% { transform: scale(0); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.status-card h2 {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 0.5rem;
}
.status-card p { color: var(--gray-500); font-size: 0.92rem; }

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--gray-100);
  font-size: 0.88rem;
}
.detail-row:last-child { border-bottom: none; }
.detail-row .label { color: var(--gray-500); }
.detail-row .value { color: var(--gray-900); font-weight: 600; }
.detail-row .value.mono { font-family: ui-monospace, "SF Mono", monospace; font-size: 0.82rem; }

.details-block {
  background: var(--gray-50);
  border-radius: var(--radius);
  padding: 0.5rem 1rem;
  margin: 1.5rem 0;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}
.status-pill.success { background: var(--success-bg); color: var(--success); }
.status-pill.pending { background: #fffbeb; color: var(--warning); }
.status-pill .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: currentColor;
}

/* ========================================
   Toast
   ======================================== */
.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--gray-900);
  color: white;
  padding: 0.7rem 1.1rem;
  border-radius: var(--radius);
  font-size: 0.88rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transition: opacity var(--t), transform var(--t);
  pointer-events: none;
  z-index: 1000;
  max-width: 90vw;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.toast.error { background: var(--error); }

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 480px) {
  .shell { padding: 1.5rem 1rem; }
  .card { padding: 1.5rem 1.25rem; border-radius: var(--radius-lg); }
  .header h1 { font-size: 1.4rem; }
  .quick-amounts { grid-template-columns: repeat(2, 1fr); }
}

/* ========================================
   Utilities
   ======================================== */
.hidden { display: none !important; }
.text-center { text-align: center; }
