/* =====================================================================
   欧易 OKX 官网模板 — 全局样式表 style.css
   ---------------------------------------------------------------------
   包含：设计变量 / 重置 / 工具类 / 按钮 / 顶部公告 / 导航 / 页脚
         通用组件（卡片、Tabs、手风琴、表格、Toast、抽屉、回到顶部）
   页面级样式见 pages.css
   ===================================================================== */

/* ---------------------------------------------------------------------
   1. 设计变量
--------------------------------------------------------------------- */
:root {
  /* 背景层级 */
  --bg: #000000;
  --bg-1: #0b0e11;
  --bg-2: #11151b;
  --bg-3: #1a1f27;
  --bg-4: #242b35;

  /* 文字层级 */
  --text-1: #eaecef;
  --text-2: #9aa4b2;
  --text-3: #646e7b;

  /* 描边 */
  --line: rgba(255, 255, 255, .08);
  --line-strong: rgba(255, 255, 255, .16);

  /* 品牌与功能色 */
  --primary: #2a6bff;
  --primary-h: #4a82ff;
  --primary-soft: rgba(42, 107, 255, .14);
  --cyan: #00d4ff;
  --up: #0ecb81;          /* 涨/买入 */
  --up-soft: rgba(14, 203, 129, .12);
  --down: #f6465d;        /* 跌/卖出 */
  --down-soft: rgba(246, 70, 93, .12);
  --gold: #f0b90b;

  /* 渐变 */
  --grad-brand: linear-gradient(135deg, #2a6bff 0%, #00d4ff 100%);
  --grad-hero: radial-gradient(ellipse 60% 50% at 70% 10%, rgba(42, 107, 255, .22), transparent 65%),
               radial-gradient(ellipse 50% 40% at 15% 85%, rgba(0, 212, 255, .12), transparent 60%);

  /* 尺寸 */
  --radius-s: 8px;
  --radius-m: 12px;
  --radius-l: 16px;
  --radius-xl: 24px;
  --nav-h: 68px;
  --container: 1280px;

  /* 阴影 */
  --shadow-1: 0 8px 28px rgba(0, 0, 0, .45);
  --shadow-2: 0 16px 48px rgba(0, 0, 0, .6);

  /* 字体 */
  --font: "Inter", "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --mono: "SF Mono", "JetBrains Mono", Consolas, "Courier New", monospace;

  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---------------------------------------------------------------------
   2. 重置与基础
--------------------------------------------------------------------- */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-1);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; transition: color .2s var(--ease); }

button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; outline: none; }

img, svg, canvas { display: block; max-width: 100%; }

ul, ol { list-style: none; }

table { border-collapse: collapse; width: 100%; }

::selection { background: rgba(42, 107, 255, .45); color: #fff; }

/* 滚动条美化（桌面端） */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-1); }
::-webkit-scrollbar-thumb { background: #2b3340; border-radius: 6px; border: 2px solid var(--bg-1); }
::-webkit-scrollbar-thumb:hover { background: #3a4454; }

/* ---------------------------------------------------------------------
   3. 工具类
--------------------------------------------------------------------- */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }

.section { padding: 96px 0; }
.section--tight { padding: 64px 0; }
.section--bg1 { background: var(--bg-1); }

/* 统一区块标题 */
.section-head { max-width: 720px; margin: 0 auto 56px; text-align: center; }
.section-head--left { margin-left: 0; text-align: left; }
.section-head h2 { font-size: clamp(26px, 3.2vw, 40px); font-weight: 700; letter-spacing: -.02em; line-height: 1.25; }
.section-head p { margin-top: 14px; color: var(--text-2); font-size: 16px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--cyan); margin-bottom: 16px;
}
.eyebrow::before { content: ""; width: 18px; height: 2px; background: var(--grad-brand); border-radius: 2px; }

.grad-text { background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent; }

.text-2 { color: var(--text-2); }
.text-3 { color: var(--text-3); }
.up { color: var(--up); }
.down { color: var(--down); }
.mono { font-family: var(--mono); }

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600;
  background: var(--bg-3); color: var(--text-2); border: 1px solid var(--line);
}
.badge--up { background: var(--up-soft); color: var(--up); border-color: rgba(14, 203, 129, .25); }
.badge--down { background: var(--down-soft); color: var(--down); border-color: rgba(246, 70, 93, .25); }
.badge--primary { background: var(--primary-soft); color: #7aa8ff; border-color: rgba(42, 107, 255, .3); }

/* 滚动显现动画 */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .1s; }
.reveal[data-delay="2"] { transition-delay: .2s; }
.reveal[data-delay="3"] { transition-delay: .3s; }
.reveal[data-delay="4"] { transition-delay: .4s; }
.reveal[data-delay="5"] { transition-delay: .5s; }

/* ---------------------------------------------------------------------
   4. 按钮
--------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 22px; border-radius: 10px;
  font-size: 14px; font-weight: 600; white-space: nowrap;
  transition: all .22s var(--ease); border: 1px solid transparent;
}
.btn:active { transform: scale(.97); }
.btn svg { width: 18px; height: 18px; flex: none; }

.btn--primary { background: var(--primary); color: #fff; }
.btn--primary:hover { background: var(--primary-h); box-shadow: 0 6px 22px rgba(42, 107, 255, .38); }

.btn--white { background: #fff; color: #0b0e11; }
.btn--white:hover { background: #dfe6f0; }

.btn--outline { border-color: var(--line-strong); color: var(--text-1); }
.btn--outline:hover { border-color: rgba(255, 255, 255, .4); background: rgba(255, 255, 255, .04); }

.btn--ghost { color: var(--text-2); }
.btn--ghost:hover { color: var(--text-1); background: rgba(255, 255, 255, .06); }

.btn--grad { background: var(--grad-brand); color: #fff; }
.btn--grad:hover { filter: brightness(1.12); box-shadow: 0 8px 26px rgba(0, 180, 255, .35); }

.btn--up { background: var(--up); color: #042e1d; }
.btn--up:hover { filter: brightness(1.1); }
.btn--down { background: var(--down); color: #fff; }
.btn--down:hover { filter: brightness(1.1); }

.btn--sm { height: 36px; padding: 0 16px; font-size: 13px; border-radius: 8px; }
.btn--lg { height: 52px; padding: 0 30px; font-size: 15px; border-radius: 12px; }
.btn--block { width: 100%; }

.btn[disabled] { opacity: .45; pointer-events: none; }

/* ---------------------------------------------------------------------
   5. 顶部公告条
--------------------------------------------------------------------- */
.topbar {
  position: relative; z-index: 60;
  background: linear-gradient(90deg, rgba(42, 107, 255, .18), rgba(0, 212, 255, .12));
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  height: 38px; font-size: 12.5px; color: var(--text-2);
}
.topbar b { color: var(--text-1); font-weight: 600; }
.topbar a { color: var(--cyan); }
.topbar a:hover { text-decoration: underline; }
.topbar-close {
  position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
  width: 26px; height: 26px; border-radius: 6px; color: var(--text-3);
  display: flex; align-items: center; justify-content: center;
}
.topbar-close:hover { background: rgba(255, 255, 255, .08); color: var(--text-1); }
.topbar.is-hidden { display: none; }

/* ---------------------------------------------------------------------
   6. 主导航
--------------------------------------------------------------------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(0, 0, 0, .72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s;
}
.nav.scrolled { background: rgba(0, 0, 0, .9); border-bottom-color: var(--line); }

.nav-inner { display: flex; align-items: center; height: var(--nav-h); gap: 28px; }

/* Logo */
.brand { display: flex; align-items: center; gap: 10px; flex: none; }
.brand-mark { width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; }
.brand-mark svg { width: 26px; height: 26px; }
.brand-name { font-size: 19px; font-weight: 800; letter-spacing: .04em; }

/* 菜单 */
.nav-menu { display: flex; align-items: center; gap: 2px; flex: 1; }
.nav-item { position: relative; }
.nav-link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 14px; border-radius: 9px;
  font-size: 14px; font-weight: 500; color: var(--text-2);
}
.nav-link:hover { color: var(--text-1); background: rgba(255, 255, 255, .06); }
.nav-link.active { color: var(--text-1); font-weight: 600; }
.nav-link .caret { width: 10px; height: 10px; transition: transform .25s var(--ease); }
.nav-item:hover > .nav-link .caret { transform: rotate(180deg); }

/* 下拉菜单 */
.dropdown {
  position: absolute; top: calc(100% + 8px); left: 0; min-width: 240px;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px;
  padding: 8px; box-shadow: var(--shadow-2);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: all .22s var(--ease);
}
.nav-item:hover .dropdown { opacity: 1; visibility: visible; transform: none; }
.dropdown a {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 10px;
}
.dropdown a:hover { background: rgba(255, 255, 255, .06); }
.dropdown .dd-ico {
  width: 34px; height: 34px; border-radius: 9px; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-3); color: var(--cyan);
}
.dropdown .dd-ico svg { width: 17px; height: 17px; }
.dropdown .dd-t { font-size: 13.5px; font-weight: 600; }
.dropdown .dd-d { font-size: 12px; color: var(--text-3); }

/* 右侧操作区（桌面端由 .nav-menu 撑开；移动端菜单隐藏后靠 margin-left:auto 顶到最右） */
.nav-actions { display: flex; align-items: center; gap: 10px; flex: none; margin-left: auto; }

/* 右侧辅助菜单（下载 / 学院 / 帮助） */
.nav-sub { display: flex; align-items: center; gap: 2px; margin-right: 8px; }

/* 汉堡按钮（移动端） */
.nav-toggle {
  display: none; width: 42px; height: 42px; border-radius: 10px;
  align-items: center; justify-content: center; flex-direction: column; gap: 5px;
}
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--text-1); border-radius: 2px; transition: all .3s var(--ease); }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* 移动端抽屉 */
.mobile-drawer {
  position: fixed; inset: var(--nav-h) 0 0 0; z-index: 45;
  background: rgba(0, 0, 0, .96); backdrop-filter: blur(20px);
  padding: 24px; overflow-y: auto;
  transform: translateX(100%); transition: transform .32s var(--ease);
}
.mobile-drawer.open { transform: none; }
.mobile-drawer .m-link {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 6px; font-size: 17px; font-weight: 600;
  border-bottom: 1px solid var(--line);
}
.mobile-drawer .m-link svg { width: 14px; height: 14px; color: var(--text-3); }
.mobile-drawer .m-sub { padding: 6px 0 10px 14px; }
.mobile-drawer .m-sub a { display: block; padding: 9px 0; font-size: 14px; color: var(--text-2); }
.mobile-drawer .m-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 28px; }

@media (min-width: 993px) { .mobile-drawer { display: none; } }

/* ---------------------------------------------------------------------
   7. 页脚
--------------------------------------------------------------------- */
.footer { background: var(--bg-1); border-top: 1px solid var(--line); padding: 72px 0 32px; }
.footer-grid {
  display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 40px;
  padding-bottom: 48px; border-bottom: 1px solid var(--line);
}
.footer-brand p { margin-top: 16px; font-size: 13px; color: var(--text-3); max-width: 300px; line-height: 1.7; }
.footer-col h4 { font-size: 13px; font-weight: 700; letter-spacing: .06em; color: var(--text-1); margin-bottom: 18px; }
.footer-col a { display: block; padding: 6px 0; font-size: 13.5px; color: var(--text-2); }
.footer-col a:hover { color: var(--text-1); }

.footer-social { display: flex; gap: 10px; margin-top: 20px; }
.footer-social a {
  width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center; color: var(--text-2);
}
.footer-social a:hover { color: #fff; border-color: var(--line-strong); background: rgba(255, 255, 255, .05); }
.footer-social svg { width: 17px; height: 17px; }

.footer-bottom {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding-top: 28px; flex-wrap: wrap;
}
.footer-bottom p { font-size: 12.5px; color: var(--text-3); }
.footer-langs { display: flex; align-items: center; gap: 8px; }
.footer-langs .f-select {
  display: flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 12px; border-radius: 9px;
  border: 1px solid var(--line); font-size: 13px; color: var(--text-2);
  background: transparent;
}
.footer-langs .f-select:hover { border-color: var(--line-strong); color: var(--text-1); }
.footer-langs svg { width: 15px; height: 15px; }

.footer-disclaimer {
  margin-top: 24px; padding: 16px 18px; border-radius: 12px;
  border: 1px dashed rgba(246, 70, 93, .3); background: rgba(246, 70, 93, .05);
  font-size: 12.5px; color: var(--text-3); line-height: 1.75;
}
.footer-disclaimer b { color: var(--text-2); }

/* ---------------------------------------------------------------------
   8. 通用组件
--------------------------------------------------------------------- */

/* 卡片 */
.card {
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: var(--radius-l); padding: 26px;
  transition: transform .3s var(--ease), border-color .3s, background .3s;
}
.card:hover { border-color: var(--line-strong); }

/* Tabs */
.tabs { display: inline-flex; align-items: center; gap: 4px; padding: 4px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; flex-wrap: wrap; }
.tab {
  padding: 8px 18px; border-radius: 9px; font-size: 13.5px; font-weight: 600; color: var(--text-2);
  transition: all .2s var(--ease); white-space: nowrap;
}
.tab:hover { color: var(--text-1); }
.tab.active { background: var(--bg-4); color: var(--text-1); }

/* 下划线式 Tabs */
.tabs-line { display: flex; gap: 26px; border-bottom: 1px solid var(--line); }
.tabs-line .tab { padding: 12px 2px; border-radius: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; background: none; }
.tabs-line .tab.active { color: var(--text-1); border-bottom-color: var(--primary); background: none; }

/* 面板显隐 */
.tab-pane { display: none; }
.tab-pane.active { display: block; animation: fadeUp .35s var(--ease); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* 手风琴 */
.accordion { border: 1px solid var(--line); border-radius: var(--radius-l); overflow: hidden; background: var(--bg-2); }
.acc-item { border-bottom: 1px solid var(--line); }
.acc-item:last-child { border-bottom: none; }
.acc-head {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 20px 24px; text-align: left; font-size: 15px; font-weight: 600; color: var(--text-1);
  transition: background .2s;
}
.acc-head:hover { background: rgba(255, 255, 255, .03); }
.acc-head .acc-ico {
  width: 24px; height: 24px; border-radius: 7px; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-3); color: var(--text-2);
  transition: transform .3s var(--ease), color .3s;
  font-size: 15px; line-height: 1;
}
.acc-item.open .acc-ico { transform: rotate(45deg); color: var(--cyan); }
.acc-body { max-height: 0; overflow: hidden; transition: max-height .38s var(--ease); }
.acc-body-inner { padding: 0 24px 22px; color: var(--text-2); font-size: 14px; line-height: 1.8; }

/* 表格 */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-l); background: var(--bg-2); }
table.data-table { min-width: 720px; font-size: 14px; }
.data-table thead th {
  position: sticky; top: 0; z-index: 2;
  padding: 14px 18px; text-align: right; font-size: 12.5px; font-weight: 600;
  color: var(--text-3); background: var(--bg-2); border-bottom: 1px solid var(--line);
  white-space: nowrap; user-select: none;
}
.data-table thead th:first-child, .data-table thead th.left { text-align: left; }
.data-table thead th.sortable { cursor: pointer; }
.data-table thead th.sortable:hover { color: var(--text-1); }
.data-table thead th .sort-ico { display: inline-block; margin-left: 4px; opacity: .4; font-size: 10px; }
.data-table thead th.sorted .sort-ico { opacity: 1; color: var(--cyan); }
.data-table tbody td {
  padding: 14px 18px; text-align: right; border-bottom: 1px solid rgba(255, 255, 255, .05);
  white-space: nowrap;
}
.data-table tbody td:first-child, .data-table tbody td.left { text-align: left; }
.data-table tbody tr { transition: background .15s; }
.data-table tbody tr:hover { background: rgba(255, 255, 255, .035); }
.data-table tbody tr:last-child td { border-bottom: none; }

/* 币种图标 */
.coin-ico {
  width: 30px; height: 30px; border-radius: 50%; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800; color: #fff;
}

/* 输入框 */
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.input {
  width: 100%; height: 48px; padding: 0 14px;
  background: var(--bg-1); border: 1px solid var(--line); border-radius: 11px;
  font-size: 14px; color: var(--text-1); transition: border-color .2s, box-shadow .2s;
}
.input::placeholder { color: var(--text-3); }
.input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(42, 107, 255, .18); }

/* Toast 提示 */
.toast-wrap { position: fixed; top: 84px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 20px; border-radius: 12px; font-size: 13.5px; font-weight: 500;
  background: var(--bg-3); border: 1px solid var(--line-strong); box-shadow: var(--shadow-2);
  animation: toastIn .3s var(--ease);
}
.toast.out { animation: toastOut .3s var(--ease) forwards; }
.toast svg { width: 17px; height: 17px; color: var(--cyan); flex: none; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-14px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-10px); } }

/* 回到顶部 */
.backtop {
  position: fixed; right: 26px; bottom: 26px; z-index: 80;
  width: 46px; height: 46px; border-radius: 13px;
  background: var(--bg-3); border: 1px solid var(--line-strong);
  display: flex; align-items: center; justify-content: center; color: var(--text-2);
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: all .3s var(--ease);
}
.backtop.show { opacity: 1; visibility: visible; transform: none; }
.backtop:hover { color: #fff; border-color: var(--cyan); }
.backtop svg { width: 18px; height: 18px; }

/* 空态 */
.empty { padding: 48px 20px; text-align: center; color: var(--text-3); font-size: 13.5px; }
.empty svg { width: 44px; height: 44px; margin: 0 auto 14px; opacity: .4; }

/* 区块分隔装饰 */
.glow-line { height: 1px; border: none; background: linear-gradient(90deg, transparent, rgba(42, 107, 255, .5), transparent); }

/* ---------------------------------------------------------------------
   9. 响应式（导航 / 页脚 / 通用）
--------------------------------------------------------------------- */
@media (max-width: 1120px) {
  .nav-menu .nav-link, .nav-sub .nav-link { padding: 9px 10px; }
  .nav-link span.hide-md { display: none; }
}

@media (max-width: 992px) {
  .nav-menu, .nav-sub, .nav-actions .desk-only { display: none; }
  .nav-toggle { display: flex; }
  .section { padding: 72px 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .container { padding: 0 18px; }
  .hide-xs { display: none !important; }
  .section { padding: 56px 0; }
  .section-head { margin-bottom: 36px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 26px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .backtop { right: 16px; bottom: 16px; }
  .topbar-inner { padding-right: 34px; justify-content: flex-start; font-size: 12px; }
}
