﻿:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --panel: #f7f8fa;
  --panel-2: #edf0f3;
  --surface: rgba(255, 255, 255, 0.88);
  --surface-strong: rgba(255, 255, 255, 0.94);
  --line: #d7dde5;
  --table-line: rgba(215, 221, 229, 0.86);
  --table-head: rgba(237, 240, 243, 0.84);
  --text: #111827;
  --muted: #5f6b7a;
  --accent: #008f7a;
  --accent-soft: rgba(0, 143, 122, 0.08);
  --gold-soft: rgba(245, 170, 22, 0.08);
  --alert-text: #533800;
  --alert-border: rgba(245, 170, 22, 0.7);
  --alert-bg: linear-gradient(90deg, rgba(255, 107, 125, 0.14), rgba(245, 170, 22, 0.16), rgba(0, 143, 122, 0.1));
  --alert-shadow: 0 0 0 1px rgba(245, 170, 22, 0.1), 0 12px 28px rgba(245, 170, 22, 0.1);
  --slogan-bg: linear-gradient(90deg, #ff3355, #ffb000, #00a88d);
  --slogan-text: #ffffff;
  --slogan-shadow: 0 16px 36px rgba(255, 107, 125, 0.2);
  --danger: #ff6b7d;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --panel: #101318;
    --panel-2: #1b2028;
    --surface: rgba(16, 19, 24, 0.78);
    --surface-strong: rgba(16, 19, 24, 0.9);
    --line: #2a303b;
    --table-line: rgba(42, 48, 59, 0.72);
    --table-head: rgba(27, 32, 40, 0.72);
    --text: #f3f5f7;
    --muted: #9aa4b2;
    --accent: #55d6be;
    --accent-soft: rgba(85, 214, 190, 0.08);
    --gold-soft: rgba(255, 193, 7, 0.05);
    --alert-text: #fff5c2;
    --alert-border: rgba(255, 193, 7, 0.82);
    --alert-bg: linear-gradient(90deg, rgba(255, 107, 125, 0.24), rgba(255, 193, 7, 0.18), rgba(85, 214, 190, 0.12));
    --alert-shadow: 0 0 0 1px rgba(255, 193, 7, 0.14), 0 12px 32px rgba(255, 193, 7, 0.12);
    --slogan-bg: linear-gradient(90deg, #ff244c, #ffb000, #00d1a7);
    --slogan-shadow: 0 16px 40px rgba(255, 107, 125, 0.18);
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(130deg, var(--accent-soft), transparent 32%),
    linear-gradient(310deg, var(--gold-soft), transparent 28%),
    var(--bg);
  color: var(--text);
}

.app {
  width: min(1440px, calc(100% - 32px));
  margin: 0 auto;
  padding: 16px 0 36px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.topbar,
.settings {
  display: none;
}

.settings {
  margin-bottom: 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.05;
}

h2 {
  font-size: 20px;
}

.controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  align-items: end;
  gap: 10px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

select,
input,
button {
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  padding: 0 12px;
  font: inherit;
}

button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-weight: 700;
}

button:hover,
input:hover,
select:hover {
  border-color: var(--accent);
}

input {
  width: 100%;
  min-width: 0;
}

input[type="checkbox"] {
  width: 20px;
  min-width: 20px;
  accent-color: var(--accent);
}

.toggle-label {
  align-items: start;
}

#telegramToken {
  grid-column: span 2;
}

.slogan-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px clamp(16px, 2.6vw, 36px);
  min-height: 86px;
  margin-bottom: 18px;
  padding: 14px 20px;
  border-radius: 8px;
  color: var(--slogan-text);
  background: var(--slogan-bg);
  box-shadow: var(--slogan-shadow);
  font-size: clamp(30px, 3.6vw, 58px);
  font-weight: 1000;
  line-height: 1;
  text-align: center;
}

.slogan-banner span {
  color: var(--slogan-text);
  white-space: nowrap;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.22), 0 10px 24px rgba(0, 0, 0, 0.18);
}

.boards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.alert-ticker {
  height: 70px;
  margin-bottom: 18px;
  overflow: hidden;
  border: 1px solid var(--alert-border);
  border-radius: 8px;
  color: var(--alert-text);
  box-shadow: var(--alert-shadow);
  background: var(--alert-bg);
}

.alert-ticker[hidden] {
  display: none;
}

.alert-ticker div {
  display: inline-block;
  min-width: 100%;
  padding: 18px 18px;
  white-space: nowrap;
  font-size: 26px;
  line-height: 1.15;
  font-weight: 900;
  text-shadow: 0 0 18px rgba(255, 193, 7, 0.45);
  animation: ticker-scroll 18s linear infinite;
}

@keyframes ticker-scroll {
  from {
    transform: translateX(100%);
  }

  to {
    transform: translateX(-100%);
  }
}

.board {
  position: relative;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  overflow: hidden;
}

.board-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.board-head > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.updated {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.chain-dot {
  width: 10px;
  height: 10px;
  border-radius: 99px;
  display: inline-block;
}

.chain-dot.sol {
  background: #7cffe1;
}

.chain-dot.bsc {
  background: #f5c84c;
}

.chain-dot.eth {
  background: #86a7ff;
}

.chain-dot.base {
  background: #4da3ff;
}

.table-wrap {
  min-height: 472px;
  overflow-x: auto;
}

.board.is-loading .table-wrap {
  opacity: 0.55;
}

.board.is-loading::after {
  content: "\52a0\8f7d\4e2d...";
  position: absolute;
  right: 14px;
  top: 13px;
  color: var(--muted);
  font-size: 12px;
  pointer-events: none;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 650px;
}

th,
td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--table-line);
  text-align: right;
  font-size: 13px;
  white-space: nowrap;
}

th {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  background: var(--table-head);
}

th:first-child,
td:first-child,
th:nth-child(2),
td:nth-child(2) {
  text-align: left;
}

th:nth-child(3),
td:nth-child(3),
th:nth-child(4),
td:nth-child(4),
th:nth-child(5),
td:nth-child(5),
th:nth-child(6),
td:nth-child(6) {
  text-align: center;
}

tbody tr:hover {
  background: var(--accent-soft);
}

.rank {
  width: 36px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.token {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 190px;
}

.token img,
.token-fallback {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  flex: 0 0 28px;
  background: var(--panel-2);
}

.token-fallback {
  display: inline-grid;
  place-items: center;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

.token-name {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.token-name a {
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
}

.token-name span {
  color: var(--muted);
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.metric {
  color: var(--accent);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.holder-change {
  color: var(--accent);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.empty {
  min-height: 472px;
  padding: 30px 14px;
  color: var(--muted);
}

@media (max-width: 720px) {
  .app {
    width: min(100% - 20px, 1440px);
    padding-top: 18px;
  }

  .topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .controls {
    grid-template-columns: 1fr;
  }

  .slogan-banner {
    gap: 8px 16px;
    min-height: 112px;
    padding: 14px;
    font-size: clamp(28px, 10vw, 48px);
  }

  .alert-ticker {
    height: 60px;
  }

  .alert-ticker div {
    padding: 16px 14px;
    font-size: 22px;
  }

  .boards {
    grid-template-columns: 1fr;
  }

  #telegramToken {
    grid-column: span 1;
  }
}
