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

html,
body {
  min-height: 100%;
}

body {
  font-family: Kanit, sans-serif;
  background: #eef8ff;
  color: #280d5f;
  -webkit-font-smoothing: antialiased;
}

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

button,
input {
  font-family: inherit;
  border: 0;
  background: none;
}

button {
  cursor: pointer;
}

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

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 72px;
  padding: 16px 24px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #e7e3eb;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #280d5f;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.brand img {
  width: 26px;
  height: 26px;
}

.chev {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-right: auto;
  margin-left: 16px;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
  height: 40px;
  padding: 0 14px;
  border-radius: 12px;
  color: #7a6eaa;
  font-size: 16px;
  font-weight: 600;
}

.nav-item:hover,
.nav-item.is-active {
  background: #eeeaf4;
  color: #280d5f;
}

.badge {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  background: #31d0aa;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
}

.menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 280px;
  padding: 8px;
  background: #fff;
  border: 1px solid #e7e3eb;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(40, 13, 95, 0.08);
}

.nav-item:hover .menu {
  display: block;
}

.menu a {
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  color: #280d5f;
  font-size: 16px;
  font-weight: 600;
}

.menu a:hover {
  background: #eeeaf4;
}

.menu small {
  display: block;
  margin-top: 2px;
  color: #7a6eaa;
  font-size: 12px;
  font-weight: 400;
}

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

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  color: #7a6eaa;
  display: grid;
  place-items: center;
}

.icon-btn:hover {
  background: #eeeaf4;
  color: #280d5f;
}

.icon-btn svg {
  width: 20px;
  height: 20px;
}

.connect {
  height: 40px;
  padding: 0 16px;
  border-radius: 16px;
  background: #1fc7d4;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  box-shadow: inset 0 -1px 0 rgba(14, 14, 44, 0.4);
}

.connect:hover {
  background: #53dee9;
}

.page {
  min-height: calc(100vh - 72px);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 16px 80px;
}

.tabs {
  display: flex;
  align-items: center;
  width: 401px;
  max-width: 100%;
  height: 42px;
  padding: 1px;
  margin-bottom: 16px;
  background: #eeeaf4;
  border-radius: 16px;
}

.tab {
  flex: 1;
  height: 40px;
  border-radius: 16px;
  color: #7a6eaa;
  font-size: 16px;
  font-weight: 400;
}

.tab.is-active {
  background: #7a6eaa;
  color: #fff;
  font-weight: 600;
}

.tab-chart {
  flex: 0 0 48px;
  width: 48px;
  height: 40px;
  border-radius: 16px;
  color: #7a6eaa;
  display: grid;
  place-items: center;
}

.tab-chart svg {
  width: 20px;
  height: 20px;
}

.card {
  width: 480px;
  max-width: 100%;
  background: #fff;
  border-radius: 24px;
  padding: 16px;
}

.card + .card {
  margin-top: 16px;
}

.field-label {
  padding: 0 8px 8px;
  color: #7a6eaa;
  font-size: 12px;
  font-weight: 600;
}

.field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 80px;
  padding: 8px 16px;
  background: #eeeaf4;
  border-radius: 20px;
}

.token-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #280d5f;
  text-align: left;
}

.token-btn .token {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

.token-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.token-meta strong {
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.1;
}

.token-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #7a6eaa;
  font-size: 12px;
  font-weight: 500;
}

.chain-ico {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.amount {
  text-align: right;
  min-width: 110px;
}

.amount input {
  width: 130px;
  outline: none;
  color: #280d5f;
  font-size: 24px;
  font-weight: 600;
  text-align: right;
}

.amount input::placeholder {
  color: #b8add2;
}

.usd {
  display: block;
  margin-top: 2px;
  color: #7a6eaa;
  font-size: 12px;
  font-weight: 500;
}

.switch-wrap {
  position: relative;
  height: 12px;
  margin: 4px 0;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2;
}

.switch {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #eeeaf4;
  color: #1fc7d4;
  display: grid;
  place-items: center;
  box-shadow: 0 0 0 4px #fff;
}

.switch:hover {
  background: #e0d9ea;
}

.switch svg {
  width: 18px;
  height: 18px;
}

.slip-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  color: #7a6eaa;
  font-size: 14px;
  font-weight: 400;
}

.auto {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 7px 8px;
  border-radius: 12px;
  background: #eff4f5;
  color: #02919d;
  font-size: 14px;
  font-weight: 600;
}

.auto svg {
  width: 14px;
  height: 14px;
}

.cta {
  width: 100%;
  height: 48px;
  border-radius: 16px;
  background: #1fc7d4;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  box-shadow: inset 0 -1px 0 rgba(14, 14, 44, 0.4);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.cta:hover {
  background: #53dee9;
}

.cta svg {
  width: 16px;
  height: 16px;
}

.footer {
  background: #27262c;
  color: #b8add2;
  padding: 40px 48px 24px;
}

.footer-top {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(6, 1fr) 160px;
  gap: 24px;
}

.footer h3 {
  margin-bottom: 16px;
  color: #9a6aff;
  font-size: 16px;
  font-weight: 600;
}

.footer a {
  display: block;
  margin: 10px 0;
  color: #b8add2;
  font-size: 14px;
  font-weight: 400;
}

.footer a:hover {
  color: #fff;
}

.footer-logo {
  justify-self: end;
  align-self: start;
}

.footer-logo img {
  width: 48px;
  height: 48px;
}

.footer-bottom {
  max-width: 1200px;
  margin: 36px auto 0;
  padding-top: 20px;
  border-top: 1px solid #383241;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer-left,
.footer-right,
.socials {
  display: flex;
  align-items: center;
  gap: 12px;
}

.theme-toggle {
  width: 48px;
  height: 28px;
  border-radius: 999px;
  background: #372f47;
  position: relative;
}

.theme-toggle i {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
}

.lang {
  color: #b8add2;
  font-size: 16px;
  font-weight: 600;
}

.socials a {
  margin: 0;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  color: #b8add2;
}

.cake-price {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-weight: 600;
}

.cake-price img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
}

.buy-cake {
  height: 40px;
  padding: 0 16px;
  border-radius: 16px;
  background: #1fc7d4;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  box-shadow: inset 0 -1px 0 rgba(14, 14, 44, 0.4);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(40, 13, 95, 0.6);
  place-items: center;
  padding: 24px;
}

.modal.open {
  display: grid;
}

.modal-box {
  width: min(420px, 100%);
  background: #fff;
  border-radius: 24px;
  padding: 24px;
}

.modal-box h3 {
  font-size: 20px;
  margin-bottom: 8px;
}

.modal-box p {
  color: #7a6eaa;
  margin-bottom: 16px;
}

.search-input,
.wallet-list button {
  width: 100%;
  height: 48px;
  border-radius: 16px;
  font: 600 16px Kanit, sans-serif;
  color: #280d5f;
}

.search-input {
  border: 1px solid #e7e3eb;
  padding: 0 16px;
  outline: none;
}

.wallet-list {
  display: grid;
  gap: 8px;
}

.wallet-list button {
  background: #eeeaf4;
  text-align: left;
  padding: 0 16px;
}

.wallet-list button:hover {
  background: #e0d9ea;
}

@media (max-width: 980px) {
  .nav {
    display: none;
  }

  .footer-top {
    grid-template-columns: 1fr 1fr;
  }

  .footer-logo {
    justify-self: start;
  }

  .footer-bottom {
    flex-wrap: wrap;
  }
}

@media (max-width: 640px) {
  .connect span {
    display: none;
  }

  .card,
  .tabs {
    width: 100%;
  }
}
