:root {
  color: #e8edf7;
  background: #070b17;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  min-height: 100vh;
  margin: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: radial-gradient(circle at 50% -20%, rgba(18, 216, 245, 0.12), transparent 45%), #070b17;
}

main {
  width: min(520px, 100%);
  min-width: 0;
  padding: 24px;
  display: grid;
  gap: 20px;
  border: 1px solid #1e2940;
  border-radius: 18px;
  background: #0a1020;
  box-shadow: 0 24px 80px rgb(0 0 0 / 45%);
  text-align: left;
}
main > * { min-width: 0; max-width: 100%; }
.header { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
#network { margin: 0; color: #8e9bb3; font-size: 11px; }

.brand { display: block; height: 26px; width: auto; }

.ring {
  position: relative;
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  border-radius: 50%;
  border: 2px solid #1e2940;
  display: grid;
  place-items: center;
}
.ring::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: #12d8f5;
  border-right-color: #817ff5;
  animation: spin 1.1s linear infinite;
}
.ring::after {
  content: "";
  display: none;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #12d8f5;
}
main[data-state="done"] .ring::before, main[data-state="error"] .ring::before { animation: none; border-color: transparent; }
main[data-state="done"] .ring { border-color: #43d6a1; }
main[data-state="done"] .ring::after {
  display: block;
  width: 8px;
  height: 5px;
  border-radius: 0;
  background: none;
  border: 0 solid #43d6a1;
  border-width: 0 0 2px 2px;
  transform: translateY(-1px) rotate(-45deg);
  animation: none;
}
main[data-state="error"] .ring { border-color: #ff8c9a; }
main[data-state="error"] .ring::after { display: block; background: #ff8c9a; animation: none; }
main[data-state="missing"] .ring::before { animation: none; border-color: transparent; }
main[data-state="missing"] .ring::after { display: block; background: #8e9bb3; animation: none; }

@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ring::before { animation: none; } }

h1 { margin: 0; font-size: 26px; font-weight: 650; letter-spacing: -0.03em; color: #eef3fb; overflow-wrap: anywhere; }
#summary { margin: 0; font-size: 14px; line-height: 1.5; color: #dce4f2; overflow-wrap: anywhere; white-space: pre-line; }
#summary:empty { display: none; }
.transfer-details { margin: 0; border: 1px solid #1e2940; border-radius: 12px; background: #0c1425; }
.transfer-details > div { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 12px; padding: 14px; }
.transfer-details > div + div { border-top: 1px solid #1e2940; }
.transfer-details dt { color: #8e9bb3; font-size: 12px; }
.transfer-details dd { margin: 0; min-width: 0; font: 12px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; }
.status-row { display: flex; align-items: center; gap: 10px; padding-top: 16px; border-top: 1px solid #1e2940; }
#status { margin: 0; color: #8e9bb3; font-size: 12px; line-height: 1.5; }
#status:empty { display: none; }
main[data-state="error"] #status { color: #ff9b9b; }
.note {
  margin: 6px 0 0;
  padding-top: 14px;
  border-top: 1px solid #1e2940;
  color: #66748e;
  font-size: 11px;
  line-height: 1.5;
}
.note b { color: #8e9bb3; font-weight: 600; }
.footer { margin: -10px 0 0; color: #66748e; font-size: 11px; line-height: 1.5; }
main:not([data-state="waiting"]) .footer { display: none; }
#saved-results { border-top: 1px solid #1e2940; padding-top: 16px; }
#saved-results h2 { margin: 0 0 10px; font-size: 14px; }
.saved-result { display: grid; gap: 10px; padding: 10px 0; overflow-wrap: anywhere; }
.saved-result p { margin: 0; color: #8e9bb3; font-size: 12px; line-height: 1.5; }
.saved-result button { justify-self: start; }
[hidden] { display: none !important; }
#picker { width: 100%; display: grid; gap: 10px; justify-items: center; }
.step { margin: 4px 0 0; color: #8e9bb3; font-size: 11px; }
.wallets { width: 100%; display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.wallets button {
  padding: 12px 8px 10px;
  display: grid;
  justify-items: center;
  gap: 6px;
  border: 1px solid #1e2940;
  border-radius: 12px;
  background: #0c1425;
  color: #eef3fb;
  font: 600 12px/1.2 inherit;
  cursor: pointer;
}
.wallets button:hover, .wallets button[aria-pressed="true"] { border-color: #12d8f5; background: #101a2e; }
.wallets img { width: 32px; height: 32px; border-radius: 8px; }
.wallets small { color: #8e9bb3; font-size: 9px; font-weight: 500; }
.wallets .added { color: #43d6a1; }
.chains { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.chains.accounts { display: grid; gap: 8px; justify-items: start; }
.chains.accounts label { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; }
.chains.accounts small { color: #8e9bb3; font-family: inherit; }
.chains label { display: flex; align-items: center; gap: 6px; color: #dce4f2; font-size: 12px; cursor: pointer; }
.chains input { accent-color: #12d8f5; }
.account-type-trigger, .account-type-option {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  min-height: 36px; padding: 7px 10px; border: 1px solid transparent; border-radius: 9px;
  background: transparent; color: #e5ebf6; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
}
.account-type-trigger { border-color: #2b3b59; background: #111b2d; }
.account-type-trigger::after { content: ""; width: 6px; height: 6px; border: solid #8e9bb3; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
.account-type-trigger[aria-expanded="true"]::after { transform: rotate(225deg); }
.account-type-options { position: fixed; inset: auto; margin: 0; padding: 5px; width: min(176px, calc(100vw - 16px)); overflow-y: auto;
  border: 1px solid #2b3b59; border-radius: 12px; background: #0b1424; box-shadow: 0 16px 44px rgb(0 0 0 / 55%); }
.account-type-option { width: 100%; }
.account-type-option:hover { background: #16233a; }
.account-type-option[aria-selected="true"] { border-color: #2a4b67; background: #13273b; }
.account-type-option span { visibility: hidden; color: #12d8f5; }
.account-type-option[aria-selected="true"] span { visibility: visible; }
.account-type-trigger:focus-visible, .account-type-option:focus-visible { outline: 2px solid #12d8f5; outline-offset: 1px; }
button.primary {
  padding: 9px 16px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, #12d8f5, #817ff5);
  color: #07101d;
  font: 650 12px/1 inherit;
  cursor: pointer;
}
button.primary:disabled { opacity: 0.5; cursor: default; }
main[data-state="picking"] .ring { display: none; }
#walletconnect-qr { justify-self: center; width: 240px; max-width: 100%; border-radius: 12px; image-rendering: pixelated; }
