@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Plus+Jakarta+Sans:wght@400;500;600&display=swap');

:root {
  --bg-0: #0b0f14;
  --bg-1: #121a24;
  --bg-2: #0f141c;
  --card: rgba(17, 24, 33, 0.82);
  --border: rgba(148, 163, 184, 0.2);
  --text: #e6edf5;
  --muted: #a7b6c7;
  --accent: #1dd3b0;
  --accent-soft: rgba(29, 211, 176, 0.2);
  --gold: #f6c453;
  --danger: #ff6b6b;
  --success: #3bd186;
  --shadow: 0 30px 80px rgba(6, 14, 24, 0.55);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Plus Jakarta Sans', sans-serif;
  color: var(--text);
  background: radial-gradient(1200px 700px at 10% 10%, rgba(29, 211, 176, 0.18), transparent),
    radial-gradient(900px 600px at 90% 20%, rgba(246, 196, 83, 0.16), transparent),
    linear-gradient(160deg, var(--bg-0), var(--bg-1));
  min-height: 100vh;
}

.bg-grid {
  position: fixed;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.2;
  pointer-events: none;
}

.page {
  position: relative;
  padding: 40px clamp(20px, 4vw, 64px) 64px;
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 36px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: transparent;
  box-shadow: none;
  overflow: hidden;
}

.logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.25);
}

.title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 22px;
  font-weight: 600;
}

.subtitle {
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.invoice-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.copy-chip {
  background: rgba(29, 211, 176, 0.12);
  color: var(--accent);
  border: 1px solid rgba(29, 211, 176, 0.35);
  border-radius: 999px;
  padding: 6px 14px;
  font-weight: 600;
  cursor: pointer;
}

.grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 0.9fr);
  gap: 24px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  animation: fadeUp 0.6s ease-out;
}

.main-card {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.amount-row,
.address-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.amount {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 34px;
  font-weight: 600;
}

.unit {
  font-size: 18px;
  color: var(--muted);
}

.hint {
  color: var(--muted);
  font-size: 13px;
}

.address {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 16px;
  word-break: break-all;
}

.ghost {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  padding: 8px 14px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.qr-row {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 24px;
  align-items: center;
}

.qr {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 18px;
  padding: 16px;
  text-align: center;
}

.qr img {
  width: 140px;
  height: 140px;
  border-radius: 12px;
  background: #fff;
  padding: 10px;
}

.qr-caption {
  margin-top: 10px;
  font-size: 13px;
  color: var(--muted);
}

.wallets {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.wallet {
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text);
  text-decoration: none;
  transition: all 0.2s ease;
}

.wallet:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.status-block {
  background: rgba(15, 23, 36, 0.6);
  border-radius: 18px;
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.status-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.status-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 18px;
  font-weight: 600;
}

.status-pill {
  background: rgba(29, 211, 176, 0.12);
  color: var(--accent);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.08em;
}

.status-body {
  margin-top: 8px;
  color: var(--muted);
}

.progress {
  margin-top: 16px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--gold));
  transition: width 0.4s ease;
}

.status-meta {
  margin-top: 12px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 13px;
}

.tx-hash {
  font-family: 'Space Grotesk', sans-serif;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.timer {
  color: var(--muted);
  font-size: 14px;
}

.cta {
  margin-top: 8px;
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 14px;
  background: linear-gradient(120deg, var(--accent), var(--gold));
  color: var(--bg-0);
  text-decoration: none;
  font-weight: 700;
}

.cta-secondary {
  display: inline-flex;
  align-items: center;
  padding: 12px 18px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.04);
  transition: all 0.2s ease;
}

.cta-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.help-card {
  display: flex;
  flex-direction: column;
  gap: 20px;
  animation: fadeUp 0.8s ease-out;
}

.help-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 18px;
  font-weight: 600;
}

.help-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: var(--muted);
}

.support a {
  color: var(--accent);
  text-decoration: none;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  padding: 12px 16px;
  border-radius: 14px;
  background: rgba(12, 18, 26, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.35);
  color: var(--text);
  font-size: 14px;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 20;
}

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

.toast.success {
  border-color: rgba(59, 209, 134, 0.7);
}

.toast.error {
  border-color: rgba(255, 107, 107, 0.7);
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 960px) {
  .grid {
    grid-template-columns: 1fr;
  }

  .header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .invoice-meta {
    align-items: flex-start;
  }

  .qr-row {
    grid-template-columns: 1fr;
  }

  .toast {
    right: 16px;
    left: 16px;
  }
}
