/* ========== 设计令牌 ========== */
:root {
  --bg: #0b0e14;
  --bg-2: #10141c;
  --card: #151a24;
  --card-2: #1c2130;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #f5f6f8;
  --muted: #8a93a6;
  --muted-2: #5d6578;
  --accent: #f0c040;
  --accent-2: #e8a817;
  --accent-soft: rgba(240, 192, 64, 0.12);
  --up: #3ddc84;
  --down: #f6465d;
  --radius: 20px;
  --radius-sm: 12px;
  --header-h: 72px;
  --maxw: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(900px 500px at 85% -10%, rgba(240, 192, 64, 0.07), transparent 60%),
    radial-gradient(700px 400px at -10% 30%, rgba(80, 110, 255, 0.05), transparent 60%);
  background-attachment: fixed;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img, svg, canvas { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

.up { color: var(--up); }
.down { color: var(--down); }
.accent { color: var(--accent); }
.num { font-variant-numeric: tabular-nums; }

/* ========== 顶部导航 ========== */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: rgba(11, 14, 20, 0.82);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.header .container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--accent);
}
.logo i { font-size: 26px; filter: drop-shadow(0 0 10px rgba(240, 192, 64, 0.45)); }

.nav { display: flex; align-items: center; gap: 6px; }
.nav a {
  padding: 8px 16px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
  transition: color .2s, background .2s;
}
.nav a:hover { color: var(--text); }
.nav a.active { color: var(--accent); background: var(--accent-soft); }
.nav .nav-cta {
  margin-left: 8px;
  color: #1a1400;
  background: var(--accent);
  font-weight: 700;
}
.nav .nav-cta:hover { color: #1a1400; background: var(--accent-2); }

.menu-btn {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  padding: 0;
  position: relative;
}
.menu-btn span {
  position: absolute;
  left: 8px;
  right: 8px;
  height: 3px;
  border-radius: 3px;
  background: var(--text);
  transition: transform .25s, opacity .2s, top .25s;
}
.menu-btn span:nth-child(1) { top: 12px; }
.menu-btn span:nth-child(2) { top: 20px; }
.menu-btn span:nth-child(3) { top: 28px; }
.menu-open .menu-btn span:nth-child(1) { top: 20px; transform: rotate(45deg); }
.menu-open .menu-btn span:nth-child(2) { opacity: 0; }
.menu-open .menu-btn span:nth-child(3) { top: 20px; transform: rotate(-45deg); }

@media (max-width: 820px) {
  .menu-btn { display: block; }
  .nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 16px 20px 24px;
    background: rgba(11, 14, 20, 0.97);
    border-bottom: 1px solid var(--border);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s, transform .2s, visibility .2s;
  }
  .menu-open .nav { transform: none; opacity: 1; visibility: visible; }
  .nav a { padding: 14px 16px; border-radius: var(--radius-sm); font-size: 16px; }
  .nav .nav-cta { margin: 8px 0 0; text-align: center; }
}

/* ========== 通用区块 ========== */
.section { padding: 40px 0; }
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}
.section-title { margin: 0; font-size: 24px; font-weight: 800; letter-spacing: -0.3px; }
.section-sub { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.more-link { color: var(--accent); font-size: 14px; font-weight: 600; white-space: nowrap; }
.more-link i { font-size: 12px; margin-left: 4px; }

.page-hero { padding: 40px 0 8px; }
.page-hero h1 { margin: 0; font-size: clamp(32px, 7vw, 48px); line-height: 1.2; font-weight: 900; letter-spacing: -0.5px; }
.page-hero p { margin: 12px 0 0; color: var(--muted); font-size: 16px; }

.card {
  background: linear-gradient(180deg, var(--card-2), var(--card));
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

/* ========== 首页 Hero ========== */
.hero { padding: 44px 0 12px; }
.hero h1 {
  margin: 0;
  font-size: clamp(38px, 10vw, 64px);
  line-height: 1.18;
  font-weight: 900;
  letter-spacing: -1px;
}
.hero .lead {
  margin: 20px 0 0;
  max-width: 560px;
  color: var(--muted);
  font-size: clamp(17px, 4.2vw, 20px);
  line-height: 1.75;
}

.stats { display: flex; flex-wrap: wrap; gap: 16px 32px; margin-top: 36px; }
.stat-label { color: var(--muted-2); font-size: 15px; }
.stat-value { margin-top: 2px; font-size: clamp(26px, 6.4vw, 34px); font-weight: 800; letter-spacing: -0.5px; }
.stat-change { margin-top: 2px; font-size: 16px; font-weight: 700; }
.stat-change i { font-size: 14px; margin-right: 4px; }

/* ========== 交易所卡片 ========== */
.ex-card { position: relative; margin-top: 40px; padding: 28px 24px 24px; }
.ex-badge {
  position: absolute;
  top: 24px;
  right: 22px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(240, 192, 64, 0.1);
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
}
.ex-badge i { font-size: 13px; }
.ex-name { display: flex; align-items: center; gap: 16px; margin-top: 30px; }
.ex-name i { font-size: 44px; color: var(--accent); }
.ex-name h2 { margin: 0; font-size: 32px; font-weight: 800; letter-spacing: -0.5px; }
.ex-desc { margin: 18px 0 24px; color: var(--muted); font-size: 16px; line-height: 1.8; }
.ex-actions { display: grid; gap: 14px; }
.ex-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  text-align: center;
}
.ex-meta b { display: block; font-size: 18px; font-weight: 800; }
.ex-meta span { color: var(--muted-2); font-size: 12px; }

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 60px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: #262a38;
  color: var(--text);
  font-size: 18px;
  font-weight: 700;
  transition: transform .15s, background .2s, border-color .2s;
}
.btn:hover { background: #2e3344; border-color: rgba(255, 255, 255, 0.22); }
.btn:active { transform: scale(0.98); }
.btn-dark { background: #1f2330; }
.btn-primary {
  background: linear-gradient(135deg, #f7d154, var(--accent-2));
  border-color: transparent;
  color: #1a1400;
  box-shadow: 0 8px 28px rgba(240, 192, 64, 0.25);
}
.btn-primary:hover { background: linear-gradient(135deg, #fad964, #f0b020); border-color: transparent; }
.btn-sm { min-height: 44px; font-size: 15px; width: auto; }

/* ========== 行情迷你列表 ========== */
.coin-list { overflow: hidden; }
.coin-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  transition: background .15s;
}
.coin-row:last-child { border-bottom: 0; }
.coin-row:hover { background: rgba(255, 255, 255, 0.02); }
.coin-id { display: flex; align-items: center; gap: 12px; min-width: 0; }
.coin-icon {
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 800;
  color: #fff;
}
.coin-sym { font-weight: 700; font-size: 16px; }
.coin-name { color: var(--muted-2); font-size: 13px; }
.coin-price { text-align: right; font-weight: 700; font-size: 16px; }
.coin-chg { text-align: right; font-size: 13px; font-weight: 600; }

/* ========== 特性网格 ========== */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.feature { padding: 22px; }
.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 20px;
}
.feature h3 { margin: 16px 0 6px; font-size: 18px; }
.feature p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.75; }

/* ========== 步骤 ========== */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; counter-reset: step; }
.step { padding: 22px; position: relative; }
.step::before {
  counter-increment: step;
  content: "0" counter(step);
  font-size: 40px;
  font-weight: 900;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(240, 192, 64, 0.55);
  line-height: 1;
}
.step h3 { margin: 14px 0 6px; font-size: 18px; }
.step p { margin: 0; color: var(--muted); font-size: 14px; }

/* ========== 新闻 ========== */
.tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin: 24px 0 20px;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: none;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  transition: all .2s;
}
.tab:hover { color: var(--text); }
.tab.active { background: var(--accent); border-color: var(--accent); color: #1a1400; }

.news-list { display: grid; gap: 14px; }
.news-item { padding: 20px 22px; transition: border-color .2s, transform .2s; }
.news-item:hover { border-color: var(--border-strong); }
.news-meta { display: flex; align-items: center; gap: 10px; color: var(--muted-2); font-size: 13px; }
.news-tag {
  padding: 2px 10px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}
.news-tag.t-reg { background: rgba(120, 140, 255, 0.12); color: #9aa8ff; }
.news-tag.t-defi { background: rgba(61, 220, 132, 0.12); color: var(--up); }
.news-tag.t-tech { background: rgba(200, 120, 255, 0.12); color: #cf9bff; }
.news-item h3 { margin: 10px 0 8px; font-size: 18px; line-height: 1.5; }
.news-item p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.8; }
.news-item.featured { padding: 26px 24px; border-color: rgba(240, 192, 64, 0.25); }
.news-item.featured h3 { font-size: 22px; }
.news-item[hidden] { display: none; }

.flash { padding: 8px 22px; }
.flash-item { display: grid; grid-template-columns: 52px 1fr; gap: 12px; padding: 14px 0; border-bottom: 1px dashed var(--border); }
.flash-item:last-child { border-bottom: 0; }
.flash-time { color: var(--accent); font-weight: 700; font-size: 14px; }
.flash-text { font-size: 14px; color: #cfd4de; }

/* ========== 图表页 ========== */
.chart-card { padding: 22px 20px; margin-top: 24px; }
.chart-top { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; }
.chart-pair { display: flex; align-items: center; gap: 12px; }
.chart-pair h2 { margin: 0; font-size: 22px; }
.chart-pair small { color: var(--muted-2); font-size: 13px; }
.chart-price { font-size: clamp(30px, 8vw, 40px); font-weight: 900; letter-spacing: -0.5px; line-height: 1.1; }
.chart-change { font-size: 15px; font-weight: 700; }
.chart-tabs { display: flex; gap: 8px; margin: 18px 0 8px; flex-wrap: wrap; }
.chart-tabs .tab { padding: 6px 14px; font-size: 13px; }
.chart-wrap { position: relative; height: 340px; margin: 8px -4px 0; }
.chart-wrap canvas { width: 100%; height: 100%; }
.chart-tip {
  position: absolute;
  pointer-events: none;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(21, 26, 36, 0.95);
  border: 1px solid var(--border-strong);
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  transition: opacity .12s;
}
.chart-tip b { display: block; font-size: 14px; }
.chart-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; margin-top: 14px; }
.chart-stat { padding: 16px; }
.chart-stat span { color: var(--muted-2); font-size: 13px; }
.chart-stat b { display: block; margin-top: 4px; font-size: 18px; }

.sentiment { padding: 22px; }
.gauge-bar { position: relative; height: 10px; margin: 18px 0 8px; border-radius: 99px; background: linear-gradient(90deg, var(--down), #f3a93c, var(--accent), #9be15d, var(--up)); }
.gauge-dot { position: absolute; top: 50%; width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 4px solid var(--bg); transform: translate(-50%, -50%); box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.4); }
.gauge-scale { display: flex; justify-content: space-between; color: var(--muted-2); font-size: 12px; }

/* ========== 市场页 ========== */
.market-tools { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin: 24px 0 16px; }
.search {
  flex: 1 1 240px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  height: 46px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
}
.search i { color: var(--muted-2); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; font-size: 15px; }
.search:focus-within { border-color: rgba(240, 192, 64, 0.5); }

.overview { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.overview .card { padding: 16px 18px; }
.overview .card > span { color: var(--muted-2); font-size: 13px; }
.overview b { display: block; margin-top: 2px; font-size: 20px; font-weight: 800; }
.overview small { font-size: 13px; font-weight: 600; }

.table-card { overflow: hidden; }
.mtable { width: 100%; border-collapse: collapse; }
.mtable th {
  padding: 14px 16px;
  color: var(--muted-2);
  font-size: 13px;
  font-weight: 600;
  text-align: right;
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
  user-select: none;
}
.mtable th[data-sort] { cursor: pointer; }
.mtable th[data-sort]:hover { color: var(--text); }
.mtable th.sorted { color: var(--accent); }
.mtable th:first-child,
.mtable td:first-child { text-align: left; }
.mtable td { padding: 14px 16px; text-align: right; border-bottom: 1px solid var(--border); white-space: nowrap; }
.mtable tr:last-child td { border-bottom: 0; }
.mtable tbody tr { transition: background .15s; }
.mtable tbody tr:hover { background: rgba(255, 255, 255, 0.02); }
.mtable .rank { color: var(--muted-2); font-size: 13px; width: 28px; display: inline-block; }
.chg-pill { display: inline-block; min-width: 76px; padding: 4px 10px; border-radius: 8px; text-align: center; font-weight: 700; font-size: 14px; }
.chg-pill.up { background: rgba(61, 220, 132, 0.12); }
.chg-pill.down { background: rgba(246, 70, 93, 0.12); }
.spark { width: 110px; height: 36px; margin-left: auto; }
.col-hide-sm { }
.empty { padding: 40px 16px; text-align: center; color: var(--muted-2); }

@media (max-width: 640px) {
  .col-hide-sm { display: none; }
  .mtable th, .mtable td { padding: 14px 12px; }
  .mtable .rank { display: none; }
}

/* ========== CTA 横幅 ========== */
.cta-band {
  padding: 28px 24px;
  display: grid;
  gap: 18px;
  background:
    radial-gradient(400px 200px at 100% 0%, rgba(240, 192, 64, 0.18), transparent 70%),
    linear-gradient(180deg, var(--card-2), var(--card));
  border-color: rgba(240, 192, 64, 0.2);
}
.cta-band h2 { margin: 0; font-size: 24px; }
.cta-band p { margin: 6px 0 0; color: var(--muted); font-size: 15px; }
.cta-band .ex-actions { grid-template-columns: 1fr 1fr; }
@media (max-width: 480px) { .cta-band .ex-actions { grid-template-columns: 1fr; } }
@media (min-width: 821px) {
  .cta-band { grid-template-columns: 1.3fr 1fr; align-items: center; padding: 34px 36px; }
}

/* ========== FAQ ========== */
.faq { display: grid; gap: 10px; }
.faq details { padding: 0 20px; }
.faq summary {
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 18px 0;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary i { color: var(--muted-2); transition: transform .2s; }
.faq details[open] summary i { transform: rotate(45deg); color: var(--accent); }
.faq details p { margin: 0 0 18px; color: var(--muted); font-size: 14px; line-height: 1.8; }

/* ========== 页脚 ========== */
.footer { margin-top: 40px; padding: 36px 0 110px; border-top: 1px solid var(--border); color: var(--muted-2); font-size: 13px; }
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; }
.footer .logo { font-size: 20px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.footer-links a:hover { color: var(--text); }
.disclaimer { margin: 24px 0 0; line-height: 1.8; }
.copyright { margin-top: 14px; }

/* ========== 底部悬浮 CTA（移动端） ========== */
.sticky-cta {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 10px 10px 18px;
  border-radius: 999px;
  background: rgba(28, 33, 48, 0.94);
  border: 1px solid var(--border-strong);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  transform: translateY(140%);
  transition: transform .3s ease;
}
.sticky-cta.show { transform: none; }
.sticky-cta .txt { flex: 1; min-width: 0; font-size: 14px; line-height: 1.35; }
.sticky-cta .txt b { display: block; font-size: 15px; }
.sticky-cta .txt span { color: var(--muted); font-size: 12px; }
.sticky-cta .btn { width: auto; min-height: 44px; font-size: 15px; padding: 0 22px; }
@media (min-width: 821px) { .sticky-cta { display: none; } .footer { padding-bottom: 36px; } }

/* ========== 桌面布局 ========== */
@media (min-width: 821px) {
  .hero-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 56px; align-items: center; }
  .hero-grid .ex-card { margin-top: 0; }
  .two-col { display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; align-items: start; }
  .section { padding: 56px 0; }
}

/* ========== 入场动画 ========== */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

.flash-num { transition: color .6s; }
.tick-up { color: var(--up) !important; }
.tick-down { color: var(--down) !important; }
