:root {
  --bg: #050308;
  --panel: rgba(13, 8, 20, 0.92);
  --panel-soft: rgba(18, 10, 28, 0.7);
  --line: rgba(216, 195, 255, 0.13);
  --line-bright: rgba(190, 154, 255, 0.38);
  --text: #f7f2ff;
  --muted: #978d9f;
  --purple: #8b5cf6;
  --purple-bright: #c4b5fd;
  --success: #78e6b4;
  --warning: #efbc68;
  --danger: #f0859a;
  --display: "Manrope", sans-serif;
  --body: "DM Sans", sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; color-scheme: dark; }
body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 16% 42%, rgba(103, 49, 189, 0.15), transparent 28%),
    radial-gradient(circle at 78% 30%, rgba(81, 39, 146, 0.11), transparent 27%),
    var(--bg);
  font: 400 15px/1.6 var(--body);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.014) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, #000 0%, transparent 88%);
}

a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button { color: inherit; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
::selection { color: #fff; background: var(--purple); }

.noise {
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  opacity: .025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.95' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.85'/%3E%3C/svg%3E");
}

.ambient { position: fixed; width: 520px; height: 520px; border: 1px solid rgba(178,142,247,.1); border-radius: 50%; pointer-events: none; animation: orbit 30s linear infinite; }
.ambient::before { content: ""; position: absolute; width: 6px; height: 6px; border-radius: 50%; background: var(--purple-bright); box-shadow: 0 0 20px var(--purple); top: 10%; left: 18%; }
.ambient-one { top: -330px; right: -120px; }
.ambient-two { left: -360px; bottom: -360px; width: 680px; height: 680px; animation-direction: reverse; animation-duration: 42s; }
@keyframes orbit { to { transform: rotate(360deg); } }

.payment-header {
  position: relative;
  z-index: 10;
  min-height: 82px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 clamp(24px, 4vw, 72px);
  border-bottom: 1px solid var(--line);
  background: rgba(5,3,8,.62);
  backdrop-filter: blur(18px);
}

.brand { width: max-content; display: inline-flex; align-items: center; gap: 11px; font: 700 14px/1 var(--display); letter-spacing: .16em; }
.brand img { width: 31px; height: 31px; object-fit: contain; }
.brand b { color: var(--purple-bright); font-weight: inherit; }
.secure-label { display: flex; align-items: center; gap: 9px; color: #817688; font: 600 9px/1 var(--display); letter-spacing: .12em; text-transform: uppercase; }
.secure-label i { width: 6px; height: 6px; border-radius: 50%; background: var(--success); box-shadow: 0 0 10px var(--success); }
.back-link { justify-self: end; color: #a79dac; font: 600 10px/1 var(--display); letter-spacing: .1em; text-transform: uppercase; }
.back-link span { margin-left: 8px; color: var(--purple-bright); }

.payment-layout {
  position: relative;
  z-index: 2;
  width: min(1200px, calc(100% - 48px));
  min-height: calc(100vh - 162px);
  margin: 0 auto;
  padding: clamp(70px, 8vw, 118px) 0 90px;
  display: grid;
  grid-template-columns: .82fr 1.18fr;
  gap: clamp(60px, 8vw, 120px);
  align-items: start;
}

.payment-intro { position: sticky; top: 62px; padding-top: 18px; }
.eyebrow, .panel-kicker { display: block; color: #9e91aa; font: 600 9px/1 var(--display); letter-spacing: .18em; text-transform: uppercase; }
.payment-intro h1 { margin: 27px 0 24px; font: 500 clamp(48px, 5.4vw, 76px)/1.03 var(--display); letter-spacing: -.06em; }
.payment-intro h1 em { color: var(--purple-bright); font-style: normal; }
.payment-intro > p { max-width: 510px; margin: 0; color: var(--muted); font-size: 16px; }

.flow-list { position: relative; display: grid; gap: 0; margin: 55px 0 42px; padding: 0; list-style: none; }
.flow-list::before { content: ""; position: absolute; left: 16px; top: 22px; bottom: 22px; width: 1px; background: var(--line); }
.flow-list li { position: relative; display: grid; grid-template-columns: 34px 1fr; gap: 18px; align-items: center; min-height: 67px; color: #675f6d; transition: color .3s; }
.flow-list li > span { z-index: 1; display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--line); background: var(--bg); font: 600 8px/1 var(--display); transition: border-color .3s, box-shadow .3s, color .3s; }
.flow-list b { display: block; color: inherit; font: 500 12px/1.2 var(--display); }
.flow-list small { display: block; margin-top: 5px; color: #5f5765; font-size: 10px; }
.flow-list li.active { color: #e4daeb; }
.flow-list li.active > span { border-color: var(--purple-bright); color: #fff; box-shadow: 0 0 20px rgba(139,92,246,.24); }
.flow-list li.complete { color: #afa3b7; }
.flow-list li.complete > span { border-color: rgba(120,230,180,.55); color: var(--success); }

.trust-note { max-width: 500px; display: flex; gap: 14px; padding: 18px; border: 1px solid var(--line); background: rgba(12,7,17,.42); }
.trust-note svg { flex: 0 0 26px; width: 26px; fill: none; stroke: var(--purple-bright); stroke-width: 1.4; }
.trust-note strong { display: block; font: 500 11px/1.3 var(--display); }
.trust-note span { display: block; margin-top: 5px; color: #716879; font-size: 10px; }

.checkout-shell { position: relative; border: 1px solid var(--line-bright); background: rgba(7,4,11,.88); box-shadow: 0 42px 120px rgba(0,0,0,.42); backdrop-filter: blur(18px); overflow: hidden; }
.checkout-shell::before { content: ""; position: absolute; top: -180px; right: -190px; width: 430px; height: 430px; border-radius: 50%; background: radial-gradient(circle,rgba(120,65,215,.18),transparent 68%); pointer-events: none; }
.shell-head, .shell-foot { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; padding: 0 22px; border-bottom: 1px solid var(--line); color: #625a69; font: 600 7px/1 var(--display); letter-spacing: .13em; text-transform: uppercase; }
.shell-head { height: 47px; }
.shell-head > div { display: flex; gap: 6px; }
.window-dot { width: 5px; height: 5px; border-radius: 50%; background: #443c49; }
.shell-foot { min-height: 44px; border-top: 1px solid var(--line); border-bottom: 0; }
.shell-foot span:first-child { display: flex; align-items: center; gap: 7px; }
.shell-foot i { width: 5px; height: 5px; border-radius: 50%; background: var(--success); box-shadow: 0 0 8px var(--success); }

.panel { position: relative; z-index: 1; min-height: 580px; padding: clamp(34px, 5vw, 54px); animation: panelIn .45s cubic-bezier(.2,.7,.2,1); }
@keyframes panelIn { from { opacity: 0; transform: translateY(12px); } }
.panel h2 { margin: 15px 0 9px; font: 500 clamp(30px, 3.2vw, 42px)/1.1 var(--display); letter-spacing: -.04em; }
.panel-copy { max-width: 530px; margin: 0 0 35px; color: var(--muted); }

.alert { position: relative; z-index: 3; margin: 18px 22px 0; padding: 13px 16px; border: 1px solid rgba(240,133,154,.35); background: rgba(104,25,44,.18); color: #f5bdc8; font-size: 12px; }
.alert.success { border-color: rgba(120,230,180,.35); background: rgba(30,100,71,.15); color: #a8f1d0; }
.activation-notice { position: relative; z-index: 2; display: grid; gap: 4px; margin: 20px 22px 0; padding: 13px 16px; border: 1px solid rgba(239,188,104,.28); background: rgba(113,72,19,.12); }
.activation-notice strong { color: #e6c489; font: 600 10px/1.3 var(--display); letter-spacing: .05em; text-transform: uppercase; }
.activation-notice span { color: #a79477; font-size: 10px; }

.field-row { display: grid; grid-template-columns: 1fr 1.05fr; gap: 13px; }
.field { display: grid; gap: 9px; }
.field > span, .pay-amount > span, .address-block > span { color: #827789; font: 600 8px/1 var(--display); letter-spacing: .13em; text-transform: uppercase; }
.field select, .amount-field { width: 100%; height: 57px; border: 1px solid var(--line); outline: 0; background: rgba(17,10,25,.72); color: #e5dce9; transition: border-color .25s, box-shadow .25s; }
.field select { padding: 0 16px; appearance: none; background-image: linear-gradient(45deg,transparent 50%,#81748c 50%),linear-gradient(135deg,#81748c 50%,transparent 50%); background-position: calc(100% - 18px) 25px,calc(100% - 13px) 25px; background-size: 5px 5px,5px 5px; background-repeat: no-repeat; }
.amount-field { display: flex; align-items: center; }
.amount-field b { padding-left: 17px; color: var(--purple-bright); font-weight: 500; }
.amount-field input { width: 100%; height: 100%; border: 0; outline: 0; padding: 0 14px 0 7px; background: transparent; color: #fff; font: 500 17px/1 var(--display); }
.field select:focus, .amount-field:focus-within { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(139,92,246,.08); }
.field small { min-height: 16px; color: #625a69; font-size: 9px; }
.field.invalid small { color: var(--danger); }
.field.invalid .amount-field { border-color: rgba(240,133,154,.55); }

.fee-toggle, .terms-check { position: relative; display: grid; grid-template-columns: 20px 1fr auto; gap: 12px; align-items: center; margin-top: 25px; cursor: pointer; }
.fee-toggle { padding: 18px; border: 1px solid var(--line); background: rgba(16,9,24,.48); }
.fee-toggle input, .terms-check input { position: absolute; opacity: 0; pointer-events: none; }
.checkmark { display: grid; place-items: center; width: 18px; height: 18px; border: 1px solid var(--line-bright); }
input:checked + .checkmark { border-color: var(--purple); background: var(--purple); }
input:checked + .checkmark::after { content: "✓"; color: #fff; font-size: 10px; }
.fee-toggle b { display: block; color: #d6ccdc; font: 500 11px/1.3 var(--display); }
.fee-toggle small { display: block; margin-top: 4px; color: #6d6573; font-size: 9px; }
.fee-toggle strong { color: var(--purple-bright); font: 500 13px/1 var(--display); }

.order-summary { margin: 28px 0 23px; border-top: 1px solid var(--line); }
.order-summary > div { display: flex; justify-content: space-between; padding: 11px 0; color: #77707d; font-size: 11px; }
.order-summary b { color: #afa5b5; font-weight: 500; }
.order-summary .summary-total { align-items: flex-end; margin-top: 4px; padding-top: 18px; border-top: 1px solid var(--line); color: #bab0c0; }
.summary-total strong { color: #fff; font: 500 26px/1 var(--display); }
.summary-total small { color: var(--purple-bright); font-size: 10px; letter-spacing: .08em; }

.terms-check { grid-template-columns: 20px 1fr; margin: 0 0 23px; color: #7e7584; font-size: 10px; line-height: 1.45; }
.primary-button, .secondary-button { width: 100%; min-height: 54px; display: flex; align-items: center; justify-content: space-between; border: 0; padding: 0 20px; cursor: pointer; text-transform: uppercase; letter-spacing: .1em; font: 600 10px/1 var(--display); transition: transform .25s, opacity .25s, background .25s; }
.primary-button { color: #fff; background: linear-gradient(115deg,#6326c8,#9a71ed); box-shadow: 0 15px 38px rgba(103,45,206,.22); }
.primary-button:hover:not(:disabled), .secondary-button:hover:not(:disabled) { transform: translateY(-2px); }
.primary-button:disabled { cursor: wait; opacity: .55; }
.primary-button i { color: #fff; font-style: normal; font-size: 15px; }
.primary-button.loading .button-label::after { content: ""; display: inline-block; width: 10px; height: 10px; margin-left: 10px; border: 1px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; vertical-align: -2px; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.form-note { margin: 14px 0 0; color: #5f5765; font-size: 9px; text-align: center; }

.token-list { display: grid; gap: 10px; margin-bottom: 28px; }
.token-option { position: relative; width: 100%; display: grid; grid-template-columns: 44px 1fr auto; gap: 14px; align-items: center; min-height: 72px; padding: 12px 16px; border: 1px solid var(--line); background: rgba(15,9,23,.58); color: inherit; text-align: left; cursor: pointer; transition: border-color .25s, background .25s, transform .25s; }
.token-option:hover { transform: translateX(3px); border-color: var(--line-bright); }
.token-option.selected { border-color: var(--purple); background: rgba(74,36,127,.2); }
.token-mark { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--line); color: var(--purple-bright); font: 600 10px/1 var(--display); }
.token-option strong { display: block; font: 500 13px/1.2 var(--display); }
.token-option small { display: block; margin-top: 5px; color: #716878; font-size: 9px; }
.token-option > b { color: #cfc4d6; font: 500 12px/1 var(--display); }
.network-panel .primary-button:disabled { cursor: not-allowed; }

.transfer-panel { min-height: 620px; }
.transfer-status-row { display: flex; justify-content: space-between; align-items: flex-start; }
.countdown { min-width: 72px; padding: 9px 11px; border: 1px solid var(--line); color: var(--warning); font: 600 11px/1 var(--display); letter-spacing: .08em; text-align: center; }
.pay-amount { margin-top: 26px; padding: 25px 0; border-block: 1px solid var(--line); }
.pay-amount > div { display: flex; align-items: center; gap: 9px; margin-top: 8px; }
.pay-amount strong { max-width: 300px; overflow: hidden; text-overflow: ellipsis; font: 500 clamp(27px,4vw,39px)/1 var(--display); letter-spacing: -.03em; }
.pay-amount b { color: var(--purple-bright); font: 500 12px/1 var(--display); }
.pay-amount small { display: block; margin-top: 9px; color: #6c6372; font-size: 9px; }
.copy-button { border: 1px solid var(--line); background: transparent; color: #94889d; padding: 7px 9px; cursor: pointer; font: 600 7px/1 var(--display); letter-spacing: .09em; text-transform: uppercase; }
.pay-amount .copy-button { margin-left: auto; }
.copy-button.copied { color: var(--success); border-color: rgba(120,230,180,.4); }

.address-block { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; margin-top: 24px; }
.address-block > span { grid-column: 1/-1; }
.address-block code { min-width: 0; overflow: hidden; padding: 14px; border: 1px solid var(--line); background: rgba(15,9,23,.6); color: #d7ccdf; font: 500 11px/1.3 monospace; text-overflow: ellipsis; white-space: nowrap; }
.address-block .copy-button { height: 43px; }
.transfer-warning { display: flex; gap: 12px; margin: 22px 0; padding: 15px; border: 1px solid rgba(239,188,104,.2); background: rgba(113,72,19,.1); }
.transfer-warning i { flex: 0 0 21px; display: grid; place-items: center; width: 21px; height: 21px; border: 1px solid rgba(239,188,104,.45); color: var(--warning); font: 600 10px/1 var(--display); font-style: normal; }
.transfer-warning p { margin: 0; color: #9e8d76; font-size: 10px; }
.transfer-warning b { color: #d8b983; font-weight: 500; }
.status-card { display: flex; justify-content: space-between; gap: 15px; padding: 16px 0; border-top: 1px solid var(--line); }
.status-pulse { display: flex; align-items: center; gap: 8px; color: #cfc4d6; font-size: 11px; }
.status-pulse i { width: 6px; height: 6px; border-radius: 50%; background: var(--warning); box-shadow: 0 0 10px var(--warning); animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; } }
.status-card small { max-width: 220px; color: #635b69; font-size: 8px; text-align: right; }
.secondary-button { justify-content: center; margin-top: 15px; border: 1px solid var(--line); background: transparent; color: #a99fb1; }

.result-panel { display: flex; min-height: 580px; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.result-icon { display: grid; place-items: center; width: 72px; height: 72px; margin-bottom: 30px; border: 1px solid rgba(120,230,180,.5); color: var(--success); font: 400 25px/1 var(--display); box-shadow: 0 0 50px rgba(120,230,180,.1); }
.result-panel > p { max-width: 420px; margin: 5px auto 28px; color: var(--muted); }
.receipt { width: 100%; margin-bottom: 28px; border-top: 1px solid var(--line); }
.receipt > div { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--line); color: #746b7b; font-size: 10px; }
.receipt b { color: #cfc5d6; font-weight: 500; }
.result-panel .primary-button { max-width: 100%; }
.result-panel.expired .result-icon { border-color: rgba(240,133,154,.45); color: var(--danger); box-shadow: 0 0 50px rgba(240,133,154,.08); }

.payment-footer { position: relative; z-index: 2; width: min(1200px,calc(100% - 48px)); min-height: 80px; display: flex; justify-content: space-between; align-items: center; margin: 0 auto; border-top: 1px solid var(--line); color: #5d5563; font: 600 8px/1 var(--display); letter-spacing: .11em; text-transform: uppercase; }

@media (max-width: 920px) {
  .payment-layout { grid-template-columns: 1fr; gap: 60px; padding-top: 70px; }
  .payment-intro { position: static; }
  .payment-intro > p { max-width: 650px; }
  .flow-list { grid-template-columns: repeat(4,1fr); margin-bottom: 35px; }
  .flow-list::before { left: 17px; right: 17px; top: 17px; bottom: auto; width: auto; height: 1px; }
  .flow-list li { display: flex; min-height: 78px; flex-direction: column; align-items: flex-start; gap: 10px; }
  .trust-note { max-width: none; }
}

@media (max-width: 640px) {
  .payment-header { min-height: 68px; grid-template-columns: 1fr auto; padding: 0 20px; }
  .secure-label { display: none; }
  .back-link { font-size: 0; }
  .back-link span { font-size: 13px; }
  .payment-layout { width: calc(100% - 28px); padding: 60px 0; }
  .payment-intro h1 { font-size: 49px; }
  .flow-list { grid-template-columns: 1fr 1fr; gap: 12px; }
  .flow-list::before { display: none; }
  .flow-list li { min-height: 60px; flex-direction: row; align-items: center; }
  .flow-list small { display: none; }
  .panel { min-height: 0; padding: 32px 20px; }
  .field-row { grid-template-columns: 1fr; gap: 18px; }
  .shell-foot { gap: 10px; line-height: 1.35; }
  .shell-foot span:last-child { display: none; }
  .address-block { grid-template-columns: 1fr; }
  .address-block > span { grid-column: auto; }
  .address-block code { white-space: normal; overflow-wrap: anywhere; }
  .status-card { flex-direction: column; }
  .status-card small { max-width: none; text-align: left; }
  .pay-amount > div { flex-wrap: wrap; }
  .pay-amount strong { max-width: 100%; font-size: 28px; }
  .pay-amount .copy-button { margin-left: 0; }
  .payment-footer { width: calc(100% - 28px); flex-direction: column; justify-content: center; gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
