:root {
  --bg: #111113;
  --bg2: #18191b;
  --bg3: #212225;
  --bg4: #272a2d;
  --text: #fafafa;
  --text2: #e4e4e7;
  --text3: #a1a1aa;
  --text4: #8a8a8f;
  --green: #5ddf6c;
  --green-btn: #86efac;
  --green-on: #052e16;
  --yellow: #f5c518;
  --border: #212225;
  --border2: #272a2d;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100%;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

a { color: inherit; text-decoration: none; }

.pf-root { min-height: 100dvh; background: var(--bg); }

/* Banner */
.pf-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 8px 16px;
  background: #0a0a0b;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  color: var(--text3);
  position: relative;
}
.pf-banner a:hover { color: var(--text); }
.pf-banner-x {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  color: var(--text4);
  width: 28px;
  height: 28px;
}

/* Shell */
.pf-shell { display: flex; min-height: calc(100dvh - 36px); }

/* Left rail */
.pf-rail {
  width: 72px;
  flex-shrink: 0;
  border-right: 1px solid var(--border2);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 0 16px;
  position: sticky;
  top: 0;
  height: 100dvh;
  background: var(--bg);
  z-index: 20;
}
.pf-rail-logo {
  width: 36px;
  height: 36px;
  margin-bottom: 18px;
  display: grid;
  place-items: center;
}
.pf-rail-logo img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  display: block;
  filter: none;
}
.pf-rail-logo {
  border-radius: 8px;
  overflow: hidden;
}
.pf-rail-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}
.pf-rail-btn {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: var(--text4);
  transition: background .15s, color .15s;
}
.pf-rail-btn:hover,
.pf-rail-btn.is-on {
  background: var(--bg3);
  color: var(--text);
}
.pf-rail-plus {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--green-btn);
  color: var(--green-on);
  font-size: 22px;
  font-weight: 600;
  display: grid;
  place-items: center;
  margin-top: 8px;
}
.pf-rail-plus:hover { filter: brightness(1.05); }

/* Main */
.pf-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

.pf-top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 15;
}
.pf-search {
  flex: 1;
  max-width: 520px;
  height: 40px;
  border-radius: 999px;
  background: var(--bg2);
  border: 1px solid var(--border2);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  color: var(--text4);
  font-size: 13px;
}
.pf-search span:first-of-type { flex: 1; text-align: left; }
.pf-kbd {
  font-size: 11px;
  color: var(--text4);
  background: var(--bg3);
  border-radius: 6px;
  padding: 2px 6px;
}
.pf-top-right { display: flex; gap: 8px; margin-left: auto; }
.pf-btn-create {
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--border2);
  background: var(--bg2);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.pf-btn-create:hover { background: var(--bg3); }
.pf-btn-signin {
  height: 36px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--green-btn);
  color: var(--green-on);
  font-size: 13px;
  font-weight: 700;
}
.pf-btn-signin:hover { filter: brightness(1.05); }

/* Body layout — center the Top PNL + profile cluster like real pump framing */
.pf-body {
  display: flex;
  gap: 0;
  flex: 1;
  width: 100%;
  min-height: 0;
  justify-content: center;
  max-width: 1180px;
  margin: 0 auto;
}

/* Aside leaderboard */
.pf-aside {
  width: 320px;
  flex-shrink: 0;
  border-right: 1px solid var(--border);
  padding: 16px 12px 24px;
  display: none;
  position: sticky;
  top: 65px;
  align-self: flex-start;
  max-height: calc(100dvh - 65px);
  overflow-y: auto;
}
@media (min-width: 960px) {
  .pf-aside { display: block; }
}
.pf-aside-tabs {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
  font-size: 15px;
  font-weight: 600;
}
.pf-aside-tabs button { color: var(--text4); }
.pf-aside-tabs button.is-on { color: var(--text); }
.pf-aside-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.pf-chip {
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--bg2);
  border: 1px solid var(--border2);
  font-size: 12px;
  color: var(--text3);
}
.pf-lb { display: flex; flex-direction: column; gap: 2px; }
.pf-lb-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 10px;
  width: 100%;
  text-align: left;
}
.pf-lb-row:hover { background: var(--bg2); }
.pf-lb-n {
  width: 18px;
  font-size: 12px;
  color: var(--text4);
  font-variant-numeric: tabular-nums;
}
.pf-lb-av {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg3);
  flex-shrink: 0;
}
.pf-lb-name {
  flex: 1;
  font-size: 13px;
  font-weight: 500;
  color: var(--text2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pf-lb-pnl {
  font-size: 13px;
  font-weight: 600;
  color: var(--green);
  font-variant-numeric: tabular-nums;
}
.pf-load {
  width: 100%;
  margin-top: 12px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--border2);
  background: var(--bg2);
  font-size: 13px;
  font-weight: 600;
  color: var(--text2);
}
.pf-load:hover { background: var(--bg3); }

/* Center column — primary profile frame */
.pf-center {
  flex: 1;
  min-width: 0;
  padding: 28px 28px 56px;
  max-width: 780px;
}

.pf-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px 24px;
  margin-bottom: 14px;
}

.pf-head-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.pf-id {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.pf-av-wrap {
  position: relative;
  flex-shrink: 0;
  width: 96px;
  height: 96px;
}
.pf-av {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--yellow);
  background: var(--bg3);
}
.pf-check {
  position: absolute;
  right: 2px;
  bottom: 2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--yellow);
  display: grid;
  place-items: center;
  border: 2px solid var(--bg2);
}

.pf-name {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 4px;
}
.pf-meta {
  display: flex;
  gap: 14px;
  font-size: 14px;
  color: var(--text3);
  margin-bottom: 4px;
}
.pf-meta b { color: var(--text); font-weight: 600; }
.pf-created {
  font-size: 12px;
  color: var(--text4);
  margin-bottom: 10px;
}
.pf-follow {
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--border2);
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  color: var(--text2);
}
.pf-follow:hover { background: var(--bg3); }

.pf-actions {
  display: flex;
  gap: 4px;
  align-items: flex-start;
}
.pf-ghost {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--text3);
}
.pf-ghost:hover { background: var(--bg3); color: var(--text); }

.pf-bio {
  font-size: 14px;
  color: var(--text2);
  margin-bottom: 12px;
}

.pf-wallet {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--bg3);
  font-size: 12px;
  font-weight: 500;
  color: var(--text3);
  margin-bottom: 16px;
  font-variant-numeric: tabular-nums;
}
.pf-wallet:hover { color: var(--text); }

.pf-value-block { margin-bottom: 16px; }
.pf-value {
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}
.pf-delta {
  font-size: 14px;
  font-weight: 600;
  color: var(--green);
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}
.pf-rank-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  flex-wrap: wrap;
  gap: 8px;
}
.pf-rank {
  font-size: 13px;
  color: var(--text3);
}
.pf-ranges {
  display: flex;
  gap: 4px;
  background: var(--bg3);
  border-radius: 999px;
  padding: 3px;
}
.pf-ranges button {
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text4);
}
.pf-ranges button.is-on {
  background: var(--bg4);
  color: var(--text);
}

.pf-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.pf-stat-k {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text4);
  margin-bottom: 4px;
}
.pf-stat-v {
  font-size: 16px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.pf-stat-v.green { color: var(--green); }

/* Tabs */
.pf-tabs-card { padding-top: 12px; }
.pf-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin: 0 -20px 16px;
  padding: 0 16px;
  overflow-x: auto;
}
.pf-tabs button {
  padding: 14px 16px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text4);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.pf-tabs button.is-on {
  color: var(--text);
  border-bottom-color: var(--text);
}
.pf-tabs button:hover { color: var(--text2); }

.pf-empty {
  text-align: center;
  padding: 40px 16px;
  color: var(--text4);
  font-size: 14px;
}

.pf-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg4);
  border: 1px solid var(--border2);
  color: var(--text);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  z-index: 100;
  box-shadow: 0 8px 24px rgba(0,0,0,.4);
}

@media (max-width: 720px) {
  .pf-rail { width: 56px; }
  .pf-center { padding: 12px; max-width: none; }
  .pf-value { font-size: 26px; }
  .pf-av-wrap, .pf-av { width: 72px; height: 72px; }
  .pf-name { font-size: 18px; }
  .pf-top { padding: 10px 12px; }
  .pf-search span:first-of-type { display: none; }
  .pf-stats { grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
  .pf-stat-v { font-size: 13px; }
}

/* Wide screens: keep profile framed, don't stretch into a void */
@media (min-width: 1400px) {
  .pf-center {
    max-width: 760px;
    padding-left: 28px;
    padding-right: 28px;
  }
}
