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

:root {
  --bg:        #0a0c12;
  --surface:   #111420;
  --border:    #1e2235;
  --border2:   #252840;
  --text:      #e8eaf6;
  --muted:     #6b7280;
  --accent:    #5b6ef5;
  --accent2:   #00d4aa;
  --red:       #ff4d6d;
  --green:     #00d4aa;
  --yellow:    #f5c842;
  --radius:    12px;
  --font-mono: 'IBM Plex Mono', monospace;
  --font-sans: 'IBM Plex Sans', sans-serif;
}

html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  min-height: 100vh;
  overflow-x: clip;
}

body::before {
  content: '';
  position: fixed; inset: 0; z-index: 0;
  background-image:
    linear-gradient(rgba(91,110,245,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(91,110,245,.04) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}

.global-ticker {
  position: relative;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  height: 36px;
  z-index: 100;
}

.global-ticker-inner {
  display: flex;
  align-items: center;
  height: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 0 40px;
  scroll-behavior: smooth;
}
.global-ticker-inner::-webkit-scrollbar { display: none; }

.ticker-item {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 16px;
  height: 100%;
  border-right: 1px solid var(--border);
  white-space: nowrap;
  flex-shrink: 0;
  font-size: 12px;
  font-family: var(--font-mono);
}
.ticker-item:first-child { border-left: 1px solid var(--border); }

.ticker-label { color: var(--muted); font-size: 11px; }
.ticker-value { color: var(--text); font-weight: 600; font-size: 12px; }

.ticker-change { font-size: 11px; font-weight: 700; }
.ticker-change.up   { color: var(--green); }
.ticker-change.down { color: var(--red); }

.dom-bar {
  display: inline-flex;
  align-items: center;
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
  background: var(--border2);
  vertical-align: middle;
}
.dom-segment { height: 100%; flex-shrink: 0; }
.dom-btc { background: var(--yellow); }
.dom-eth { background: #627eea; }

.ticker-arrow-btn {
  position: absolute;
  top: 0; bottom: 0;
  width: 36px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: opacity .2s;
}
.ticker-arrow-btn.hidden { display: none; }
.ticker-arrow-btn svg {
  width: 14px; height: 14px;
  fill: none;
  stroke: var(--muted);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ticker-arrow-btn:hover svg { stroke: var(--text); }
#tickerArrowLeft {
  left: 0;
  background: linear-gradient(to right, var(--surface) 60%, transparent);
}
#tickerArrowRight {
  right: 0;
  background: linear-gradient(to left, var(--surface) 60%, transparent);
}

.wrapper {
  position: relative; z-index: 1;
  max-width: 100%;
  margin: 0 auto;
  padding: 0 32px 60px;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 0 32px;
  border-bottom: 1px solid var(--border);
  gap: 16px;
  flex-wrap: wrap;
}

.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.logo-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 18px;
  color: #fff;
}
.logo-text {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text);
}
.logo-text span { color: var(--accent); }

.header-meta {
  display: flex; align-items: center; gap: 10px;
  font-size: 11px; color: var(--muted);
  font-family: var(--font-mono);
}

.live-dot {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--green);
}
.live-dot::before {
  content: '';
  width: 7px; height: 7px;
  background: var(--green);
  border-radius: 50%;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%,100% { opacity:1; transform:scale(1); }
  50%      { opacity:.5; transform:scale(1.4); }
}

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

.header-nav {
  display: flex; align-items: center; gap: 2px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 3px;
}
.nav-item {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 14px;
  border-radius: 7px;
  font-size: 13px; font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  transition: all .2s;
  white-space: nowrap;
}
.nav-item:hover { color: var(--text); background: var(--border); }
.nav-item.active { background: var(--accent); color: #fff; }
.nav-icon { font-size: 14px; }

.lang-switcher {
  display: flex; align-items: center;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 8px;
  overflow: hidden;
  font-size: 12px;
  font-family: var(--font-mono);
}
.lang-current { padding: 6px 12px; background: var(--accent); color: #fff; font-weight: 700; }
.lang-option  { padding: 6px 12px; color: var(--muted); text-decoration: none; transition: color .2s, background .2s; }
.lang-option:hover { color: var(--text); background: var(--border); }

.page-header { padding: 28px 0 20px; }
.page-title {
  font-size: 22px; font-weight: 800;
  letter-spacing: -0.3px;
  margin-bottom: 10px;
  color: var(--text);
}
.page-subtitle {
  font-size: 13px; color: var(--muted);
  line-height: 1.7; max-width: 860px;
  font-family: var(--font-mono);
}
.page-subtitle strong { color: var(--text); font-weight: 700; }

/* ── Controls ──────────────────────────────────────────────────────────── */
.controls {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 0 20px;
  flex-wrap: wrap;
  position: relative;
}

/* ── Tab Strip ─────────────────────────────────────────────────────────── */
.tab-strip {
  display: flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 4px;
  gap: 2px;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  /* 桌面端隐藏滚动条 */
  scrollbar-width: none;
}
.tab-strip::-webkit-scrollbar {
  display: none;
}

/* 移动端显示细滚动条 */
@media (max-width: 768px) {
  .tab-strip {
    scrollbar-width: thin;
    scrollbar-color: var(--border2) transparent;
    padding-bottom: 6px;
  }
  .tab-strip::-webkit-scrollbar {
    display: block;
    height: 3px;
  }
  .tab-strip::-webkit-scrollbar-track {
    background: transparent;
  }
  .tab-strip::-webkit-scrollbar-thumb {
    background: var(--border2);
    border-radius: 2px;
  }
}

.tab-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 18px;
  border-radius: 7px;
  border: none;
  background: none;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  text-decoration: none;  
  transition: all .2s;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active {
  background: var(--accent);
  color: #fff;
}
.tab-icon { font-size: 15px; }

/* ── Country Dropdown ──────────────────────────────────────────────────── */
.country-select { position: relative; flex-shrink: 0; }
.country-btn {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 8px;
  padding: 0 12px; height: 38px;
  font-size: 13px; font-weight: 600;
  color: var(--text);
  font-family: var(--font-sans);
  cursor: pointer; white-space: nowrap;
  transition: border-color .2s;
}
.country-btn:hover { border-color: var(--accent); }
.country-chevron {
  width: 14px; height: 14px;
  color: var(--muted); flex-shrink: 0;
  transition: transform .2s;
}
.country-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  left: auto;
  z-index: 200;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 12px;
  box-shadow: 0 16px 48px rgba(0,0,0,.6);
  width: 220px;
  max-height: 320px;
  overflow: hidden;
  display: none;
  flex-direction: column;
}
.country-dropdown.open { display: flex; }
.country-search-wrap { padding: 10px 10px 6px; border-bottom: 1px solid var(--border); }
.country-search-input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border2);
  border-radius: 6px;
  color: var(--text);
  font-size: 12px; font-family: var(--font-mono);
  padding: 6px 10px; outline: none;
}
.country-search-input:focus { border-color: var(--accent); }
.country-list { overflow-y: auto; padding: 4px 0; }
.country-list::-webkit-scrollbar { width: 4px; }
.country-list::-webkit-scrollbar-track { background: transparent; }
.country-list::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 2px; }
.country-option {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 14px;
  font-size: 13px; font-weight: 600;
  color: var(--text); cursor: pointer;
  transition: background .15s;
  font-family: var(--font-sans);
}
.country-option:hover { background: rgba(91,110,245,.08); }
.country-option.active { color: var(--green); }
.country-option .check { color: var(--green); font-size: 14px; }

/* ── Rows Select ───────────────────────────────────────────────────────── */
.rows-select-wrap {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 8px;
  padding: 0 4px 0 12px; height: 38px;
  flex-shrink: 0;
}
.rows-label { font-size: 13px; color: var(--muted); white-space: nowrap; }
.rows-select-wrap select {
  border: none; background: transparent;
  color: var(--text); font-size: 13px;
  font-family: var(--font-sans); font-weight: 600;
  padding: 0 8px; height: 100%;
  outline: none; cursor: pointer;
}

/* ── Table ─────────────────────────────────────────────────────────────── */
.table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow-x: auto;
}
table { width: 100%; border-collapse: collapse; }
thead {
  background: rgba(91,110,245,.06);
  border-bottom: 1px solid var(--border);
}
th {
  padding: 12px 16px;
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .08em;
  color: var(--muted); text-align: left;
  white-space: nowrap; cursor: pointer;
  user-select: none; transition: color .2s;
}
th:hover { color: var(--text); }
th.sorted { color: var(--text); }
th[data-sort] { position: relative; padding-right: 22px; }
th[data-sort]::after {
  content: '';
  position: absolute; right: 8px; top: 50%;
  transform: translateY(-50%);
  border: 4px solid transparent; opacity: 0.2;
}
th.sort-asc::after  { border-bottom-color: var(--text); margin-top: -2px; opacity: .8; }
th.sort-desc::after { border-top-color: var(--text); margin-top: 2px; opacity: .8; }
th.right, td.right { text-align: right; }
th.center, td.center { text-align: center; }

tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background .15s; cursor: pointer;
  animation: rowIn .4s ease both;
}
@keyframes rowIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: rgba(91,110,245,.05); }
td {
  padding: 14px 16px; font-size: 13px;
  vertical-align: middle; white-space: nowrap;
}

.rank-cell {
  font-family: var(--font-mono); font-size: 12px;
  color: var(--muted); width: 40px; text-align: center;
}

.exchange-cell { display: flex; align-items: center; gap: 12px; }
.exchange-logo {
  width: 32px; height: 32px;
  border-radius: 8px; object-fit: contain;
  background: var(--border); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: var(--accent); overflow: hidden;
}
.exchange-logo img { width: 100%; height: 100%; object-fit: contain; border-radius: 8px; }
.exchange-name {
  font-weight: 700; font-size: 14px; color: var(--text);
  display: flex; align-items: center; gap: 8px;
}
.exchange-name:hover { color: var(--accent); }
.exchange-country { font-size: 11px; color: var(--muted); font-family: var(--font-mono); margin-top: 2px; }

.verified-badge {
  display: inline-flex; align-items: center;
  background: rgba(0,212,170,.12);
  border: 1px solid rgba(0,212,170,.3);
  border-radius: 4px; padding: 1px 6px;
  font-size: 10px; font-weight: 700;
  color: var(--green); letter-spacing: .04em;
}

.trust-score {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 52px; padding: 5px 12px;
  border-radius: 20px; font-size: 12px; font-weight: 700;
  font-family: var(--font-mono);
}
.trust-high   { background: rgba(0,212,170,.15);  color: #00d4aa; border: 1px solid rgba(0,212,170,.3); }
.trust-medium { background: rgba(245,200,66,.12);  color: #f5c842; border: 1px solid rgba(245,200,66,.3); }
.trust-low    { background: rgba(255,77,109,.12);  color: #ff4d6d; border: 1px solid rgba(255,77,109,.3); }
.trust-none   { background: rgba(107,114,128,.1);  color: var(--muted); border: 1px solid var(--border2); }

.volume-cell { font-family: var(--font-mono); font-size: 13px; font-weight: 700; color: var(--text); }

.spark-cell { width: 160px; padding-left: 12px; }
.spark-wrap { display: flex; align-items: center; height: 44px; }
.spark-wrap svg { display: block; overflow: visible; }

.visit-btn {
  display: inline-flex; align-items: center; gap: 5px;
  border: 1px solid var(--border2); border-radius: 6px;
  padding: 5px 12px; font-size: 12px; font-weight: 600;
  color: var(--muted); text-decoration: none;
  transition: all .2s; font-family: var(--font-sans);
}
.visit-btn:hover { border-color: var(--accent); color: var(--accent); background: rgba(91,110,245,.08); }

/* ── Pagination ────────────────────────────────────────────────────────── */
.pagination-wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-top: 28px; flex-wrap: wrap; padding: 0 4px;
}
.pagination-info { font-family: var(--font-mono); font-size: 12px; color: var(--muted); white-space: nowrap; }
.pagination { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.page-btn {
  min-width: 36px; height: 36px; border-radius: 8px;
  border: 1px solid var(--border2); background: var(--surface);
  color: var(--text); font-size: 13px; font-family: var(--font-mono);
  cursor: pointer; transition: all .2s;
  display: grid; place-items: center; padding: 0 10px;
}
.page-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.page-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700; }
.page-btn:disabled { opacity: .35; cursor: not-allowed; }
.page-ellipsis { padding: 0 4px; color: var(--muted); font-family: var(--font-mono); font-size: 14px; line-height: 36px; }
.pagination-jump { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); font-family: var(--font-mono); }
.pagination-jump input {
  width: 60px; height: 36px; border-radius: 8px;
  border: 1px solid var(--border2); background: var(--surface);
  color: var(--text); font-size: 12px; font-family: var(--font-mono);
  text-align: center; outline: none; transition: border-color .2s;
  -moz-appearance: textfield;
}
.pagination-jump input::-webkit-outer-spin-button,
.pagination-jump input::-webkit-inner-spin-button { -webkit-appearance: none; }
.pagination-jump input:focus { border-color: var(--accent); }

/* ── Error Banner ──────────────────────────────────────────────────────── */
.error-banner {
  background: rgba(255,77,109,.1); border: 1px solid rgba(255,77,109,.3);
  border-radius: var(--radius); padding: 18px 24px; margin: 20px 0;
  display: flex; align-items: flex-start; gap: 12px;
}
.error-icon { font-size: 20px; flex-shrink: 0; }
.error-title { font-weight: 700; color: var(--red); margin-bottom: 4px; }
.error-msg { font-size: 13px; color: var(--muted); font-family: var(--font-mono); }

/* ── Footer ────────────────────────────────────────────────────────────── */
.site-footer { margin-top: 48px; padding: 28px 0 40px; border-top: 1px solid var(--border); }
.footer-copyright { font-size: 13px; color: var(--text); font-family: var(--font-mono); margin-bottom: 20px; }
.footer-disclaimer {
  background: rgba(255,255,255,.03); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px 24px;
}
.disclaimer-title { font-size: 12px; font-weight: 700; color: var(--text); font-family: var(--font-mono); letter-spacing: .06em; margin-bottom: 10px; }
.footer-disclaimer p { font-size: 12px; line-height: 1.75; color: var(--muted); font-family: var(--font-mono); }

/* ── Footer Nav Block ──────────────────────────────────────────────────── */
.footer-nav-block {
  display: flex;
  gap: 48px;
  padding: 48px 0 40px;
  border-top: 1px solid rgba(255,255,255,0.07);
  margin-top: 32px;
}
.footer-brand-col {
  flex: 0 0 260px;
  min-width: 0;
}
.footer-brand-name {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
  letter-spacing: -0.3px;
}
.footer-brand-name span { color: #4f8ef7; }
.footer-brand-desc {
  font-size: 13px;
  color: rgba(255,255,255,0.45);
  line-height: 1.7;
  margin: 0;
}
.footer-links-cols {
  display: flex;
  flex: 1;
  gap: 32px;
  flex-wrap: wrap;
}
.footer-link-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 130px;
}
.footer-link-title {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}
.footer-link-group a {
  font-size: 13px;
  color: rgba(255,255,255,0.45);
  text-decoration: none;
  transition: color 0.15s;
  white-space: nowrap;
}
.footer-link-group a:hover { color: #4f8ef7; }

/* ── Back to Top ───────────────────────────────────────────────────────── */
#backToTop {
  text-decoration: none;
  position: fixed; right: 24px; bottom: 32px; z-index: 999;
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border2);
  color: var(--text); cursor: pointer;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 1px;
  transition: border-color .2s, background .2s;
  box-shadow: 0 4px 16px rgba(0,0,0,.4);
}
#backToTop:hover { background: var(--accent); border-color: var(--accent); }
#backToTop .btt-line { width:14px; height:2px; background:currentColor; border-radius:2px; margin-bottom:2px; }
#backToTop svg { width:14px; height:14px; fill:none; stroke:currentColor; stroke-width:2.2; stroke-linecap:round; stroke-linejoin:round; }

/* ── FAQ ───────────────────────────────────────────────────────────────── */
.faq-item {
  border-bottom: 1px solid rgba(255,255,255,0.07);
  padding: 12px 0;
}
.faq-question {
  cursor: pointer;
  font-weight: 500;
  font-size: 15px;
  color: #fff;
  list-style: none;
  padding: 4px 0;
}
.faq-question::-webkit-details-marker { display: none; }
.faq-question::before { content: '＋ '; color: var(--accent); }
details[open] .faq-question::before { content: '－ '; }
.faq-answer {
  padding: 10px 0 4px;
  font-size: 14px;
  color: rgba(255,255,255,0.65);
  line-height: 1.7;
}

/* ── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .header-nav .nav-icon { display: none; }
  .nav-item { padding: 5px 10px; font-size: 12px; }
  td.col-visit { display: none; }
}

@media (max-width: 768px) {
  .wrapper { padding: 0 12px 40px; }
  header { flex-wrap: wrap; padding: 14px 0 16px; gap: 10px; }
  .logo { flex: 1; }
  .header-right { order: 2; margin-left: auto; }
  .header-nav { order: 3; width: 100%; justify-content: center; }
  .header-nav .nav-item { flex: 1; justify-content: center; }
  .tab-strip { flex: unset; width: 100%; }
  .controls { gap: 8px; flex-wrap: wrap; }
  .page-title { font-size: 20px; }
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  table { width: 700px; }
  td, th { padding: 10px 10px; }
  .exchange-name { font-size: 13px; }
  .exchange-logo { width: 26px; height: 26px; }
  .pagination-wrap { flex-direction: column; align-items: center; }
  .global-ticker-inner { padding: 0 32px; }

  .country-select { position: static; width: 100%; }
  .country-btn { width: 100%; justify-content: space-between; }
  .country-dropdown {
    position: absolute;
    top: auto;
    left: 12px;
    right: 12px;
    width: auto;
    min-width: unset;
    max-width: unset;
    max-height: 40vh;
  }
  .country-list { max-height: calc(40vh - 60px); }

  .footer-nav-block {
    flex-direction: column;
    gap: 32px;
  }
  .footer-brand-col { flex: none; }
  .footer-links-cols { gap: 24px; }
  .footer-link-group { min-width: 110px; }
}

@media (max-width: 480px) {
  .logo-text { font-size: 17px; }
  .logo-icon { width: 30px; height: 30px; font-size: 14px; }
}