@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800;900&display=swap');

:root {
  --main-bg: #080810;
  --panel: #0f0f1a;
  --panel-soft: #151524;
  --panel-strong: #1c1c30;
  --line: #2a2a44;
  --accent-1: #7c5cff;
  --accent-2: #a78bfa;
  --accent-3: #5b3fd4;
  --accent-hover-1: #6a4de0;
  --accent-hover-2: #8b6ef0;
  --accent-hover-3: #4a30b8;
  --line-accent: rgba(124, 92, 255, 0.5);
  --text: #ffffff;
  --text-dark: #080810;
  --muted: #8888aa;
  --muted-strong: #b8b8d0;
  --warning-bg: #2a2114;
  --warning-line: #7c5b24;
  --warning-text: #fcbb00;
  --radius: 8px;
  --text-xs: 0.75rem;
  --text-lg: 1.125rem;
  --font-weight-bold: 700;
}

*, *::before, *::after {
  box-sizing: border-box;
  border: 0 solid;
  margin: 0;
  padding: 0;
  outline: none;
  scrollbar-width: none;
}
*::-webkit-scrollbar { display: none; }

html {
  min-height: 100%;
  overflow-x: hidden;
  background: var(--main-bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body {
  overflow-x: hidden;
  min-height: 100vh;
  background:
    radial-gradient(circle at 50% -10%, rgba(124, 92, 255, 0.25), transparent 40rem),
    radial-gradient(circle at 100% 30%, rgba(167, 139, 250, 0.10), transparent 30rem),
    radial-gradient(circle at 0% 60%, rgba(91, 63, 212, 0.08), transparent 25rem),
    var(--main-bg);
}

.bg-particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(1px 1px at 10% 20%, rgba(167,139,250,0.4), transparent),
    radial-gradient(1px 1px at 30% 40%, rgba(124,92,255,0.3), transparent),
    radial-gradient(1px 1px at 50% 15%, rgba(255,255,255,0.2), transparent),
    radial-gradient(1px 1px at 70% 60%, rgba(167,139,250,0.3), transparent),
    radial-gradient(1px 1px at 90% 30%, rgba(124,92,255,0.25), transparent),
    radial-gradient(1px 1px at 15% 70%, rgba(255,255,255,0.15), transparent),
    radial-gradient(1px 1px at 85% 80%, rgba(167,139,250,0.2), transparent),
    radial-gradient(1px 1px at 45% 90%, rgba(124,92,255,0.2), transparent);
}

button, input, select {
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  background-color: transparent;
  border-radius: 0;
}
button, select { cursor: pointer; }
a { color: inherit; text-decoration: inherit; }
h1,h2,h3,h4,h5,h6 { font-size: inherit; font-weight: inherit; }

.uppercase { text-transform: uppercase; }
.font-bold { font-weight: var(--font-weight-bold); }

.checkout-shell {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  min-height: 100dvh;
  padding: 24px 16px 40px;
}

.checkout-content {
  width: min(100%, 480px);
  min-width: 0;
  max-width: 100%;
}

.brand-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 18px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-size: 28px;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
}

.razed-logo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent-1) 0%, var(--accent-3) 100%);
  color: white;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.02em;
  box-shadow: 0 0 24px rgba(124, 92, 255, 0.4), inset 0 1px 0 rgba(255,255,255,0.15);
}

.razed-logo-text {
  background: linear-gradient(135deg, #fff 0%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 0.06em;
}

.invoice-pill {
  flex: 0 0 auto;
  border: 1px solid var(--line-accent);
  border-radius: var(--radius);
  background: rgba(124, 92, 255, 0.10);
  color: var(--accent-2);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
  padding: 10px 14px;
  text-transform: uppercase;
}

.gift-card {
  display: grid;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  gap: 12px;
}
.gift-card > * { min-width: 0; }

.app-header,
.app-network,
.appPaymentBox {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(21, 21, 36, 0.97), rgba(12, 12, 20, 0.98));
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(124,92,255,0.05);
}

.app-header {
  padding: 22px 20px;
}

.app-header-subtitle {
  color: var(--text);
  font-size: clamp(32px, 9vw, 48px);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 0.95;
  text-transform: uppercase;
  background: linear-gradient(135deg, #fff 20%, var(--accent-2) 80%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.app-header-tagline {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.amount-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
  min-width: 0;
  gap: 12px;
  margin-top: 20px;
}

.amount-field {
  display: block;
  min-width: 0;
}

.amount-label,
.app-label {
  display: block;
  color: var(--muted-strong);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.amount-control {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  margin-top: 8px;
  border: 1px solid var(--line-accent);
  border-radius: var(--radius);
  background: rgba(8, 8, 16, 0.8);
  padding: 12px 14px 10px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.amount-control:focus-within {
  border-color: var(--accent-1);
  box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.15);
}

.amount-control--readonly {
  border-color: rgba(136, 136, 170, 0.25);
  background: rgba(255, 255, 255, 0.025);
}

.amount-input {
  min-width: 0;
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: clamp(24px, 7vw, 42px);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1;
}

.amount-control--readonly .amount-input {
  color: var(--accent-2);
}

.amount-input::placeholder {
  color: rgba(255, 255, 255, 0.2);
}

.amount-input::-webkit-outer-spin-button,
.amount-input::-webkit-inner-spin-button {
  margin: 0;
  appearance: none;
}

.amount-token {
  flex: 0 0 auto;
  color: var(--accent-2);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.3;
  padding-bottom: 4px;
}

.app-header-note {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  gap: 7px;
  margin-top: 16px;
  border: 1px solid rgba(124, 92, 255, 0.25);
  border-radius: var(--radius);
  background: rgba(124, 92, 255, 0.06);
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
  padding: 8px 12px;
}

.app-header-note span:last-child { min-width: 0; }

.info-dot,
.warning-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.app-network {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  padding: 14px;
}

.app-selectors {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
  min-width: 0;
  max-width: 100%;
  gap: 12px;
}

.app-selector-group { min-width: 0; }

.select-shell,
.appQrCopyButton {
  display: inline-flex;
  align-items: center;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(8, 8, 16, 0.8);
  color: var(--text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.select-shell {
  position: relative;
  gap: 10px;
  overflow: hidden;
  margin-top: 8px;
  padding: 10px 14px;
}

.select-shell:hover,
.select-shell:focus-within {
  border-color: var(--line-accent);
  box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.1);
}

.selector-select {
  min-width: 0;
  width: 100%;
  border: 0;
  appearance: none;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
  padding: 3px 22px 3px 0;
}

.selector-select option {
  background: var(--main-bg);
  color: var(--text);
}

.coin-icon {
  display: block;
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  border-radius: 50%;
  box-shadow: 0 0 14px rgba(124, 92, 255, 0.15);
}

.chevron {
  position: absolute;
  right: 14px;
  top: calc(50% - 5px);
  width: 8px;
  height: 8px;
  pointer-events: none;
  border-right: 2px solid var(--muted-strong);
  border-bottom: 2px solid var(--muted-strong);
  transform: rotate(45deg);
}

.appPaymentBox {
  padding: 14px;
}

.appQrPanel {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  padding: 4px 0 6px;
  text-align: center;
}

.qr-shell {
  width: 260px;
  max-width: 100%;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  padding: 10px;
  box-shadow: 0 0 40px rgba(124, 92, 255, 0.08);
}

.appQrCode {
  display: block;
  width: 240px;
  height: 240px;
  max-width: 100%;
  margin: 0 auto;
  background: #ffffff;
}

.appQrCode--disabled { opacity: 0.55; }

.payment-summary {
  display: grid;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  gap: 7px;
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(8, 8, 16, 0.7);
  padding: 12px 14px;
  text-align: left;
}

.summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
}

.summary-row strong,
.summary-value {
  flex: 1 1 auto;
  justify-content: flex-end;
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 7px;
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  border-radius: 50%;
}

.appQrCopyButton {
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
  border-color: var(--line-accent);
  background: linear-gradient(135deg, var(--accent-1) 0%, var(--accent-3) 100%);
  color: white;
  cursor: pointer;
  overflow: hidden;
  font-size: clamp(9px, 2.65vw, 12px);
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.2;
  padding: 13px 14px;
  text-transform: uppercase;
  box-shadow: 0 4px 20px rgba(124, 92, 255, 0.3);
}

.appQrCopyButton:hover {
  border-color: var(--accent-hover-1);
  background: linear-gradient(135deg, var(--accent-hover-1) 0%, var(--accent-hover-3) 100%);
  box-shadow: 0 4px 28px rgba(124, 92, 255, 0.45);
}

.appQrCopyButton:active {
  transform: translateY(1px);
}

.copy-icon {
  position: relative;
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.copy-icon::before,
.copy-icon::after {
  position: absolute;
  content: "";
  border: 1.8px solid currentColor;
  border-radius: 3px;
}

.copy-icon::before {
  right: 1px;
  bottom: 1px;
  width: 10px;
  height: 10px;
}

.copy-icon::after {
  top: 1px;
  left: 1px;
  width: 10px;
  height: 10px;
  opacity: 0.55;
}

.copy-value {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.appWarningPanel {
  display: inline-flex;
  align-items: center;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  gap: 8px;
  margin-top: 14px;
  border: 1px solid var(--warning-line);
  border-radius: var(--radius);
  background: var(--warning-bg);
  color: var(--warning-text);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  padding: 10px 12px;
  text-align: left;
}

.appWarningPanel span:last-child { min-width: 0; }

.address-warning {
  margin-top: 10px;
  border: 1px solid #7b3030;
  border-radius: var(--radius);
  background: rgba(211, 63, 63, 0.12);
  color: #ff6568;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  padding: 9px 10px;
}

.site-footer {
  margin-top: 20px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  opacity: 0.5;
}

.toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  transform: translateY(12px);
  opacity: 0;
  pointer-events: none;
  border: 1px solid var(--line-accent);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--accent-2);
  font-size: 13px;
  font-weight: 800;
  padding: 13px 16px;
  text-transform: uppercase;
  transition: opacity 0.18s ease, transform 0.18s ease;
  box-shadow: 0 8px 30px rgba(0,0,0,0.4);
}

.toast--visible {
  transform: translateY(0);
  opacity: 1;
}

@media (max-width: 600px) {
  .checkout-shell {
    padding: 14px 10px 24px;
  }
  .brand-mark {
    font-size: 22px;
  }
  .invoice-pill {
    font-size: 10px;
    padding: 9px 10px;
  }
  .app-header {
    padding: 16px;
  }
  .app-header-subtitle {
    font-size: clamp(28px, 10vw, 38px);
  }
  .app-selectors {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .toast {
    right: 10px;
    bottom: 10px;
    left: 10px;
    text-align: center;
  }
}
