:root {
      --bg-page: #070a10;
      --surface: #0f1420;
      --surface-soft: rgba(13, 18, 28, 0.88);
      --field-bg: #0d121d;
      --line: #233047;
      --text: #e9f0ff;
      --muted: #8fa0bc;
      --accent: #22c55e;
      --header-ring: #9ec5ff;
      --danger: #ef4444;
      --shadow: 0 22px 50px rgba(2, 6, 15, 0.45);
      --table-row-odd: rgba(17, 22, 29, 0.68);
      --table-row-even: rgba(9, 13, 19, 0.6);
      --table-row-hover: rgba(20, 33, 49, 0.72);
      --page-width: 1620px;
    }

    * {
      box-sizing: border-box;
    }

    html,
    body {
      margin: 0;
      min-height: 100%;
      background:
        radial-gradient(1100px 520px at 5% -10%, rgba(139, 180, 255, 0.18), transparent 55%),
        radial-gradient(860px 420px at 96% -12%, rgba(34, 197, 94, 0.1), transparent 52%),
        linear-gradient(180deg, #06080e 0%, var(--bg-page) 42%, #06080d 100%);
      color: var(--text);
      font-family: "Space Grotesk", "Segoe UI", Tahoma, sans-serif;
    }

    body {
      overflow-x: hidden;
    }

    a,
    button,
    input {
      font: inherit;
    }

    [hidden] {
      display: none !important;
    }

    .matrix-rain {
      position: fixed;
      inset: 0;
      width: 100%;
      height: 100%;
      pointer-events: none;
      z-index: 0;
      opacity: 0.36;
    }

    .page {
      position: relative;
      z-index: 1;
      padding: 150px 14px 22px;
    }

    .corner-brand {
      position: fixed;
      top: 12px;
      left: 14px;
      z-index: 3;
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      gap: 8px;
      pointer-events: none;
    }

    .corner-logo {
      display: block;
      width: 124px;
      height: auto;
      filter: drop-shadow(0 10px 22px rgba(2, 6, 15, 0.34));
    }

    .beta-badge {
      position: static;
      padding: 5px 10px;
      border: 1px solid rgba(244, 191, 117, 0.34);
      border-radius: 999px;
      background: rgba(42, 28, 10, 0.92);
      color: #ffd89b;
      font-size: 0.68rem;
      letter-spacing: 0.12em;
      text-transform: uppercase;
      font-weight: 700;
      box-shadow: 0 10px 22px rgba(2, 6, 15, 0.28);
      pointer-events: none;
    }

    .shell {
      max-width: var(--page-width);
      margin: 0 auto;
      display: grid;
      gap: 14px;
    }

    .view-switch-row {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
    }

    .view-switch-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-height: 36px;
      padding: 0 14px;
      border-radius: 10px;
      border: 1px solid #365c8d;
      background: rgba(12, 22, 35, 0.82);
      color: #dcecff;
      text-decoration: none;
      font-size: 0.76rem;
      letter-spacing: 0.12em;
      text-transform: uppercase;
      font-weight: 600;
      transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, transform 0.15s ease;
    }

    .view-switch-btn:hover {
      transform: translateY(-1px);
      border-color: #5d83b2;
      background: rgba(19, 32, 50, 0.92);
    }

    .view-switch-btn.is-active {
      border-color: var(--accent);
      background: linear-gradient(135deg, rgba(23, 72, 40, 0.95), rgba(15, 33, 24, 0.95));
      color: #eafff0;
      box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.2) inset;
    }

    .menu-card,
    .table-card {
      border: 1px solid var(--line);
      border-radius: 14px;
      background: var(--surface);
      box-shadow: var(--shadow);
    }

    .menu-card {
      position: relative;
      overflow: hidden;
      padding: 12px;
      display: grid;
      gap: 10px;
      border-color: #2c3a53;
      background: linear-gradient(136deg, #151e31cc 0%, #111a2abd 52%, #0e1724b3 100%);
    }

    .menu-head {
      position: relative;
      z-index: 1;
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 10px;
      flex-wrap: wrap;
    }

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

    .brand-logo {
      width: 46px;
      height: 46px;
      border-radius: 12px;
      border: 1px solid #3a4b68;
      background: linear-gradient(150deg, #1a2740 0%, #111c2f 60%, #122024 100%);
      position: relative;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      flex: 0 0 auto;
    }

    .logo-ring {
      width: 30px;
      height: 30px;
      border-radius: 999px;
      border: 2px solid var(--header-ring);
      opacity: 0.95;
    }

    .brand-logo-core {
      position: absolute;
      width: 8px;
      height: 8px;
      border-radius: 999px;
      background: #d8ecff;
    }

    .brand-copy h1 {
      margin: 0;
      font-size: 1.2rem;
      letter-spacing: 0.08em;
      text-transform: uppercase;
    }

    .brand-copy p {
      margin: 2px 0 0;
      color: #b7c5da;
      font-size: 0.84rem;
    }

    .status-inline {
      background: rgba(9, 13, 22, 0.42);
      border: 1px solid #2f405b;
      border-radius: 10px;
      padding: 6px 10px;
      display: flex;
      align-items: center;
      flex-wrap: wrap;
      gap: 8px;
      justify-content: flex-end;
    }

    .status-chip {
      border: 1px solid #3b9d66;
      border-radius: 999px;
      padding: 2px 9px;
      font-size: 0.68rem;
      letter-spacing: 0.05em;
      text-transform: uppercase;
      color: var(--accent);
      background: #0f1a13;
      font-weight: 700;
    }

    .status-chip.status-chip-error {
      border-color: #6b2a2a;
      color: var(--danger);
      background: #1b1111;
    }

    .status-text {
      color: #bcc9dd;
      font-size: 0.8rem;
    }

    .toolbar {
      position: relative;
      z-index: 1;
      border: 1px solid #31415b;
      border-radius: 10px;
      background: rgba(10, 15, 24, 0.74);
      padding: 8px;
      display: grid;
      grid-template-columns: minmax(0, 1.25fr) auto minmax(0, 1.45fr);
      gap: 8px;
      align-items: end;
      box-shadow: inset 0 0 0 1px rgba(155, 201, 255, 0.06);
    }

    .toolbar-filters {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 8px;
    }

    .field {
      min-width: 0;
      display: grid;
      gap: 4px;
    }

    .field span {
      font-size: 0.66rem;
      color: #9fb2cc;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      font-weight: 500;
    }

    .field input {
      width: 100%;
      height: 34px;
      border: 1px solid #2a3a55;
      border-radius: 8px;
      background: var(--field-bg);
      color: #e6efff;
      padding: 0 10px;
      font-size: 0.9rem;
      outline: none;
    }

    .toolbar-options {
      display: flex;
      gap: 8px;
      align-items: center;
      flex-wrap: wrap;
    }

    .chip-toggle {
      min-height: 34px;
      padding: 0 11px;
      border: 1px solid #314461;
      border-radius: 999px;
      background: #0f1724;
      color: #dde8f9;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      font-size: 0.82rem;
      white-space: nowrap;
      cursor: pointer;
    }

    .chip-toggle input {
      margin: 0;
      accent-color: var(--accent);
    }

    .chip-toggle.is-on {
      border-color: #4ca770;
      background: #102017;
      color: #d3ffe4;
    }

    .toolbar-controls {
      display: grid;
      grid-template-columns: auto 168px auto;
      gap: 8px;
      align-items: end;
      justify-content: end;
    }

    .interval-field {
      width: 168px;
    }

    .btn {
      height: 34px;
      border: 1px solid #2f3f5a;
      border-radius: 8px;
      background: #0f1622;
      color: #e5eefc;
      padding: 0 11px;
      font-size: 0.82rem;
      font-weight: 600;
      cursor: pointer;
    }

    .btn.btn-primary {
      border-color: var(--accent);
      background: var(--accent);
      color: #08110c;
    }

    .overview-strip {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 8px;
    }

    .overview-card {
      border: 1px solid #2d3c56;
      border-radius: 12px;
      background: linear-gradient(180deg, rgba(8, 14, 23, 0.9), rgba(11, 19, 30, 0.84));
      padding: 10px 12px;
      min-width: 0;
    }

    .overview-label {
      display: block;
      color: #8ea3c0;
      font-size: 0.66rem;
      letter-spacing: 0.1em;
      text-transform: uppercase;
    }

    .overview-value {
      display: block;
      margin-top: 6px;
      color: #edf4ff;
      font-size: 0.96rem;
      letter-spacing: 0.02em;
    }

    .overview-copy {
      margin: 6px 0 0;
      color: #9db1cc;
      font-size: 0.77rem;
      line-height: 1.42;
    }

    .error-banner {
      border: 1px solid #6b2e2e;
      border-radius: 12px;
      background: #1a1218;
      color: #efb4b4;
      padding: 10px 12px;
      font-size: 0.88rem;
    }

    .table-card {
      overflow: hidden;
      background: linear-gradient(180deg, rgba(13, 17, 24, 0.7) 0%, rgba(9, 12, 18, 0.62) 100%);
      box-shadow:
        var(--shadow),
        inset 0 1px 0 rgba(173, 212, 255, 0.04);
    }

    .table-wrap {
      overflow-x: auto;
      padding: 0 14px 6px;
      scrollbar-gutter: stable;
    }

    .token-table {
      width: 100%;
      min-width: 1220px;
      border-collapse: separate;
      border-spacing: 0;
    }

    .token-table th,
    .token-table td {
      white-space: nowrap;
      border-bottom: 1px solid #1a1f27;
    }

    .token-table th {
      position: sticky;
      top: 0;
      z-index: 3;
      background: linear-gradient(180deg, rgba(8, 11, 16, 0.96), rgba(8, 12, 18, 0.9));
      color: #f2f7ff;
      padding: 11px 12px;
      text-align: left;
      font-size: 0.7rem;
      letter-spacing: 0.1em;
      text-transform: uppercase;
      font-weight: 600;
      box-shadow: inset 0 -1px 0 rgba(38, 58, 87, 0.75);
    }

    .token-table th.sortable {
      cursor: pointer;
      user-select: none;
    }

    .token-table th.sortable:hover {
      color: #ffffff;
      background: #0d1118;
    }

    .token-table th.sorted {
      color: #f9fffb;
      background: rgba(13, 17, 24, 0.94);
    }

    .token-table .sort-arrow {
      display: inline-block;
      margin-left: 6px;
      color: var(--accent);
      font-size: 0.7rem;
      line-height: 1;
      vertical-align: middle;
      transform: translateY(-1px);
    }

    .token-table td {
      padding: 10px 10px;
      font-size: 0.84rem;
      color: #d6dde8;
    }

    .token-table th:first-child,
    .token-table td:first-child {
      text-align: center;
      width: 74px;
      padding-left: 12px;
    }

    .token-table th:last-child,
    .token-table td:last-child {
      padding-right: 12px;
    }

    .token-table thead th:first-child {
      border-top-left-radius: 12px;
    }

    .token-table thead th:last-child {
      border-top-right-radius: 12px;
    }

    .token-table tbody tr:nth-child(odd) td {
      background: var(--table-row-odd);
    }

    .token-table tbody tr:nth-child(even) td {
      background: var(--table-row-even);
    }

    .token-table tbody tr:hover td {
      background: linear-gradient(180deg, rgba(16, 28, 42, 0.92), rgba(12, 21, 33, 0.92));
      box-shadow: inset 0 1px 0 rgba(120, 179, 255, 0.04), inset 0 -1px 0 rgba(120, 179, 255, 0.04);
    }

    .numeric {
      text-align: right;
      font-family: "JetBrains Mono", Consolas, "Courier New", monospace;
      font-variant-numeric: tabular-nums;
    }

    .rank-cell {
      color: #edf4ff;
      font-weight: 700;
      font-size: 0.92rem;
      letter-spacing: 0.02em;
    }

    .token-cell-inner {
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .token-avatar {
      width: 50px;
      height: 50px;
      border: 1px solid #313844;
      border-radius: 12px;
      overflow: hidden;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      background: linear-gradient(145deg, #171b22 0%, #101419 100%);
      color: #d0d6df;
      font-size: 1.12rem;
      font-weight: 700;
      flex: 0 0 auto;
    }

    .token-avatar img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
    }

    .token-name {
      color: #edf4ff;
      font-weight: 600;
      max-width: 168px;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .token-symbol {
      margin-top: 3px;
      color: #8ee6b0;
      font-size: 0.76rem;
      letter-spacing: 0.06em;
      text-transform: uppercase;
    }

    .token-id-preview {
      margin-top: 3px;
      color: #8091ab;
      font-size: 0.73rem;
    }

    .metric-chip {
      display: inline-flex;
      align-items: center;
      justify-content: flex-end;
      min-width: 82px;
      padding: 5px 9px;
      border-radius: 10px;
      border: 1px solid #2b3444;
      background: rgba(10, 14, 20, 0.88);
    }

    .metric-chip-price {
      border-color: rgba(89, 176, 255, 0.38);
      background: linear-gradient(180deg, rgba(18, 36, 58, 0.95), rgba(10, 19, 31, 0.95));
      color: #bfe1ff;
    }

    .metric-chip-volume {
      border-color: rgba(34, 197, 94, 0.34);
      background: linear-gradient(180deg, rgba(16, 38, 25, 0.95), rgba(8, 23, 15, 0.95));
      color: #9bf2be;
    }

    .metric-chip-liquidity {
      border-color: rgba(244, 191, 117, 0.32);
      background: linear-gradient(180deg, rgba(46, 31, 11, 0.95), rgba(26, 17, 6, 0.95));
      color: #ffd89b;
    }

    .tx-cell,
    .age-cell {
      color: #b0bed4;
      font-size: 0.8rem;
    }

    .change-badge {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-width: 82px;
      height: 28px;
      padding: 0 9px;
      border-radius: 999px;
      border: 1px solid #525b69;
      background: #02050a;
      font-family: "JetBrains Mono", Consolas, "Courier New", monospace;
      font-size: 0.82rem;
    }

    .trend-up {
      color: #7dffb7;
      border-color: #1fd07c;
    }

    .trend-down {
      color: #ff9090;
      border-color: #f25e5e;
    }

    .trend-flat {
      color: #e5ecf8;
      border-color: #5a6270;
    }

    .score-pill {
      display: inline-block;
      min-width: 66px;
      border: 1px solid #343b47;
      border-radius: 8px;
      background: #11161f;
      color: #d8dfe9;
      padding: 3px 7px;
      text-align: right;
      font-weight: 600;
      font-family: "JetBrains Mono", Consolas, "Courier New", monospace;
    }

    .metric-mc-small,
    .metric-mc-mid,
    .metric-mc-large,
    .metric-mc-unknown {
      color: #7ea6d4;
    }

    .actions-cell-inner {
      display: flex;
      justify-content: flex-end;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
      min-width: 134px;
    }

    .links-cell {
      min-width: 172px;
    }

    .mini-btn {
      height: 28px;
      border: 1px solid #2f3642;
      border-radius: 999px;
      background: #10151e;
      color: #cfd7e3;
      text-decoration: none;
      font-size: 0.72rem;
      font-weight: 500;
      padding: 0 10px;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      justify-content: center;
    }

    .addr-btn {
      max-width: 112px;
      overflow: hidden;
      text-overflow: ellipsis;
      border-color: #32435d;
      background: rgba(13, 21, 33, 0.96);
    }

    .dex-btn {
      min-width: 46px;
      border-color: rgba(244, 191, 117, 0.34);
      background: rgba(40, 27, 11, 0.92);
      color: #ffd89b;
    }

    .spinner-box,
    .empty {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      padding: 22px;
      color: var(--muted);
    }

    .table-footer {
      padding: 10px 14px;
      border-top: 1px solid #2c3d59;
      color: #96a8c2;
      font-size: 0.84rem;
    }

    .site-disclaimer {
      border: 1px solid rgba(163, 51, 51, 0.34);
      border-radius: 14px;
      background: linear-gradient(180deg, rgba(30, 15, 18, 0.9), rgba(20, 11, 13, 0.9));
      color: #efc4c4;
      padding: 14px 16px;
      box-shadow: var(--shadow);
    }

    .site-disclaimer p {
      margin: 0;
      max-width: none;
      font-size: 0.86rem;
      line-height: 1.6;
      font-weight: 500;
    }

    .spinner {
      width: 16px;
      height: 16px;
      border: 2px solid #334964;
      border-top-color: var(--accent);
      border-radius: 50%;
      animation: spin 0.9s linear infinite;
    }

    @keyframes spin {
      to {
        transform: rotate(360deg);
      }
    }

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

    @media (max-width: 1120px) {
      .overview-strip {
        grid-template-columns: 1fr;
      }
    }

    @media (max-width: 1360px) {
      .token-table {
        min-width: 1080px;
      }

      .token-table th:nth-child(6),
      .token-table td:nth-child(6),
      .token-table th:nth-child(7),
      .token-table td:nth-child(7),
      .token-table th:nth-child(9),
      .token-table td:nth-child(9) {
        display: none;
      }
    }

    @media (max-width: 1180px) {
      .token-table {
        min-width: 920px;
      }

      .token-table th:nth-child(8),
      .token-table td:nth-child(8),
      .token-table th:nth-child(11),
      .token-table td:nth-child(11),
      .token-table th:nth-child(12),
      .token-table td:nth-child(12) {
        display: none;
      }
    }

    @media (max-width: 980px) {
      .toolbar-filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

      .table-wrap {
        padding: 0 10px 6px;
      }

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

      .token-table th:nth-child(10),
      .token-table td:nth-child(10) {
        display: none;
      }
    }

    @media (max-width: 760px) {
      .page {
        padding: 112px 8px 8px;
      }

      .corner-brand {
        top: 10px;
        left: 10px;
        gap: 6px;
      }

      .corner-logo {
        width: 92px;
      }

      .beta-badge {
        padding: 4px 8px;
      }

      .toolbar,
      .toolbar-filters,
      .toolbar-controls {
        grid-template-columns: 1fr;
      }

      .interval-field {
        width: 100%;
      }

      .token-table {
        min-width: 100%;
      }

      .table-wrap {
        padding: 0 8px 6px;
      }

      .token-table th,
      .token-table td {
        padding: 9px 8px;
      }

      .token-avatar {
        width: 42px;
        height: 42px;
      }

      .token-name {
        max-width: 120px;
      }

      .metric-chip {
        min-width: 70px;
        padding: 4px 7px;
      }

      .actions-cell-inner {
        min-width: 96px;
        gap: 6px;
      }

      .addr-btn {
        max-width: 96px;
      }
    }
