:root {
  --bg: #060809;
  --bg-elevated: #0b1012;
  --panel: rgba(14, 20, 23, 0.82);
  --panel-solid: #0f1416;
  --panel-2: #141c1f;
  --border: rgba(90, 207, 199, 0.14);
  --border-strong: rgba(90, 207, 199, 0.28);
  --text: #f4f8f9;
  --muted: #8fa3a6;
  --accent: #5acfc7;
  --accent-2: #7de0da;
  --brand-cyan: #5acfc7;
  --accent-soft: rgba(90, 207, 199, 0.1);
  --accent-glow: rgba(90, 207, 199, 0.35);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --shadow-soft: 0 8px 32px rgba(0, 0, 0, 0.28);
  --radius: 16px;
  --radius-lg: 22px;
  --font: "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.page {
  display: grid;
  grid-template-columns: minmax(340px, 440px) 1fr;
  min-height: 100vh;
}

@media (max-width: 900px) {
  .page { grid-template-columns: 1fr; }
  .summary {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .checkout { padding: 24px 16px 40px; }
  .checkout-card { padding: 24px 20px; }
}

.summary {
  position: relative;
  background:
    linear-gradient(180deg, rgba(90, 207, 199, 0.06) 0%, transparent 28%),
    linear-gradient(180deg, #0c1316 0%, #060809 100%);
  border-right: 1px solid var(--border);
  padding: 32px 36px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  overflow: hidden;
}

.summary::before {
  content: "";
  position: absolute;
  top: -120px;
  left: -80px;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(90, 207, 199, 0.12), transparent 68%);
  pointer-events: none;
}

.summary__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 1;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand__mark {
  width: 36px;
  height: 36px;
  display: block;
  flex-shrink: 0;
  filter: drop-shadow(0 0 18px rgba(90, 207, 199, 0.35));
}

.brand__wordmark {
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.03em;
  line-height: 1;
}

.brand__pay {
  color: var(--accent);
  text-shadow: 0 0 24px rgba(90, 207, 199, 0.25);
}

.summary__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s, transform 0.15s;
}

.icon-btn:hover {
  border-color: var(--border-strong);
  color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-1px);
}

.lang {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  font-weight: 600;
  font-size: 12px;
}

.summary-hero {
  position: relative;
  z-index: 1;
  padding: 8px 0 4px;
}

.summary-hero__label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}

.summary__amount {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
}

.amount {
  font-size: clamp(44px, 6vw, 58px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  background: linear-gradient(180deg, #ffffff 0%, #d7ecea 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.amount-currency {
  font-size: 28px;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: -0.02em;
  text-shadow: 0 0 30px rgba(90, 207, 199, 0.3);
}

.merchant-card {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(90, 207, 199, 0.06), rgba(255, 255, 255, 0.02));
  box-shadow: var(--shadow-soft);
}

.merchant__icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(90, 207, 199, 0.08);
  display: grid;
  place-items: center;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid rgba(90, 207, 199, 0.12);
}

.merchant__icon img {
  width: 34px;
  height: 34px;
  display: block;
}

.merchant__name {
  font-weight: 700;
  font-size: 15px;
}

.merchant__order {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
  letter-spacing: 0.04em;
}

.copy-inline {
  border: none;
  background: none;
  color: var(--muted);
  cursor: pointer;
  padding: 0 4px;
  transition: color 0.15s;
}

.copy-inline:hover { color: var(--accent); }

.summary__item {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  position: relative;
  z-index: 1;
}

.summary-card {
  margin-top: auto;
  padding: 18px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  z-index: 1;
}

.line {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: var(--muted);
  gap: 16px;
}

.line dd {
  color: var(--text);
  font-weight: 500;
  text-align: right;
}

.line--total {
  margin-top: 4px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 15px;
}

.line--total dt,
.line--total dd {
  color: var(--text);
  font-weight: 700;
}

.line--total dd {
  color: var(--accent);
  font-size: 16px;
}

.line--hidden { display: none; }
.line--hidden.show { display: flex; }

.accent { color: var(--accent) !important; }

.summary__footer {
  font-size: 12px;
  color: var(--muted);
  position: relative;
  z-index: 1;
}

.summary__footer strong {
  color: var(--accent);
  font-weight: 600;
}

.checkout {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 32px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 0%, rgba(90, 207, 199, 0.12), transparent 38%),
    radial-gradient(circle at 100% 100%, rgba(90, 207, 199, 0.06), transparent 32%),
    var(--bg);
}

.checkout__glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 40%, rgba(90, 207, 199, 0.08), transparent 25%),
    radial-gradient(circle at 70% 60%, rgba(90, 207, 199, 0.05), transparent 30%);
  pointer-events: none;
}

.checkout__inner {
  width: min(540px, 100%);
  position: relative;
  z-index: 1;
  animation: fadeUp 0.45s ease-out;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.checkout-card {
  padding: 32px 28px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(16, 22, 25, 0.92), rgba(10, 14, 16, 0.88));
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(16px);
}

.step-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  margin-bottom: 14px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(90, 207, 199, 0.22);
  background: rgba(90, 207, 199, 0.08);
}

.checkout__title {
  font-size: clamp(30px, 4vw, 38px);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 10px;
  line-height: 1.1;
}

.checkout__subtitle {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 28px;
}

.panel { display: none; }
.panel--active { display: block; }

.field-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 10px;
}

.usdt-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  margin-bottom: 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(90, 207, 199, 0.08), rgba(255, 255, 255, 0.02));
  font-size: 14px;
  color: var(--muted);
}

.usdt-badge img {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(90, 207, 199, 0.15);
}

.usdt-badge strong { color: var(--text); }

.coin-list,
.network-list {
  list-style: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  max-height: 420px;
  overflow-y: auto;
  background: rgba(0, 0, 0, 0.15);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.coin-list::-webkit-scrollbar,
.network-list::-webkit-scrollbar { width: 8px; }
.coin-list::-webkit-scrollbar-track,
.network-list::-webkit-scrollbar-track { background: transparent; }
.coin-list::-webkit-scrollbar-thumb,
.network-list::-webkit-scrollbar-thumb {
  background: rgba(90, 207, 199, 0.2);
  border-radius: 999px;
}

.currency-search {
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.22);
  color: var(--text);
  font: inherit;
  font-size: 14px;
}

.currency-search::placeholder { color: var(--muted); }

.currency-search:focus {
  outline: none;
  border-color: var(--border-strong);
  box-shadow: 0 0 0 3px rgba(90, 207, 199, 0.1);
}

.coin-list li,
.network-list li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 18px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.18s, transform 0.15s, border-color 0.18s;
  position: relative;
}

.network-list li::after {
  content: "›";
  margin-left: auto;
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
  transition: color 0.15s, transform 0.15s;
}

.coin-list li:last-child,
.network-list li:last-child { border-bottom: none; }

.coin-list li:hover:not(.disabled),
.network-list li:hover:not(.disabled) {
  background: rgba(90, 207, 199, 0.06);
}

.network-list li:hover:not(.disabled)::after {
  color: var(--accent);
  transform: translateX(2px);
}

.coin-list li.disabled,
.network-list li.disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.network-list li.selected {
  background: linear-gradient(90deg, rgba(90, 207, 199, 0.14), rgba(90, 207, 199, 0.04));
  box-shadow: inset 3px 0 0 var(--accent);
}

.network-list li.selected::after { color: var(--accent); }

.coin-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: #1a2224;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
}

.coin-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.coin-icon--fallback {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

.coin-meta { flex: 1; min-width: 0; }
.coin-symbol { font-weight: 700; font-size: 15px; }
.coin-name { font-size: 13px; color: var(--muted); margin-top: 2px; }

.badge-soon {
  font-size: 11px;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 4px 8px;
  border-radius: 999px;
}

.btn-back {
  margin: 0 0 18px;
  padding: 8px 12px;
  background: rgba(90, 207, 199, 0.06);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.btn-back:hover {
  color: var(--accent);
  border-color: var(--border-strong);
  background: rgba(90, 207, 199, 0.1);
}

.copy-field {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
}

.copy-field input {
  flex: 1;
  padding: 15px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.22);
  color: var(--text);
  font-size: 13px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.copy-field input:focus {
  outline: none;
  border-color: var(--border-strong);
  box-shadow: 0 0 0 3px rgba(90, 207, 199, 0.1);
}

.copy-btn {
  width: 50px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(90, 207, 199, 0.06);
  color: var(--text);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.12s;
}

.copy-btn:hover {
  background: rgba(90, 207, 199, 0.14);
  border-color: var(--border-strong);
  color: var(--accent);
  transform: translateY(-1px);
}

.hint {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 12px;
}

.hint.instruction {
  color: var(--accent-2);
  font-weight: 500;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: rgba(90, 207, 199, 0.06);
  border: 1px solid rgba(90, 207, 199, 0.12);
}

.status-bar {
  margin-top: 24px;
  padding: 14px 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: linear-gradient(90deg, rgba(90, 207, 199, 0.08), rgba(255, 255, 255, 0.02));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.status-bar__left {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(90, 207, 199, 0.15);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.status-bar__timer {
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  font-weight: 700;
  font-size: 15px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(90, 207, 199, 0.1);
  border: 1px solid rgba(90, 207, 199, 0.16);
}

.paid-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 24px 32px;
  gap: 20px;
}

.paid-success__icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 34px;
  font-weight: 700;
  color: var(--accent-2);
  background: linear-gradient(135deg, rgba(90, 207, 199, 0.22), rgba(90, 207, 199, 0.08));
  border: 2px solid rgba(90, 207, 199, 0.45);
  box-shadow: 0 0 48px rgba(90, 207, 199, 0.18);
  animation: paidPop 0.5s ease-out;
}

@keyframes paidPop {
  from {
    opacity: 0;
    transform: scale(0.85);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.paid-success__hint {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.6;
}

.checkout-card--paid .step-label {
  display: none;
}

.checkout-card--paid .checkout__subtitle {
  margin-bottom: 8px;
}

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(14, 20, 23, 0.95);
  color: #fff;
  padding: 12px 20px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-soft);
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
  z-index: 99;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(-4px);
}
