:root {
  --bg: #0a0e14;
  --bg-soft: #0f141d;
  --card: #131922;
  --card-2: #171e29;
  --ink: #f2f5f9;
  --muted: #9aa5b4;
  --faint: #5f6b7c;
  --line: #232c3a;
  --line-soft: #1c242f;
  --accent: #5b8cff;
  --accent-dark: #4a76e6;
  --accent-glow: rgba(91, 140, 255, 0.18);
  --success: #2ecf91;
  --danger: #ff5d5d;
  --radius: 18px;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.02) inset,
    0 20px 50px -16px rgba(0, 0, 0, 0.65);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

body {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background:
    radial-gradient(900px 500px at 50% -10%, rgba(91, 140, 255, 0.08), transparent 60%),
    var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  min-height: 100vh; padding: 24px; line-height: 1.5;
}

.shell { width: 100%; max-width: 440px; }

.brand { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; padding-left: 4px; }
.brand-mark {
  width: 28px; height: 28px; border-radius: 8px;
  background: linear-gradient(140deg, var(--accent), #7aa2ff);
  color: #061018; display: grid; place-items: center;
  font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 13px; letter-spacing: -0.5px;
}
.brand-name { font-family: "Space Grotesk", sans-serif; font-weight: 600; font-size: 14px; letter-spacing: 0.2px; color: var(--ink); }

.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
}
.card-head {
  padding: 28px 28px 22px; border-bottom: 1px solid var(--line-soft);
  background: linear-gradient(180deg, var(--card-2), var(--card));
}
.merchant { font-size: 13px; color: var(--muted); margin-bottom: 22px; }
.merchant strong { color: var(--ink); font-weight: 600; }

.eyebrow { font-size: 11px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--faint); font-weight: 600; margin-bottom: 8px; }

.amount {
  font-family: "Space Grotesk", sans-serif; font-variant-numeric: tabular-nums;
  font-size: 46px; font-weight: 600; letter-spacing: -1.5px; line-height: 1; color: var(--ink);
  display: flex; align-items: baseline; gap: 6px;
  padding-bottom: 14px; border-bottom: 2px solid var(--accent);
}
.amount .currency { font-size: 22px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.description { margin-top: 18px; font-size: 14px; color: var(--muted); }

.card-body { padding: 22px 28px 28px; }

.pay-btn {
  width: 100%; border: none; border-radius: 12px;
  background: linear-gradient(180deg, var(--accent), var(--accent-dark));
  color: #fff; font-family: "Inter", sans-serif; font-size: 15px; font-weight: 600;
  padding: 15px 18px; cursor: pointer;
  transition: filter 0.15s ease, transform 0.05s ease, box-shadow 0.15s ease;
  box-shadow: 0 8px 24px -8px var(--accent-glow);
  display: flex; align-items: center; justify-content: center; gap: 9px;
}
.pay-btn:hover { filter: brightness(1.08); box-shadow: 0 10px 30px -8px var(--accent-glow); }
.pay-btn:active { transform: translateY(1px); }
.pay-btn:disabled { opacity: 0.55; cursor: default; box-shadow: none; }
.pay-btn:focus-visible { outline: 3px solid var(--accent-glow); outline-offset: 2px; }

.secure { margin-top: 16px; display: flex; align-items: center; justify-content: center; gap: 7px; font-size: 12px; color: var(--faint); }
.secure svg { width: 13px; height: 13px; }
.powered { margin-top: 14px; text-align: center; font-size: 12px; color: var(--faint); }

.pay-methods {
  margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line-soft);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px;
}
.pm {
  display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted);
  border: 1px solid var(--line); border-radius: 999px; padding: 5px 11px; font-weight: 500;
  white-space: nowrap; background: var(--bg-soft);
}
.pm svg { width: 13px; height: 13px; color: var(--accent); }

.order-ref { margin-top: 18px; text-align: center; font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 11px; color: var(--faint); letter-spacing: 0.3px; }

.state { text-align: center; padding: 40px 28px; }
.state-icon { width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 18px; display: grid; place-items: center; }
.state-icon.ok { background: rgba(46, 207, 145, 0.14); color: var(--success); }
.state-icon.err { background: rgba(255, 93, 93, 0.14); color: var(--danger); }
.state-icon svg { width: 28px; height: 28px; }
.state h1 { font-family: "Space Grotesk", sans-serif; font-size: 22px; font-weight: 600; letter-spacing: -0.4px; margin-bottom: 8px; color: var(--ink); }
.state p { font-size: 14px; color: var(--muted); max-width: 320px; margin: 0 auto; }
.state .pay-btn { margin-top: 24px; }

.link { margin-top: 16px; display: inline-block; font-size: 13px; color: var(--accent); text-decoration: none; font-weight: 500; }
.link:hover { text-decoration: underline; }

.skeleton {
  background: linear-gradient(90deg, #171e29 25%, #1f2937 37%, #171e29 63%);
  background-size: 400% 100%; animation: shimmer 1.4s ease infinite;
  border-radius: 6px; color: transparent !important; border-color: transparent !important;
}
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

.spinner { width: 18px; height: 18px; border: 2px solid rgba(255, 255, 255, 0.35); border-top-color: #fff; border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) { .skeleton, .spinner { animation: none; } }

@media (max-width: 480px) {
  .amount { font-size: 40px; }
  .card-head, .card-body { padding-left: 22px; padding-right: 22px; }
}
