:root {
  --bg: #f7faf7;
  --bg-soft: rgba(255, 255, 255, 0.78);
  --surface: rgba(255, 255, 255, 0.92);
  --surface-strong: #ffffff;
  --text: #193229;
  --muted: #6f8179;
  --line: rgba(25, 50, 41, 0.09);
  --accent: #66b49e;
  --accent-strong: #2f8e77;
  --accent-warm: #f7d9b3;
  --accent-cool: #d7f0ff;
  --danger-bg: #fff0ef;
  --danger-text: #b84f43;
  --shadow: 0 30px 80px rgba(116, 151, 138, 0.16);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top left, rgba(235, 255, 247, 0.95), transparent 35%),
    linear-gradient(180deg, #fcfdfb 0%, #f4f8f4 100%);
  color: var(--text);
  font-family: "Outfit", "Noto Sans SC", sans-serif;
}

body {
  min-height: 100vh;
}

.page-shell {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  padding: 32px 20px 56px;
}

.background-orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(10px);
  opacity: 0.9;
  pointer-events: none;
}

.orb-one {
  top: -120px;
  left: -90px;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(188, 240, 219, 0.75), transparent 70%);
}

.orb-two {
  right: -80px;
  top: 120px;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(255, 226, 190, 0.6), transparent 70%);
}

.app-card {
  position: relative;
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.96));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, 0.8fr);
  gap: 24px;
  align-items: end;
  padding: 8px 4px 28px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(102, 180, 158, 0.12);
  color: var(--accent-strong);
  font-size: 0.84rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 14px 0 14px;
  max-width: 14ch;
  font-size: clamp(2.15rem, 4vw, 3.5rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.hero p {
  margin: 0;
  max-width: 62ch;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.7;
}

.view-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0 14px;
}

.view-tab {
  appearance: none;
  border: 1px solid rgba(25, 50, 41, 0.08);
  border-radius: 999px;
  padding: 10px 15px;
  background: rgba(255, 255, 255, 0.84);
  color: var(--muted);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease,
    color 0.18s ease,
    box-shadow 0.18s ease;
}

.view-tab:hover {
  transform: translateY(-1px);
  border-color: rgba(47, 142, 119, 0.2);
  color: var(--text);
}

.view-tab.active {
  background: linear-gradient(135deg, rgba(102, 180, 158, 0.16), rgba(215, 240, 255, 0.56));
  border-color: rgba(47, 142, 119, 0.2);
  color: var(--accent-strong);
  box-shadow: 0 12px 26px rgba(102, 180, 158, 0.12);
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
}

.filter-label {
  color: var(--muted);
  font-size: 0.94rem;
}

.filter-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-button {
  appearance: none;
  border: 1px solid rgba(25, 50, 41, 0.08);
  border-radius: 999px;
  padding: 9px 14px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--muted);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease,
    color 0.18s ease,
    box-shadow 0.18s ease;
}

.filter-button:hover {
  transform: translateY(-1px);
  border-color: rgba(47, 142, 119, 0.2);
  color: var(--text);
}

.filter-button.active {
  background: linear-gradient(135deg, rgba(102, 180, 158, 0.16), rgba(215, 240, 255, 0.56));
  border-color: rgba(47, 142, 119, 0.2);
  color: var(--accent-strong);
  box-shadow: 0 12px 26px rgba(102, 180, 158, 0.12);
}

.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 14px;
  justify-self: end;
  width: 100%;
  max-width: 280px;
}

.refresh-button {
  appearance: none;
  border: none;
  border-radius: 18px;
  padding: 16px 18px;
  background: linear-gradient(135deg, var(--accent), #86d7c2);
  color: white;
  font: inherit;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: 0 18px 35px rgba(102, 180, 158, 0.28);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    opacity 0.18s ease;
}

.refresh-button:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 20px 40px rgba(102, 180, 158, 0.32);
}

.refresh-button:disabled {
  cursor: progress;
  opacity: 0.72;
}

.refresh-tip {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(215, 240, 255, 0.65), rgba(255, 255, 255, 0.9));
  border: 1px solid rgba(47, 142, 119, 0.08);
  color: var(--muted);
}

.refresh-tip strong {
  color: var(--text);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.stat-card {
  padding: 22px 20px;
  border-radius: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  min-height: 124px;
}

.stat-card:nth-child(2n) {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(246, 252, 249, 0.95)),
    var(--surface);
}

.stat-label {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.92rem;
}

.stat-value {
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.04em;
}

.stat-note {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.88rem;
}

.panel {
  border-radius: 26px;
  padding: 22px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
}

.panel-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.panel-header h2 {
  margin: 0 0 8px;
  font-size: 1.2rem;
}

.panel-header p {
  margin: 0;
  color: var(--muted);
}

.panel-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(102, 180, 158, 0.1);
  color: var(--accent-strong);
  font-size: 0.88rem;
}

.meta-chip.subtle {
  background: rgba(25, 50, 41, 0.05);
  color: var(--muted);
}

.error-banner {
  margin-bottom: 16px;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--danger-bg);
  color: var(--danger-text);
  border: 1px solid rgba(184, 79, 67, 0.12);
  line-height: 1.5;
}

.hidden {
  display: none;
}

.table-wrapper {
  overflow-x: auto;
  border-radius: 18px;
  border: 1px solid var(--line);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1050px;
  background: var(--surface-strong);
}

thead th {
  position: sticky;
  top: 0;
  background: linear-gradient(180deg, #fcfdfc, #f6fbf8);
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

th,
td {
  padding: 16px 14px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

tbody tr:hover {
  background: rgba(102, 180, 158, 0.045);
}

.token-cell {
  display: block;
}

.token-code {
  font-weight: 700;
}

.token-sub {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.82rem;
}

.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(102, 180, 158, 0.1);
  color: var(--accent-strong);
  font-size: 0.82rem;
  font-weight: 600;
}

.pill-link {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: linear-gradient(180deg, #2b2f36, #1f2228);
  border: 1px solid rgba(240, 185, 11, 0.24);
  color: #f0b90b;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition:
    transform 0.18s ease,
    background 0.18s ease,
    color 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.pill-link:hover {
  transform: translateY(-1px);
  background: linear-gradient(180deg, #343941, #262a31);
  border-color: rgba(240, 185, 11, 0.42);
  color: #ffd76a;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 10px 18px rgba(23, 25, 29, 0.14);
}

.pill.secondary {
  background: rgba(247, 217, 179, 0.35);
  color: #9a6730;
}

.market-stack {
  display: grid;
  gap: 10px;
}

.market-row {
  display: grid;
  gap: 8px;
}

.market-row-label {
  color: var(--muted);
  font-size: 0.76rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.number-negative {
  color: #cf5a5a;
}

.number-positive {
  color: #2b9a6f;
}

.loading-row,
.empty-row {
  color: var(--muted);
  text-align: center;
  padding: 36px 16px;
}

.skeleton {
  position: relative;
  overflow: hidden;
}

.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.7),
    transparent
  );
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  100% {
    transform: translateX(100%);
  }
}

@media (max-width: 1040px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    justify-self: stretch;
    max-width: none;
  }

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

@media (max-width: 720px) {
  .page-shell {
    padding: 18px 12px 28px;
  }

  .app-card {
    padding: 18px;
    border-radius: 24px;
  }

  .hero h1 {
    max-width: none;
    font-size: 2.2rem;
  }

  .filter-bar {
    align-items: flex-start;
  }

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

  .panel {
    padding: 16px;
  }

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

  th,
  td {
    padding: 14px 12px;
  }
}
