:root {
  --ink: #f6f3ee;
  --muted: #b7aea4;
  --faint: #7d756c;
  --line: rgba(255, 148, 48, 0.16);
  --card: rgba(18, 14, 10, 0.86);
  --green: #3ee0a0;
  --green-deep: #7dffc3;
  --red: #ff5d6c;
  --orange: #ff7a18;
  --orange-2: #ffb15a;
  --sky: rgba(255, 122, 24, 0.12);
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.42);
  --sidebar: 248px;
  --radius: 18px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: "Plus Jakarta Sans", ui-sans-serif, system-ui, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(920px 420px at 0% -12%, rgba(255, 110, 20, 0.28) 0%, transparent 56%),
    radial-gradient(760px 420px at 100% -8%, rgba(255, 70, 0, 0.14) 0%, transparent 52%),
    radial-gradient(680px 420px at 88% 112%, rgba(255, 140, 40, 0.08) 0%, transparent 50%),
    #050505;
}
button, input, a { font: inherit; color: inherit; }
button { cursor: pointer; }
a { text-decoration: none; }
svg { display: block; }
[hidden] { display: none !important; }

.app { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar);
  flex: 0 0 var(--sidebar);
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 18px 14px 16px;
  display: flex;
  flex-direction: column;
  background: rgba(8, 8, 8, 0.88);
  border-right: 1px solid var(--line);
  backdrop-filter: blur(18px);
  z-index: 20;
}
.sidebar.collapsed { width: 84px; flex-basis: 84px; }
.sidebar.collapsed .nav-link span,
.sidebar.collapsed .profile-copy { display: none; }
.sidebar.collapsed .collapse-btn svg { transform: rotate(180deg); }

.side-top { display: flex; align-items: center; justify-content: space-between; padding: 4px 8px 18px; }
.brand-mark, .profile-avatar, .paid-logo, .token-logo {
  display: grid;
  place-items: center;
}
.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(255, 148, 48, 0.35), 0 0 22px rgba(255, 122, 24, 0.45);
}
.icon-btn {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  display: grid;
  place-items: center;
}
.icon-btn:hover, .mini-icon:hover { background: rgba(255, 122, 24, 0.12); }

.side-nav { display: flex; flex-direction: column; gap: 4px; }
.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--muted);
  font-weight: 600;
  font-size: 15px;
}
.nav-link svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.nav-link:hover { background: rgba(255, 122, 24, 0.08); color: var(--ink); }
.nav-link.active {
  color: #ffd7b0;
  background: rgba(255, 122, 24, 0.14);
  box-shadow: inset 0 0 0 1px rgba(255, 148, 48, 0.22);
}

.profile {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 14px;
}
.profile:hover { background: rgba(255, 122, 24, 0.08); }
.profile-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #1a120c;
  color: var(--orange-2);
  font-weight: 800;
  font-size: 14px;
  border: 1px solid var(--line);
}
.profile-copy { display: flex; flex-direction: column; min-width: 0; }
.profile-copy strong { font-size: 14px; }
.profile-copy span, .ticker, .meta-row, .sub, .fine, .ohlc span { color: var(--muted); }

.workspace { flex: 1; min-width: 0; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 15;
  height: 68px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 22px;
  background: rgba(5, 5, 5, 0.72);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid transparent;
}
.menu-btn { display: none; }
.search-wrap { flex: 1; display: flex; justify-content: center; position: relative; }
.search {
  width: min(560px, 100%);
  height: 44px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px 0 16px;
  border-radius: 999px;
  background: #120e0b;
  border: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}
.search svg { width: 16px; height: 16px; fill: var(--faint); }
.search input {
  border: 0;
  outline: none;
  width: 100%;
  background: transparent;
  color: var(--ink);
}
.search input::placeholder { color: var(--faint); }
.search-results {
  position: absolute;
  top: 50px;
  width: min(560px, calc(100% - 8px));
  background: #14110e;
  border-radius: 16px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 6px;
  z-index: 30;
}
.search-results button {
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--ink);
}
.search-results button:hover { background: var(--sky); }
.search-results small { display: block; color: var(--muted); }

.top-actions { display: flex; gap: 8px; margin-left: auto; }
.btn {
  border-radius: 999px;
  padding: 9px 16px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 700;
}
.btn-solid {
  background: linear-gradient(180deg, #ff9a3c, #ff6a00);
  color: #1a0d00;
  box-shadow: 0 8px 22px rgba(255, 106, 0, 0.28);
}
.btn-solid:hover { filter: brightness(1.06); }
.btn-ghost { background: #120e0b; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: rgba(255, 148, 48, 0.45); }
.wide { width: 100%; display: inline-flex; justify-content: center; margin-top: 8px; }

main { width: min(1080px, calc(100% - 40px)); margin: 0 auto; padding: 22px 0 48px; }
.hero-banner {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 0 18px;
  border-radius: 20px;
  border: 1px solid rgba(255, 148, 48, 0.22);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45), 0 0 42px rgba(255, 122, 24, 0.14);
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
.back-link:hover { color: var(--orange-2); }
.retry {
  display: block;
  margin: 8px auto 18px;
  border: 0;
  background: transparent;
  color: var(--orange-2);
  font-size: 13px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: inset 0 1px 0 rgba(255, 180, 100, 0.08), var(--shadow);
}
.stat-card, .next-card { padding: 16px 18px; }
.stat-card {
  min-height: 96px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: relative;
}
.card-hit { position: absolute; inset: 0; border-radius: inherit; z-index: 1; }
.token-id, .name-row, .meta-row, .who, .tabs, .socials { display: flex; align-items: center; }
.token-id { gap: 12px; position: relative; z-index: 2; }
.token-logo { position: relative; width: 52px; height: 52px; }
.token-logo img, .bubble img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 14px;
  display: block;
  box-shadow: 0 0 18px rgba(255, 122, 24, 0.28);
}
.token-logo.sm { width: 42px; height: 42px; }
.token-logo.sm img { border-radius: 12px; }
.bubble {
  width: 32px;
  height: 32px;
  overflow: hidden;
  border-radius: 10px;
  background: #111;
}
.live-dot {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--orange);
  border: 2px solid #120e0b;
  box-shadow: 0 0 8px rgba(255, 122, 24, 0.8);
}
.paid-logo {
  position: relative;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: #1a120c;
  color: var(--orange-2);
  font-weight: 800;
  font-size: 26px;
  border: 1px solid var(--line);
}
.check {
  position: absolute;
  right: -4px;
  bottom: -2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--orange);
  color: #1a0d00;
  font-size: 10px;
  display: grid;
  place-items: center;
  border: 2px solid #120e0b;
}
.name-row { gap: 8px; }
.name-row h1, .name-row h2, .page-title { margin: 0; font-size: 18px; letter-spacing: -0.03em; }
.ticker { font-size: 14px; }
.mini-icon, .meta-row a, .x-link {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 2px;
  border-radius: 8px;
  position: relative;
  z-index: 2;
}
.meta-row { gap: 8px; margin-top: 4px; font-size: 13px; font-weight: 600; }
.meta-row svg, .x-link svg { fill: currentColor; }
.stat-value { text-align: right; position: relative; z-index: 2; }
.stat-value strong { font-size: 28px; letter-spacing: -0.04em; }
.stat-value span { display: block; color: var(--faint); font-size: 12px; font-weight: 700; letter-spacing: 0.04em; }

.next-card { margin-top: 14px; }
.next-card h2 { font-size: 16px; margin: 0 0 6px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.x-word { font-weight: 800; color: var(--orange-2); }
.for { color: var(--muted); font-weight: 500; }
.who { gap: 6px; color: var(--muted); font-weight: 600; }
.who-avatar {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #fff4e8, #ff7a18 42%, #1a0d00 44%);
}
.next-card p { margin: 0; color: var(--muted); font-size: 14px; }

.chart-card { margin-top: 14px; padding: 14px 14px 8px; }
.timeframes { display: flex; gap: 4px; }
.timeframes button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  font-size: 13px;
  border-radius: 999px;
  padding: 6px 10px;
}
.timeframes button.on {
  background: linear-gradient(180deg, #ff9a3c, #ff6a00);
  color: #1a0d00;
}
.ohlc { margin: 10px 6px 4px; font-size: 12px; font-weight: 700; }
.ohlc span { font-weight: 600; margin-left: 8px; }
.ohlc .down { color: var(--red); }
.ohlc .up { color: var(--green-deep); }
.chart-frame { position: relative; height: 380px; }
canvas { width: 100%; height: 100%; display: block; }
.tip {
  position: absolute;
  pointer-events: none;
  background: #1a140f;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 10px;
  font-size: 12px;
  box-shadow: var(--shadow);
  white-space: nowrap;
}

.tabs { gap: 8px; margin: 18px 0 12px; }
.tab {
  border: 1px solid var(--line);
  background: #120e0b;
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 700;
  font-size: 14px;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.tab svg { fill: currentColor; }
.tab.on {
  background: linear-gradient(180deg, #ff9a3c, #ff6a00);
  color: #1a0d00;
  border-color: transparent;
}

.empty {
  border: 1px dashed rgba(255, 148, 48, 0.28);
  border-radius: var(--radius);
  min-height: 150px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 28px;
  background: rgba(18, 14, 10, 0.45);
}
.empty p { margin: 0; font-weight: 700; }
.empty .sub { font-weight: 500; margin-top: 6px; }

.claims { display: flex; flex-direction: column; gap: 8px; }
.claim {
  display: grid;
  grid-template-columns: 140px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #120e0b;
  border: 1px solid var(--line);
}
.claim:hover { border-color: rgba(255, 148, 48, 0.45); box-shadow: var(--shadow); }
.claim b { font-size: 17px; }
.claim b span, .claim-time { color: var(--muted); font-weight: 600; font-size: 13px; }
.claim small { display: block; color: var(--faint); font-size: 11px; }
.claim-mid { display: flex; justify-content: center; align-items: center; gap: 8px; }
.pump {
  width: 26px;
  height: 16px;
  border-radius: 999px;
  border: 1.5px solid var(--green);
  transform: rotate(-35deg);
}
.sol {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(160deg, #14f195, #9945ff);
  color: white;
  font-size: 11px;
  font-weight: 800;
}

.page-title { font-size: 28px; margin: 8px 0 8px; letter-spacing: -0.04em; }
.lede { color: var(--muted); max-width: 62ch; }
.token-row {
  width: min(640px, 100%);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #120e0b;
  text-align: left;
}
.token-row:hover { border-color: rgba(255, 148, 48, 0.45); }
.token-row span span, .token-row small { display: block; color: var(--muted); font-weight: 600; font-size: 12px; }
.token-row b { margin-left: auto; font-size: 18px; }

.footer {
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 24px;
}
.footer h3 { margin: 0 0 10px; font-size: 14px; }
.footer a, .footer p { display: block; color: var(--muted); font-size: 14px; margin: 6px 0; }
.footer a:hover { color: var(--orange-2); }
.socials { gap: 10px; margin: 10px 0; }
.socials a {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #120e0b;
  border: 1px solid var(--line);
}
.socials svg { fill: var(--ink); }
.fine { font-size: 12px !important; }

.modal {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 22px;
  width: min(420px, calc(100% - 32px));
  background: #14110e;
  color: var(--ink);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
}
.modal::backdrop { background: rgba(0, 0, 0, 0.62); }
.modal h2 { margin: 0 0 8px; }
.modal p { color: var(--muted); margin: 0 0 12px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(12px);
  background: linear-gradient(180deg, #ff9a3c, #ff6a00);
  color: #1a0d00;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: 0.2s ease;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.62); z-index: 18; }

@media (max-width: 980px) {
  .sidebar {
    position: fixed;
    left: 0;
    transform: translateX(-105%);
    transition: transform 0.2s ease;
    background: rgba(8, 8, 8, 0.98);
  }
  .sidebar.open { transform: none; }
  .menu-btn { display: grid; }
  .collapse-btn { display: none; }
  .stat-grid, .footer { grid-template-columns: 1fr; }
  .stat-value strong { font-size: 22px; }
  .chart-frame { height: 280px; }
  .claim { grid-template-columns: 1fr auto; }
  .claim-mid { display: none; }
  .top-actions .btn-ghost { display: none; }
  main { width: min(1080px, calc(100% - 28px)); }
}
