:root {
  --bg-0: #09101a;
  --bg-1: #101b2a;
  --bg-2: #16243a;
  --ink-0: #f7fbff;
  --ink-1: #bbcadc;
  --line: #29415e;
  --accent: #3ee8b5;
  --accent-2: #7ed6ff;
  --good: #56f2c2;
  --bad: #ff8b9e;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  color: var(--ink-0);
  font-family: "Space Grotesk", sans-serif;
  line-height: 1.45;
  background: radial-gradient(1200px 800px at 80% -10%, rgba(126, 214, 255, 0.16), transparent 60%),
              radial-gradient(900px 700px at 0% 0%, rgba(62, 232, 181, 0.12), transparent 55%),
              linear-gradient(160deg, var(--bg-0), var(--bg-1) 50%, var(--bg-2));
}

.bg-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  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: 34px 34px;
}

.site-header,
.bots-layout,
.site-footer {
  position: relative;
  z-index: 1;
  width: min(1240px, calc(100% - 2rem));
  margin: 0 auto;
}

.site-header {
  padding: 1.1rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
}

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

.brand-wrap {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink-0);
}

.brand-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 14px rgba(62, 232, 181, 0.9);
}

.brand {
  font-family: "Sora", sans-serif;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.sol-price {
  font-size: 12px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink-1);
}

.top-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.ghost-btn {
  text-decoration: none;
  border-radius: 999px;
  padding: 0.46rem 0.8rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink-0);
  font-weight: 700;
  font-size: 0.84rem;
}

.ghost-btn.active {
  background: rgba(126, 214, 255, 0.2);
}

.bots-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 1rem;
}

.sidebar,
.content {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(10, 18, 31, 0.72);
}

.sidebar {
  padding: 1rem;
  height: fit-content;
}

.side-head {
  margin-bottom: 0.72rem;
}

.side-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border: 1px solid rgba(126, 214, 255, 0.32);
  border-radius: 999px;
  padding: 0.18rem 0.54rem;
  color: var(--accent-2);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sidebar h2 {
  margin: 0.5rem 0 0.38rem;
  font-family: "Sora", sans-serif;
  font-size: 1.08rem;
}

.side-desc {
  margin: 0;
  color: var(--ink-1);
  font-size: 0.8rem;
  line-height: 1.45;
}

.program-buttons {
  display: grid;
  gap: 0.46rem;
}

.side-btn {
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  text-align: left;
  margin: 0;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  color: var(--ink-0);
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.86rem;
  padding: 0.58rem 0.68rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 120ms ease, border-color 120ms ease, background 120ms ease;
}

.side-btn:hover {
  border-color: rgba(126, 214, 255, 0.42);
  transform: translateY(-1px);
}

.program-label {
  display: flex;
  align-items: center;
  gap: 0.38rem;
  min-width: 0;
}

.program-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  padding: 0.1rem 0.32rem;
  border-radius: 999px;
  background: rgba(126, 214, 255, 0.18);
  color: #d6ecff;
  font-family: "Sora", sans-serif;
  font-size: 0.66rem;
}

.program-name {
  font-size: 0.88rem;
}

.program-revenue {
  font-family: "Sora", sans-serif;
  font-size: 0.84rem;
  letter-spacing: 0.01em;
  color: var(--good);
  font-weight: 700;
}

.side-btn.active {
  border-color: transparent;
  color: #062018;
  background: linear-gradient(120deg, var(--accent), #81f8d7);
  box-shadow: 0 8px 20px rgba(62, 232, 181, 0.26);
}

.side-btn.active .program-rank {
  background: rgba(6, 32, 24, 0.18);
  color: #0f3a2e;
}

.side-btn.active .program-revenue {
  color: #0b5f48;
}

.side-btn-daily {
  margin-top: 0.72rem;
  align-items: center;
}

#daily-chevron {
  font-size: 0.9rem;
  color: var(--ink-1);
}

.side-btn-daily.active #daily-chevron {
  color: #062018;
}

.daily-menu {
  display: none;
  margin: 0.4rem 0 0.55rem;
  padding: 0.45rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.018);
  max-height: none;
  overflow: visible;
}

.daily-menu.open {
  display: block;
}

.daily-menu-empty {
  margin: 0.15rem 0;
  color: var(--ink-1);
  font-size: 0.8rem;
}

.day-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
  margin: 0.24rem 0;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink-0);
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.84rem;
  font-weight: 700;
  padding: 0.48rem 0.64rem;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.day-btn.active {
  border-color: transparent;
  color: #062018;
  background: linear-gradient(120deg, var(--accent), #6af7d0);
}

.side-note {
  margin: 0.72rem 0 0;
  color: var(--ink-1);
  font-size: 0.76rem;
}

.content {
  padding: 0.95rem;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.8rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 0.8rem;
}

.panel-head h1 {
  margin: 0;
  font-family: "Sora", sans-serif;
  font-size: clamp(1.02rem, 2.4vw, 1.34rem);
}

.panel-sub {
  margin: 0.4rem 0 0;
  color: var(--ink-1);
  font-size: 0.82rem;
}

.dot-sep {
  margin: 0 0.35rem;
}

.timeframe {
  display: inline-flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.tf-btn {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink-1);
  border-radius: 999px;
  padding: 0.32rem 0.68rem;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 0.78rem;
  cursor: pointer;
}

.tf-btn.active {
  color: #062018;
  border-color: transparent;
  background: linear-gradient(120deg, var(--accent), #6af7d0);
}

.refresh-note {
  margin: 0.72rem 0 0.55rem;
  color: var(--ink-1);
  font-size: 0.76rem;
}

.stats-strip {
  margin-top: 0.8rem;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.55rem;
}

.metric-card {
  border: 1px solid rgba(126, 214, 255, 0.2);
  border-radius: 12px;
  padding: 0.62rem 0.7rem;
  background: rgba(18, 30, 48, 0.55);
}

.metric-label {
  margin: 0;
  color: var(--ink-1);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.metric-value {
  margin: 0.22rem 0 0;
  font-family: "Sora", sans-serif;
  font-size: 1rem;
  font-weight: 700;
}

.metric-value.pos {
  color: var(--good);
}

.metric-value.neg {
  color: var(--bad);
}

.sort-bar {
  display: none;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin: 0.5rem 0 0.2rem;
}

.sort-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.34rem 0.62rem;
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink-1);
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
}

.sort-chip.active {
  color: #062018;
  border-color: transparent;
  background: linear-gradient(120deg, var(--accent), #6af7d0);
}

.table-wrap {
  margin-top: 0.38rem;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.lb-table {
  width: 100%;
  min-width: 700px;
  border-collapse: collapse;
}

.lb-table th,
.lb-table td {
  padding: 0.56rem 0.62rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  text-align: left;
  font-size: 0.8rem;
}

.lb-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #16253a;
  color: #d7e4f2;
  font-family: "Sora", sans-serif;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.sort-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  width: 100%;
  border: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-transform: inherit;
  letter-spacing: inherit;
  cursor: pointer;
}

.sort-btn .sort-indicator {
  color: var(--ink-1);
  font-size: 0.78rem;
  line-height: 1;
}

.sort-btn.active .sort-indicator {
  color: var(--accent);
}

.lb-table tbody tr:hover {
  background: rgba(126, 214, 255, 0.06);
}

.lb-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.012);
}

.wallet-link {
  color: var(--accent-2);
  font-weight: 700;
  text-decoration: none;
}

.wallet {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
}

.wallet-link:hover {
  text-decoration: underline;
}

.mobile-rank {
  display: none;
}

.pos {
  color: var(--good);
  font-weight: 700;
}

.neg {
  color: var(--bad);
  font-weight: 700;
}

.muted {
  color: var(--ink-1);
  text-align: center;
}

.site-footer {
  padding: 1.1rem 0 2rem;
  color: #9db5ca;
  font-size: 0.82rem;
}

@media (max-width: 980px) {
  .bots-layout {
    grid-template-columns: 1fr;
  }

  .stats-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sidebar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.45rem;
    align-items: start;
  }

  .side-head,
  .daily-menu,
  .side-note {
    grid-column: 1 / -1;
  }

  .panel-head {
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .site-header,
  .bots-layout,
  .site-footer {
    width: min(1240px, calc(100% - 1rem));
  }

  .top-links {
    row-gap: 0.3rem;
  }

  .stats-strip {
    grid-template-columns: 1fr;
  }

  .panel-head h1 {
    font-size: 1rem;
  }
}

@media (max-width: 720px) {
  .sort-bar {
    display: flex;
  }

  .table-wrap {
    overflow: visible;
    border: none;
    background: transparent;
    margin-top: 0.5rem;
  }

  .lb-table {
    min-width: 0;
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 0.5rem;
  }

  .lb-table thead {
    display: none;
  }

  .lb-table tbody tr {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.22rem 0.3rem;
    border: 1px solid rgba(126, 214, 255, 0.2);
    border-radius: 12px;
    background: rgba(18, 30, 48, 0.7);
    padding: 0.48rem 0.55rem;
  }

  .lb-table tbody tr:nth-child(even),
  .lb-table tbody tr:hover {
    background: rgba(18, 30, 48, 0.7);
  }

  .lb-table td {
    border: 0;
    padding: 0.08rem 0.18rem;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.76rem;
    min-width: 0;
  }

  .lb-table td::before {
    content: attr(data-label);
    color: var(--ink-1);
    font-size: 0.69rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-weight: 700;
    width: 72px;
    flex: 0 0 72px;
  }

  .lb-table td:nth-child(1) {
    display: none;
  }

  .lb-table td.wallet {
    grid-column: 1 / -1;
    font-size: 0.83rem;
    font-weight: 700;
    gap: 0.55rem;
  }

  .lb-table td.wallet::before {
    content: "";
    display: none;
  }

  .lb-table td.wallet .wallet-link,
  .lb-table td.wallet .wallet-link:visited {
    color: var(--accent-2) !important;
    font-weight: 700;
    text-decoration: none;
  }

  .mobile-rank {
    display: inline-block;
    color: var(--ink-1);
    font-size: 0.75rem;
    font-weight: 700;
    width: 48px;
    flex: 0 0 48px;
  }

  .lb-table td:nth-child(3) { grid-column: 1 / 4; }
  .lb-table td:nth-child(4) { grid-column: 4 / 7; }
  .lb-table td:nth-child(5) { grid-column: 1 / 4; }
  .lb-table td:nth-child(6) { grid-column: 4 / 7; }

  .lb-table td:nth-child(3),
  .lb-table td:nth-child(4),
  .lb-table td:nth-child(5),
  .lb-table td:nth-child(6) {
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 0.02rem;
    white-space: nowrap;
    padding-left: 0.08rem;
    padding-right: 0.08rem;
    font-size: 0.73rem;
    line-height: 1.08;
  }

  .lb-table td:nth-child(3)::before,
  .lb-table td:nth-child(4)::before,
  .lb-table td:nth-child(5)::before,
  .lb-table td:nth-child(6)::before {
    width: auto;
    flex: 0 0 auto;
    font-size: 0.62rem;
    letter-spacing: 0.02em;
    line-height: 1;
  }

  .lb-table td.muted {
    grid-column: 1 / -1;
    justify-content: center;
    text-align: center;
    display: block;
    padding: 0.55rem;
  }

  .lb-table td.muted::before {
    content: "";
    display: none;
  }
}
