:root {
  --bg: #020617;
  --bg-card: #020617;
  --border-subtle: #111827;
  --accent: #3b82f6;
  --text: #e5e7eb;
  --text-soft: #9ca3af;
  --danger: #f97373;
  --success: #22c55e;
  --radius-xl: 24px;
  --shadow-soft: 0 22px 60px rgba(15, 23, 42, 0.75);
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Inter", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: var(--font-sans);
  background: radial-gradient(circle at top, #020617 0, #020617 35%, #000 100%);
  color: var(--text);
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* NAVBAR */

.nav {
  max-width: 960px;
  margin: 20px auto 8px;
  padding: 12px 20px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.18);
  backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-logo {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}

.nav-title-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-title {
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #e5e7eb;
}

.nav-subtitle {
  font-size: 11px;
  color: #9ca3af;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.network-pill {
  font-size: 11px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.35);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #cbd5f5;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #6b7280;
}

.dot-online {
  background: #22c55e;
}

/* WALLET BUTTON */

.wallet-btn {
  border-radius: 999px;
  padding: 6px 14px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: #020617;
  color: #e5e7eb;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  cursor: pointer;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.08s ease;
}

.wallet-btn:hover {
  background: #030b1f;
  border-color: #60a5fa;
  transform: translateY(-0.5px);
}

.wallet-btn:active {
  transform: translateY(0.5px);
}

.wallet-icon {
  width: 16px;
  height: 16px;
}

/* MAIN CENTERING */

.main {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center; /* vertically center between nav and footer */
  padding: 10px 16px 20px;
}

.main-inner {
  width: 100%;
  max-width: 960px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* CARD */

.card {
  background: radial-gradient(
      circle at top left,
      #02091c 0,
      #020617 38%,
      #020617 100%
    );
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-soft);
  padding: 24px 24px 22px;
}

.card-title {
  font-size: 24px;
  font-weight: 600;
  margin: 0 0 6px;
}

.card-subtitle {
  margin: 0 0 24px;
  font-size: 14px;
  color: var(--text-soft);
}

.card-title-sm {
  font-size: 17px;
  font-weight: 600;
  margin: 0 0 4px;
}

.card-subtitle-sm {
  margin: 0 0 18px;
  font-size: 13px;
  color: var(--text-soft);
}

/* FORM */

.form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field-label {
  font-size: 13px;
  color: #9ca3af;
}

.input-shell {
  border-radius: 14px;
  background: #020617;
  border: 1px solid #111827;
  padding: 1px;
}

.input-inner {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  gap: 8px;
}

.input-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.input-right {
  font-size: 13px;
  color: #9ca3af;
}

.input-suffix {
  font-size: 13px;
  color: #9ca3af;
}

.input {
  border: none;
  outline: none;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  width: 100%;
}

.token-icon {
  width: 18px;
  height: 18px;
}

.form-error {
  margin: 0;
  font-size: 13px;
  color: var(--danger);
}

/* BUTTONS */

.primary-btn {
  margin-top: 4px;
  width: 100%;
  border-radius: 999px;
  padding: 12px 16px;
  border: none;
  font-size: 14px;
  font-weight: 500;
  background: linear-gradient(90deg, #2563eb, #4f46e5);
  color: white;
  cursor: pointer;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.4);
  transition:
    transform 0.12s ease,
    box-shadow 0.12s ease,
    filter 0.12s ease,
    opacity 0.12s ease;
}

.primary-btn:hover {
  filter: brightness(1.07);
  transform: translateY(-0.5px);
  box-shadow: 0 18px 45px rgba(37, 99, 235, 0.55);
}

.primary-btn:active {
  transform: translateY(0.5px);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.3);
}

.primary-btn:disabled {
  opacity: 0.6;
  cursor: default;
  transform: none;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.6);
}

/* INFO ROW */

.info-row {
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px dashed rgba(51, 65, 85, 0.8);
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.info-icon {
  font-size: 13px;
  color: #9ca3af;
}

.info-text {
  margin: 0;
  font-size: 12px;
  color: var(--text-soft);
}

/* RESULT CARD */

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

.result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid rgba(30, 64, 175, 0.35);
}

.result-row:first-of-type {
  border-top: none;
  padding-top: 0;
}

.result-label {
  font-size: 13px;
  color: #9ca3af;
}

.result-value-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.result-value {
  display: flex;
  align-items: center;
  gap: 6px;
}

.result-tag {
  font-size: 11px;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.16);
  border: 1px solid rgba(129, 140, 248, 0.5);
  color: #bfdbfe;
}

.mono {
  font-family: var(--font-mono);
  font-size: 13px;
}

.ghost-btn-xs {
  font-size: 11px;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: transparent;
  color: #e5e7eb;
  cursor: pointer;
  transition:
    background 0.15s ease,
    border-color 0.15s ease;
}

.ghost-btn-xs:hover {
  background: rgba(15, 23, 42, 0.9);
  border-color: #60a5fa;
}

/* STATUS */

.status-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-pill {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.status-waiting {
  background: rgba(30, 64, 175, 0.15);
  color: #bfdbfe;
  border: 1px solid rgba(59, 130, 246, 0.45);
}

.status-success {
  background: rgba(22, 163, 74, 0.15);
  color: #bbf7d0;
  border: 1px solid rgba(34, 197, 94, 0.7);
}

.status-error {
  background: rgba(220, 38, 38, 0.12);
  color: #fecaca;
  border: 1px solid rgba(248, 113, 113, 0.8);
}

.status-helper {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--text-soft);
}

/* SPINNER */

.spinner {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 2px solid rgba(148, 163, 184, 0.4);
  border-top-color: #e5e7eb;
  animation: spin 0.75s linear infinite;
}

.spinner-btn {
  width: 14px;
  height: 14px;
}

.spinner-inline {
  width: 13px;
  height: 13px;
}

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

/* FOOTER */

.footer {
  padding: 18px 16px 16px;
  background: linear-gradient(
    180deg,
    rgba(15, 23, 42, 0.98),
    #020617 45%,
    #020617 100%
  );
  border-top: 1px solid rgba(51, 65, 85, 0.9);
}

.footer-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-logo {
  width: 26px;
  height: 26px;
  border-radius: 8px;
}

.footer-text-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.footer-brand {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #e5e7eb;
}

.footer-tagline {
  font-size: 12px;
  color: var(--text-soft);
}

.footer-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-label {
  font-size: 12px;
  color: var(--text-soft);
}

.footer-social {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 14px;
  color: #e5e7eb;
  background: rgba(15, 23, 42, 0.9);
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease,
    transform 0.08s ease;
}

.footer-social:hover {
  background: rgba(37, 99, 235, 0.2);
  border-color: #60a5fa;
  color: #bfdbfe;
  transform: translateY(-0.5px);
}

.footer-bottom {
  max-width: 960px;
  margin: 10px auto 0;
  font-size: 11px;
  color: var(--text-soft);
  opacity: 0.9;
}

/* UTILS */

.hidden {
  display: none !important;
}

/* RESPONSIVE */

@media (max-width: 720px) {
  .nav {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-right {
    align-self: stretch;
    justify-content: space-between;
  }

  .main {
    padding: 8px 12px 18px;
    align-items: stretch;
  }

  .main-inner {
    gap: 12px;
  }

  .card {
    padding: 18px 16px 18px;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-bottom {
    text-align: left;
  }
}
