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

body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  background-color: #ffffff;
  color: #070707;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

button {
  font: inherit;
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
}

.container {
  width: min(100%, 980px);
  margin: 0 auto;
  padding: 0 32px;
}

.site-header {
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  padding: 24px 0;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  font-weight: 600;
  font-size: 20px;
}

.brand-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #d8d8d8, #f1f1f1);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.menu-wrapper {
  position: relative;
}

.network-popover {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 220px;
  border-radius: 16px;
  border: 1px solid rgba(7, 7, 7, 0.08);
  background: #ffffff;
  box-shadow: 0 18px 36px rgba(7, 7, 7, 0.14);
  padding: 6px 0;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 10;
}

.menu-wrapper.open .network-popover {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.network-option {
  width: 100%;
  text-align: left;
  padding: 10px 18px;
  font-size: 14px;
  color: #070707;
  display: flex;
  align-items: center;
  gap: 10px;
  background: transparent;
}

.network-option:hover {
  background: rgba(7, 7, 7, 0.05);
}

.network-option .checkmark {
  min-width: 16px;
  font-size: 14px;
  line-height: 1;
  color: #070707;
  opacity: 0;
}

.network-option.active .checkmark {
  opacity: 1;
}

.ghost-button {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.ghost-button .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.75);
}

.pill-button {
  background: #0e0e0e;
  color: #ffffff;
  padding: 14px 32px;
  border-radius: 999px;
  font-weight: 500;
  transition: background 0.15s ease;
}

.pill-button:hover {
  background: #1f1f1f;
}

main {
  flex: 1;
}

.hero {
  padding: 84px 0 120px;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 36px;
}

.hero h1 {
  font-size: clamp(34px, 5vw, 48px);
  line-height: 1.1;
  font-weight: 600;
  margin: 0;
}

.swap-wrapper {
  width: min(100%, 640px);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.toggle-button {
  align-self: flex-end;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 20px;
  border-radius: 999px;
  background: #111111;
  color: #ffffff;
  font-size: 14px;
  position: relative;
  cursor: pointer;
  transition: background 0.15s ease;
  border: none;
  font-family: inherit;
}

.toggle-button:hover {
  background: #1a1a1a;
}

.info-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.24);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 500;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.info-icon:hover,
.info-icon:focus {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.4);
}

.info-icon:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.7);
  outline-offset: 2px;
}

.info-tooltip {
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  transform: translateX(-50%);
  width: min(320px, 90vw);
  background: #171717;
  color: #ffffff;
  padding: 16px 18px;
  border-radius: 18px;
  font-size: 13px;
  line-height: 1.5;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.3);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
  z-index: 8;
}

.info-tooltip::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 16px;
  height: 16px;
  background: #171717;
  border-radius: 3px;
}

.info-icon:hover + .info-tooltip,
.info-icon:focus + .info-tooltip {
  opacity: 1;
}

.switch {
  width: 36px;
  height: 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  padding: 2px;
  display: flex;
  align-items: center;
  transition: background 0.2s ease;
}

.toggle-button.active .switch {
  background: #2f84ff;
}

.switch-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ffffff;
  margin-left: 0;
  transition: margin-left 0.2s ease;
}

.toggle-button.active .switch-thumb {
  margin-left: auto;
}

.swap-card {
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 24px;
  padding: 36px 40px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 28px;
  text-align: left;
}

.swap-row {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.row-label {
  font-size: 16px;
  color: rgba(7, 7, 7, 0.75);
}

.input-control {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 18px;
  padding: 18px 26px;
  background: rgba(0, 0, 0, 0.02);
}

.select-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  color: #070707;
}

.caret {
  font-size: 18px;
  line-height: 1;
}

.amount {
  font-size: 20px;
  color: rgba(7, 7, 7, 0.5);
}

.token-output {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 20px;
  font-weight: 500;
}

.crypto-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid rgba(7, 7, 7, 0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.crypto-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wallet-icon {
  width: 32px;
  height: 32px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.wallet-icon svg {
  width: 24px;
  height: 24px;
  display: block;
}

.disclaimer {
  margin: 0;
  font-size: 14px;
  color: rgba(7, 7, 7, 0.45);
  text-align: center;
}

.primary-button {
  margin-top: 20px;
  padding: 18px 60px;
  border-radius: 999px;
  background: #0e0e0e;
  color: #ffffff;
  font-weight: 500;
  font-size: 18px;
  transition: background 0.15s ease;
}

.primary-button:hover {
  background: #1f1f1f;
}

.faq {
  padding: 0 0 120px;
}

.faq h2 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 24px;
}

.accordion {
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 18px;
  overflow: hidden;
  background: #ffffff;
}

.accordion details + details {
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.accordion summary {
  list-style: none;
  padding: 20px 28px;
  font-weight: 500;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 18px;
  cursor: pointer;
}

.accordion summary::-webkit-details-marker {
  display: none;
}

.accordion summary::after {
  content: '▾';
  font-size: 18px;
  transition: transform 0.2s ease;
}

.accordion details[open] summary::after {
  transform: rotate(180deg);
}

.accordion p {
  margin: 0;
  padding: 0 28px 20px;
  font-size: 16px;
  color: rgba(7, 7, 7, 0.65);
  line-height: 1.5;
}

.accordion ul {
  margin: 0;
  padding: 0 28px 20px 28px;
  list-style-position: inside;
}

.accordion li {
  font-size: 16px;
  color: rgba(7, 7, 7, 0.65);
  line-height: 1.5;
  font-weight: 400;
  margin-bottom: 8px;
}

.accordion li:last-child {
  margin-bottom: 0;
}

.faq .container {
  display: flex;
  flex-direction: column;
}

.feedback-link {
  display: inline-block;
  margin-top: 18px;
  margin-left: auto;
  color: rgba(7, 7, 7, 0.55);
  border-bottom: 1px solid rgba(7, 7, 7, 0.35);
  padding-bottom: 2px;
  font-size: 16px;
}

.feedback-link:hover {
  color: #070707;
  border-color: #070707;
}

.site-footer {
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  padding: 48px 0 60px;
  background: rgba(0, 0, 0, 0.02);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  gap: 60px;
  flex-wrap: wrap;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  font-weight: 600;
  font-size: 20px;
}

.footer-columns {
  display: flex;
  gap: 60px;
  flex-wrap: wrap;
  font-size: 16px;
}

.column {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 140px;
}

.column h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
  color: rgba(7, 7, 7, 0.7);
}

.column a {
  color: #070707;
  font-weight: 500;
}

.column a:hover {
  color: rgba(7, 7, 7, 0.65);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 100;
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-backdrop.dark {
  background: rgba(7, 7, 7, 0.65);
}

.modal-backdrop.light {
  background: rgba(7, 7, 7, 0.35);
  backdrop-filter: blur(4px);
}

.modal-card {
  width: min(100%, 420px);
  border-radius: 28px;
  box-shadow: 0 24px 48px rgba(7, 7, 7, 0.22);
}

.connect-modal {
  background: #080808;
  color: #ffffff;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.modal-header h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.2;
}

.close-button {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  width: 34px;
  height: 34px;
  color: #ffffff;
  font-size: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.close-button:hover {
  background: rgba(255, 255, 255, 0.18);
}

.wallet-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.wallet-item {
  width: 100%;
  padding: 14px 18px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
  font-size: 16px;
  font-weight: 500;
  transition: background 0.15s ease;
  display: flex;
  align-items: center;
  gap: 14px;
  justify-content: flex-start;
  text-align: left;
}

.wallet-item:hover {
  background: rgba(255, 255, 255, 0.14);
}

.less-options {
  align-self: flex-end;
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
}

.less-options:hover {
  color: #ffffff;
}

.token-modal {
  background: #ffffff;
  padding: 28px 32px 36px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  color: #070707;
}

.token-search {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(7, 7, 7, 0.12);
  border-radius: 22px;
  padding: 12px 16px;
  font-size: 16px;
  color: rgba(7, 7, 7, 0.55);
}

.token-search input {
  flex: 1;
  border: none;
  background: transparent;
  font: inherit;
  color: inherit;
  outline: none;
}

.token-search input::placeholder {
  color: rgba(7, 7, 7, 0.35);
}

.search-icon {
  width: 20px;
  height: 20px;
}

.token-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.token-section h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.token-section p {
  margin: 0;
  font-size: 15px;
  color: rgba(7, 7, 7, 0.55);
}

body.modal-open {
  overflow: hidden;
}

@media (max-width: 680px) {
  .container {
    padding: 0 20px;
  }

  .hero {
    padding: 60px 0 90px;
  }

  .swap-card {
    padding: 28px;
  }

  .input-control {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .amount {
    font-size: 18px;
  }

  .primary-button {
    width: 100%;
  }

  .footer-content {
    flex-direction: column;
    gap: 36px;
  }

  .footer-columns {
    gap: 32px;
  }
}