:root {
  --bg: #07150d;
  --bg-soft: rgba(12, 28, 18, 0.84);
  --panel: rgba(12, 27, 18, 0.82);
  --panel-strong: rgba(9, 22, 14, 0.95);
  --line: rgba(87, 255, 170, 0.14);
  --text: #effff5;
  --muted: #86b79a;
  --aqua: #46f08f;
  --cyan: #79ffb5;
  --mint: #c7ffd9;
  --danger: #ff7d98;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #09160f;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(70, 240, 143, 0.22), transparent 28%),
    radial-gradient(circle at top right, rgba(121, 255, 181, 0.14), transparent 32%),
    linear-gradient(180deg, #173c28 0%, #0c1e14 58%, #09160f 100%);
  color: var(--text);
  font-family: "Space Grotesk", sans-serif;
}

body {
  overflow-x: hidden;
}

.aurora {
  position: fixed;
  inset: auto;
  width: 42rem;
  height: 42rem;
  border-radius: 999px;
  filter: blur(70px);
  opacity: 0.32;
  pointer-events: none;
}

.aurora-a {
  top: -12rem;
  left: -8rem;
  background: radial-gradient(circle, rgba(70, 240, 143, 0.88), transparent 58%);
}

.aurora-b {
  right: -10rem;
  top: 18rem;
  background: radial-gradient(circle, rgba(109, 255, 161, 0.6), transparent 58%);
}

.noise {
  position: fixed;
  inset: 0;
  opacity: 0.03;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 6px 6px, 6px 6px;
  pointer-events: none;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.92) 72%, rgba(0, 0, 0, 0.3) 100%);
}

.shell {
  position: relative;
  z-index: 1;
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.topbar {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 20px;
  margin-bottom: 56px;
}

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

.brand-mark {
  position: relative;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.brand-logo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 18px rgba(70, 240, 143, 0.16));
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Syne", sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

h2 {
  margin: 0 0 14px;
  font-size: clamp(1.3rem, 2.2vw, 1.7rem);
}

.brand-tagline {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}

h3 {
  font-size: 1.35rem;
}

.wallet-button,
.primary-button {
  border: 1px solid rgba(70, 240, 143, 0.22);
  background: linear-gradient(180deg, rgba(12, 25, 16, 0.95), rgba(4, 9, 6, 0.98));
  color: var(--text);
  border-radius: 18px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.wallet-button {
  padding: 14px 18px;
  min-width: 180px;
}

.primary-button {
  padding: 16px 18px;
  margin-top: 20px;
}

.wallet-button:hover,
.primary-button:hover {
  transform: translateY(-1px);
  border-color: rgba(70, 240, 143, 0.42);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
}

.primary-button:disabled {
  cursor: default;
  opacity: 0.55;
  transform: none;
  box-shadow: none;
  border-color: rgba(78, 170, 112, 0.12);
}

.primary-button:disabled:hover {
  transform: none;
  box-shadow: none;
  border-color: rgba(78, 170, 112, 0.12);
}

.swap-shell {
  display: flex;
  justify-content: center;
}

.seo-copy {
  width: min(760px, 100%);
  margin: 28px auto 0;
  color: var(--muted);
  line-height: 1.7;
  font-size: 0.96rem;
}

.info-panel {
  display: inline-block;
}

.info-toggle {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  color: var(--muted);
  font-size: 0.88rem;
  user-select: none;
}

.info-toggle::-webkit-details-marker {
  display: none;
}

.info-badge {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(78, 170, 112, 0.22);
  background: rgba(8, 20, 13, 0.72);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 700;
}

.info-copy {
  margin-top: 12px;
  max-width: 720px;
}

.info-copy p {
  margin: 0 0 14px;
}

.glass-card {
  position: relative;
  background: linear-gradient(180deg, rgba(17, 37, 24, 0.88), rgba(7, 16, 11, 0.94));
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.swap-card {
  width: min(100%, 430px);
  padding: 18px;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.pill {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(70, 240, 143, 0.08);
  color: var(--mint);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.swap-form {
  display: grid;
  gap: 0;
}

.swap-panel {
  padding: 16px 18px;
  background: rgba(13, 22, 18, 0.92);
  border: 1px solid rgba(78, 170, 112, 0.14);
  border-radius: 24px;
}

.swap-panel-out {
  background: rgba(4, 8, 6, 0.92);
  margin-top: 2px;
}

.panel-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.panel-label {
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 600;
}

.panel-body {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.token-chip {
  border-radius: 18px;
  border: 1px solid rgba(78, 170, 112, 0.18);
  background: var(--panel-strong);
  min-height: 46px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text);
  font-weight: 600;
  font-size: 0.95rem;
}

.amount-field {
  display: grid;
  justify-items: end;
  gap: 4px;
  flex: 1;
}

.amount-field input {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: right;
  font-family: "Syne", sans-serif;
  font-size: clamp(1.3rem, 3vw, 2.2rem);
  font-weight: 700;
  line-height: 1;
  outline: none;
}

.amount-field input::-webkit-outer-spin-button,
.amount-field input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.amount-field-out input {
  cursor: default;
}

.amount-estimate {
  color: var(--muted);
  font-size: 0.78rem;
}

.swap-divider {
  position: relative;
  display: flex;
  justify-content: center;
  margin: -8px 0;
  z-index: 1;
}

.swap-direction {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.78);
  background: #0a120d;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 0.95rem;
}

.token-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--aqua);
  box-shadow: 0 0 12px rgba(70, 240, 143, 0.4);
}

.token-dot-out {
  background: var(--mint);
}

.meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 2px 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.meta-row strong {
  color: var(--text);
  text-align: right;
  font-size: 0.88rem;
}

.quote-panel {
  margin-top: 14px;
  display: grid;
  gap: 8px;
  padding: 0;
}

.advanced-panel {
  margin-top: 14px;
  border-top: 1px solid rgba(78, 170, 112, 0.12);
  padding-top: 10px;
}

.advanced-toggle {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  color: var(--muted);
  font-size: 0.88rem;
  user-select: none;
}

.advanced-toggle::-webkit-details-marker {
  display: none;
}

.advanced-icon {
  width: 10px;
  height: 10px;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 160ms ease;
}

.advanced-panel[open] .advanced-icon {
  transform: rotate(225deg);
}

.quote-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.quote-row span {
  color: var(--muted);
}

.quote-row strong {
  font-size: 0.88rem;
  text-align: right;
}

@media (max-width: 680px) {
  .shell {
    width: min(100% - 20px, 1120px);
    padding-top: 18px;
  }

  .topbar {
    grid-template-columns: 1fr;
  }

  .wallet-button {
    width: 100%;
  }

  .swap-card,
  .swap-card {
    padding: 18px;
  }
}
