@font-face { font-family: Sora; src: url('/fonts/sora-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: Sora; src: url('/fonts/sora-600.woff2') format('woff2'); font-weight: 600; font-display: swap; }

:root, [data-theme='dark'] {
  --bg: #030c15; --elev: #0e1b28; --card-top: #12233a; --card-bottom: #0b1724;
  --surface: rgba(243, 247, 253, 0.04); --surface-2: rgba(243, 247, 253, 0.07);
  --ink: #f3f7fd; --mute: rgba(243, 247, 253, 0.74); --soft: rgba(243, 247, 253, 0.52);
  --line: rgba(182, 207, 241, 0.1); --line-2: rgba(182, 207, 241, 0.18);
  --accent: #b6cff1; --accent-soft: rgba(182, 207, 241, 0.12); --on-accent: #030c15;
  --pos: #7fe0b8; --neg: #f4a3a3; --warn: #f6c56b; --glow: rgba(182, 207, 241, 0.18);
  color-scheme: dark;
}
[data-theme='light'] {
  --bg: #f3f7fd; --elev: #ffffff; --card-top: #ffffff; --card-bottom: #f7faff;
  --surface: rgba(3, 12, 21, 0.03); --surface-2: rgba(3, 12, 21, 0.06);
  --ink: #030c15; --mute: rgba(3, 12, 21, 0.72); --soft: rgba(3, 12, 21, 0.52);
  --line: rgba(3, 12, 21, 0.08); --line-2: rgba(3, 12, 21, 0.14);
  --accent: #3f5f8d; --accent-soft: rgba(63, 95, 141, 0.1); --on-accent: #ffffff;
  --pos: #0e8a5a; --neg: #c0392b; --warn: #b7791f; --glow: rgba(63, 95, 141, 0.16);
  color-scheme: light;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; }
body {
  min-height: 100dvh; display: flex; flex-direction: column; align-items: center;
  background: radial-gradient(70% 50% at 50% 0%, var(--glow), transparent 70%), var(--bg);
  color: var(--ink); font: 15px/1.5 Sora, ui-sans-serif, system-ui, sans-serif;
  padding: max(24px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom));
}
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
button:disabled { opacity: 0.55; cursor: progress; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
.mono { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-variant-numeric: slashed-zero; }
.muted { color: var(--mute); }
.small { font-size: 13px; }
.strong { font-weight: 600; }
.icon { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.shell { width: 100%; max-width: 440px; display: grid; gap: 14px; }
.loading { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 80px 0; color: var(--soft); }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--accent); animation: spin 0.8s linear infinite; }

.summary { padding: 4px 2px 6px; }
.head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.merchant { display: flex; align-items: center; gap: 12px; min-width: 0; }
.merchant .name { font-weight: 600; }
.avatar { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-weight: 600; background: var(--accent-soft); color: var(--accent); border: 1px solid var(--line-2); }
.total { display: flex; align-items: flex-end; justify-content: space-between; margin-top: 18px; }
.big { font-size: 40px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }

.card { background: linear-gradient(180deg, var(--card-top), var(--card-bottom)); border: 1px solid var(--line-2); border-radius: 20px; padding: 20px; box-shadow: 0 30px 80px -40px var(--glow); }
.card.center { text-align: center; display: grid; gap: 12px; justify-items: center; padding: 32px 22px; }
.section-title { font-size: 15px; font-weight: 600; margin-bottom: 12px; }
.title { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }

.options { display: grid; gap: 8px; }
.option { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--surface); text-align: left; transition: border-color 120ms, background 120ms, transform 80ms; }
.option:hover { border-color: var(--accent); background: var(--accent-soft); }
.option:active { transform: translateY(1px); }
.option-main { display: grid; flex: 1; }
.option-amount { font-variant-numeric: tabular-nums; font-weight: 600; }
.chain { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--accent); }
.chain.tron { background: #ef4444; } .chain.base { background: #3b82f6; } .chain.bsc { background: #f0b90b; }

.label { margin-top: 16px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--soft); }
.row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 6px; }
.amount { font-size: 22px; font-weight: 600; }
.address { font-size: 13px; word-break: break-all; line-height: 1.45; }
.qr-wrap { display: grid; place-items: center; margin: 18px 0 4px; }
.qr { width: 204px; height: 204px; border-radius: 14px; image-rendering: pixelated; }
.verified { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 12.5px; color: var(--pos); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 16px; border-radius: 12px; font-weight: 600; font-size: 14px; text-decoration: none; transition: opacity 120ms, background 120ms; }
.btn.primary { background: var(--ink); color: var(--bg); }
.btn.primary:hover { opacity: 0.9; }
.btn.ghost { border: 1px solid var(--line-2); background: var(--surface); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.small { height: 32px; padding: 0 10px; font-size: 12.5px; border-radius: 9px; flex: none; }
.btn.ok { color: var(--pos); }
.btn.wide { width: 100%; margin-top: 16px; }
.link { display: inline-flex; align-items: center; gap: 4px; color: var(--soft); font-size: 13px; }
.link:hover { color: var(--ink); }
.back { margin-bottom: 4px; }

.pill { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--surface-2); color: var(--mute); border: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.pill.warn { color: var(--warn); background: color-mix(in srgb, var(--warn) 12%, transparent); border-color: color-mix(in srgb, var(--warn) 28%, transparent); }
.badge-icon { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.badge-icon .icon { width: 24px; height: 24px; }
.badge-icon.ok { background: color-mix(in srgb, var(--pos) 15%, transparent); color: var(--pos); }
.badge-icon.warn { background: color-mix(in srgb, var(--warn) 15%, transparent); color: var(--warn); }
.badge-icon.bad { background: color-mix(in srgb, var(--neg) 15%, transparent); color: var(--neg); }
.note { margin-top: 12px; }
.center-text { text-align: center; margin-top: 10px; min-height: 1.2em; }
.help { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; }
.help summary { cursor: pointer; font-size: 13px; color: var(--mute); }
.help p { margin-top: 8px; }

.foot { margin-top: auto; padding-top: 28px; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; font-size: 12px; color: var(--soft); }
.foot a { color: var(--mute); text-decoration: none; font-weight: 600; }
.noscript { text-align: center; color: var(--mute); }

.rise { animation: rise 420ms cubic-bezier(0.2, 0.7, 0.2, 1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .rise, .spinner { animation: none; } }
