/* ========== 背景粒子层 ========== */
.bg-particles {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  width: 100vw; height: 100vh;
}

/* ========== 全局微调 ========== */
html, body { -webkit-tap-highlight-color: transparent; }
* { scrollbar-width: thin; scrollbar-color: #334155 transparent; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: #334155; border-radius: 4px; }

/* 数字等宽 */
.tabular { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }

/* 玻璃卡片 */
.glass {
  background: linear-gradient(135deg, rgba(30,41,59,0.55), rgba(15,23,42,0.55));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(99,102,241,0.12);
}

/* 深色背景 + 渐变光晕 */
body {
  background: #05070f;
  position: relative;
  overflow-x: hidden;
}
body::before {
  content: '';
  position: fixed; inset: 0; z-index: -1;
  background:
    radial-gradient(600px 400px at 10% 0%, rgba(99,102,241,0.12), transparent 60%),
    radial-gradient(500px 500px at 90% 100%, rgba(168,85,247,0.10), transparent 60%),
    radial-gradient(400px 300px at 50% 50%, rgba(59,130,246,0.06), transparent 70%);
}

/* 输入框数字对齐 */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type=number] { -moz-appearance: textfield; }

/* 涨跌色 */
.pos { color: #34d399; text-shadow: 0 0 12px rgba(52,211,153,0.35); }
.neg { color: #f87171; text-shadow: 0 0 12px rgba(248,113,113,0.35); }

/* 底部 tab */
.tab-btn.active { color: #a5b4fc; }
.tab-btn.active .tab-ico { transform: translateY(-2px); filter: drop-shadow(0 2px 6px rgba(165,180,252,0.5)); }
.tab-ico { transition: transform .2s; display: inline-block; }

/* 可点击行 */
.tap { transition: background .15s, transform .1s; }
.tap:active { background: rgba(99,102,241,0.15); transform: scale(0.98); }

/* ========== 炫酷卡片 ========== */
.stat-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(30,41,59,0.7), rgba(15,23,42,0.8));
  border: 1px solid rgba(99,102,241,0.18);
  border-radius: 16px;
  padding: 14px 16px;
  transition: transform .25s, box-shadow .25s;
}
.stat-card::before {
  content: '';
  position: absolute; top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(closest-side, rgba(99,102,241,0.10), transparent 70%);
  opacity: 0; transition: opacity .3s;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 10px 30px -10px rgba(99,102,241,0.4); }
.stat-card:hover::before { opacity: 1; }

.stat-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

/* 头部大字金额 */
.hero-total {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #a5b4fc 0%, #c4b5fd 50%, #f0abfc 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 40px rgba(165,180,252,0.25);
  line-height: 1.1;
}

/* 按钮渐变 */
.btn-primary {
  background: linear-gradient(135deg, #6366f1, #a855f7);
  box-shadow: 0 4px 14px -2px rgba(139,92,246,0.5);
  transition: all .2s;
}
.btn-primary:hover { box-shadow: 0 6px 20px -2px rgba(139,92,246,0.65); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }

/* Chip */
.chip {
  transition: all .2s;
  position: relative;
  overflow: hidden;
}
.chip.on {
  background: linear-gradient(135deg, rgba(99,102,241,0.85), rgba(139,92,246,0.85));
  border-color: rgba(165,180,252,0.5);
  box-shadow: 0 0 0 1px rgba(165,180,252,0.2), 0 4px 12px -2px rgba(139,92,246,0.5);
}
.chip.off {
  background: rgba(30,41,59,0.6);
  border-color: rgba(71,85,105,0.5);
}

/* 数字滚动动画 */
@keyframes countUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.count-animate { animation: countUp .5s ease-out both; }

/* 入场动画 */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp .4s ease-out both; }

/* 图表容器 */
.chart-card {
  background: linear-gradient(135deg, rgba(30,41,59,0.55), rgba(15,23,42,0.65));
  border: 1px solid rgba(99,102,241,0.14);
  border-radius: 18px;
  padding: 16px;
  position: relative;
}
.chart-card::after {
  content: '';
  position: absolute; inset: -1px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(99,102,241,0.2), transparent 40%, transparent 60%, rgba(168,85,247,0.15));
  z-index: -1; pointer-events: none;
}

/* 密码门背景粒子 */
.auth-bg {
  background:
    radial-gradient(600px 400px at 30% 30%, rgba(99,102,241,0.18), transparent 60%),
    radial-gradient(500px 600px at 80% 70%, rgba(168,85,247,0.14), transparent 60%),
    #05070f;
}

/* Toast */
.toast {
  background: linear-gradient(135deg, rgba(30,41,59,0.95), rgba(15,23,42,0.95));
  border: 1px solid rgba(99,102,241,0.3);
  backdrop-filter: blur(16px);
}

/* Modal */
.modal-panel {
  background: linear-gradient(135deg, rgba(30,41,59,0.95), rgba(15,23,42,0.95));
  border: 1px solid rgba(99,102,241,0.2);
  backdrop-filter: blur(20px);
}

/* 表格行 hover */
.row-hover { transition: background .15s; }
.row-hover:hover { background: rgba(99,102,241,0.08); }

/* 进度条渐变 */
.progress-bar {
  background: linear-gradient(90deg, #6366f1, #a855f7);
  box-shadow: 0 0 10px rgba(139,92,246,0.5);
}
