:root {
  color-scheme: dark;
  --bg: #030506;
  --surface: #080d12;
  --surface-2: #111720;
  --line: rgba(140, 220, 255, 0.22);
  --text: #f5fbff;
  --muted: #8ca1b5;
  --cyan: #00d8ff;
  --blue: #218cff;
  --green: #29e3a2;
  --amber: #ffb02e;
  --rose: #ff4f87;
  --nav: #171a25;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(0, 216, 255, 0.14), transparent 28rem),
    linear-gradient(180deg, #020303 0%, #06090d 48%, #050609 100%);
  color: var(--text);
}

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

button,
input {
  font: inherit;
}

.app-shell {
  min-height: 100vh;
  padding-bottom: 82px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 72px;
  padding: 12px clamp(16px, 4vw, 48px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(3, 5, 6, 0.82);
  backdrop-filter: blur(18px);
}

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

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

.brand strong {
  font-size: 18px;
  letter-spacing: 0;
}

.desktop-brand {
  display: inline-flex;
}

.desktop-brand strong {
  display: none;
}

.ticker {
  overflow: hidden;
  min-width: 0;
}

.ticker-track {
  display: flex;
  width: max-content;
  gap: 34px;
  animation: ticker 24s linear infinite;
  white-space: nowrap;
}

.ticker span {
  color: #dbe8f2;
  font-weight: 700;
}

.ticker strong {
  margin-left: 7px;
}

.ticker em {
  margin-left: 6px;
  color: var(--cyan);
  font-style: normal;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-button {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  cursor: pointer;
}

.icon-button:hover {
  background: rgba(255, 255, 255, 0.08);
}

.hero {
  position: relative;
  display: grid;
  min-height: min(820px, calc(100vh - 72px));
  overflow: hidden;
  padding: clamp(34px, 8vw, 96px) clamp(18px, 5vw, 72px) 42px;
  background:
    linear-gradient(90deg, rgba(3, 5, 6, 0.38), rgba(3, 5, 6, 0.08) 54%, rgba(3, 5, 6, 0.28)),
    linear-gradient(180deg, rgba(3, 5, 6, 0), rgba(3, 5, 6, 0.26) 88%),
    url("assets/top_bg.CsRyxjoM.gif") center / cover no-repeat;
  isolation: isolate;
}

.market-canvas {
  display: none;
}

.hero-video,
.hero-grid {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-video {
  display: none;
  object-fit: cover;
  opacity: 0.64;
  filter: saturate(1.25) contrast(1.12);
  z-index: -3;
}

.hero-grid {
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(3, 5, 6, 0), rgba(3, 5, 6, 0.16) 82%),
    linear-gradient(90deg, rgba(0, 216, 255, 0.035) 1px, transparent 1px),
    linear-gradient(0deg, rgba(0, 216, 255, 0.03) 1px, transparent 1px);
  background-size: auto, 56px 56px, 56px 56px;
  opacity: 0.58;
}

.coin-field {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.78;
  pointer-events: none;
}

.coin {
  position: absolute;
  width: clamp(54px, 12vw, 122px);
  filter: drop-shadow(0 0 22px rgba(0, 216, 255, 0.32));
  animation: drift 8s ease-in-out infinite;
}

.coin-btc {
  left: 7%;
  top: 27%;
  width: clamp(86px, 16vw, 154px);
}

.coin-eth {
  left: 11%;
  top: 56%;
  animation-delay: -2s;
}

.coin-usdt {
  left: 13%;
  top: 9%;
  animation-delay: -4s;
}

.coin-xrp {
  right: 8%;
  top: 31%;
  width: clamp(84px, 15vw, 146px);
  animation-delay: -3s;
}

.coin-ltc {
  right: 12%;
  top: 58%;
  animation-delay: -5s;
}

.hero-content {
  align-self: center;
  max-width: 710px;
  margin-inline: auto;
  text-align: center;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-size: clamp(42px, 9vw, 96px);
  line-height: 0.98;
  letter-spacing: 0;
}

.hero h1 span {
  color: var(--cyan);
}

.hero-copy {
  max-width: 680px;
  margin: 18px auto 26px;
  color: #ecf7ff;
  font-size: clamp(17px, 3vw, 22px);
  font-weight: 700;
  line-height: 1.65;
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  max-width: 620px;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(2, 16, 28, 0.66);
  box-shadow: 0 18px 70px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(18px);
}

.metric-strip div {
  padding: 22px 12px;
  background: rgba(255, 255, 255, 0.025);
}

.metric-strip strong {
  display: block;
  font-size: clamp(22px, 4vw, 34px);
  line-height: 1.1;
  white-space: nowrap;
}

.metric-strip span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-weight: 700;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 28px;
}

.primary-action,
.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: min(100%, 250px);
  min-height: 58px;
  padding: 0 26px;
  border-radius: 999px;
  font-size: 18px;
  font-weight: 800;
}

.primary-action {
  background: linear-gradient(135deg, #1c8eff, #00d8ff);
  color: white;
  box-shadow: 0 18px 48px rgba(0, 152, 255, 0.34);
}

.secondary-action {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
}

.trade-panel {
  display: none;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  padding: 24px clamp(14px, 4vw, 58px);
  background: #020303;
}

.quick-actions a {
  display: grid;
  justify-items: center;
  gap: 10px;
  min-width: 0;
  color: #f8fbff;
  font-weight: 800;
}

.quick-actions strong {
  font-size: clamp(12px, 3vw, 16px);
  text-align: center;
}

.circle-icon {
  position: relative;
  display: grid;
  width: clamp(58px, 13vw, 78px);
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  background:
    radial-gradient(circle at 36% 22%, rgba(255, 255, 255, 0.18), transparent 34%),
    linear-gradient(145deg, rgba(13, 22, 33, 0.96), rgba(5, 8, 13, 0.96));
  box-shadow:
    inset 0 0 0 1px rgba(0, 216, 255, 0.12),
    0 14px 36px rgba(0, 0, 0, 0.35);
}

.circle-icon img {
  width: 54%;
  height: 54%;
  filter: drop-shadow(0 0 10px rgba(0, 216, 255, 0.36));
}

.market-section,
.insight-band {
  padding: 34px clamp(16px, 5vw, 72px);
}

.section-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.section-title h2,
.insight-band h2 {
  margin: 0;
  font-size: clamp(28px, 5vw, 48px);
}

.segmented {
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
}

.segmented button {
  min-height: 34px;
  border: 0;
  border-radius: 999px;
  padding: 0 14px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.segmented .active {
  background: #f7fbff;
  color: #030506;
  font-weight: 800;
}

.market-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.market-card {
  min-height: 190px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012));
  padding: 16px;
}

.market-card div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.market-card span {
  font-weight: 800;
}

.market-card strong {
  color: #e9f6ff;
}

.market-card em {
  display: block;
  margin-top: 10px;
  color: var(--cyan);
  font-size: 22px;
  font-style: normal;
  font-weight: 900;
}

.sparkline {
  width: 100%;
  height: 84px;
  margin-top: 8px;
}

.insight-band {
  display: grid;
  grid-template-columns: 1fr;
  gap: 26px;
  align-items: center;
  margin: 24px clamp(16px, 5vw, 72px) 40px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(0, 216, 255, 0.12), transparent 42%),
    rgba(255, 255, 255, 0.035);
}

.insight-band p:last-child {
  max-width: 650px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.75;
}

.insight-band img {
  width: min(100%, 720px);
  justify-self: center;
}

.rail {
  display: none;
}

.bottom-nav {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  min-height: 82px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--nav);
}

.bottom-nav a {
  display: grid;
  place-items: center;
  gap: 4px;
  padding: 8px 2px;
  color: #8090a6;
  font-size: 13px;
  font-weight: 800;
}

.bottom-nav .active {
  color: var(--cyan);
}

.nav-icon,
.toolbar-icon {
  display: block;
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.bottom-nav a:not(.active) .nav-icon,
.rail-nav a:not(.active) .nav-icon {
  filter: grayscale(1) saturate(0.15) brightness(1.5);
  opacity: 0.72;
}

.bottom-nav .active .nav-icon,
.rail-nav .active .nav-icon,
.rail-nav a:hover .nav-icon {
  filter: drop-shadow(0 0 10px rgba(0, 216, 255, 0.46));
}

.toolbar-icon {
  width: 24px;
  height: 24px;
}

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

@keyframes drift {
  0%,
  100% {
    transform: translate3d(0, 0, 0) rotate(-4deg);
  }
  50% {
    transform: translate3d(0, -16px, 0) rotate(5deg);
  }
}

@media (max-width: 620px) {
  .topbar {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .ticker {
    grid-column: 1 / -1;
    grid-row: 2;
    margin-inline: -16px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.035);
  }

  .hero {
    min-height: 735px;
    padding-top: 52px;
  }

  .hero-copy {
    margin-top: 76px;
  }

  .coin-usdt {
    left: 10%;
    top: 5%;
  }

  .coin-btc {
    left: -5%;
    top: 24%;
    width: 90px;
  }

  .coin-xrp {
    right: -22px;
    top: 34%;
    width: 82px;
  }

  .metric-strip div {
    padding-inline: 6px;
  }

  .metric-strip strong {
    font-size: 23px;
  }

  .metric-strip span {
    font-size: 12px;
  }

  .primary-action,
  .secondary-action {
    width: 100%;
  }

  .secondary-action {
    display: none;
  }

  .quick-actions {
    overflow-x: auto;
    grid-template-columns: repeat(5, minmax(78px, 1fr));
    scrollbar-width: none;
  }

  .section-title {
    align-items: start;
    flex-direction: column;
  }

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

  .market-card {
    min-height: 172px;
    padding: 14px;
  }

  .market-card div {
    display: block;
  }
}

@media (min-width: 900px) {
  .app-shell {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    padding-bottom: 0;
  }

  .rail {
    position: sticky;
    top: 0;
    display: grid;
    align-content: start;
    gap: 34px;
    min-height: 100vh;
    padding: 22px 14px;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(3, 5, 6, 0.78);
    backdrop-filter: blur(18px);
  }

  .rail .brand {
    justify-content: center;
  }

  .rail-nav {
    display: grid;
    gap: 12px;
  }

  .rail-nav a {
    display: grid;
    justify-items: center;
    gap: 6px;
    padding: 12px 4px;
    border-radius: 8px;
    color: #8494aa;
    font-size: 12px;
    font-weight: 800;
  }

  .rail-nav .active,
  .rail-nav a:hover {
    background: rgba(0, 216, 255, 0.11);
    color: var(--cyan);
  }

  .desktop-brand {
    display: inline-flex;
  }

  .desktop-brand strong {
    display: inline;
  }

  .coin-btc {
    left: -2%;
    top: 29%;
    width: 132px;
  }

  .coin-eth {
    left: 13%;
    top: 62%;
  }

  .topbar {
    grid-template-columns: auto minmax(280px, 1fr) auto;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 390px);
    align-items: center;
    gap: 38px;
  }

  .hero-content {
    margin-inline: 0;
    text-align: left;
  }

  .metric-strip,
  .hero-copy {
    margin-left: 0;
  }

  .hero-actions {
    justify-content: flex-start;
  }

  .trade-panel {
    display: block;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    background: rgba(3, 9, 15, 0.74);
    padding: 20px;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.34);
    backdrop-filter: blur(18px);
  }

  .panel-head {
    display: flex;
    justify-content: space-between;
    gap: 18px;
  }

  .panel-head span,
  .order-form span {
    display: block;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
  }

  .panel-head strong {
    display: block;
    margin-top: 8px;
    font-size: 28px;
  }

  .panel-head em {
    color: var(--green);
    font-style: normal;
    font-weight: 900;
  }

  .depth-bars {
    display: grid;
    gap: 8px;
    margin: 28px 0;
  }

  .depth-bars span {
    display: block;
    width: var(--w);
    height: 11px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(0, 216, 255, 0.76), rgba(41, 227, 162, 0.42));
  }

  .order-form {
    display: grid;
    gap: 12px;
  }

  .order-form label {
    display: grid;
    gap: 8px;
  }

  .order-form input {
    width: 100%;
    height: 48px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    color: white;
    padding: 0 14px;
    outline: 0;
  }

  .order-form button {
    height: 52px;
    border: 0;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--green), var(--cyan));
    color: #031014;
    font-weight: 900;
    cursor: pointer;
  }

  .quick-actions {
    grid-template-columns: repeat(5, minmax(120px, 1fr));
    padding-top: 32px;
    padding-bottom: 32px;
  }

  .market-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .insight-band {
    grid-template-columns: minmax(0, 0.88fr) minmax(300px, 1fr);
  }

  .bottom-nav {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
