:root {
  color-scheme: dark;
  --bg: #07101e;
  --surface: rgba(16, 28, 47, .92);
  --surface-2: rgba(25, 41, 66, .78);
  --border: rgba(157, 183, 221, .17);
  --text: #f4f8ff;
  --muted: #9aabc3;
  --accent: #4ea4ff;
  --accent-2: #7ec5ff;
  --danger: #ff8b8b;
  --success: #54dfa1;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { min-height: 100%; background: var(--bg); }

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 8%, rgba(48, 133, 255, .17), transparent 34rem),
    radial-gradient(circle at 90% 88%, rgba(61, 211, 171, .1), transparent 30rem),
    var(--bg);
}

button,
input,
textarea { font: inherit; }

button { -webkit-tap-highlight-color: transparent; }

.receive-shell {
  width: min(680px, calc(100% - 32px));
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 24px;
  margin: 0 auto;
  padding: max(24px, env(safe-area-inset-top)) 0 max(24px, env(safe-area-inset-bottom));
}

.receive-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 17px;
  letter-spacing: -.02em;
}

.receive-brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(126, 197, 255, .28);
  border-radius: 12px;
  background: rgba(78, 164, 255, .12);
  color: var(--accent-2);
}

.receive-brand-mark svg { width: 24px; height: 24px; }

.receive-card {
  align-self: center;
  padding: clamp(24px, 6vw, 42px);
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: 0 34px 100px rgba(0, 0, 0, .32);
  backdrop-filter: blur(22px);
}

.receive-eyebrow {
  color: var(--accent-2);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}

h1,
h2,
p { margin-top: 0; }

.receive-intro h1,
.receive-summary h1,
.receive-complete h1 {
  margin: 9px 0 9px;
  font-size: clamp(30px, 7vw, 48px);
  letter-spacing: -.045em;
  line-height: 1.04;
}

.receive-intro p,
.receive-summary-head p,
.receive-complete p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.receive-code-form {
  display: grid;
  gap: 9px;
  margin-top: 30px;
}

.receive-code-form > label {
  color: var(--text);
  font-size: 12px;
  font-weight: 750;
}

.receive-code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.receive-code-row input {
  width: 100%;
  min-width: 0;
  height: 52px;
  border: 1px solid var(--border);
  border-radius: 15px;
  outline: 0;
  padding: 0 16px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 19px;
  font-weight: 760;
  font-variant-numeric: tabular-nums;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.receive-code-row input:focus {
  border-color: rgba(78, 164, 255, .75);
  box-shadow: 0 0 0 4px rgba(78, 164, 255, .11);
}

.receive-code-row button,
.receive-primary {
  min-height: 52px;
  border: 0;
  border-radius: 15px;
  padding: 0 22px;
  background: linear-gradient(135deg, var(--accent), #2977ef);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(41, 119, 239, .24);
}

.receive-code-row button:disabled,
.receive-primary:disabled { opacity: .55; cursor: wait; }

.receive-code-form > small {
  color: var(--muted);
  font-size: 11px;
}

.receive-loading {
  min-height: 220px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
}

.receive-loading span {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(126, 197, 255, .18);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: receive-spin .8s linear infinite;
}

.receive-loading p { margin: 0; color: var(--muted); font-size: 13px; }

@keyframes receive-spin { to { transform: rotate(360deg); } }

.receive-error {
  display: grid;
  gap: 10px;
  padding: 18px;
  border: 1px solid rgba(255, 139, 139, .25);
  border-radius: 18px;
  background: rgba(255, 90, 90, .08);
}

.receive-error strong { color: var(--danger); }
.receive-error p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.receive-error button,
.receive-action-card button,
.receive-action-card a {
  justify-self: start;
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 9px 13px;
  background: var(--surface-2);
  color: var(--text);
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
}

.receive-summary-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
}

.receive-lock {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: rgba(84, 223, 161, .11);
  color: var(--success);
}

.receive-lock svg { width: 25px; height: 25px; }

.receive-items {
  display: grid;
  gap: 8px;
  margin: 25px 0 18px;
}

.receive-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: rgba(255, 255, 255, .025);
}

.receive-item-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: rgba(78, 164, 255, .11);
  color: var(--accent-2);
  font-weight: 800;
}

.receive-item-copy { min-width: 0; display: grid; gap: 3px; }
.receive-item-copy strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.receive-item-copy small,
.receive-item > small { color: var(--muted); font-size: 11px; }

.receive-primary { width: 100%; }

.receive-promise {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
  text-align: center;
}

.receive-actions {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}

.receive-actions h2 { margin-bottom: 12px; font-size: 14px; }
#receiveActionList { display: grid; gap: 10px; }

.receive-action-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255, 255, 255, .025);
}

.receive-action-card strong { font-size: 13px; }
.receive-action-card p { margin: 0; color: var(--muted); font-size: 12px; }
.receive-action-card textarea {
  width: 100%;
  min-height: 120px;
  resize: vertical;
  border: 1px solid var(--border);
  border-radius: 12px;
  outline: 0;
  padding: 12px;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}
.receive-action-card .receive-action-status { color: var(--accent-2); }

.receive-complete {
  min-height: 260px;
  display: grid;
  justify-items: center;
  align-content: center;
  text-align: center;
}

.receive-complete-mark {
  width: 66px;
  height: 66px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  background: rgba(84, 223, 161, .13);
  color: var(--success);
  font-size: 32px;
  font-weight: 900;
}

.receive-complete h1 { font-size: clamp(28px, 6vw, 40px); }

footer {
  align-self: end;
  color: rgba(154, 171, 195, .7);
  font-size: 11px;
  text-align: center;
}

[hidden] { display: none !important; }

@media (max-width: 560px) {
  .receive-shell { width: min(100% - 20px, 680px); gap: 14px; padding-top: 14px; }
  .receive-card { padding: 22px 18px; border-radius: 23px; }
  .receive-code-row { grid-template-columns: 1fr; }
  .receive-code-row button { width: 100%; }
  .receive-summary h1 { font-size: 31px; }
  .receive-item { grid-template-columns: auto minmax(0, 1fr); }
  .receive-item > small { grid-column: 2; }
}

@media (prefers-reduced-motion: reduce) {
  .receive-loading span { animation-duration: 1.8s; }
}
