/* ============================================================
   traders-binance.css —— 币安带单榜页面专属样式
   说明：通用样式（glass-card / toast-show 等）复用 css/style.css，
        这里只补充本页特有的：榜单切换标签、周期胶囊、排名徽章、表格行。
   设计：严格沿用暗黑科技风（neonCyan 强调 + 毛玻璃）。
   ============================================================ */

/* ---------- 造富榜 / 韭菜榜 切换标签 ---------- */
.binance-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #c5c6c7;
  background: rgba(31, 40, 51, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.2s ease;
}
.binance-tab:hover {
  color: #fff;
  border-color: rgba(102, 252, 241, 0.4);
}
.binance-tab.is-active {
  color: #0b0c10;
  background: linear-gradient(135deg, #66fcf1, #45a29e);
  border-color: transparent;
  box-shadow: 0 8px 20px -8px rgba(102, 252, 241, 0.5);
}

/* ---------- 7天 / 30天 周期胶囊 ---------- */
.binance-pill {
  padding: 0.4rem 0.9rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  color: #c5c6c7;
  background: rgba(11, 12, 16, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.2s ease;
}
.binance-pill:hover {
  color: #fff;
  border-color: rgba(102, 252, 241, 0.4);
}
.binance-pill.is-active {
  color: #66fcf1;
  border-color: rgba(102, 252, 241, 0.6);
  background: rgba(102, 252, 241, 0.08);
}

/* ---------- 排名徽章 ---------- */
.rank-badge {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.6rem;
  font-weight: 700;
  font-size: 0.85rem;
  color: #c5c6c7;
  background: rgba(255, 255, 255, 0.05);
}
.rank-badge.top1 { color: #0b0c10; background: linear-gradient(135deg, #ffd700, #ffae00); }
.rank-badge.top2 { color: #0b0c10; background: linear-gradient(135deg, #e8e8e8, #b0b0b0); }
.rank-badge.top3 { color: #0b0c10; background: linear-gradient(135deg, #f0a673, #cd7f32); }

/* ---------- 榜单行（卡片式，移动端友好） ---------- */
.binance-row {
  display: grid;
  grid-template-columns: 2.5rem 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1.1rem;
  border-radius: 0.9rem;
  background: rgba(31, 40, 51, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.06);
  cursor: pointer;
  transition: all 0.18s ease;
}
.binance-row:hover {
  border-color: rgba(102, 252, 241, 0.35);
  background: rgba(31, 40, 51, 0.6);
  transform: translateY(-1px);
}

/* 带关注按钮的行：4 列（排名 | 信息 | 数值 | 关注按钮） */
.binance-row-with-follow {
  grid-template-columns: 2.5rem 1fr auto 2.25rem;
}

/* 关注按钮（星标） */
.follow-btn {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.6rem;
  font-size: 1.05rem;
  color: #c5c6c7;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: all 0.18s ease;
}
.follow-btn:hover {
  color: #66fcf1;
  border-color: rgba(102, 252, 241, 0.45);
  background: rgba(102, 252, 241, 0.08);
  transform: scale(1.08);
}
/* 已关注：实心星 + 青色高亮 */
.follow-btn.is-followed {
  color: #0b0c10;
  background: linear-gradient(135deg, #66fcf1, #45a29e);
  border-color: transparent;
  box-shadow: 0 4px 12px -4px rgba(102, 252, 241, 0.6);
}
.follow-btn.is-followed:hover {
  filter: brightness(1.1);
}

/* 数值涨跌配色 */
.val-up { color: #4ade80; }
.val-down { color: #fb7185; }

/* ============================================================
   实时动态视觉元素 —— 发光、跳动、脉冲，提升「实时感」与爽点
   ============================================================ */

/* ---------- 收益率发光跳动（榜单行 ROI） ---------- */
/* 绿色(盈利)用青绿光晕呼吸，红色(亏损)用暖红光晕呼吸 */
.roi-glow.val-up {
  animation: roiPulseUp 2.4s ease-in-out infinite;
}
.roi-glow.val-down {
  animation: roiPulseDown 2.4s ease-in-out infinite;
}
@keyframes roiPulseUp {
  0%, 100% { text-shadow: 0 0 6px rgba(74, 222, 128, 0.25); }
  50%      { text-shadow: 0 0 14px rgba(74, 222, 128, 0.75), 0 0 4px rgba(74, 222, 128, 0.4); }
}
@keyframes roiPulseDown {
  0%, 100% { text-shadow: 0 0 6px rgba(251, 113, 133, 0.25); }
  50%      { text-shadow: 0 0 14px rgba(251, 113, 133, 0.75), 0 0 4px rgba(251, 113, 133, 0.4); }
}

/* ---------- 大盘数字霓虹呼吸（收录交易员数） ---------- */
.num-glow {
  animation: numGlow 3s ease-in-out infinite;
}
@keyframes numGlow {
  0%, 100% { text-shadow: 0 0 8px rgba(102, 252, 241, 0.3); }
  50%      { text-shadow: 0 0 22px rgba(102, 252, 241, 0.85), 0 0 6px rgba(102, 252, 241, 0.5); }
}

/* ---------- 标题高亮渐变流光 ---------- */
.title-glow {
  background: linear-gradient(90deg, #66fcf1, #45a29e, #66fcf1);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: titleShine 4s linear infinite;
}
@keyframes titleShine {
  0%   { background-position: 0% center; }
  100% { background-position: 200% center; }
}

/* ---------- 实时脉冲圆点（live indicator） ---------- */
.live-dot {
  position: relative;
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 9999px;
  background: #66fcf1;
  box-shadow: 0 0 0 0 rgba(102, 252, 241, 0.6);
  animation: livePulse 1.8s ease-out infinite;
}
@keyframes livePulse {
  0%   { box-shadow: 0 0 0 0 rgba(102, 252, 241, 0.55); }
  70%  { box-shadow: 0 0 0 8px rgba(102, 252, 241, 0); }
  100% { box-shadow: 0 0 0 0 rgba(102, 252, 241, 0); }
}

/* ---------- 风险提示图标轻微闪烁 ---------- */
.risk-blink {
  animation: riskBlink 2.2s ease-in-out infinite;
}
@keyframes riskBlink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.45; }
}

/* ---------- Hero 背景极光光晕 ---------- */
.hero-aurora {
  position: absolute;
  top: -40%;
  left: 50%;
  transform: translateX(-50%);
  width: 60rem;
  max-width: 140%;
  height: 30rem;
  pointer-events: none;
  background:
    radial-gradient(closest-side, rgba(102, 252, 241, 0.16), transparent 70%),
    radial-gradient(closest-side, rgba(69, 162, 158, 0.12), transparent 70%);
  filter: blur(40px);
  animation: auroraDrift 9s ease-in-out infinite;
}
@keyframes auroraDrift {
  0%, 100% { transform: translateX(-50%) translateY(0) scale(1); opacity: 0.85; }
  50%      { transform: translateX(-48%) translateY(14px) scale(1.06); opacity: 1; }
}

/* ---------- 统计卡片：悬停微浮 + 高亮描边 ---------- */
.stat-card {
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.stat-card:hover {
  transform: translateY(-3px);
  border-color: rgba(102, 252, 241, 0.35);
  box-shadow: 0 14px 30px -16px rgba(102, 252, 241, 0.5);
}

/* ---------- 排名单元格（容纳排名徽章 + 冠军皇冠 + 升降箭头） ---------- */
.rank-cell {
  position: relative;
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
}
/* 名次升降箭头：绝对定位于徽章右下，不撑开行高 */
.rank-delta {
  position: absolute;
  right: -0.55rem;
  bottom: -0.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.05rem;
  padding: 0.05rem 0.28rem;
  border-radius: 9999px;
  font-size: 0.6rem;
  font-weight: 700;
  line-height: 1;
  animation: deltaPop 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.rank-delta.up { color: #4ade80; background: rgba(74, 222, 128, 0.15); }
.rank-delta.down { color: #fb7185; background: rgba(251, 113, 133, 0.15); }
.rank-delta i { font-size: 0.6rem; }
@keyframes deltaPop {
  0% { transform: scale(0) translateY(4px); opacity: 0; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}

/* ---------- 涨跌闪烁：实时刷新时，ROI 变化的行整行扫过一道高亮 ---------- */
.binance-row.flash-up { animation: rowFlashUp 1.1s ease-out; }
.binance-row.flash-down { animation: rowFlashDown 1.1s ease-out; }
@keyframes rowFlashUp {
  0%   { background: rgba(74, 222, 128, 0.28); box-shadow: inset 0 0 0 1px rgba(74, 222, 128, 0.5); }
  100% { background: rgba(31, 40, 51, 0.35); box-shadow: none; }
}
@keyframes rowFlashDown {
  0%   { background: rgba(251, 113, 133, 0.28); box-shadow: inset 0 0 0 1px rgba(251, 113, 133, 0.5); }
  100% { background: rgba(31, 40, 51, 0.35); box-shadow: none; }
}

/* ---------- 造富榜冠军特效：金色光环 + 漂浮皇冠 ---------- */
.binance-row.is-champion {
  border-color: rgba(255, 196, 0, 0.45);
  background: linear-gradient(100deg, rgba(255, 196, 0, 0.1), rgba(31, 40, 51, 0.35) 45%);
  animation: championHalo 2.6s ease-in-out infinite;
}
.binance-row.is-champion:hover {
  border-color: rgba(255, 196, 0, 0.7);
}
@keyframes championHalo {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 196, 0, 0); }
  50%      { box-shadow: 0 0 22px -4px rgba(255, 196, 0, 0.55); }
}
.champion-crown {
  position: absolute;
  top: -0.95rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1rem;
  color: #ffd700;
  filter: drop-shadow(0 0 5px rgba(255, 196, 0, 0.85));
  animation: crownBob 2s ease-in-out infinite;
}
@keyframes crownBob {
  0%, 100% { transform: translateX(-50%) translateY(0) rotate(-6deg); }
  50%      { transform: translateX(-50%) translateY(-3px) rotate(6deg); }
}

/* ---------- 尊重「减少动画」无障碍偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  .roi-glow.val-up,
  .roi-glow.val-down,
  .num-glow,
  .title-glow,
  .live-dot,
  .risk-blink,
  .hero-aurora,
  .binance-row.flash-up,
  .binance-row.flash-down,
  .binance-row.is-champion,
  .champion-crown,
  .rank-delta {
    animation: none;
  }
  .title-glow {
    -webkit-text-fill-color: #66fcf1;
  }
}

/* 详情页图表容器 */
.binance-chart {
  width: 100%;
  height: 240px;
}

/* 空状态 / 加载态 */
.binance-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 1.5rem;
  color: #c5c6c7;
}

/* ---------- 交易实录表格（持仓 / 历史交易） ---------- */
.binance-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  white-space: nowrap;
}
.binance-table thead th {
  text-align: left;
  font-weight: 600;
  color: #c5c6c7;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(11, 12, 16, 0.4);
}
.binance-table tbody td {
  padding: 0.55rem 0.75rem;
  color: #e8e8ea;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.binance-table tbody tr:hover {
  background: rgba(102, 252, 241, 0.05);
}

/* ============================================================
   近期热议交易员滚动条（traders.html 顶部）
   说明：横向无限滚动，hover 暂停。数据由后端 /api/hot-traders 提供。
   ============================================================ */

/* 滚动轨道：左右渐隐遮罩，让内容"飘入飘出"更柔和 */
.hot-traders-track {
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 28px, #000 calc(100% - 28px), transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, #000 28px, #000 calc(100% - 28px), transparent 100%);
}

/* 滚动内容：复制两份实现无缝循环，动画时长按条数动态计算（JS 设定） */
.hot-traders-scroll {
  animation: hot-traders-marquee var(--hot-marquee-duration, 40s) linear infinite;
  will-change: transform;
}
.hot-traders-scroll:hover {
  animation-play-state: paused; /* 鼠标悬停暂停，方便用户细看 */
}

/* 单条热议项：名字 + 标签 + 一句话理由 */
.hot-trader-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: #c5c6c7;
}
.hot-trader-item .hot-name {
  color: #ffffff;
  font-weight: 600;
}
.hot-trader-item .hot-tag {
  display: inline-block;
  padding: 0.05rem 0.4rem;
  border-radius: 0.25rem;
  font-size: 0.65rem;
  color: #66fcf1;
  background: rgba(102, 252, 241, 0.1);
  border: 1px solid rgba(102, 252, 241, 0.2);
}
.hot-trader-item .hot-reason {
  color: #9ca3af;
}
/* 项之间的分隔小圆点 */
.hot-trader-sep {
  color: rgba(102, 252, 241, 0.35);
  font-size: 0.6rem;
}

@keyframes hot-traders-marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); } /* 内容复制两份，位移一半即无缝衔接 */
}

/* 无障碍：用户开启"减少动态效果"时停止滚动，改为静态展示 */
@media (prefers-reduced-motion: reduce) {
  .hot-traders-scroll {
    animation: none;
    flex-wrap: wrap;
    white-space: normal;
    justify-content: center;
  }
}
