: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 {
  font-family: "Space Grotesk", system-ui, sans-serif;
  color: var(--ink-0);
  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));
  min-height: 100vh;
}

.bg-grid {
  position: fixed;
  inset: 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,
.page-wrap,
.site-footer {
  position: relative;
  z-index: 2;
  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;
  color: var(--ink-1);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 10px;
  background: rgba(255, 255, 255, 0.06);
}

.top-links { display: flex; gap: 10px; flex-wrap: wrap; }
.ghost-btn {
  text-decoration: none;
  color: var(--ink-0);
  font-size: 0.84rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.46rem 0.8rem;
  background: rgba(255, 255, 255, 0.04);
  font-weight: 700;
}
.ghost-btn.active {
  border-color: var(--line);
  color: var(--ink-0);
  background: rgba(126, 214, 255, 0.2);
}

.page-wrap { padding: 0; }

.content {
  background: rgba(10, 18, 31, 0.72);
  border: 1px solid var(--line);
  border-radius: 18px;
  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;
}

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; }

.panel-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
}

.timeframe { display: inline-flex; gap: 0.45rem; flex-wrap: wrap; }
.tf-btn {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.32rem 0.68rem;
  color: var(--ink-1);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 0.78rem;
}
.tf-btn.active {
  color: #062018;
  border-color: transparent;
  background: linear-gradient(120deg, var(--accent), #6af7d0);
  font-weight: 700;
}

.tf-live {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.live-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--accent);
  border: 2px solid rgba(255, 255, 255, 0.88);
  box-shadow: 0 0 16px rgba(62, 232, 181, 0.95);
  animation: livePulse 1.35s ease-in-out infinite;
  flex: 0 0 10px;
}

.tf-live.active .live-dot {
  background: #16e0a7;
  border-color: rgba(6, 32, 24, 0.68);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.16), 0 0 18px rgba(62, 232, 181, 0.98);
}

@keyframes livePulse {
  0%, 100% { transform: scale(0.9); opacity: 0.72; }
  50% { transform: scale(1.15); opacity: 1; }
}

.daily-picker {
  position: relative;
  min-width: 190px;
}

.side-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.58rem 0.72rem;
  background: rgba(18, 30, 48, 0.55);
  color: var(--ink-0);
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
}

.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-daily {
  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;
  position: absolute;
  right: 0;
  top: calc(100% + 0.4rem);
  z-index: 20;
  width: 100%;
  margin: 0;
  padding: 0.45rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(9, 16, 26, 0.96);
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.28);
  max-height: 340px;
  overflow: auto;
}

.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);
}

.stats-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  margin-top: 0.8rem;
  margin-bottom: 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;
}

.sort-bar {
  display: none;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin: 0.55rem 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;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: auto;
  background: rgba(9, 16, 26, 0.72);
}

.recent-section {
  margin-top: 0.9rem;
}

.live-filters {
  display: grid;
  grid-template-columns: 1.15fr repeat(3, minmax(0, 1fr)) auto;
  gap: 0.55rem;
  margin: 0.45rem 0 0.6rem;
}

.live-toggle,
.live-field {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 42px;
  border: 1px solid rgba(126, 214, 255, 0.18);
  border-radius: 12px;
  padding: 0.58rem 0.72rem;
  background: rgba(18, 30, 48, 0.55);
}

.live-toggle {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink-0);
}

.live-toggle input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.live-field {
  justify-content: space-between;
}

.live-field span {
  color: var(--ink-1);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.live-field input,
.live-field select {
  width: min(140px, 100%);
  border: 1px solid rgba(126, 214, 255, 0.16);
  border-radius: 10px;
  padding: 0.42rem 0.56rem;
  background: rgba(9, 16, 26, 0.9);
  color: var(--ink-0);
  font: inherit;
}

.filter-reset-btn {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.58rem 0.9rem;
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink-0);
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

.filter-reset-btn:hover {
  border-color: rgba(126, 214, 255, 0.34);
  background: rgba(126, 214, 255, 0.08);
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.15rem;
  margin-bottom: 0.3rem;
}

.section-head h2 {
  margin: 0;
  font-family: "Sora", sans-serif;
  font-size: 0.96rem;
}

.section-head p {
  margin: 0.22rem 0 0;
  color: var(--ink-1);
  font-size: 0.78rem;
}

.recent-wrap {
  margin-top: 0.2rem;
}

.recent-table {
  min-width: 760px;
}

.recent-section[hidden] {
  display: none !important;
}

.lb-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 700px;
  table-layout: fixed;
  font-variant-numeric: tabular-nums;
}
.lb-table th, .lb-table td {
  padding: 0.56rem 0.62rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.8rem;
  text-align: left;
}
.lb-table th:nth-child(1), .lb-table td:nth-child(1) { width: 52px; }
.lb-table th:nth-child(2), .lb-table td:nth-child(2) { width: 180px; }
.lb-table th:nth-child(3), .lb-table td:nth-child(3) { width: 90px; text-align: right; }
.lb-table th:nth-child(4), .lb-table td:nth-child(4) { width: 180px; }
.lb-table th:nth-child(5), .lb-table td:nth-child(5) { width: 120px; text-align: right; }
.lb-table th:nth-child(6), .lb-table td:nth-child(6) { width: 120px; text-align: right; }
.lb-table th:nth-child(7), .lb-table td:nth-child(7) { width: 120px; text-align: right; }
.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); }
.lb-table tr:last-child td { border-bottom: none; }

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

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

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

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

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

.base-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.44rem;
  border-radius: 999px;
  border: 1px solid rgba(126, 214, 255, 0.18);
  background: rgba(126, 214, 255, 0.08);
  color: var(--ink-0);
  font-size: 0.72rem;
  font-weight: 700;
}

.mobile-rank {
  display: none;
}

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

.site-footer { margin: 8px auto 0; padding: 0 0 26px; color: var(--ink-1); font-size: 12px; }

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

  .site-header, .page-wrap, .site-footer { width: min(1240px, calc(100% - 1rem)); }
  .panel-head { flex-direction: column; }
  .panel-actions {
    width: 100%;
    align-items: stretch;
  }
  .daily-picker {
    width: 100%;
    min-width: 0;
  }
  .live-filters {
    grid-template-columns: 1fr;
  }
  .live-field input,
  .live-field select {
    width: 100%;
    max-width: none;
  }
  .daily-menu {
    position: static;
    width: 100%;
    margin-top: 0.4rem;
    box-shadow: none;
  }
  .top-links { gap: 0.4rem; }
  .stats-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .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: 56px;
    flex: 0 0 56px;
  }

  .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;
    margin-left: 10ch;
  }

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

  .lb-table td:nth-child(3) { grid-column: 1 / 3; }
  .lb-table td:nth-child(4) { grid-column: 3 / 7; white-space: normal; line-height: 1.2; padding-left: 3ch; }
  .lb-table td:nth-child(5) { grid-column: 1 / 3; }
  .lb-table td:nth-child(6) { grid-column: 3 / 5; }
  .lb-table td:nth-child(7) { grid-column: 5 / 7; }

  .lb-table td:nth-child(4)::before,
  .lb-table td:nth-child(5)::before,
  .lb-table td:nth-child(6)::before,
  .lb-table td:nth-child(7)::before {
    width: 48px;
    flex: 0 0 48px;
  }

  .lb-table td:nth-child(5),
  .lb-table td:nth-child(6),
  .lb-table td:nth-child(7) {
    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(6),
  .lb-table td:nth-child(7) {
    padding-left: 3ch;
  }

  .lb-table td:nth-child(5)::before,
  .lb-table td:nth-child(6)::before,
  .lb-table td:nth-child(7)::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;
  }

  .recent-table tbody tr {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .recent-table td:nth-child(2),
  .recent-table td:nth-child(7) {
    grid-column: 1 / -1;
  }

  .recent-table td:nth-child(3),
  .recent-table td:nth-child(4),
  .recent-table td:nth-child(5),
  .recent-table td:nth-child(6) {
    padding-left: 0.08rem;
  }

  .recent-table td:nth-child(7) .tx-link {
    word-break: break-all;
  }
}
