:root {
  --bg: #070d1a;
  --bg2: #0c1426;
  --card: rgba(17, 26, 46, .82);
  --line: rgba(148, 163, 184, .14);
  --line2: rgba(148, 163, 184, .26);
  --text: #e8edf6;
  --muted: #8b97ad;
  --green: #26a17b;
  --green2: #34d399;
  --teal: #0ea5a4;
  --gold: #f5c451;
  --red: #f87171;
  --radius: 20px;
  --grad: linear-gradient(135deg, #34d399 0%, #10b981 45%, #0ea5a4 100%);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
.bg-glow {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(600px 400px at 85% -10%, rgba(16, 185, 129, .20), transparent 70%),
    radial-gradient(500px 380px at -10% 30%, rgba(14, 165, 164, .14), transparent 70%),
    radial-gradient(700px 500px at 50% 120%, rgba(245, 196, 81, .07), transparent 70%);
}
button { font: inherit; color: inherit; cursor: pointer; }
input { font: inherit; }

/* Top bar */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  max-width: 1080px; margin: 0 auto; padding: 18px 16px;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 800; letter-spacing: .04em; font-size: 15px; }
.brand-mark { width: 34px; height: 34px; }
.brand b { color: var(--gold); font-weight: 800; }
.brand em { font-style: normal; color: var(--green2); }
.rate-pill {
  display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted);
  padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.03);
  white-space: nowrap;
}
.rate-pill strong { color: var(--text); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green2); box-shadow: 0 0 0 4px rgba(52,211,153,.18); animation: pulse 2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(52,211,153,0); } }

main { max-width: 1080px; margin: 0 auto; padding: 8px 16px 40px; }
.view { display: none; animation: fade .35s ease; }
.view.active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* Hero */
.hero { max-width: 640px; margin: 24px auto 0; text-align: center; }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 600; color: var(--green2); background: rgba(52,211,153,.1); border: 1px solid rgba(52,211,153,.25); padding: 6px 14px; border-radius: 999px; }
h1 { font-size: clamp(32px, 7vw, 54px); line-height: 1.08; letter-spacing: -.025em; margin: 20px 0 14px; font-weight: 800; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { color: var(--muted); font-size: 17px; line-height: 1.6; margin: 0 auto 28px; max-width: 520px; }
.rate-card {
  display: flex; align-items: center; justify-content: space-between; text-align: left;
  max-width: 420px; margin: 0 auto 22px; padding: 18px 22px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  backdrop-filter: blur(10px);
}
.rate-card small { color: var(--muted); font-size: 13px; }
.rate-big { font-size: 26px; font-weight: 800; margin-top: 2px; }
.rate-big span { color: var(--green2); }
.usdt-coin { width: 52px; height: 52px; filter: drop-shadow(0 6px 18px rgba(38,161,123,.45)); }

.btn-hero {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  width: 100%; max-width: 420px; padding: 22px 28px; border: 0; border-radius: 18px;
  background: var(--grad); color: #04140e; font-size: 20px; font-weight: 800; letter-spacing: .06em;
  box-shadow: 0 14px 40px -10px rgba(16,185,129,.7), inset 0 1px 0 rgba(255,255,255,.35);
  transition: transform .15s ease, box-shadow .2s ease;
  position: relative; overflow: hidden;
}
.btn-hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.35) 50%, transparent 70%); transform: translateX(-100%); animation: shine 3.2s infinite; }
@keyframes shine { 60%, 100% { transform: translateX(100%); } }
.btn-hero:hover { transform: translateY(-2px); box-shadow: 0 20px 50px -10px rgba(16,185,129,.85); }
.btn-hero:active { transform: translateY(0) scale(.99); }
.btn-hero svg { width: 24px; height: 24px; }

.trust { list-style: none; padding: 0; margin: 36px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.trust li { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 8px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.02); }
.trust span { font-size: 22px; }
.trust b { display: block; font-size: 14px; }
.trust small { color: var(--muted); font-size: 12px; }
.how { list-style: none; padding: 0; margin: 28px 0 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; text-align: left; }
.how li { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); padding: 12px 14px; border-radius: 14px; background: rgba(255,255,255,.02); border: 1px solid var(--line); }
.how b { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: rgba(52,211,153,.14); color: var(--green2); font-size: 13px; }

/* Card */
.card {
  max-width: 560px; margin: 12px auto 0; padding: 26px 22px 28px;
  background: var(--card); border: 1px solid var(--line); border-radius: 24px;
  backdrop-filter: blur(14px); box-shadow: 0 30px 80px -30px rgba(0,0,0,.6);
}
.card.center { text-align: center; }
.card h2 { font-size: 23px; margin: 18px 0 6px; letter-spacing: -.01em; }
.muted { color: var(--muted); margin: 0 0 18px; line-height: 1.55; }
.hl { color: var(--green2); }
.back { background: none; border: 0; color: var(--muted); padding: 0; font-size: 14px; margin-bottom: 14px; }
.back:hover { color: var(--text); }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.steps i { height: 4px; border-radius: 4px; background: var(--line2); }
.steps i.on { background: var(--grad); }

/* Amount */
.amount-box { display: block; padding: 16px 18px; border-radius: 18px; background: var(--bg2); border: 1px solid var(--line2); transition: border-color .2s; }
.amount-box:focus-within { border-color: var(--green2); box-shadow: 0 0 0 4px rgba(52,211,153,.12); }
.amount-box.receive { background: linear-gradient(135deg, rgba(16,185,129,.12), rgba(14,165,164,.06)); border-color: rgba(52,211,153,.3); }
.lbl { font-size: 13px; color: var(--muted); }
.amount-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 6px; }
.amount-row input, .amount-row output { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--text); font-size: 34px; font-weight: 800; letter-spacing: -.02em; padding: 0; }
.amount-row output { color: var(--green2); overflow: hidden; text-overflow: ellipsis; }
.cur { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 15px; padding: 8px 12px; border-radius: 12px; background: rgba(255,255,255,.06); }
.cur img { width: 22px; height: 22px; }
.swap { width: 36px; height: 36px; margin: -8px auto; position: relative; z-index: 1; display: grid; place-items: center; border-radius: 12px; background: var(--bg); border: 1px solid var(--line2); color: var(--green2); font-weight: 800; }
.hint { min-height: 20px; font-size: 13px; color: var(--muted); margin: 12px 2px 0; }
.hint.bad { color: var(--red); }

.btn {
  display: flex; align-items: center; justify-content: center; width: 100%; margin-top: 18px;
  padding: 17px 20px; border: 0; border-radius: 16px; background: var(--grad); color: #04140e;
  font-weight: 800; font-size: 17px; letter-spacing: .02em; text-decoration: none;
  box-shadow: 0 10px 30px -12px rgba(16,185,129,.8); transition: transform .12s, opacity .2s;
}
.btn:hover:not(:disabled) { transform: translateY(-1px); }
.btn:disabled { opacity: .35; cursor: not-allowed; box-shadow: none; }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line2); box-shadow: none; font-weight: 600; font-size: 15px; }
.btn.loading { pointer-events: none; opacity: .7; }

/* Summary */
.summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 18px; padding: 14px 16px; border-radius: 16px; background: linear-gradient(135deg, rgba(16,185,129,.14), rgba(14,165,164,.06)); border: 1px solid rgba(52,211,153,.28); position: sticky; top: 8px; z-index: 5; backdrop-filter: blur(12px); }
.summary div { display: flex; flex-direction: column; }
.summary small { color: var(--muted); font-size: 12px; }
.summary b { font-size: 18px; }
.summary .r b { color: var(--green2); }
.summary .arrow { color: var(--green2); font-weight: 800; }
.card.center .summary { text-align: left; position: static; }

/* Banks */
.bank-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.bank {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 6px 12px; min-height: 104px; border-radius: 16px; border: 1.5px solid var(--line);
  background: rgba(255,255,255,.025); text-align: center; transition: border-color .15s, background .15s, transform .12s;
}
.bank:hover { border-color: var(--line2); background: rgba(255,255,255,.05); }
.bank.sel { border-color: var(--green2); background: rgba(52,211,153,.1); box-shadow: 0 0 0 4px rgba(52,211,153,.12); }
.bank .logo { width: 48px; height: 48px; border-radius: 12px; background: #fff; display: grid; place-items: center; overflow: hidden; padding: 4px; }
.bank .logo img { width: 100%; height: 100%; object-fit: contain; }
.bank .logo.ini { color: #fff; font-weight: 800; font-size: 14px; padding: 0; }
.bank span { font-size: 12px; font-weight: 600; line-height: 1.25; color: var(--text); }

.reveal { display: none; margin-top: 20px; animation: fade .35s ease; }
.reveal.show { display: block; }
.field-title { display: block; font-size: 14px; font-weight: 600; margin: 0 0 10px; }
.field { display: block; margin-top: 4px; }
.field span { display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.field i { color: var(--muted); font-style: normal; font-weight: 400; }
.field input {
  width: 100%; padding: 15px 16px; border-radius: 14px; border: 1px solid var(--line2); background: var(--bg2);
  color: var(--text); font-size: 16px; outline: none; transition: border-color .2s, box-shadow .2s;
}
.field input:focus { border-color: var(--green2); box-shadow: 0 0 0 4px rgba(52,211,153,.12); }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.seg button { padding: 14px; border-radius: 14px; border: 1.5px solid var(--line); background: rgba(255,255,255,.025); text-align: left; }
.seg button b { display: block; font-size: 15px; }
.seg button small { color: var(--muted); font-size: 12px; }
.seg button.sel { border-color: var(--green2); background: rgba(52,211,153,.1); }
.error { color: var(--red); font-size: 14px; min-height: 0; margin: 10px 0 0; }
.error:empty { display: none; }

/* Wallet */
.wallet-card { padding: 20px; border-radius: 20px; background: linear-gradient(160deg, #101b33, #0a1222); border: 1px solid var(--line2); text-align: center; margin-bottom: 22px; }
.net { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; padding: 7px 12px; border-radius: 999px; background: rgba(98,126,234,.14); border: 1px solid rgba(98,126,234,.35); color: #c7d2fe; }
.net img { width: 18px; height: 18px; }
.qr { width: 220px; height: 220px; margin: 18px auto; padding: 12px; border-radius: 18px; background: #fff; box-shadow: 0 16px 40px -16px rgba(0,0,0,.7); }
.qr img { width: 100%; height: 100%; display: block; }
.addr { display: flex; align-items: center; gap: 8px; padding: 10px 10px 10px 14px; border-radius: 14px; background: rgba(0,0,0,.3); border: 1px dashed var(--line2); }
.addr code { flex: 1; min-width: 0; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 13px; word-break: break-all; text-align: left; color: #e2e8f0; }
.copy { flex: none; border: 0; border-radius: 10px; padding: 10px 14px; background: var(--grad); color: #04140e; font-weight: 700; font-size: 13px; }
.warn { font-size: 13px; color: #fcd34d; background: rgba(245,196,81,.08); border: 1px solid rgba(245,196,81,.25); border-radius: 12px; padding: 10px 12px; margin: 14px 0 0; text-align: left; line-height: 1.5; }

.drop { display: block; border: 1.5px dashed var(--line2); border-radius: 18px; padding: 22px; text-align: center; cursor: pointer; background: rgba(255,255,255,.02); margin-bottom: 16px; transition: border-color .2s, background .2s; }
.drop:hover, .drop.over { border-color: var(--green2); background: rgba(52,211,153,.06); }
.drop svg { width: 34px; height: 34px; color: var(--green2); }
.drop b { display: block; margin: 8px 0 4px; }
.drop small { color: var(--muted); font-size: 12px; }
.drop-file { display: none; flex-direction: column; align-items: center; gap: 6px; }
.drop.has .drop-empty { display: none; }
.drop.has .drop-file { display: flex; }
.drop.has { border-style: solid; border-color: rgba(52,211,153,.5); }
.drop-file img { max-width: 100%; max-height: 220px; border-radius: 12px; }
.drop-file img[src=""] { display: none; }
.drop-file span { font-size: 14px; font-weight: 600; word-break: break-all; }
.order-code { color: var(--muted); font-size: 13px; text-align: center; margin: 16px 0 0; }
.order-code b { color: var(--text); font-family: 'JetBrains Mono', monospace; letter-spacing: .04em; }

/* Timer */
.timer { position: relative; width: 210px; height: 210px; margin: 10px auto 6px; }
.timer svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.timer circle { fill: none; stroke-width: 9; }
.timer .track { stroke: var(--line2); }
.timer .prog { stroke: var(--green2); stroke-linecap: round; stroke-dasharray: 326.7; stroke-dashoffset: 0; transition: stroke-dashoffset 1s linear; filter: drop-shadow(0 0 8px rgba(52,211,153,.6)); }
.timer-txt { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.timer-txt strong { font-size: 42px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.timer-txt small { color: var(--muted); font-size: 13px; }
.chain-ok { margin: 14px 0 0; padding: 12px 14px; border-radius: 14px; font-size: 14px; line-height: 1.5; color: var(--green2); background: rgba(52,211,153,.1); border: 1px solid rgba(52,211,153,.3); }
.check { width: 86px; height: 86px; margin: 14px auto 0; border-radius: 50%; display: grid; place-items: center; font-size: 44px; font-weight: 800; color: #04140e; background: var(--grad); box-shadow: 0 0 0 12px rgba(52,211,153,.12); }
.check.bad { background: var(--red); box-shadow: 0 0 0 12px rgba(248,113,113,.12); }
.details { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; text-align: left; margin: 16px 0 0; padding: 16px; border-radius: 16px; background: rgba(255,255,255,.02); border: 1px solid var(--line); font-size: 14px; }
.details dt { color: var(--muted); }
.details dd { margin: 0; text-align: right; font-weight: 600; word-break: break-word; }

.foot { text-align: center; color: var(--muted); font-size: 12px; padding: 10px 16px 30px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 30px); opacity: 0; background: #111a2e; border: 1px solid var(--line2); padding: 12px 18px; border-radius: 12px; font-size: 14px; transition: .25s; pointer-events: none; z-index: 50; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (min-width: 720px) {
  .how { grid-template-columns: repeat(4, 1fr); }
  .how li { flex-direction: column; text-align: center; }
  .bank-grid { grid-template-columns: repeat(4, 1fr); }
  .card { padding: 32px 34px 34px; }
}
@media (max-width: 420px) {
  .brand span { font-size: 13px; }
  .rate-pill { font-size: 12px; padding: 7px 10px; }
  .trust { grid-template-columns: 1fr; }
  .trust li { flex-direction: row; text-align: left; padding: 12px 14px; }
  .amount-row input, .amount-row output { font-size: 28px; }
}
