:root {
  --bg: #04060b;
  --panel: rgba(255, 255, 255, 0.028);
  --border: rgba(255, 255, 255, 0.075);
  --border-strong: rgba(255, 255, 255, 0.15);
  --text: #eef3fa;
  --muted: #8b98ae;
  --muted-2: #5b6a84;
  --accent: #2fb4ff;
  --accent-2: #8b5cf6;
  --cyan: #22d3ee;
  --good: #3ddc97;
  --bad: #ff6b6b;
  --warn: #ffc24b;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --radius: 18px;
  --shadow: 0 22px 55px -26px rgba(0, 0, 0, 0.9);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.55 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection { background: rgba(47, 180, 255, 0.35); }

:focus-visible {
  outline: 2px solid rgba(47, 180, 255, 0.7);
  outline-offset: 2px;
  border-radius: 8px;
}

.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.right { text-align: right; }
button { font: inherit; color: inherit; }

.wrap { max-width: 1640px; margin-left: auto; margin-right: auto; padding-left: 28px; padding-right: 28px; }

/* ---------- фон ---------- */

.bg-grid {
  position: fixed; inset: 0; z-index: -3; pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 0%, transparent 78%);
}

.bg-glow {
  position: fixed; inset: -10%; z-index: -2; pointer-events: none;
  background:
    radial-gradient(760px 440px at 10% -4%, rgba(47, 180, 255, 0.13), transparent 65%),
    radial-gradient(680px 480px at 94% 2%, rgba(139, 92, 246, 0.1), transparent 62%),
    radial-gradient(980px 760px at 50% 125%, rgba(47, 180, 255, 0.05), transparent 70%);
}

.aurora {
  position: fixed; z-index: -1; pointer-events: none;
  border-radius: 50%; filter: blur(90px); opacity: 0.55;
  will-change: transform;
}
.aurora.a1 {
  width: 620px; height: 620px; left: -170px; top: -190px;
  background: radial-gradient(circle, rgba(47, 180, 255, 0.16), transparent 65%);
  animation: drift1 26s ease-in-out infinite alternate;
}
.aurora.a2 {
  width: 560px; height: 560px; right: -140px; top: -120px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.15), transparent 65%);
  animation: drift2 32s ease-in-out infinite alternate;
}
.aurora.a3 {
  width: 480px; height: 480px; left: 38%; bottom: -260px;
  background: radial-gradient(circle, rgba(61, 220, 151, 0.07), transparent 65%);
  animation: drift3 36s ease-in-out infinite alternate;
}
@keyframes drift1 {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(60px, 40px, 0) scale(1.12); }
}
@keyframes drift2 {
  from { transform: translate3d(0, 0, 0) scale(1.05); }
  to { transform: translate3d(-70px, 50px, 0) scale(0.95); }
}
@keyframes drift3 {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(-40px, -30px, 0) scale(1.1); }
}

/* ---------- шапка ---------- */

.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(4, 6, 11, 0.78);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.topbar-inner {
  position: relative;
  max-width: 1640px; margin: 0 auto; padding: 13px 28px 11px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}

.live-line {
  height: 2px; opacity: 0.55;
  background: linear-gradient(90deg, transparent, rgba(47, 180, 255, 0.75), rgba(139, 92, 246, 0.75), transparent);
  background-size: 220% 100%;
  animation: live-line 7s linear infinite;
}
@keyframes live-line {
  from { background-position: 200% 0; }
  to { background-position: -20% 0; }
}

.brand { display: flex; align-items: center; gap: 14px; }

.radar {
  position: relative; width: 44px; height: 44px; border-radius: 50%; flex: none;
  border: 1px solid rgba(47, 180, 255, 0.45);
  background: radial-gradient(circle at center, rgba(47, 180, 255, 0.24), rgba(4, 6, 11, 0.92) 74%);
  box-shadow: 0 0 26px -4px rgba(47, 180, 255, 0.55), inset 0 0 14px rgba(47, 180, 255, 0.22);
  overflow: hidden;
}
.radar-ring {
  position: absolute; inset: 10px; border-radius: 50%;
  border: 1px solid rgba(47, 180, 255, 0.28);
}
.radar-sweep {
  position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0.7turn, rgba(47, 180, 255, 0.6) 0.99turn, transparent 1turn);
  animation: sweep 3s linear infinite;
}
.radar-blip {
  position: absolute; top: 12px; left: 29px; width: 4px; height: 4px; border-radius: 50%;
  background: var(--good); box-shadow: 0 0 9px var(--good);
  animation: blip 3s ease-out infinite;
}
@keyframes sweep { to { transform: rotate(1turn); } }
@keyframes blip {
  0%, 12% { opacity: 1; }
  40%, 100% { opacity: 0; }
}

.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-title {
  font-weight: 800; letter-spacing: 0.16em; font-size: 17px;
  background: linear-gradient(92deg, #fff 0%, #a5dcff 55%, #c0a9ff 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.brand-sub { margin-top: 2px; font-size: 11px; color: var(--muted-2); letter-spacing: 0.22em; text-transform: uppercase; }

.top-right { display: flex; align-items: center; gap: 12px; }

.icon-btn {
  width: 34px; height: 34px; border-radius: 11px; cursor: pointer;
  display: grid; place-items: center; padding: 0; flex: none;
  background: rgba(255, 255, 255, 0.03); border: 1px solid var(--border); color: var(--muted);
  transition: color 0.15s, border-color 0.15s, opacity 0.15s, box-shadow 0.15s;
}
.icon-btn:hover { color: var(--text); border-color: var(--border-strong); box-shadow: 0 0 16px -6px rgba(47, 180, 255, 0.6); }
.icon-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn.is-off { opacity: 0.45; }
.icon-btn.is-blocked { opacity: 1; color: var(--warn); border-color: rgba(255, 194, 75, 0.55); box-shadow: 0 0 16px -6px rgba(255, 194, 75, 0.6); }

.status {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px; border-radius: 999px;
  border: 1px solid var(--border); background: rgba(255, 255, 255, 0.03);
  font-size: 12px; color: var(--muted); white-space: nowrap;
}
.status .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); flex: none; }
.status[data-state="live"] { color: #c4f4de; border-color: rgba(61, 220, 151, 0.38); background: rgba(61, 220, 151, 0.09); }
.status[data-state="live"] .dot { background: var(--good); animation: pulse 1.8s infinite; }
.status[data-state="connecting"] .dot { background: var(--warn); animation: pulse 1.1s infinite; }
.status[data-state="down"] { color: #ffc9c9; border-color: rgba(255, 107, 107, 0.38); background: rgba(255, 107, 107, 0.09); }
.status[data-state="down"] .dot { background: var(--bad); animation: pulse 1.1s infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 currentColor; opacity: 1; }
  70% { box-shadow: 0 0 0 7px transparent; opacity: 0.85; }
  100% { box-shadow: 0 0 0 0 transparent; opacity: 1; }
}

.clock { color: var(--muted); font-size: 13px; letter-spacing: 0.08em; }

/* ---------- тикер ---------- */

.ticker {
  max-width: 1640px; margin: 12px auto 0; padding: 0 28px;
  display: flex; align-items: center; gap: 12px;
}
.ticker-label {
  flex: none; display: inline-flex; align-items: center; gap: 7px;
  font-size: 10px; font-weight: 800; letter-spacing: 0.2em; color: var(--muted);
  border: 1px solid var(--border); border-radius: 9px; padding: 6px 11px;
  background: rgba(255, 255, 255, 0.02); text-transform: uppercase;
}
.ticker-label::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--good); box-shadow: 0 0 8px var(--good); animation: pulse 1.8s infinite;
}
.ticker-view {
  flex: 1; min-width: 0; overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.ticker-track {
  display: inline-flex; gap: 34px; white-space: nowrap; padding: 7px 0;
  animation: marquee 48s linear infinite; will-change: transform;
}
.ticker:hover .ticker-track { animation-play-state: paused; }
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.tick-item { display: inline-flex; align-items: baseline; gap: 8px; font-size: 12.5px; }
.tick-sym { font-weight: 800; letter-spacing: 0.03em; }
.tick-price { color: var(--muted); }
.tick-new { color: var(--good); font-weight: 700; font-size: 11px; letter-spacing: 0.08em; }

/* ---------- статистика ---------- */

.page { padding-bottom: 6px; }

.stats {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px;
  margin-top: 16px;
}

.stat {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015));
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 15px 16px 13px; box-shadow: var(--shadow);
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
  animation: fade-up 0.5s ease both;
}
.stat:nth-child(2) { animation-delay: 0.04s; }
.stat:nth-child(3) { animation-delay: 0.08s; }
.stat:nth-child(4) { animation-delay: 0.12s; }
.stat:nth-child(5) { animation-delay: 0.16s; }
.stat:nth-child(6) { animation-delay: 0.2s; }
.stat:hover { transform: translateY(-2px); border-color: var(--border-strong); box-shadow: 0 26px 60px -26px rgba(0, 0, 0, 0.95), 0 0 24px -12px rgba(47, 180, 255, 0.5); }

@keyframes fade-up {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.stat-accent { position: absolute; top: 0; left: 0; right: 0; height: 2px; }
.stat-accent.a-blue { background: linear-gradient(90deg, rgba(47, 180, 255, 0.95), transparent); }
.stat-accent.a-violet { background: linear-gradient(90deg, rgba(139, 92, 246, 0.95), transparent); }
.stat-accent.a-cyan { background: linear-gradient(90deg, rgba(34, 211, 238, 0.95), transparent); }
.stat-accent.a-red { background: linear-gradient(90deg, rgba(255, 107, 107, 0.95), transparent); }
.stat-accent.a-green { background: linear-gradient(90deg, rgba(61, 220, 151, 0.95), transparent); }
.stat-accent.a-amber { background: linear-gradient(90deg, rgba(255, 194, 75, 0.95), transparent); }

.stat-icon {
  position: absolute; top: 12px; right: 12px;
  width: 30px; height: 30px; border-radius: 10px;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.045); border: 1px solid var(--border);
  box-shadow: 0 0 14px -6px currentColor;
}
.stat-icon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.stat-icon.c-blue { color: var(--accent); }
.stat-icon.c-violet { color: var(--accent-2); }
.stat-icon.c-cyan { color: var(--cyan); }
.stat-icon.c-red { color: var(--bad); }
.stat-icon.c-green { color: var(--good); }
.stat-icon.c-amber { color: var(--warn); }

.stat-value { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.stat-label { margin-top: 6px; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.12em; }

/* ---------- панели ---------- */

.panel {
  position: relative;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.015));
  border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.panel::before {
  content: ""; position: absolute; top: 0; left: 22px; right: 22px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.16), transparent);
  pointer-events: none;
}

.panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 14px 18px; border-bottom: 1px solid var(--border);
}
.panel-head h2 {
  margin: 0; font-size: 12px; font-weight: 700; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--muted);
}
.panel-head .muted { font-size: 12px; }
#activityMeta { white-space: nowrap; }

.activity { margin-top: 14px; padding-bottom: 6px; }
.activity .panel-head { border-bottom: none; padding-bottom: 4px; }
#spark { display: block; width: 100%; height: 84px; }

/* ---------- тулбар ---------- */

.toolbar {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin-top: 16px;
}

.search { position: relative; flex: 1 1 340px; min-width: 220px; }
.search svg {
  position: absolute; left: 13px; top: 50%; width: 16px; height: 16px;
  transform: translateY(-50%); fill: none; stroke: var(--muted-2); stroke-width: 2; stroke-linecap: round;
}
.search input {
  width: 100%; padding: 11px 14px 11px 38px;
  background: rgba(255, 255, 255, 0.03); border: 1px solid var(--border); border-radius: 13px;
  color: var(--text); outline: none; font: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.search input:focus { border-color: rgba(47, 180, 255, 0.55); box-shadow: 0 0 0 3px rgba(47, 180, 255, 0.13); }
.search input::placeholder { color: var(--muted-2); }

.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  padding: 9px 16px; border-radius: 999px; cursor: pointer;
  background: rgba(255, 255, 255, 0.03); border: 1px solid var(--border); color: var(--muted);
  transition: color 0.15s, border-color 0.15s, background 0.15s, box-shadow 0.15s, transform 0.15s;
}
.chip:hover { color: var(--text); border-color: var(--border-strong); transform: translateY(-1px); }
.chip.is-active {
  color: #dcf2ff; border-color: rgba(47, 180, 255, 0.6);
  background: linear-gradient(180deg, rgba(47, 180, 255, 0.2), rgba(47, 180, 255, 0.07));
  box-shadow: 0 0 18px -6px rgba(47, 180, 255, 0.55);
}

.switch { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; color: var(--muted); font-size: 13px; user-select: none; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch-track {
  width: 38px; height: 21px; border-radius: 999px; padding: 2px; flex: none;
  background: rgba(255, 255, 255, 0.08); border: 1px solid var(--border);
  transition: background 0.18s, border-color 0.18s;
}
.switch-thumb {
  display: block; width: 15px; height: 15px; border-radius: 50%;
  background: var(--muted-2); transition: transform 0.18s, background 0.18s;
}
.switch input:checked + .switch-track { background: rgba(47, 180, 255, 0.28); border-color: rgba(47, 180, 255, 0.55); }
.switch input:checked + .switch-track .switch-thumb { transform: translateX(17px); background: var(--accent); }

/* ---------- раскладка ---------- */

.layout {
  display: grid; grid-template-columns: minmax(0, 1fr) 396px; gap: 16px;
  margin-top: 16px; align-items: start;
}

/* ---------- лента ---------- */

.feed { overflow: hidden; }
.feed::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; z-index: 3;
  background: linear-gradient(180deg, rgba(47, 180, 255, 0.65), rgba(139, 92, 246, 0.45) 55%, transparent);
  opacity: 0.8;
}

.table-wrap { position: relative; overflow: auto; max-height: calc(100vh - 380px); min-height: 260px; }

table { width: 100%; border-collapse: collapse; }

thead th {
  position: sticky; top: 0; z-index: 2;
  padding: 11px 16px; text-align: left;
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase; color: var(--muted-2);
  background: rgba(7, 10, 16, 0.95); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

tbody td {
  padding: 12px 16px; border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  vertical-align: middle;
}
tbody tr { cursor: pointer; transition: background 0.12s; }
tbody tr:hover { background: rgba(47, 180, 255, 0.05); }
tbody tr.is-selected { background: rgba(47, 180, 255, 0.09); box-shadow: inset 2px 0 0 var(--accent); }
tbody tr:last-child td { border-bottom: none; }

@keyframes flash {
  0% { background-color: rgba(47, 180, 255, 0.22); }
  100% { background-color: transparent; }
}
@keyframes slide-in {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: none; }
}
tbody tr.is-new { animation: slide-in 0.35s ease-out; }
tbody tr.is-new td { animation: flash 1.2s ease-out; }
tbody tr.is-new.is-good td { animation-name: flash-good; }
@keyframes flash-good {
  0% { background-color: rgba(61, 220, 151, 0.22); }
  100% { background-color: transparent; }
}

.age { color: var(--muted); white-space: nowrap; font-size: 12.5px; }
.age.is-fresh { color: #c9f5e3; }
.age.is-fresh::before {
  content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--good); margin-right: 8px; vertical-align: 1px;
  box-shadow: 0 0 9px var(--good); animation: pulse 1.6s infinite;
}

.token-cell { display: flex; align-items: center; gap: 11px; min-width: 150px; }
.token-avatar {
  position: relative; width: 30px; height: 30px; border-radius: 10px; flex: none;
  background: linear-gradient(135deg, rgba(47, 180, 255, 0.3), rgba(139, 92, 246, 0.3));
  display: grid; place-items: center; font-weight: 800; font-size: 13px; color: #d8ecff;
  overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 14px -6px rgba(47, 180, 255, 0.55);
  transition: transform 0.15s;
}
tbody tr:hover .token-avatar { transform: scale(1.07); }
.token-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.token-names { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.token-sym { font-weight: 700; letter-spacing: 0.015em; font-size: 13.5px; }
.token-name { font-size: 11.5px; color: var(--muted); max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.addr { font-size: 12px; color: #9fb0c8; cursor: pointer; transition: color 0.12s; }
a.addr { text-decoration: none; }
.addr:hover { color: var(--accent); }
.addr-wrap { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.addr-wrap .addr { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.copy-btn.mini { width: 20px; height: 20px; border-radius: 6px; }
.copy-btn.mini svg { width: 11px; height: 11px; }
.addr-admin.is-renounced { color: var(--good); cursor: default; }
.addr-admin.is-live { color: var(--warn); }
.addr-admin.is-unknown { color: var(--muted-2); cursor: default; }

.pct { font-weight: 700; white-space: nowrap; }
.pct.is-up { color: var(--good); }
.pct.is-down { color: var(--bad); }
.pct.is-flat { color: var(--muted-2); }
.pct.is-warn { color: var(--warn); }

.flags { display: flex; gap: 5px; flex-wrap: wrap; }
.flag {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 7px; letter-spacing: 0.07em;
  border: 1px solid var(--border); color: var(--muted); background: rgba(255, 255, 255, 0.03);
  text-transform: uppercase; white-space: nowrap;
}
.flag:not(.f-dim)::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.flag.f-bad { color: #ffbcbc; border-color: rgba(255, 107, 107, 0.42); background: rgba(255, 107, 107, 0.12); }
.flag.f-good { color: #a9f0cf; border-color: rgba(61, 220, 151, 0.42); background: rgba(61, 220, 151, 0.1); }
.flag.f-warn { color: #ffe1a1; border-color: rgba(255, 194, 75, 0.42); background: rgba(255, 194, 75, 0.1); }
.flag.f-dim { color: var(--muted-2); }

.empty { display: none; padding: 64px 20px; text-align: center; color: var(--muted); }
.empty.is-visible { display: block; }
.empty-radar {
  width: 88px; height: 88px; margin: 0 auto 20px; border-radius: 50%;
  border: 1px solid rgba(47, 180, 255, 0.38); position: relative;
  background: radial-gradient(circle, rgba(47, 180, 255, 0.2), transparent 70%);
  box-shadow: 0 0 34px -8px rgba(47, 180, 255, 0.6);
}
.empty-radar span {
  position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0.75turn, rgba(47, 180, 255, 0.55) 0.99turn, transparent 1turn);
  animation: sweep 2.6s linear infinite;
}

/* ---------- карточка: вкладки ---------- */

.tabs {
  display: flex; gap: 4px; padding: 12px 18px 0;
  border-bottom: 1px solid var(--border);
}
.tab {
  flex: 1; background: transparent; border: none; cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  color: var(--muted); padding: 9px 6px 11px;
  font-size: 12px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase;
  transition: color 0.15s, border-color 0.15s;
}
.tab:hover { color: var(--text); }
.tab.is-active {
  color: var(--text); border-color: var(--accent);
  text-shadow: 0 0 18px rgba(47, 180, 255, 0.6);
}

.detail { position: sticky; top: 96px; max-height: calc(100vh - 116px); display: flex; flex-direction: column; }
.detail-body { overflow: auto; padding: 18px; }
.detail-body:not([hidden]) { animation: tab-in 0.25s ease; }
@keyframes tab-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.detail-placeholder { text-align: center; color: var(--muted-2); padding: 48px 10px; }
.ph-mark { font-size: 30px; color: rgba(47, 180, 255, 0.55); margin-bottom: 12px; }

.detail-hero { display: flex; gap: 13px; align-items: center; margin-bottom: 14px; }
.detail-avatar {
  position: relative; width: 54px; height: 54px; border-radius: 15px; flex: none; overflow: hidden;
  background: linear-gradient(135deg, rgba(47, 180, 255, 0.32), rgba(139, 92, 246, 0.32));
  display: grid; place-items: center; font-size: 21px; font-weight: 800; color: #d5ecff;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 8px 22px -10px rgba(47, 180, 255, 0.7);
}
.detail-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.detail-sym { font-size: 19px; font-weight: 800; line-height: 1.15; word-break: break-word; letter-spacing: 0.01em; }
.detail-name { color: var(--muted); font-size: 13px; margin-top: 2px; }
.detail-when { color: var(--muted-2); font-size: 12px; margin-top: 4px; }

.detail-flags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 4px; }

.detail-section { margin-top: 18px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, 0.06); }
.detail-section:first-of-type { border-top: none; margin-top: 10px; padding-top: 0; }
.detail-section > h3 {
  margin: 0 0 10px; font-size: 10.5px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted-2);
}
.kv { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 8px 12px; font-size: 13px; margin: 0; }
.kv dt { color: var(--muted-2); }
.kv dd { margin: 0; word-break: break-all; min-width: 0; }

.copy-row { display: flex; align-items: center; gap: 7px; min-width: 0; }
.copy-row .addr { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.copy-btn {
  flex: none; width: 24px; height: 24px; border-radius: 7px; cursor: pointer;
  display: grid; place-items: center; padding: 0;
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--border); color: var(--muted);
  transition: color 0.13s, border-color 0.13s, background 0.13s, transform 0.13s;
}
.copy-btn:hover { color: var(--accent); border-color: rgba(47, 180, 255, 0.5); background: rgba(47, 180, 255, 0.1); transform: scale(1.08); }
.copy-btn svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.links { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.links a {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 15px; border-radius: 11px; text-decoration: none; font-size: 12.5px; font-weight: 600;
  border: 1px solid rgba(47, 180, 255, 0.35); background: linear-gradient(180deg, rgba(47, 180, 255, 0.14), rgba(47, 180, 255, 0.05)); color: #d9efff;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.links a:hover { border-color: rgba(47, 180, 255, 0.7); box-shadow: 0 0 20px -8px rgba(47, 180, 255, 0.8); transform: translateY(-1px); }

.desc {
  margin-top: 6px; padding: 12px 14px; border-radius: 12px; font-size: 12.5px; line-height: 1.55;
  background: rgba(255, 255, 255, 0.025); border: 1px solid var(--border); color: #c3d0e2;
  white-space: pre-wrap; word-break: break-word; max-height: 160px; overflow: auto;
}

.ghost {
  padding: 6px 12px; border-radius: 10px; cursor: pointer; font-size: 12px;
  background: transparent; border: 1px solid var(--border); color: var(--muted);
  transition: color 0.13s, border-color 0.13s, opacity 0.13s;
}
.ghost:hover { color: var(--text); border-color: var(--border-strong); }
.ghost:disabled { opacity: 0.45; cursor: wait; }

/* ---------- цена и график ---------- */

.price-top { display: flex; align-items: baseline; gap: 12px; margin: 2px 0 10px; flex-wrap: wrap; }
.price-now { font-size: 24px; font-weight: 800; letter-spacing: -0.01em; }
.price-chg { font-size: 13px; font-weight: 700; }
.tf-row { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.tf-row button {
  padding: 6px 11px; border-radius: 9px; cursor: pointer;
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.04em;
  background: rgba(255, 255, 255, 0.03); border: 1px solid var(--border); color: var(--muted);
  transition: color 0.13s, border-color 0.13s, background 0.13s;
}
.tf-row button:hover { color: var(--text); border-color: var(--border-strong); }
.tf-row button.is-active {
  color: #dcf2ff; border-color: rgba(47, 180, 255, 0.55); background: rgba(47, 180, 255, 0.14);
}
.chart-wrap { position: relative; }
#priceChart { display: block; width: 100%; height: 170px; cursor: crosshair; }
.chart-empty {
  position: absolute; inset: 0; display: grid; place-items: center; text-align: center;
  color: var(--muted-2); font-size: 12.5px; line-height: 1.6; padding: 0 20px;
  background: rgba(255, 255, 255, 0.015); border: 1px dashed var(--border); border-radius: 12px;
}
.chart-empty[hidden] { display: none; }

/* ---------- холдеры ---------- */

.holders-body { display: flex; flex-direction: column; overflow: hidden; }
.holders-head {
  position: sticky; top: 0; z-index: 2;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 2px 0 12px;
  background: linear-gradient(180deg, rgba(9, 12, 19, 0.97), rgba(9, 12, 19, 0.85));
}
.holders-meta { font-size: 12px; }
.holders-summary {
  border: 1px solid var(--border); border-radius: 13px;
  background: rgba(255, 255, 255, 0.02);
  padding: 12px 14px; margin-bottom: 12px;
}
.conc { display: grid; grid-template-columns: 64px 1fr 52px; gap: 10px; align-items: center; margin: 7px 0; font-size: 12px; }
.conc:first-child { margin-top: 0; }
.conc:last-child { margin-bottom: 0; }
.conc-label { color: var(--muted-2); }
.conc-bar { height: 6px; border-radius: 4px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.conc-bar > span {
  display: block; height: 100%; width: 0; border-radius: 4px;
  transition: width 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.conc-bar.b-low > span { background: linear-gradient(90deg, rgba(61, 220, 151, 0.9), rgba(61, 220, 151, 0.4)); }
.conc-bar.b-mid > span { background: linear-gradient(90deg, rgba(255, 194, 75, 0.9), rgba(255, 194, 75, 0.4)); }
.conc-bar.b-high > span { background: linear-gradient(90deg, rgba(255, 107, 107, 0.9), rgba(255, 107, 107, 0.4)); }
.conc-val { text-align: right; font-weight: 700; }
.holders-list { display: flex; flex-direction: column; gap: 8px; padding-bottom: 4px; }
.holders-list.no-anim .holder { animation: none; }
.holder {
  display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 10px; align-items: center;
  padding: 10px 12px; border: 1px solid var(--border); border-radius: 13px;
  background: rgba(255, 255, 255, 0.02);
  transition: border-color 0.15s, transform 0.15s, background 0.15s;
  animation: holder-in 0.3s ease both;
}
.holder:hover { border-color: var(--border-strong); background: rgba(47, 180, 255, 0.04); transform: translateX(2px); }
@keyframes holder-in {
  from { opacity: 0; transform: translateX(-8px); }
  to { opacity: 1; transform: none; }
}
.holder-rank {
  width: 27px; height: 27px; border-radius: 9px;
  display: grid; place-items: center; font-size: 12px; font-weight: 800;
  color: var(--muted); background: rgba(255, 255, 255, 0.05); border: 1px solid var(--border);
}
.holder:nth-child(1) .holder-rank { color: #ffe1a1; border-color: rgba(255, 194, 75, 0.5); background: rgba(255, 194, 75, 0.1); box-shadow: 0 0 14px -6px rgba(255, 194, 75, 0.8); }
.holder:nth-child(2) .holder-rank { color: #dbe4f0; border-color: rgba(219, 228, 240, 0.35); background: rgba(219, 228, 240, 0.07); }
.holder:nth-child(3) .holder-rank { color: #f0b48a; border-color: rgba(240, 180, 138, 0.4); background: rgba(240, 180, 138, 0.08); }
.holder-main { min-width: 0; }
.holder-addr { display: flex; align-items: center; gap: 7px; font-size: 12.5px; min-width: 0; }
.holder-addr .addr { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.holder-badges { display: inline-flex; gap: 4px; flex: none; }
.holder-bar { height: 5px; border-radius: 3px; background: rgba(255, 255, 255, 0.07); margin-top: 8px; overflow: hidden; }
.holder-bar > span {
  display: block; height: 100%; width: 0; border-radius: 3px;
  background: linear-gradient(90deg, rgba(47, 180, 255, 0.85), rgba(139, 92, 246, 0.85));
  transition: width 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.holder-bal { text-align: right; min-width: 0; }
.holder-bal .amt { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 170px; }
.holder-bal .pct { font-size: 12px; }

/* ---------- звук: панель ---------- */

.settings {
  position: absolute; top: calc(100% + 10px); right: 28px; z-index: 40;
  width: 322px; max-width: calc(100vw - 32px);
  background: rgba(13, 18, 27, 0.98);
  border: 1px solid var(--border-strong); border-radius: 16px;
  box-shadow: 0 30px 70px -20px rgba(0, 0, 0, 0.9);
  padding: 16px 18px 14px;
  animation: fade-up 0.18s ease both;
}
.settings[hidden] { display: none; }
.settings-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.settings-head h3 { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: 0.05em; }
.set-line { display: flex; align-items: center; gap: 10px; margin: 10px 0; font-size: 13px; }
.set-line .set-label { color: var(--muted); flex: none; min-width: 88px; }
.set-line input[type="range"] { flex: 1; min-width: 0; accent-color: var(--accent); }
.set-val { font-size: 12px; color: var(--muted); min-width: 42px; text-align: right; }
.set-line select, .set-threshold input {
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--border); border-radius: 9px;
  color: var(--text); padding: 7px 10px; font: inherit; font-size: 13px; outline: none;
}
.set-line select:focus, .set-threshold input:focus { border-color: rgba(47, 180, 255, 0.5); }
.set-threshold { display: flex; align-items: center; gap: 7px; margin-left: auto; }
.set-threshold input { width: 64px; }
.set-group { margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, 0.07); }
.set-group h4 { margin: 0 0 2px; font-size: 10.5px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted-2); }
.settings-hint { margin: 12px 0 2px; font-size: 11.5px; line-height: 1.5; }
.ghost.wide { width: 100%; margin-top: 10px; }

/* ---------- футер / тост ---------- */

.footer {
  margin-top: 22px; margin-bottom: 28px;
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  color: var(--muted-2); font-size: 12px;
}

.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 16px);
  padding: 10px 20px; border-radius: 12px; font-size: 12.5px;
  background: rgba(12, 17, 25, 0.96); border: 1px solid var(--border-strong); color: var(--text);
  box-shadow: var(--shadow); opacity: 0; pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 50;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------- скроллбары ---------- */

* { scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.14) transparent; }
*::-webkit-scrollbar { width: 9px; height: 9px; }
*::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.13); border-radius: 8px; border: 2px solid transparent; background-clip: content-box; }
*::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.22); background-clip: content-box; }

/* ---------- адаптив ---------- */

@media (max-width: 1180px) {
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .layout { grid-template-columns: minmax(0, 1fr); }
  .detail { position: static; max-height: none; }
  .table-wrap { max-height: 60vh; }
}

@media (max-width: 760px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
  .topbar-inner { padding: 12px 16px 10px; }
  .ticker { padding: 0 16px; }
  .ticker-label { display: none; }
  .stats { gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 14px; }
  .stat-value { font-size: 22px; }
  .stat-icon { width: 26px; height: 26px; }
  .layout { gap: 12px; }
  .col-master, .col-admin, .col-supply { display: none; }
  thead th.col-master, thead th.col-admin, thead th.col-supply { display: none; }
  .table-wrap { max-height: 55vh; }
  .clock { display: none; }
  .brand-sub { display: none; }
  tbody td, thead th { padding: 10px 12px; }
}

@media (max-width: 560px) {
  .col-ton, .col-price, .col-change { display: none; }
  thead th.col-ton, thead th.col-price, thead th.col-change { display: none; }
  .settings { right: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .radar-sweep, .radar-blip, .empty-radar span, .bg-glow,
  .live-line, .status .dot, .age.is-fresh::before,
  .aurora, .ticker-track, .ticker-label::before { animation: none !important; }
  tbody tr.is-new, tbody tr.is-new td { animation: none !important; }
  .stat, .holder, .detail-body:not([hidden]), .settings { animation: none !important; }
  * { transition: none !important; }
}
