/* App styles */

:root {
  --primary1: #fdfcfe;
  --primary2: #fbfaff;
  --primary3: #eff1ff;
  --primary4: #e4e7ff;
  --primary5: #d7dbff;
  --primary6: #c8ccff;
  --primary7: #b0b4ff;
  --primary8: #8e8eff;
  --primary9: #4615c8;
  --primary10: #3d12b0;
  --primary11: #5a45df;
  --primary12: #2a226e;

  --gray1: hsl(206, 30%, 98.8%);
  --gray2: hsl(210, 16.7%, 97.6%);
  --gray3: hsl(209, 13.3%, 95.3%);
  --gray4: hsl(209, 12.2%, 93.2%);
  --gray5: hsl(208, 11.7%, 91.1%);
  --gray6: hsl(208, 11%, 88%);
  --gray7: hsl(207, 10%, 83%);
  --gray8: hsl(205, 9%, 74%);
  --gray9: hsl(206, 6%, 56%);
  --gray10: hsl(206, 5.8%, 52%);
  --gray11: hsl(206, 6%, 43.5%);
  --gray12: hsl(206, 24%, 9%);

  --page-bg: #ffffff;
  --page-app-bg: #f4f3fb;
  --widget-bg: #ffffff;
  --widget-card: var(--gray1);
  --widget-selector: var(--gray2);
  --widget-selector-hover: var(--gray3);
  --modal-bg: #ffffff;
  --input-bg: var(--gray3);
  --text: var(--gray12);
  --text-subtle: var(--gray11);
  --border: var(--gray5);
  --shadow-widget: 0 4px 30px rgba(0, 0, 0, 0.1);
  --shadow-modal: 0 16px 70px rgba(0, 0, 0, 0.18);
  --radius-widget: 16px;
  --radius-card: 12px;
  --radius-btn: 8px;
  --radius-pill: 9999px;
  --nav-h: 64px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-display: "Chivo", "Inter", -apple-system, sans-serif;
  --focus: var(--primary7);
  color-scheme: light;
}

html.dark {
  --page-bg: #0d0c0d;
  --page-app-bg: #0d0c0d;
  --widget-bg: #161616;
  --widget-card: #1c1c1c;
  --widget-selector: #232323;
  --widget-selector-hover: #282828;
  --modal-bg: #1c1c1c;
  --input-bg: #232323;
  --text: #ededed;
  --text-subtle: #a0a0a0;
  --border: #343434;
  --gray1: #161616;
  --gray2: #1c1c1c;
  --gray3: #232323;
  --gray4: #282828;
  --gray5: #2e2e2e;
  --gray11: #a0a0a0;
  --gray12: #ededed;
  --primary3: #251e40;
  --primary4: #2c2250;
  --primary5: #32275f;
  --primary6: #392c72;
  --shadow-widget: 0 4px 30px rgba(0, 0, 0, 0.45);
  color-scheme: dark;
}

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

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--page-bg);
  min-height: 100vh;
}

body.app-page {
  background: var(--page-app-bg);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
  color: inherit;
  border: none;
  background: none;
}

button {
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
}

/* ---------- NAV ---------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 36px;
  background: transparent;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-shrink: 0;
}

.logo {
  display: flex;
  align-items: center;
  height: 28px;
}

.logo svg {
  height: 28px;
  width: auto;
}

html.dark .logo svg path {
  fill: #ededed;
}

html.dark .logo img {
  filter: invert(1);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  font-weight: 700;
  font-size: 16px;
  line-height: 20px;
  color: var(--gray11);
  padding: 8px 12px;
  border-radius: 8px;
  transition: color 0.15s;
}

.nav-link:hover,
.nav-link.active {
  color: var(--gray12);
}

.nav-link.dropdown::after {
  content: "";
  display: inline-block;
  width: 0;
  height: 0;
  margin-left: 6px;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  vertical-align: middle;
  opacity: 0.7;
}

.nav-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 400px;
  max-width: calc(100vw - 480px);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 14px;
  background: var(--gray3);
  border-radius: 9999px;
  border: 1px solid transparent;
  transition: border-color 0.15s, background 0.15s;
}

.search-box:focus-within {
  border-color: var(--primary7);
  background: var(--widget-bg);
}

.search-box svg {
  flex-shrink: 0;
  color: var(--gray11);
}

.search-box input {
  flex: 1;
  min-width: 0;
  outline: none;
  background: transparent;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

.search-box input::placeholder {
  color: var(--gray11);
}

.search-kbd {
  font-size: 12px;
  font-weight: 600;
  color: var(--gray11);
  background: var(--widget-bg);
  border: 1px solid var(--gray5);
  border-radius: 6px;
  padding: 2px 6px;
  line-height: 1.2;
}

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

.btn-connect {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 16px;
  line-height: 12px;
  background: var(--primary5);
  color: var(--primary12);
  transition: background 0.2s;
}

.btn-connect:hover {
  background: var(--primary6);
}

html.dark .btn-connect {
  color: #fff;
}

/* ---------- MAIN / HERO ---------- */
main {
  min-height: 100vh;
  padding-top: var(--nav-h);
}

.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 72px 48px 48px;
  min-height: calc(100vh - var(--nav-h) - 100px);
}

.hero-copy h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(48px, 5.5vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  color: var(--text);
}

.hero-copy h1 .accent {
  color: var(--primary9);
  display: block;
}

.hero-copy p {
  margin-top: 20px;
  max-width: 420px;
  font-size: 16px;
  line-height: 1.55;
  color: var(--text-subtle);
  font-weight: 500;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 12px 22px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  background: var(--primary9);
  color: #fff;
  transition: background 0.2s, transform 0.1s;
}

.btn-primary:hover {
  background: var(--primary10);
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-dark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 12px 22px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  background: var(--gray12);
  color: #fff;
  transition: opacity 0.2s;
}

html.dark .btn-dark {
  background: #fff;
  color: #0d0c0d;
}

.btn-dark:hover {
  opacity: 0.9;
}

.hero-widget {
  display: flex;
  justify-content: center;
}

/* ---------- SWAP WIDGET ---------- */
.widget {
  width: 100%;
  max-width: 440px;
  background: var(--widget-bg);
  border-radius: var(--radius-widget);
  box-shadow: var(--shadow-widget);
  padding: 12px;
  border: 1px solid transparent;
}

.widget-compact {
  max-width: 400px;
}

.widget-trending {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 4px 10px;
  overflow-x: auto;
  scrollbar-width: none;
}

.widget-trending::-webkit-scrollbar {
  display: none;
}

.trend-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-subtle);
  padding: 6px 10px;
  white-space: nowrap;
}

.trend-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 9999px;
  background: var(--gray2);
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  transition: background 0.15s;
}

.trend-chip:hover {
  background: var(--gray3);
}

.trend-chip .dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--primary9);
}

.widget-tabs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px 10px;
}

.tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--gray2);
  border-radius: 9999px;
  padding: 3px;
}

.tab {
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-subtle);
  transition: background 0.15s, color 0.15s;
}

.tab.active {
  background: var(--widget-bg);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.btn-icon {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  color: var(--text-subtle);
  transition: background 0.15s, color 0.15s;
}

.btn-icon:hover {
  background: var(--gray3);
  color: var(--text);
}

.widget-card {
  background: var(--widget-card);
  border-radius: var(--radius-card);
  padding: 14px 16px;
  position: relative;
}

.widget-card + .swap-divider + .widget-card {
  margin-top: 0;
}

.widget-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.widget-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-subtle);
}

.link-wallet {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary11);
}

.link-wallet:hover {
  color: var(--primary9);
}

.widget-row-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.amount-input {
  flex: 1;
  min-width: 0;
  font-size: 36px;
  font-weight: 500;
  letter-spacing: -0.02em;
  outline: none;
  background: transparent;
  color: var(--text);
  width: 100%;
}

.amount-input::placeholder {
  color: var(--gray8);
}

.amount-usd {
  margin-top: 4px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-subtle);
  display: flex;
  align-items: center;
  gap: 4px;
}

.token-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 50px;
  padding: 0 12px 0 8px;
  border-radius: 9999px;
  background: var(--widget-selector);
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
  transition: background 0.15s, filter 0.15s;
  max-width: 180px;
}

.token-btn:hover {
  background: var(--widget-selector-hover);
}

.token-btn.select-token {
  background: var(--primary4);
  color: var(--primary12);
  text-transform: uppercase;
  font-size: 14px;
  letter-spacing: 0.02em;
  padding: 0 16px;
}

.token-btn.select-token:hover {
  background: var(--primary5);
}

.token-icons {
  position: relative;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.token-icons img.token {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--gray3);
}

.token-icons img.chain {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 14px;
  height: 14px;
  border-radius: 4px;
  border: 1.5px solid var(--widget-selector);
  background: var(--widget-bg);
  object-fit: cover;
}

.token-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.15;
  min-width: 0;
}

.token-meta .sym {
  font-size: 16px;
  font-weight: 700;
}

.token-meta .chain-name {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-subtle);
}

.token-btn .chev {
  color: var(--text-subtle);
  flex-shrink: 0;
  margin-left: 2px;
}

.swap-divider {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 12px;
  position: relative;
  z-index: 2;
  margin: -6px 0;
}

.swap-dir-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--widget-bg);
  border: 4px solid var(--primary3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray9);
  transition: color 0.15s, background 0.15s, transform 0.2s;
}

.swap-dir-btn:hover {
  color: var(--gray11);
  background: var(--gray2);
}

.swap-dir-btn.spin {
  transform: rotate(180deg);
}

.widget-cta {
  width: 100%;
  margin-top: 12px;
  min-height: 52px;
  border-radius: 12px;
  background: var(--primary9);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: background 0.2s, transform 0.1s;
}

.widget-cta:hover {
  background: var(--primary10);
}

.widget-cta:active {
  transform: scale(0.99);
}

.widget-cta:disabled {
  background: var(--gray8);
  color: var(--gray11);
  cursor: not-allowed;
}

.widget-details {
  margin-top: 10px;
  padding: 10px 4px 4px;
  font-size: 13px;
  color: var(--text-subtle);
  display: none;
}

.widget-details.visible {
  display: block;
}

.widget-details-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
}

.widget-details-row strong {
  color: var(--text);
  font-weight: 600;
}

/* ---------- TRUSTED BY ---------- */
.trusted {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 48px 48px;
  flex-wrap: wrap;
}

.trusted-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-subtle);
  margin-bottom: 12px;
}

.logo-marquee {
  display: flex;
  align-items: center;
  gap: 28px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 2%, #000 98%, transparent);
}

.logo-marquee-track {
  display: flex;
  align-items: center;
  gap: 40px;
  animation: marquee 45s linear infinite;
  width: max-content;
}

.logo-marquee img {
  height: 20px;
  width: auto;
  max-width: 110px;
  object-fit: contain;
  opacity: 0.8;
  filter: grayscale(1);
  flex-shrink: 0;
}

html.dark .logo-marquee img {
  filter: grayscale(1) invert(1);
  opacity: 0.85;
}

@keyframes marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

.ecosystem-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-subtle);
  white-space: nowrap;
}

.ecosystem-link:hover {
  color: var(--text);
}

/* ---------- SECTIONS ---------- */
.section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 80px 48px;
}

.section-muted {
  background: var(--gray1);
}

.section h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  max-width: 720px;
}

.section-lead {
  margin-top: 16px;
  max-width: 640px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-subtle);
  font-weight: 500;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 40px;
}

.feature-card {
  background: var(--widget-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 24px;
}

.feature-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.feature-card p {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-subtle);
  font-weight: 500;
}

.solutions-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 40px;
}

.sol-tab {
  padding: 8px 16px;
  border-radius: 9999px;
  font-size: 14px;
  font-weight: 600;
  background: var(--gray2);
  color: var(--text-subtle);
  transition: background 0.15s, color 0.15s;
}

.sol-tab.active {
  background: var(--widget-bg);
  color: var(--text);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--border);
}

.solutions-panel {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 48px;
  align-items: center;
}

.solutions-visual {
  background: linear-gradient(145deg, #eef0ff 0%, #f7f8fc 50%, #e8ecff 100%);
  border-radius: 24px;
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  position: relative;
  overflow: hidden;
}

html.dark .solutions-visual {
  background: linear-gradient(145deg, #1c172b 0%, #161616 50%, #251e40 100%);
}

.balance-card {
  background: var(--widget-bg);
  border-radius: 16px;
  box-shadow: var(--shadow-widget);
  padding: 20px;
  width: 100%;
  max-width: 300px;
}

.balance-card .addr {
  font-size: 12px;
  color: var(--text-subtle);
  font-weight: 600;
}

.balance-card .total-label {
  margin-top: 16px;
  font-size: 12px;
  color: var(--text-subtle);
}

.balance-card .total {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.balance-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.balance-actions span {
  flex: 1;
  text-align: center;
  padding: 10px 4px;
  border-radius: 10px;
  background: var(--gray2);
  font-size: 12px;
  font-weight: 600;
}

.solutions-copy h3 {
  font-family: var(--font-display);
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.solutions-copy p {
  margin: 16px 0 28px;
  color: var(--text-subtle);
  font-weight: 500;
  line-height: 1.55;
}

.partner-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 28px;
  align-items: center;
}

.partner-row img {
  height: 18px;
  opacity: 0.7;
  filter: grayscale(1);
}

/* ---------- CTA BAND ---------- */
.cta-band {
  background: linear-gradient(180deg, #2a1a7a 0%, #1a0f4d 100%);
  color: #fff;
  text-align: center;
  padding: 96px 48px;
}

.cta-band h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  max-width: 700px;
  margin: 0 auto;
}

.cta-band p {
  margin: 16px auto 32px;
  max-width: 520px;
  opacity: 0.85;
  font-weight: 500;
}

.cta-band .hero-ctas {
  justify-content: center;
}

.cta-band .btn-primary {
  background: #fff;
  color: var(--primary9);
}

.cta-band .btn-primary:hover {
  background: #f0f0ff;
}

.cta-band .btn-dark {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
}

/* ---------- FOOTER ---------- */
.footer {
  background: var(--page-bg);
  border-top: 1px solid var(--border);
  padding: 64px 48px 32px;
}

.footer-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr repeat(5, 1fr);
  gap: 32px;
}

.footer-col h4 {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--text);
}

.footer-col a {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-subtle);
  padding: 5px 0;
}

.footer-col a:hover {
  color: var(--text);
}

.footer-col .badge {
  display: inline-block;
  margin-left: 6px;
  font-size: 10px;
  font-weight: 700;
  background: var(--primary4);
  color: var(--primary11);
  padding: 1px 6px;
  border-radius: 4px;
  vertical-align: middle;
}

.footer-bottom {
  max-width: 1100px;
  margin: 40px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-subtle);
  text-align: center;
}

/* ---------- BRIDGE PAGE ---------- */
.bridge-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 48px 16px 80px;
  min-height: calc(100vh - var(--nav-h));
}

.bridge-main .widget {
  max-width: 440px;
}

/* ---------- FLOATING THEME TOGGLE ---------- */
.theme-toggle {
  position: fixed;
  bottom: 30px;
  left: 38px;
  z-index: 90;
  width: 64px;
  height: 32px;
  background: var(--gray4);
  border: 1px solid var(--gray5);
  border-radius: 9999px;
  display: flex;
  align-items: center;
  padding: 2px;
  gap: 0;
}

.theme-toggle .knob {
  width: 28px;
  height: 28px;
  border-radius: 9999px;
  background: var(--primary3);
  border: 1px solid var(--primary5);
  position: absolute;
  left: 2px;
  transition: transform 0.2s;
  z-index: 1;
}

html.dark .theme-toggle .knob {
  transform: translateX(30px);
}

.theme-toggle .side {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  color: var(--text-subtle);
  pointer-events: none;
}

/* ---------- MODALS ---------- */
body.modal-open {
  overflow: hidden;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(20, 20, 24, 0.52);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  backdrop-filter: blur(1px);
}

.modal-backdrop.open {
  display: flex;
}

.modal {
  background: var(--modal-bg);
  border-radius: 16px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.22), 0 0 0 1px rgba(0, 0, 0, 0.04);
  width: 100%;
  max-width: 680px;
  height: min(560px, 86vh);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalIn 0.16s ease-out;
}

.modal.token-select-modal {
  max-width: 680px;
  height: min(560px, 86vh);
}

.modal-sm {
  max-width: 400px;
  height: auto;
  max-height: min(520px, 90vh);
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px 10px;
  flex-shrink: 0;
}

.modal-header h3 {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.modal-close {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-subtle);
}

.modal-close:hover {
  background: var(--gray3);
  color: var(--text);
}

.token-modal-body {
  display: grid;
  grid-template-columns: 212px 1fr;
  min-height: 0;
  flex: 1;
  overflow: hidden;
  padding: 0 12px 12px;
  gap: 10px;
}

.chain-pane,
.token-pane {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.chain-pane {
  background: var(--gray1);
  border-radius: 12px;
  padding: 8px;
}

.pane-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--widget-bg);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
  margin-bottom: 8px;
  flex-shrink: 0;
  transition: border-color 0.12s, box-shadow 0.12s;
}

.pane-search:focus-within {
  border-color: var(--primary9);
  box-shadow: 0 0 0 1px var(--primary6);
}

.pane-search input {
  flex: 1;
  outline: none;
  font-size: 13px;
  font-weight: 500;
  background: transparent;
  min-width: 0;
}

.pane-search input::placeholder {
  color: var(--gray11);
  font-weight: 500;
}

.chain-list,
.token-list {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  scrollbar-width: thin;
}

.chain-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  text-align: left;
  transition: background 0.12s;
  min-height: 36px;
}

.chain-item:hover {
  background: var(--gray3);
}

.chain-item.active {
  background: var(--gray3);
}

.chain-item img {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--widget-bg);
}

.chain-item .icon-box {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  background: var(--primary4);
  color: var(--primary11);
  flex-shrink: 0;
  position: relative;
}

.chain-item .icon-box.multi {
  background: transparent;
  overflow: hidden;
}

.chain-item .icon-box.multi .dot {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 2px;
}
.chain-item .icon-box.multi .d1 { top: 1px; left: 1px; background: #12aaff; }
.chain-item .icon-box.multi .d2 { top: 1px; right: 1px; background: #0052ff; }
.chain-item .icon-box.multi .d3 { bottom: 1px; left: 1px; background: #627eea; }
.chain-item .icon-box.multi .d4 { bottom: 1px; right: 1px; background: #9945ff; }

.chain-item .icon-box.same {
  background: var(--primary4);
  color: var(--primary11);
  font-size: 10px;
}

.chain-item .icon-box.star {
  background: transparent;
  color: #c4a000;
  font-size: 14px;
}

.chain-item .info-i {
  margin-left: auto;
  font-size: 11px;
  color: var(--gray9);
  font-weight: 500;
}

.chain-section-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-subtle);
  padding: 12px 10px 4px;
}

.chain-empty {
  padding: 16px 10px;
  font-size: 13px;
  color: var(--text-subtle);
}

.token-pane .pane-search {
  background: var(--gray2);
  border-color: transparent;
  margin: 0 2px 6px;
}

.token-pane .pane-search:focus-within {
  border-color: var(--primary7);
  background: var(--widget-bg);
}

.token-section-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-subtle);
  padding: 10px 12px 6px;
}

.token-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  text-align: left;
  transition: background 0.12s;
  min-height: 56px;
}

.token-item:hover {
  background: var(--gray2);
}

.token-item img.tok {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--gray3);
  flex-shrink: 0;
}

.token-item .info {
  flex: 1;
  min-width: 0;
}

.token-item .info .name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.token-item .info .sub {
  font-size: 12px;
  color: var(--text-subtle);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.token-item .info .sub img {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  flex-shrink: 0;
  object-fit: cover;
}

.more-toggle {
  display: block;
  width: 100%;
  text-align: right;
  padding: 4px 14px 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-subtle);
}

.more-toggle:hover {
  color: var(--text);
}

/* connect modal */
.wallet-list {
  padding: 8px 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wallet-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--gray2);
  font-weight: 700;
  font-size: 15px;
  transition: background 0.15s;
}

.wallet-item:hover {
  background: var(--gray3);
}

.wallet-item .wicon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--widget-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

/* settings modal */
.settings-body {
  padding: 8px 20px 24px;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  font-weight: 600;
}

.slippage-options {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.slippage-options button {
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--gray2);
  font-weight: 700;
  font-size: 13px;
}

.slippage-options button.active {
  background: var(--primary4);
  color: var(--primary12);
}

.slippage-options input {
  width: 72px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--gray2);
  font-weight: 600;
  font-size: 13px;
  outline: none;
}

/* toast */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--gray12);
  color: #fff;
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  max-width: 90vw;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Intercom-style help */
.help-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary9);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(70, 21, 200, 0.35);
  z-index: 90;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1024px) {
  .hero {
    grid-template-columns: 1fr;
    padding: 40px 24px 24px;
    min-height: auto;
    text-align: center;
  }
  .hero-copy p {
    margin-left: auto;
    margin-right: auto;
  }
  .hero-ctas {
    justify-content: center;
  }
  .nav-center {
    display: none;
  }
  .feature-grid {
    grid-template-columns: 1fr;
  }
  .solutions-panel {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .token-modal-body {
    grid-template-columns: 1fr;
  }
  .chain-pane {
    max-height: 180px;
  }
}

@media (max-width: 720px) {
  .nav {
    padding: 10px 16px;
  }
  .nav-links {
    display: none;
  }
  .section {
    padding: 48px 20px;
  }
  .trusted {
    padding: 16px 20px 32px;
  }
  .footer {
    padding: 40px 20px 24px;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
  .amount-input {
    font-size: 28px;
  }
}
