:root {
  --bg: #0b0f14; --panel: #11171f; --panel2: #161e28; --line: #1f2a37; --text: #d7dee8; --dim: #6b7a8c;
  --green: #14f195; --red: #ff5c7a; --amber: #ffb547; --violet: #9b6bff; --blue: #4fa3ff;
  --mono: 'JetBrains Mono', ui-monospace, monospace; --sans: 'Inter', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 13px/1.4 var(--sans); }
button, select, input { font: inherit; color: inherit; }
a { color: var(--blue); }
.dim { color: var(--dim); }
.up { color: var(--green); } .down { color: var(--red); } .warn { color: var(--amber); }

header { display: flex; align-items: center; gap: 24px; padding: 12px 18px; border-bottom: 1px solid var(--line); background: var(--panel); position: sticky; top: 0; z-index: 5; }
.brand { display: flex; align-items: center; gap: 8px; }
.brand h1 { font: 700 18px var(--mono); margin: 0; letter-spacing: -0.5px; }
.brand .sub { color: var(--dim); font-size: 12px; }
.stats { display: flex; gap: 18px; font-family: var(--mono); font-size: 12px; color: var(--dim); }
.stats b { color: var(--text); }
.right { margin-left: auto; display: flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 12px; }
header button, .controls button.ghost { background: var(--panel2); border: 1px solid var(--line); border-radius: 6px; padding: 5px 10px; cursor: pointer; }
header button:hover { border-color: var(--green); }

.controls { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding: 10px 18px; border-bottom: 1px solid var(--line); }
.controls label { display: flex; align-items: center; gap: 6px; color: var(--dim); font-size: 12px; }
.controls select, .controls input[type=number] { background: var(--panel2); border: 1px solid var(--line); border-radius: 6px; padding: 4px 6px; color: var(--text); }
.controls input[type=number] { width: 58px; }
.controls .chk { cursor: pointer; }
.controls .ghost { margin-left: auto; color: var(--dim); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; }
.seg button { background: transparent; border: 0; padding: 5px 11px; cursor: pointer; color: var(--dim); border-right: 1px solid var(--line); }
.seg button:last-child { border-right: 0; }
.seg button.on { background: rgba(20, 241, 149, .12); color: var(--green); }

.signalbar { display: flex; align-items: center; gap: 12px; padding: 8px 18px; border-bottom: 1px solid var(--line); background: linear-gradient(90deg, rgba(155,107,255,.07), transparent); min-height: 42px; }
.bell { background: transparent; border: 1px solid var(--violet); color: var(--violet); border-radius: 6px; padding: 4px 10px; cursor: pointer; white-space: nowrap; font-weight: 600; }
.badge { background: var(--violet); color: #fff; border-radius: 9px; padding: 0 6px; margin-left: 4px; font-size: 11px; }
.signals { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: thin; }
.sig { background: var(--panel2); border: 1px solid var(--line); border-radius: 6px; padding: 3px 9px; cursor: pointer; white-space: nowrap; font-family: var(--mono); font-size: 12px; animation: pop .5s ease; }
.sig small { color: var(--dim); }
@keyframes pop { from { transform: scale(.85); opacity: 0; } }

.help { margin: 12px 18px; padding: 12px 16px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; max-width: 900px; }
.help h3 { margin: 0 0 6px; } .help ul { margin: 0; padding-left: 18px; } .help li { margin: 3px 0; }

main { display: flex; align-items: flex-start; }
.tablewrap { flex: 1; overflow: auto; max-height: calc(100vh - 190px); }
table { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: 12px; }
th { position: sticky; top: 0; background: var(--panel); color: var(--dim); font-weight: 600; text-align: left; padding: 8px; border-bottom: 1px solid var(--line); white-space: nowrap; z-index: 1; }
th.sortable { cursor: pointer; } th.sortable:hover { color: var(--text); }
th.desc::after { content: ' ▼'; font-size: 9px; } th.asc::after { content: ' ▲'; font-size: 9px; }
td { padding: 6px 8px; border-bottom: 1px solid rgba(31, 42, 55, .6); white-space: nowrap; vertical-align: middle; }
td.num { text-align: right; } th.r { text-align: right; }
td.pm b { display: block; font-size: 12.5px; }
td.pm small { display: block; color: var(--dim); font-size: 10px; line-height: 1.1; }
.t-junk { color: var(--dim); border-color: var(--line); text-decoration: line-through; }
.sig .up, .sig .down { font-size: 11px; }
.dpm { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 4px 0 10px; }
.dpm div { background: var(--panel2); border-radius: 6px; padding: 6px 8px; font-family: var(--mono); }
.dpm small { display: block; color: var(--dim); font: 10px var(--sans); text-transform: uppercase; letter-spacing: .6px; }
.dpm b { font-size: 13px; }
body.compact td { padding: 4px 7px; }
body.compact th { padding: 6px 7px; }
body.compact .tok img, body.compact .tok .ph { width: 20px; height: 20px; }
body.compact .bs { width: 76px; }
body.compact .score { width: 48px; }
tbody tr { cursor: pointer; transition: background .2s; }
tbody tr:hover { background: var(--panel2); }
tbody tr.sel { background: rgba(79, 163, 255, .08); box-shadow: inset 2px 0 var(--blue); }
tbody tr.flash { animation: flash 1.4s ease-in-out infinite; box-shadow: inset 3px 0 var(--violet); }
@keyframes flash { 50% { background: rgba(155, 107, 255, .16); } }
td.empty { text-align: center; color: var(--dim); padding: 40px; }
sub { font-size: 9px; }

.tok { display: flex; align-items: center; gap: 8px; }
.tok img, .tok .ph { width: 24px; height: 24px; border-radius: 50%; background: var(--panel2); flex: none; }
.tok div { display: flex; flex-direction: column; line-height: 1.15; }
.tok small { color: var(--dim); font-size: 10px; font-family: var(--sans); }

.score { position: relative; width: 64px; height: 20px; border-radius: 4px; background: var(--panel2); overflow: hidden; }
.score i { position: absolute; inset: 0 auto 0 0; opacity: .28; background: currentColor; }
.score span { position: relative; display: block; text-align: center; font-weight: 700; line-height: 20px; }
.s-hot { color: var(--green); } .s-warm { color: #a6e86b; } .s-mid { color: var(--amber); } .s-cold { color: var(--dim); }

.tags { display: flex; gap: 4px; flex-wrap: wrap; }
.tags.nowrap { flex-wrap: nowrap; }
.tag { font: 600 9.5px var(--sans); letter-spacing: .3px; padding: 2px 5px; border-radius: 3px; border: 1px solid; }
.t-accumulating { color: var(--green); border-color: rgba(20,241,149,.4); background: rgba(20,241,149,.08); }
.t-breakout { color: var(--blue); border-color: rgba(79,163,255,.4); background: rgba(79,163,255,.08); }
.t-late { color: var(--amber); border-color: rgba(255,181,71,.4); }
.t-dumping, .t-risky { color: var(--red); border-color: rgba(255,92,122,.4); background: rgba(255,92,122,.07); }
.t-new { color: var(--violet); border-color: rgba(155,107,255,.4); }
.t-boosted { color: var(--dim); border-color: var(--line); }

.spark polyline { fill: none; stroke-width: 1.4; vector-effect: non-scaling-stroke; }
.spark polyline.up { stroke: var(--green); } .spark polyline.down { stroke: var(--red); }

.bs { position: relative; width: 104px; height: 16px; background: rgba(255,92,122,.35); border-radius: 3px; overflow: hidden; }
.bs i { position: absolute; inset: 0 auto 0 0; background: rgba(20,241,149,.45); }
.bs span { position: relative; display: block; text-align: center; font-size: 10.5px; line-height: 16px; }

.detail { width: 380px; flex: none; position: sticky; top: 56px; max-height: calc(100vh - 190px); overflow: auto; background: var(--panel); border-left: 1px solid var(--line); padding: 16px 18px; }
.detail .close { position: absolute; right: 10px; top: 8px; background: none; border: 0; font-size: 22px; color: var(--dim); cursor: pointer; }
.dh { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.dh img { width: 40px; height: 40px; border-radius: 50%; }
.dh h2 { margin: 0; font: 700 18px var(--mono); } .dh h2 small { font: 400 12px var(--sans); color: var(--dim); }
.mint { color: var(--dim); cursor: pointer; font-size: 11px; } .mint.copied { color: var(--green); }
.bigscore { margin-left: auto; margin-right: 22px; font: 700 30px var(--mono); }
.detail h3 { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--dim); margin: 16px 0 8px; }
.part { display: grid; grid-template-columns: 150px 1fr 54px; align-items: center; gap: 8px; font-size: 12px; margin: 5px 0; }
.part b { text-align: right; font-family: var(--mono); } .part b small { color: var(--dim); font-weight: 400; }
.pbar { height: 6px; background: var(--panel2); border-radius: 3px; overflow: hidden; } .pbar i { display: block; height: 100%; background: var(--green); }
.part.pen { color: var(--red); }
dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; margin: 0; font-size: 12px; }
dt { color: var(--dim); } dd { margin: 0; font-family: var(--mono); text-align: right; }
.bigspark svg { display: block; width: 100%; height: 60px; background: var(--panel2); border-radius: 6px; }
.risks { list-style: none; padding: 0; margin: 0; font-size: 12px; }
.risks li { padding: 5px 8px; border-left: 2px solid var(--line); margin-bottom: 4px; background: var(--panel2); }
.risks li.danger { border-color: var(--red); } .risks li.warn { border-color: var(--amber); } .risks li.good { border-color: var(--green); }
.risks small { color: var(--dim); }
.links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.links a { padding: 4px 9px; border: 1px solid var(--line); border-radius: 5px; text-decoration: none; font-size: 12px; background: var(--panel2); }
.links a:hover { border-color: var(--blue); }

footer { display: flex; align-items: center; gap: 16px; padding: 8px 18px; border-top: 1px solid var(--line); font-size: 11px; position: fixed; bottom: 0; left: 0; right: 0; background: var(--panel); }
.sources { display: flex; gap: 6px; flex-wrap: wrap; }
.src { font-family: var(--mono); padding: 1px 6px; border-radius: 3px; border: 1px solid var(--line); color: var(--dim); }
.src.ok { color: var(--green); border-color: rgba(20,241,149,.3); } .src.bad { color: var(--red); border-color: rgba(255,92,122,.4); }
body { padding-bottom: 36px; }

@media (max-width: 900px) {
  header { flex-wrap: wrap; gap: 10px; } .detail { position: fixed; inset: 0; width: auto; max-height: none; z-index: 10; }
}
