:root {
  --bg: #0a0c10;
  --panel: #0f1218;
  --card: #0f1218;
  --card-hover: #151a23;
  --line: #1c212c;
  --line-2: #262c39;
  --text: #e8eaf0;
  --muted: #7c8396;
  --dim: #565d6f;
  --green: #37e39b;
  --green-bg: rgba(55, 227, 155, .12);
  --red: #ff5f7e;
  --red-bg: rgba(255, 95, 126, .12);
  --yellow: #f5c84c;
  --blue: #5aa8ff;
  --blue-bg: rgba(90, 168, 255, .12);
  --purple: #b28cff;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 13px/1.35 Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input { font: inherit; color: var(--text); }
svg { flex: none; }

/* ---------- top bar ---------- */
.topbar {
  display: flex; align-items: center; gap: 16px;
  height: 46px; padding: 0 16px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; letter-spacing: -.01em; }
.live { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; color: var(--green); background: var(--green-bg); padding: 2px 7px; border-radius: 99px; }
.live i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: .3; } }
.tabs { display: none; gap: 4px; }
.tabs button { padding: 6px 10px; border-radius: 6px; color: var(--muted); font-weight: 600; }
.tabs button.active { background: var(--line-2); color: var(--text); }

/* ---------- board ---------- */
.board { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.col { display: flex; flex-direction: column; min-width: 0; min-height: 0; border-right: 1px solid var(--line); background: var(--panel); }
.col:last-child { border-right: 0; }
.col-head {
  display: flex; align-items: center; gap: 8px;
  height: 46px; padding: 0 12px 0 14px;
  border-bottom: 1px solid var(--line);
}
.col-head h2 { margin: 0; font-size: 14px; font-weight: 700; white-space: nowrap; }
.paused-badge { display: none; font-size: 10.5px; font-weight: 700; color: var(--yellow); background: rgba(245,200,76,.12); padding: 2px 6px; border-radius: 4px; }
.col.paused .paused-badge { display: inline-block; }
.search {
  margin-left: auto; display: flex; align-items: center; gap: 6px;
  background: var(--bg); border: 1px solid var(--line-2); border-radius: 7px;
  padding: 0 8px; height: 28px; width: 150px; min-width: 80px;
}
.search svg { width: 13px; height: 13px; stroke: var(--dim); fill: none; stroke-width: 2.2; }
.search input { flex: 1; min-width: 0; background: none; border: 0; outline: none; font-size: 12px; }
.search input::placeholder { color: var(--dim); }
.count { font: 500 11.5px var(--mono); color: var(--muted); background: var(--bg); border: 1px solid var(--line-2); border-radius: 6px; padding: 4px 7px; min-width: 32px; text-align: center; }
.icon-btn { width: 28px; height: 28px; border-radius: 7px; display: grid; place-items: center; color: var(--muted); }
.icon-btn:hover, .icon-btn.on { background: var(--line-2); color: var(--text); }
.icon-btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.icon-btn.has-filter { color: var(--green); }
.seg { display: flex; background: var(--bg); border: 1px solid var(--line-2); border-radius: 7px; padding: 2px; }
.seg button { padding: 2px 8px; border-radius: 5px; font-weight: 700; font-size: 12px; color: var(--muted); }
.seg button.active { background: var(--line-2); color: var(--green); }

.filters { display: none; padding: 10px 14px; border-bottom: 1px solid var(--line); background: #0c0f14; gap: 10px 14px; flex-wrap: wrap; align-items: center; }
.col.show-filters .filters { display: flex; }
.filters label { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; }
.filters input[type=number] { width: 78px; background: var(--bg); border: 1px solid var(--line-2); border-radius: 6px; padding: 4px 6px; outline: none; }
.filters input[type=checkbox] { accent-color: var(--green); }
.filters .reset { margin-left: auto; color: var(--muted); font-size: 12px; text-decoration: underline; }

.list { flex: 1; overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.empty { padding: 40px 20px; text-align: center; color: var(--dim); }
.empty .spinner { width: 20px; height: 20px; border: 2px solid var(--line-2); border-top-color: var(--green); border-radius: 50%; margin: 0 auto 10px; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- token card ---------- */
.card {
  display: grid; grid-template-columns: 76px minmax(0, 1fr) auto;
  gap: 4px 12px; padding: 12px 12px 11px 14px;
  border-bottom: 1px solid var(--line);
  position: relative;
  cursor: pointer;
}
.card:hover { background: var(--card-hover); }
.card.enter { animation: enter .7s ease-out; }
@keyframes enter { from { background: rgba(55, 227, 155, .10); } to { background: transparent; } }

.av-wrap { grid-column: 1; grid-row: 1 / span 2; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.av {
  --p: 0; --ring: var(--green);
  width: 70px; height: 70px; border-radius: 12px; padding: 3px; position: relative;
  background: conic-gradient(var(--ring) calc(var(--p) * 1%), var(--line-2) 0);
}
.av-in { width: 100%; height: 100%; border-radius: 9px; overflow: hidden; background: #1a1f2a; display: grid; place-items: center; font-weight: 700; font-size: 26px; color: var(--muted); }
.av-in img { width: 100%; height: 100%; object-fit: cover; display: block; }
.av .lp { position: absolute; right: -5px; bottom: -5px; width: 19px; height: 19px; border-radius: 50%; border: 2px solid var(--panel); display: grid; place-items: center; font-size: 9px; font-weight: 800; color: #08110c; }
.lp.pump { background: var(--green); }
.lp.bonk { background: #ff9f2e; }
.lp.other { background: var(--blue); }
.short-ca { font: 500 10.5px var(--mono); color: var(--dim); white-space: nowrap; }
.short-ca:hover { color: var(--text); }

.mid { grid-column: 2; grid-row: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.l1 { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.sym { flex-shrink: 0; font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 60%; }
.nm { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.copy { color: var(--dim); display: inline-grid; place-items: center; }
.copy:hover { color: var(--text); }
.copy svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2; }

.clones { flex: none; font-size: 10.5px; font-weight: 700; color: var(--purple); background: rgba(178,140,255,.12); padding: 1px 5px; border-radius: 4px; white-space: nowrap; }

.l2 { display: flex; align-items: center; gap: 9px; color: var(--muted); white-space: nowrap; overflow: hidden; }
.age { color: var(--green); font-weight: 600; min-width: 22px; }
.soc { display: inline-grid; place-items: center; color: var(--muted); }
.soc:hover { color: var(--text); }
.soc svg { width: 14px; height: 14px; }
.soc.x svg, .soc.tg svg { fill: currentColor; }
.soc.web svg, .soc.find svg { fill: none; stroke: currentColor; stroke-width: 2; }
.meta { display: inline-flex; align-items: center; gap: 3px; color: var(--muted); font-weight: 500; }
.meta svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; }
.meta b { color: var(--text); font-weight: 600; }

.l3 { display: flex; gap: 8px; align-items: center; font-size: 12px; color: var(--blue); white-space: nowrap; overflow: hidden; min-height: 16px; }
.l3 .desc { color: var(--dim); overflow: hidden; text-overflow: ellipsis; }

.right { grid-column: 3; grid-row: 1; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; white-space: nowrap; }
.kv { color: var(--muted); font-size: 12px; }
.kv b { font-weight: 700; color: var(--text); }
.kv.mc b { font-size: 16px; color: var(--blue); }
.kv.mc.hot b { color: var(--yellow); }
.kv.vol b { font-size: 15px; }
.flash-up { animation: fup .9s; }
.flash-dn { animation: fdn .9s; }
@keyframes fup { from { color: var(--green); } }
@keyframes fdn { from { color: var(--red); } }
.tx { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); }
.tx b { color: var(--text); }
.bsbar { width: 34px; height: 3px; border-radius: 3px; background: var(--red); overflow: hidden; }
.bsbar i { display: block; height: 100%; background: var(--green); }

.foot { grid-column: 2 / span 2; grid-row: 2; display: flex; align-items: center; gap: 6px; min-width: 0; }
.pills { display: flex; gap: 5px; flex: 1; min-width: 0; overflow: hidden; }
.pill {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 11.5px; font-weight: 600; white-space: nowrap;
  padding: 2px 6px; border-radius: 5px; border: 1px solid var(--line-2); color: var(--muted);
}
.pill svg { width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-width: 2.2; }
.pill.g { color: var(--green); border-color: rgba(55,227,155,.25); }
.pill.r { color: var(--red); border-color: rgba(255,95,126,.28); }
.pill.b { color: var(--blue); border-color: rgba(90,168,255,.28); }
.buy {
  display: inline-flex; align-items: center; gap: 4px; flex: none;
  padding: 5px 11px; border-radius: 99px; font-weight: 700; font-size: 12px;
  background: var(--green-bg); color: var(--green); border: 1px solid rgba(55,227,155,.25);
}
.buy:hover { background: var(--green); color: #07130d; }
.buy svg { width: 12px; height: 12px; fill: currentColor; }

/* progress bar under almost-bonded cards */
.prog { grid-column: 1 / -1; grid-row: 3; height: 3px; background: var(--line-2); border-radius: 3px; overflow: hidden; margin-top: 4px; display: none; }
.prog i { display: block; height: 100%; background: linear-gradient(90deg, var(--green), var(--yellow)); }
.col[data-col=almost] .prog { display: block; }

/* ---------- status bar ---------- */
.statusbar {
  height: 32px; display: flex; align-items: center; gap: 16px; padding: 0 14px;
  border-top: 1px solid var(--line); background: var(--panel); color: var(--muted); font-size: 12px; white-space: nowrap;
}
.statusbar .spacer { flex: 1; }
.statusbar .muted { color: var(--dim); }
.conn { display: inline-flex; align-items: center; gap: 6px; }
.conn i { width: 7px; height: 7px; border-radius: 50%; background: var(--yellow); }
.conn.ok i { background: var(--green); }
.conn.ok b { color: var(--green); }
.conn.bad i { background: var(--red); }
.conn b { font-weight: 600; }
.sol { color: var(--text); font-weight: 600; }

.toast { position: fixed; left: 50%; bottom: 46px; transform: translateX(-50%) translateY(10px); opacity: 0; pointer-events: none;
  background: #1d2330; border: 1px solid var(--line-2); padding: 7px 12px; border-radius: 8px; font-weight: 600; transition: .18s; }
.toast.show { opacity: 1; transform: translateX(-50%); }

/* ---------- responsive ---------- */
@media (max-width: 1280px) {
  .card { grid-template-columns: 62px minmax(0, 1fr) auto; gap: 4px 10px; }
  .av { width: 58px; height: 58px; }
  .search { width: 110px; }
}
@media (max-width: 900px) {
  .board { grid-template-columns: 1fr; }
  .col { display: none; border-right: 0; }
  .col.mobile-active { display: flex; }
  .tabs { display: flex; }
  .brand > span:first-of-type { display: none; }
  .hide-sm { display: none; }
  .topbar { padding: 0 16px; gap: 10px; }
  .col-head { padding: 0 16px; }
  .col-head h2 { display: none; }
  .search { width: auto; flex: 1; margin-left: 0; }
  .card { padding: 12px 16px; }
}
@media (max-width: 420px) {
  .card { grid-template-columns: 52px minmax(0, 1fr) auto; }
  .av { width: 50px; height: 50px; }
  .short-ca { display: none; }
  .tabs button { padding: 6px 7px; font-size: 12px; }
}
