:root {
  --bg-base: #0b0f1a;
  --bg-surface: #111827;
  --bg-card: #1a2235;
  --bg-elevated: #1f2a3d;
  --border: #2a3650;
  --border-light: #334155;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent: #0ea5e9;
  --accent-dark: #0284c7;
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --purple: #a855f7;
  --radius: 8px;
  --radius-lg: 12px;
}

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

html, body {
  width: 100%; min-height: 100vh;
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', sans-serif;
  font-size: 14px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

/* ==================== 静态背景 ==================== */
.bg-layer {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 0; overflow: hidden;
}
.bg-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.2;
}
.bg-glow-1 { width: 400px; height: 400px; top: -100px; left: -100px; background: rgba(14, 165, 233, 0.05); }
.bg-glow-2 { width: 300px; height: 300px; bottom: 10%; right: 5%; background: rgba(34, 197, 94, 0.03); }

/* 静态装饰粒子 */
.bg-dot {
  position: absolute;
  border-radius: 50%;
  opacity: 0.3;
}
.bg-dot:nth-child(1)  { width:2px;height:2px;background:rgba(14,165,233,0.5);top:15%;left:20%; }
.bg-dot:nth-child(2)  { width:1px;height:1px;background:rgba(34,197,94,0.4);top:35%;left:70%; }
.bg-dot:nth-child(3)  { width:2px;height:2px;background:rgba(14,165,233,0.3);top:60%;left:40%; }
.bg-dot:nth-child(4)  { width:1px;height:1px;background:rgba(168,85,247,0.4);top:80%;left:15%; }
.bg-dot:nth-child(5)  { width:2px;height:2px;background:rgba(34,197,94,0.3);top:25%;left:85%; }

#app { position: relative; z-index: 1; }

/* ==================== Loading ==================== */
#loading-screen {
  position: fixed; inset: 0; background: var(--bg-base);
  z-index: 9999; display: flex; align-items: center; justify-content: center;
}
#loading-screen.hidden { display: none; }
.loading-ring {
  width: 48px; height: 48px; margin: 0 auto 16px;
  border: 3px solid var(--border); border-top-color: var(--accent);
  border-radius: 50%; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ==================== Header ==================== */
.app-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(11,15,26,0.98);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: 1440px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 24px; gap: 16px;
}
.header-brand { display: flex; align-items: center; gap: 10px; }
.brand-text h1 { font-size: 16px; font-weight: 700; }
.brand-text span { font-size: 11px; color: var(--text-muted); }
.header-nav { display: flex; gap: 2px; }
.nav-link {
  padding: 7px 14px; border-radius: 6px;
  color: var(--text-secondary); font-size: 13px; font-weight: 500;
  text-decoration: none; white-space: nowrap;
}
.nav-link:hover { color: var(--accent); background: rgba(14,165,233,0.08); }
.nav-link.active { color: var(--accent); background: rgba(14,165,233,0.12); }
.header-status { display: flex; align-items: center; gap: 8px; }
.status-dot { width: 7px; height: 7px; background: var(--success); border-radius: 50%; }
.status-text { font-size: 12px; color: var(--success); }
.header-time { font-size: 12px; color: var(--text-muted); font-variant-numeric: tabular-nums; }

/* ==================== Layout ==================== */
.app-main { max-width: 1440px; margin: 0 auto; padding: 20px 24px; min-height: calc(100vh - 120px); }
.app-footer { text-align: center; padding: 16px 24px; border-top: 1px solid var(--border); color: var(--text-muted); font-size: 12px; }

/* ==================== Pages ==================== */
.page-panel { display: none; }
.page-panel.active { display: block; }
.page-title-bar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px; padding-bottom: 12px; border-bottom: 1px solid var(--border);
}
.page-title-bar h2 { font-size: 18px; font-weight: 700; }
.title-bar-actions { display: flex; align-items: center; gap: 8px; }
.data-count { font-size: 20px; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.data-label { font-size: 12px; color: var(--text-muted); }

/* ==================== Stats ==================== */
.stats-row { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; margin-bottom: 20px; }
.stat-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 16px;
  display: flex; align-items: center; gap: 12px;
}
.stat-card.updated { animation: statFlash 0.6s ease; }
@keyframes statFlash {
  0%, 100% { border-color: var(--border); }
  50% { border-color: var(--accent); }
}
.stat-icon { width:40px;height:40px;border-radius:8px;display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:700;flex-shrink:0; }
.eth-icon { background:rgba(98,126,234,0.15);color:#627eea; }
.tron-icon { background:rgba(235,0,41,0.15);color:#eb0029; }
.blacklist-icon { background:rgba(168,85,247,0.15);color:var(--purple); }
.amount-icon { background:rgba(245,158,11,0.15);color:var(--warning); }
.stat-value { font-size:22px;font-weight:700;font-variant-numeric:tabular-nums; }
.stat-label { font-size:12px;color:var(--text-muted);margin-top:2px; }

/* ==================== Table ==================== */
.table-container { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.table-header { padding: 12px 16px; border-bottom: 1px solid var(--border); }
.table-filters { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-select, .filter-input {
  padding: 7px 12px; background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: 6px; color: var(--text-primary); font-size: 13px; outline: none;
}
.filter-input { min-width: 200px; }

.table-autoscroll {
  max-height: 480px;
  overflow: hidden;
  position: relative;
  will-change: scroll-position;
}
.table-autoscroll:hover { overflow-y: auto; }
.table-scroll { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; min-width: 700px; }
.data-table th {
  padding: 10px 14px; text-align: left; font-size: 12px;
  color: var(--text-muted); font-weight: 600; background: var(--bg-surface);
  border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 1;
}
.data-table td {
  padding: 10px 14px; font-size: 13px; color: var(--text-secondary);
  border-bottom: 1px solid rgba(42,54,80,0.4);
}
.data-table tr.row-new { background: rgba(14,165,233,0.1); }

.table-loading { text-align: center; padding: 40px; color: var(--text-muted); }
.table-pagination {
  padding: 12px 16px; display: flex; align-items: center;
  justify-content: center; gap: 4px; border-top: 1px solid var(--border);
}
.page-btn {
  padding: 5px 10px; border: 1px solid var(--border); border-radius: 4px;
  background: transparent; color: var(--text-secondary); font-size: 12px;
  cursor: pointer;
}
.page-btn.active { background: var(--accent); color: white; border-color: var(--accent); }
.scroll-pause-hint { text-align: center; padding: 6px; font-size: 11px; color: var(--text-muted); border-top: 1px solid var(--border); background: var(--bg-surface); }

/* ==================== Graph & Risk ==================== */
.graph-container { height: 600px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); position: relative; }
.risk-result { display: grid; grid-template-columns: 350px 1fr; gap: 20px; }
.risk-score-panel { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; text-align: center; }
.risk-gauge { height: 280px; }

/* ==================== Alerts ==================== */
.alert-scroll-area { max-height: 520px; overflow: hidden; position: relative; will-change: scroll-position; }
.alert-item {
  background: var(--bg-card); border: 1px solid var(--border); border-left: 4px solid var(--accent);
  border-radius: 6px; padding: 16px; margin-bottom: 12px; display: flex; gap: 16px;
}
.alert-item.high { border-left-color: var(--danger); }
.alert-item.alert-new { border-color: var(--danger); background: rgba(239,68,68,0.05); }

/* ==================== Responsive ==================== */
@media (max-width: 1024px) {
  .stats-row { grid-template-columns: repeat(2,1fr); }
  .risk-result { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .header-inner { flex-wrap: wrap; }
  .header-nav { order: 3; width: 100%; overflow-x: auto; }
  .stats-row { grid-template-columns: repeat(2,1fr); }
  .bg-layer { display: none; }
}

::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: var(--bg-surface); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

/* 链接颜色修改为亮蓝色，地址不截断 */
.hash-link { color: #38bdf8; text-decoration: none; font-family: monospace; }
.hash-link:hover { text-decoration: underline; }
.addr-text { font-family: monospace; color: var(--text-primary); white-space: nowrap; }

/* 标签样式定义 */
.tag { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 600; text-transform: uppercase; }
.tag-eth { background: rgba(98, 126, 234, 0.15); color: #627eea; }
.tag-tron { background: rgba(235, 0, 41, 0.15); color: #eb0029; }
.tag-freeze { background: rgba(239, 68, 68, 0.12); color: var(--danger); }
.tag-blacklist { background: rgba(168, 85, 247, 0.12); color: var(--purple); }
.tag-high { background: rgba(239, 68, 68, 0.15); color: var(--danger); }
.tag-medium { background: rgba(245, 158, 11, 0.15); color: var(--warning); }
.tag-low { background: rgba(34, 197, 94, 0.15); color: var(--success); }


