.dex-page { background: #111025; }

.market-world {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  isolation: isolate;
  background:
    linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px),
    radial-gradient(circle at 72% 20%, rgba(103,82,205,.22), transparent 32%),
    linear-gradient(145deg, #111025, #191735 58%, #111025);
  background-size: 46px 46px, 46px 46px, auto, auto;
}

.market-glow {
  position: absolute;
  z-index: -1;
  width: 420px;
  height: 420px;
  right: 12%;
  bottom: -240px;
  border-radius: 50%;
  background: rgba(173,255,69,.1);
  filter: blur(70px);
}

.dex-header { background: rgba(17,16,37,.56); backdrop-filter: blur(18px); }
.page-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px;
  border: 1px solid rgba(255,247,220,.11);
  border-radius: 999px;
  background: rgba(255,255,255,.025);
}
.page-nav a {
  padding: 8px 14px;
  border-radius: 999px;
  color: rgba(255,247,220,.43);
  font-size: 7px;
  font-weight: 650;
  letter-spacing: .17em;
  transition: color .25s ease, background .25s ease;
}
.page-nav a:hover { color: var(--cream); }
.page-nav a.active { color: #141329; background: var(--lime); }

.market-clock {
  display: flex;
  align-items: center;
  gap: 9px;
  justify-self: end;
  color: rgba(255,247,220,.48);
  font-size: 7px;
  font-weight: 650;
  letter-spacing: .16em;
}
.market-clock i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 13px var(--lime);
}

.market-layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
  gap: 14px;
  height: calc(100svh - 78px);
  padding: 14px;
  opacity: 0;
  transform: translateY(15px);
  transition: opacity .8s .1s ease, transform .8s .1s cubic-bezier(.2,.8,.2,1);
}
.ready .market-layout { opacity: 1; transform: translateY(0); }

.pairs-panel,
.chart-panel {
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(255,247,220,.13);
  border-radius: 24px;
  background: rgba(21,20,45,.68);
  box-shadow: 0 24px 65px rgba(2,2,12,.2);
  backdrop-filter: blur(18px);
}

.pairs-panel { display: flex; flex-direction: column; }
.pairs-heading { padding: 28px 25px 19px; }
.pairs-heading p {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 17px;
  color: rgba(255,247,220,.45);
  font-size: 7px;
  font-weight: 650;
  letter-spacing: .19em;
}
.pairs-heading p span {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border: 1px solid rgba(255,247,220,.16);
  border-radius: 50%;
}
.pairs-heading h1 {
  margin: 0;
  color: var(--cream);
  font-family: "Fredoka", sans-serif;
  font-size: clamp(52px, 5.2vw, 77px);
  font-weight: 560;
  line-height: .73;
  letter-spacing: -.06em;
}
.pairs-heading h1 em { color: var(--lime); font-style: normal; }
.pairs-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 26px;
  padding-top: 15px;
  border-top: 1px solid rgba(255,247,220,.1);
  color: rgba(255,247,220,.45);
  font-size: 7px;
  font-weight: 650;
  letter-spacing: .14em;
}
.pairs-summary button {
  border: 0;
  color: var(--lime);
  background: transparent;
  cursor: pointer;
  font-size: 7px;
  font-weight: 650;
  letter-spacing: .14em;
}

.pair-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0 8px 8px;
  scrollbar-color: rgba(173,255,69,.28) transparent;
  scrollbar-width: thin;
}
.pair-item {
  display: grid;
  grid-template-columns: 30px minmax(0,1fr) auto;
  width: 100%;
  min-height: 70px;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid transparent;
  border-radius: 17px;
  color: var(--cream);
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: border-color .22s ease, background .22s ease, transform .22s ease;
}
.pair-item + .pair-item { margin-top: 4px; }
.pair-item:hover { background: rgba(255,255,255,.04); transform: translateX(2px); }
.pair-item.active { border-color: rgba(173,255,69,.3); background: rgba(173,255,69,.075); }
.pair-index { color: rgba(255,247,220,.25); font-size: 7px; }
.pair-name, .pair-liquidity { display: grid; gap: 5px; min-width: 0; }
.pair-name b { overflow: hidden; font-size: 10px; letter-spacing: .06em; white-space: nowrap; text-overflow: ellipsis; }
.pair-name small,
.pair-liquidity small { color: rgba(255,247,220,.34); font-size: 6px; letter-spacing: .12em; }
.pair-liquidity { justify-items: end; }
.pair-liquidity b { font-size: 9px; }
.positive { color: var(--lime) !important; }
.negative { color: #ff8277 !important; }

.pair-message {
  display: flex;
  min-height: 170px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 28px;
  text-align: center;
}
.pair-message b { margin-top: 13px; font-size: 8px; letter-spacing: .16em; }
.pair-message small { max-width: 210px; margin-top: 8px; color: rgba(255,247,220,.37); font-size: 10px; line-height: 1.55; }
.loader-dot { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,247,220,.22); }
.loader-dot.is-loading { background: var(--lime); box-shadow: 0 0 18px var(--lime); animation: status-pulse 1.2s ease-in-out infinite; }
.pairs-footer { padding: 8px; }
.pairs-footer button {
  width: 100%;
  min-height: 46px;
  border: 0;
  border-radius: 15px;
  color: #16152c;
  background: var(--lime);
  cursor: pointer;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .15em;
  transition: transform .25s ease, background .25s ease;
}
.pairs-footer button:hover { background: #bdff69; transform: translateY(-2px); }
.pairs-footer button span { margin-left: 8px; font-size: 14px; }

.chart-panel {
  display: grid;
  grid-template-rows: auto auto minmax(280px,1fr) auto;
}
.chart-heading {
  display: flex;
  min-height: 83px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 15px 22px;
  border-bottom: 1px solid rgba(255,247,220,.1);
}
.chart-heading small { color: rgba(255,247,220,.37); font-size: 6px; letter-spacing: .17em; }
.chart-heading h2 { margin: 5px 0 0; font-family: "Fredoka", sans-serif; font-size: 24px; font-weight: 530; letter-spacing: -.025em; }
.chart-tags { display: flex; gap: 6px; }
.chart-tags span {
  padding: 8px 10px;
  border: 1px solid rgba(255,247,220,.12);
  border-radius: 999px;
  color: rgba(255,247,220,.5);
  font-size: 6px;
  font-weight: 650;
  letter-spacing: .13em;
}
.chart-tags span:last-child { border-color: rgba(173,255,69,.25); color: var(--lime); }

.market-stats {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  border-bottom: 1px solid rgba(255,247,220,.1);
}
.market-stats article {
  display: grid;
  min-width: 0;
  gap: 7px;
  padding: 15px 17px;
  border-right: 1px solid rgba(255,247,220,.08);
}
.market-stats article:last-child { border-right: 0; }
.market-stats span { color: rgba(255,247,220,.34); font-size: 6px; letter-spacing: .13em; }
.market-stats strong { overflow: hidden; font-size: 12px; font-weight: 550; white-space: nowrap; text-overflow: ellipsis; }

.chart-frame { position: relative; min-height: 0; overflow: hidden; background: #11101f; }
.chart-frame iframe { width: 100%; height: 100%; min-height: 100%; border: 0; background: #11101f; }
.chart-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.chart-placeholder img {
  position: absolute;
  width: min(620px, 65%);
  opacity: .1;
  filter: grayscale(.15);
  -webkit-mask-image: radial-gradient(circle, #000 25%, transparent 70%);
  mask-image: radial-gradient(circle, #000 25%, transparent 70%);
}
.chart-placeholder > div { position: relative; z-index: 2; display: grid; justify-items: center; text-align: center; }
.chart-eye { width: 60px; height: 18px; border-radius: 50%; background: var(--lime); filter: blur(8px); opacity: .65; animation: eye-pulse 3s ease-in-out infinite; }
.chart-placeholder b { margin-top: 20px; font-size: 9px; letter-spacing: .17em; }
.chart-placeholder small { max-width: 330px; margin-top: 9px; color: rgba(255,247,220,.35); font-size: 10px; line-height: 1.55; }

.chart-footer {
  display: flex;
  min-height: 51px;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  border-top: 1px solid rgba(255,247,220,.1);
  color: rgba(255,247,220,.35);
  font-size: 6px;
  font-weight: 650;
  letter-spacing: .15em;
}
.chart-footer a { color: var(--lime); transition: opacity .2s ease; }
.chart-footer a:hover { opacity: .62; }

@media (max-width: 1050px) {
  .market-stats { grid-template-columns: repeat(3, 1fr); }
  .market-stats article:nth-child(3) { border-right: 0; }
  .market-stats article:nth-child(-n+3) { border-bottom: 1px solid rgba(255,247,220,.08); }
}

@media (max-width: 760px) {
  .market-world { overflow: auto; }
  .dex-header { position: sticky; top: 0; grid-template-columns: 1fr auto; }
  .page-nav { display: none; }
  .market-layout { grid-template-columns: 1fr; height: auto; padding: 9px; }
  .pairs-panel { max-height: 440px; }
  .pairs-heading { padding: 22px 19px 15px; }
  .pairs-heading h1 { font-size: 56px; }
  .chart-panel { min-height: 720px; }
  .chart-heading { padding: 14px 16px; }
  .chart-tags span:first-child { display: none; }
  .market-stats article { padding: 13px 11px; }
  .chart-frame { min-height: 460px; }
}

@media (max-width: 430px) {
  .identity-mark { width: 32px; height: 32px; }
  .market-clock { font-size: 6px; }
  .chart-heading h2 { font-size: 20px; }
  .market-stats strong { font-size: 10px; }
  .chart-footer { padding: 0 14px; }
  .chart-footer span { display: none; }
  .chart-footer a { margin-left: auto; }
}

/* Inline market section */
.dex-section {
  position: relative;
  z-index: 3;
  min-height: 100svh;
  padding: clamp(105px, 12vw, 170px) clamp(14px, 3.3vw, 54px) clamp(54px, 7vw, 92px);
  color: var(--night);
  background:
    radial-gradient(circle at 12% 32%, rgba(255,255,255,.72), transparent 26%),
    radial-gradient(circle at 88% 84%, rgba(173,255,69,.22), transparent 24%),
    linear-gradient(180deg, #17162f 0, #bdb4ff 13%, #e9e5ff 34%, #f3efff 100%);
}

.dex-section::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 22%;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(23,22,47,.75), transparent);
}

.dex-intro {
  position: relative;
  z-index: 2;
  display: flex;
  width: min(1380px, 100%);
  align-items: end;
  justify-content: space-between;
  gap: 45px;
  margin: 0 auto 38px;
}

.dex-intro > div:first-child > p {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0 0 17px;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .19em;
}

.dex-intro > div:first-child > p span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid rgba(23,22,47,.25);
  border-radius: 50%;
}

.dex-intro h2 {
  margin: 0;
  font-family: "Fredoka", sans-serif;
  font-size: clamp(70px, 9vw, 145px);
  font-weight: 570;
  line-height: .72;
  letter-spacing: -.065em;
}

.dex-intro h2 em { color: #6650c5; font-style: normal; }

.dex-intro-copy {
  display: grid;
  max-width: 370px;
  justify-items: end;
  gap: 20px;
  padding-bottom: 5px;
  text-align: right;
}

.dex-intro-copy > p {
  margin: 0;
  color: rgba(23,22,47,.62);
  font-size: 14px;
  line-height: 1.6;
}

.dex-section .market-clock { color: rgba(23,22,47,.54); }

.dex-section .market-layout {
  width: min(1380px, 100%);
  height: min(730px, calc(100svh - 185px));
  min-height: 590px;
  margin: 0 auto;
  padding: 0;
  opacity: 1;
  transform: none;
}

.dex-section .pairs-panel,
.dex-section .chart-panel {
  border-color: rgba(255,247,220,.12);
  color: var(--cream);
  background: rgba(20,19,43,.94);
  box-shadow: 0 38px 90px rgba(56,46,111,.2);
}

.dex-section .pairs-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 78px;
  padding: 18px 18px 17px 22px;
  border-bottom: 1px solid rgba(255,247,220,.1);
}

.pairs-title-row { display: grid; gap: 7px; }
.pairs-title-row b { color: var(--cream); font-size: 9px; letter-spacing: .13em; }
.pairs-title-row span { color: rgba(255,247,220,.38); font-size: 7px; letter-spacing: .13em; }

.dex-section .pairs-heading > button {
  padding: 9px 11px;
  border: 1px solid rgba(173,255,69,.22);
  border-radius: 999px;
  color: var(--lime);
  background: transparent;
  cursor: pointer;
  font-size: 7px;
  font-weight: 650;
  letter-spacing: .12em;
  transition: color .22s ease, background .22s ease;
}
.dex-section .pairs-heading > button:hover { color: var(--night); background: var(--lime); }

.dex-section .chart-heading h3 {
  margin: 5px 0 0;
  color: var(--cream);
  font-family: "Fredoka", sans-serif;
  font-size: 24px;
  font-weight: 530;
  letter-spacing: -.025em;
}

.dex-section .pair-message b,
.dex-section .market-stats strong,
.dex-section .chart-placeholder b {
  color: var(--cream);
}

.dex-section .pair-message small,
.dex-section .chart-placeholder small {
  color: rgba(255,247,220,.5);
}

.site-footer {
  position: relative;
  z-index: 3;
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: center;
  gap: 17px;
  color: rgba(23,22,47,.55);
  background: #f3efff;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .18em;
}
.site-footer i { width: 5px; height: 5px; border-radius: 50%; background: #6a55ca; }

@media (max-width: 760px) {
  .dex-section { padding: 105px 9px 40px; }
  .dex-intro { display: grid; padding: 0 12px; margin-bottom: 28px; }
  .dex-intro h2 { font-size: clamp(65px, 20vw, 105px); }
  .dex-intro-copy { justify-items: start; max-width: 460px; text-align: left; }
  .dex-section .market-layout { grid-template-columns: 1fr; height: auto; min-height: 0; }
  .dex-section .pairs-panel { max-height: 430px; }
  .dex-section .chart-panel { min-height: 710px; }
}
