/* DeepTrading 官网样式 — 深色金融蓝科技感 */
:root {
  --bg: #050d1f;
  --bg2: #081327;
  --panel: #0b1a33;
  --line: rgba(64, 140, 255, .18);
  --blue: #2f7bff;
  --cyan: #35d0ff;
  --text: #dce7f7;
  --dim: #8499b8;
  --gold: #f2c14e;
  --silver: #cfd8e6;
  --bronze: #c98a4b;
  --nav-h: 64px;
}

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

[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.75;
  overflow-x: hidden;
}

a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* ========== 导航栏 ========== */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(5, 13, 31, .82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s;
}
.navbar.scrolled { border-bottom-color: var(--line); background: rgba(5, 13, 31, .94); }
.nav-inner {
  max-width: 1080px; margin: 0 auto; height: var(--nav-h);
  padding: 0 24px; display: flex; align-items: center; justify-content: space-between;
}
.nav-brand { display: flex; align-items: center; gap: 12px; }
.nav-logo { height: 30px; width: auto; display: block; }
.nav-logo-avenir { height: 24px; width: auto; display: block; opacity: .92; }
.nav-brand-sep { width: 1px; height: 20px; background: rgba(64, 140, 255, .35); }
.nav-links {
  list-style: none; display: flex; align-items: center; gap: 26px; font-size: 14px;
}
.nav-links a { color: var(--dim); transition: color .2s; }
.nav-links a:hover { color: #fff; text-decoration: none; }
.nav-langs { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.lang-link { color: var(--dim); }
.lang-link.on { color: #fff; font-weight: 700; }
.lang-sep { color: var(--dim); opacity: .5; }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 8px;
}
.nav-toggle span {
  width: 22px; height: 2px; background: var(--text); border-radius: 1px;
  transition: transform .25s, opacity .25s;
}
.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); }

/* ========== Hero ========== */
.hero {
  position: relative; min-height: 92vh;
  display: flex; align-items: center; justify-content: flex-start;
  text-align: left; overflow: hidden;
}
#heroCanvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-content { position: relative; z-index: 2; padding: calc(var(--nav-h) + 48px) 24px 64px 7vw; max-width: 620px; }
.hero-logo {
  height: clamp(56px, 9vw, 96px); width: auto;
  filter: drop-shadow(0 4px 24px rgba(47, 123, 255, .35));
}
.hero-tagline {
  margin-top: 26px;
  font-size: clamp(17px, 2.6vw, 26px); font-weight: 700; color: #fff;
  letter-spacing: .04em;
}
.hero-tagline-cn {
  margin-top: 8px;
  font-size: clamp(14px, 1.9vw, 19px); font-weight: 600; color: var(--cyan);
  letter-spacing: .22em; opacity: .85;
}
.hero-sub {
  margin-top: 12px;
  font-size: clamp(11px, 1.4vw, 14px); letter-spacing: .32em; color: var(--blue);
}
.hero-cta {
  margin-top: 40px; display: flex; gap: 16px; justify-content: flex-start; flex-wrap: wrap;
}
.btn {
  padding: 13px 30px; border-radius: 6px; font-size: 15px; font-weight: 600;
  transition: transform .2s, box-shadow .2s; cursor: pointer;
}
.btn:hover { transform: translateY(-2px); text-decoration: none; }
.btn-primary {
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  color: #041022;
  box-shadow: 0 4px 20px rgba(47, 123, 255, .35);
}
.btn-primary:hover { box-shadow: 0 8px 28px rgba(47, 123, 255, .5); }
.btn-ghost {
  border: 1px solid var(--line); color: var(--text);
  background: rgba(11, 26, 51, .5);
}
.btn-ghost:hover { border-color: var(--cyan); color: #fff; }

/* ========== 板块通用 ========== */
.section { padding: 88px 0; border-top: 1px solid var(--line); }
.section-alt { background: var(--bg2); }
.kicker {
  font-size: 12px; letter-spacing: .32em; color: var(--blue);
  text-transform: uppercase; margin-bottom: 10px;
}
.section-title { font-size: clamp(24px, 3.4vw, 32px); color: #fff; margin-bottom: 16px; }
.section-desc { color: var(--dim); max-width: 760px; }
.about-text { max-width: 820px; }
.about-text p { margin: 14px 0; color: var(--text); }
.about-signature { margin-top: 26px !important; color: var(--cyan) !important; font-weight: 600; }

.grid { display: grid; gap: 18px; margin-top: 34px; }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
.card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 10px; padding: 22px;
  transition: border-color .2s, transform .2s;
}
.card:hover { border-color: rgba(64, 140, 255, .4); transform: translateY(-2px); }
.card h4 { color: #fff; font-size: 16px; margin-bottom: 8px; }
.card p { color: var(--dim); font-size: 14px; }
.card-num { font-size: 12px !important; color: var(--blue) !important; letter-spacing: .2em; margin-bottom: 6px; }
.card-cap { border-left: 3px solid var(--blue); }

.more-links { margin-top: 22px; font-size: 13px; color: var(--dim); }

/* ========== 排行榜 ========== */
.board-title { margin-top: 60px; font-size: 22px; color: #fff; }
.board-note { font-size: 12px; color: var(--dim); font-weight: 400; margin-left: 10px; }
.lb-tabs { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.lb-tab {
  padding: 7px 20px; border-radius: 20px; font-size: 13px; cursor: pointer;
  border: 1px solid var(--line); background: transparent; color: var(--dim);
  transition: all .2s;
}
.lb-tab:hover { color: #fff; border-color: var(--cyan); }
.lb-tab.on {
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  color: #041022; font-weight: 700; border-color: transparent;
}
.table-wrap { margin-top: 18px; overflow-x: auto; border-radius: 10px; border: 1px solid var(--line); }
.lb-table { width: 100%; border-collapse: collapse; font-size: 14px; background: var(--panel); }
.lb-table th, .lb-table td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.lb-table th { color: var(--dim); font-weight: 600; font-size: 12px; letter-spacing: .08em; }
.lb-table tr:last-child td { border-bottom: none; }
.lb-rank-1 { color: var(--gold); font-weight: 800; }
.lb-rank-2 { color: var(--silver); font-weight: 700; }
.lb-rank-3 { color: var(--bronze); font-weight: 700; }
.ret-pos { color: #34d399; }
.ret-neg { color: #f87171; }
.lb-loading { color: var(--dim); text-align: center; padding: 28px 0 !important; }
.lb-tag {
  display: inline-block; padding: 1px 9px; border-radius: 20px;
  font-size: 11px; border: 1px solid var(--line); color: var(--cyan);
}
.lb-updated { margin-top: 10px; font-size: 12px; color: var(--dim); }

.chart-box {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 10px; padding: 20px; margin-top: 26px;
}
.chart-box h4 { color: #fff; font-size: 15px; margin-bottom: 12px; }
/* 图表按 viewBox 比例自适应；窄屏保底 640px 宽横向滚动，避免轴文字被压缩不可读 */
.chart-scroll { overflow-x: auto; }
.chart-scroll svg { display: block; width: 100%; height: auto; }
.chart-holder { position: relative; }
.chart-tip {
  position: absolute; left: 0; top: 0; z-index: 5; pointer-events: none;
  background: rgba(7,17,36,.94); border: 1px solid var(--line); border-radius: 8px;
  padding: 8px 12px; font-size: 12px; min-width: 150px;
  box-shadow: 0 8px 24px rgba(0,0,0,.45); will-change: transform;
}
.chart-tip .tip-time { color: var(--dim); margin-bottom: 6px; font-size: 11px; }
.chart-tip .tip-row { display: flex; align-items: center; gap: 6px; padding: 1px 0; white-space: nowrap; }
.chart-tip .tip-row b { margin-left: auto; padding-left: 10px; }
.chart-tip .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.legend { display: flex; gap: 18px; font-size: 12px; color: var(--dim); margin-top: 10px; flex-wrap: wrap; }
.legend .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; }
.all-note { color: var(--dim); font-size: 12px; margin-top: 10px; }

/* 工具条：赛道 tabs + 时间区间 seg 同一行，窄屏换行 */
.lb-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.lb-toolbar .lb-tabs { margin-top: 20px; }
.lb-range .lb-tab { padding: 7px 14px; }

/* 统计磁贴 */
.lb-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 26px; }
.lb-tile {
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  padding: 16px 20px; text-align: center;
}
.lb-tile-val { font-size: 24px; font-weight: 800; color: #fff; }
.lb-tile-label { font-size: 12px; color: var(--dim); margin-top: 4px; letter-spacing: .06em; }

/* 可点击行：hover 反馈 + 点名高亮 */
.lb-row { cursor: pointer; transition: background .15s; }
.lb-row:hover { background: rgba(64,140,255,.07); }
.lb-row-hi { background: rgba(64,140,255,.13) !important; }
.lb-row-hi:hover { background: rgba(64,140,255,.16) !important; }

/* ========== 招聘 ========== */
.job-card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 10px; margin-top: 16px; overflow: hidden;
}
.job-head {
  width: 100%; display: flex; align-items: center; gap: 14px;
  padding: 18px 22px; background: none; border: none; cursor: pointer;
  color: #fff; font-size: 15px; text-align: left;
}
.job-name { font-weight: 700; flex: 1; }
.job-meta { color: var(--dim); font-size: 12px; white-space: nowrap; }
.job-arrow {
  width: 8px; height: 8px; border-right: 2px solid var(--dim); border-bottom: 2px solid var(--dim);
  transform: rotate(45deg); transition: transform .25s; flex-shrink: 0;
}
.job-card.open .job-arrow { transform: rotate(-135deg); }
.job-body {
  max-height: 0; overflow: hidden; transition: max-height .35s ease;
  padding: 0 22px; color: var(--dim); font-size: 14px;
}
.job-card.open .job-body { max-height: 3000px; padding-bottom: 20px; } /* 留足余量，JD 扩写不会被静默裁切 */
.job-body h4 { color: var(--cyan); font-size: 13px; margin: 14px 0 6px; }
.job-body ul { padding-left: 20px; }
.job-body li { margin: 4px 0; }
.careers-cta { margin-top: 26px; color: var(--dim); font-size: 14px; }
.resume-apply { margin-top: 24px; border-top: 1px solid var(--line); padding-top: 16px; }
.apply-toggle, .resume-submit, .admin-login button { background: var(--blue); color: #06121f; border: 0; border-radius: 6px; padding: 9px 16px; cursor: pointer; font-weight: 600; }
.resume-form { margin-top: 14px; }
.drop-zone { border: 1px dashed var(--cyan); border-radius: 6px; padding: 22px; min-height: 200px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; color: var(--dim); cursor: pointer; }
.drop-zone.drag-over { background: rgba(47,157,255,.12); }
.resume-file, .resume-message { margin: 10px 0; color: var(--dim); min-height: 1.5em; }
/* 上传成功的醒目确认横幅（深底绿） */
.resume-message.success { background: rgba(52,199,123,.12); border: 1px solid rgba(52,199,123,.5); color: #4ade80; border-radius: 6px; padding: 12px 16px; font-weight: 600; }
.resume-submit { margin-top: 4px; }
.admin-page { min-height: 100vh; padding: 48px 24px; }
.admin-container { max-width: 1080px; margin: 0 auto; }
.admin-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:24px; }
.admin-status { color: var(--dim); min-height: 1.6em; }
.admin-login { display:flex; gap:10px; align-items:center; max-width:480px; }
.admin-login input { flex:1; padding:9px; background:var(--panel); border:1px solid var(--line); color:var(--text); }
.admin-group { margin:24px 0; }
.admin-group table { width:100%; border-collapse:collapse; background:var(--panel); }
.admin-group th, .admin-group td { padding:10px 14px; border-bottom:1px solid var(--line); text-align:left; }
.admin-action { margin-right:12px; color:var(--cyan); background:none; border:0; cursor:pointer; font:inherit; }
/* 管理页次级操作按钮统一风格：退出登录 / 上一页 / 下一页（幽灵按钮，区别于登录主按钮） */
#logout, .pagination button { background:none; border:1px solid var(--line); color:var(--text); border-radius:6px; padding:7px 16px; cursor:pointer; font:inherit; transition:border-color .2s,color .2s; }
#logout:hover, .pagination button:hover:not(:disabled) { border-color:var(--blue); color:var(--cyan); }
.pagination button:disabled { opacity:.4; cursor:default; }
.pagination { display:flex; gap:14px; align-items:center; margin-top:24px; }

/* ========== Avenir Group ========== */
.group-logo { height: 44px; width: auto; margin: 8px 0 4px; opacity: .9; }

/* ========== 页脚 ========== */
.footer { padding: 48px 0 28px; border-top: 1px solid var(--line); background: var(--bg2); }
.footer-inner { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.footer-brand { display: flex; flex-direction: column; }
.footer-logo { height: 26px; width: auto; margin-bottom: 12px; align-self: flex-start; }
.footer-logo-avenir { height: 20px; width: auto; margin-bottom: 10px; opacity: .85; align-self: flex-start; }
.footer-brand p, .footer-contact p { color: var(--dim); font-size: 13px; }
.footer-legal { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); }
.footer-legal p { color: var(--dim); font-size: 12px; opacity: .7; }

/* ========== 滚动进场动画 ========== */
.rv {
  opacity: 0; transform: translateY(26px);
  transition: opacity .7s cubic-bezier(.22,.61,.36,1), transform .7s cubic-bezier(.22,.61,.36,1);
  transition-delay: var(--d, 0s);
  will-change: opacity, transform;
}
.rv-pop { transform: translateY(30px) scale(.96); }
.rv.in { opacity: 1; transform: none; }
/* 进场完成后：回收 will-change；卡片恢复自身 hover 上浮/过渡 */
.rv.done { will-change: auto; }
.card.rv.done { transition: border-color .2s, transform .2s; }
.card.rv.in:hover { transform: translateY(-2px); }
/* 板块标题下划线随进场展开 */
.section-title { position: relative; }
.section-title::after {
  content: ""; display: block; width: 0; height: 3px; margin-top: 10px;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  border-radius: 2px; transition: width .8s ease .2s;
}
.rv.in .section-title::after { width: 64px; }
/* 表格行级联进入 */
.lb-table tbody tr { animation: rowIn .45s ease both; }
@keyframes rowIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .rv { opacity: 1; transform: none; transition: none; }
  .section-title::after { width: 64px; transition: none; }
  .lb-table tbody tr { animation: none; }
  html { scroll-behavior: auto; }
}

/* ========== 移动端 ========== */
@media (max-width: 820px) {
  .g3, .g4 { grid-template-columns: 1fr; }
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed; top: var(--nav-h); left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 0;
    background: rgba(5, 13, 31, .98); border-bottom: 1px solid var(--line);
    padding: 8px 24px 16px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; padding: 10px 0; border-bottom: 1px solid rgba(64, 140, 255, .08); }
  .nav-links li:last-child { border-bottom: none; }
  .nav-langs { padding-top: 6px; }
  .hero { min-height: 78vh; justify-content: center; text-align: center; }
  .hero-content { padding: calc(var(--nav-h) + 40px) 24px 56px; max-width: none; }
  .hero-cta { justify-content: center; }
  .lb-tabs { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 6px; }
  .lb-tab { flex-shrink: 0; }
  .lb-toolbar { flex-direction: column; align-items: stretch; }
  .lb-tiles { grid-template-columns: 1fr; }
  .section { padding: 60px 0; }
  .chart-scroll svg { width: 640px; }
  .chart-scroll .chart-holder { width: 640px; }
}
