/* sa1t index: dark theme, mint accent grounded in sa1t.fun brand */
:root {
  --bg: #000000;
  --bg-soft: #07100d;
  --panel: rgba(255, 255, 255, 0.022);
  --panel-2: rgba(255, 255, 255, 0.04);
  --border: rgba(255, 255, 255, 0.09);
  --border-bright: rgba(0, 255, 200, 0.28);
  --ink: #ffffff;
  --muted: #8a8a88;
  --muted-2: #6e6e6c;
  --mint: #00ffc8;
  --mint-deep: #062019;
  --up: #34e39b;
  --down: #ff5d6c;
  /* constituent spectrum: mint-led, warm tail, brine-toned */
  --c0: #00ffc8;
  --c1: #38bdf8;
  --c2: #a78bfa;
  --c3: #fbbf24;
  --c4: #fb7185;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --sans: "Inter Tight", system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* subtle radial brine glow behind everything */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(900px 500px at 18% -5%, rgba(0, 255, 200, 0.06), transparent 60%),
    radial-gradient(700px 400px at 100% 0%, rgba(56, 189, 248, 0.04), transparent 55%);
  pointer-events: none;
  z-index: 0;
}

/* film grain */
.grain {
  position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* spectrum top edge: slow gradient cycle */
.spectrum-edge {
  position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 50;
  background: linear-gradient(90deg, #00ffc8, #38bdf8, #a78bfa, #fbbf24, #fb7185, #00ffc8);
  background-size: 300% 100%;
  animation: spectrum 14s linear infinite;
  opacity: 0.85;
}
@keyframes spectrum { 0% { background-position: 0% 0; } 100% { background-position: 300% 0; } }

main { position: relative; z-index: 2; max-width: 1180px; margin: 0 auto; padding: 0 24px 80px; }

/* TOPBAR */
.topbar {
  position: relative; z-index: 2; max-width: 1180px; margin: 0 auto;
  padding: 22px 24px 14px; display: flex; align-items: center; justify-content: space-between;
}
.back { color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 500; transition: color .2s; }
.back:hover { color: var(--ink); }
.back .arrow { color: var(--mint); }
.net-pill {
  display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600;
  color: var(--muted); border: 1px solid var(--border); border-radius: 999px; padding: 6px 12px;
}
.net-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 8px var(--mint); animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

/* HERO */
.hero { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 18px 0 6px; flex-wrap: wrap; }
.hero-id { display: flex; align-items: center; gap: 18px; }
.logo-mark {
  width: 56px; height: 56px; border-radius: 16px; flex-shrink: 0;
  background: linear-gradient(140deg, #00ffc8, #06201f 60%, #38bdf8);
  display: grid; place-items: center; position: relative;
  box-shadow: 0 0 0 1px rgba(0,255,200,.25), 0 8px 30px rgba(0,255,200,.18);
}
.crystal {
  width: 22px; height: 22px; background: #00150f;
  transform: rotate(45deg); border-radius: 4px;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.7);
}
.hero-titles h1 {
  font-size: clamp(34px, 6vw, 52px); font-weight: 900; letter-spacing: -.03em; line-height: 1;
  background: linear-gradient(180deg, #fff, #b9fff0);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-tags { display: flex; gap: 8px; margin-top: 10px; }
.tag { font-size: 11px; font-weight: 700; letter-spacing: .04em; border-radius: 6px; padding: 4px 9px; display: inline-flex; align-items: center; gap: 6px; }
.tag-fill { background: var(--mint-deep); color: var(--mint); border: 1px solid var(--border-bright); }
.tag-line { color: var(--muted); border: 1px solid var(--border); }
.tag-line .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--mint); }

.visit-btn {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
  font-weight: 700; font-size: 14px; color: #00150f;
  background: linear-gradient(135deg, #00ffc8, #45e0ff); border-radius: 999px; padding: 12px 20px;
  box-shadow: 0 6px 26px rgba(0,255,200,.28); transition: transform .18s, box-shadow .18s;
}
.visit-btn:hover { transform: translateY(-1px); box-shadow: 0 10px 36px rgba(0,255,200,.42); }
.visit-btn .ext { font-size: 13px; }

/* PRICE */
.price-row { padding: 20px 0 26px; display: flex; align-items: stretch; gap: 18px; flex-wrap: wrap; }
.price-main { display: flex; align-items: center; gap: 16px; }
.price-value { font-size: clamp(40px, 8vw, 68px); font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.price-change { font-size: 15px; font-weight: 700; padding: 6px 12px; border-radius: 999px; font-variant-numeric: tabular-nums; }
.price-change.up { color: var(--up); background: rgba(52,227,155,.12); }
.price-change.down { color: var(--down); background: rgba(255,93,108,.12); }
.price-meta { margin-top: 12px; color: var(--muted); font-size: 13px; font-weight: 500; }

/* CARD */
.card {
  background: var(--panel); border: 1px solid var(--border); border-radius: 18px;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}

/* CHART */
.chart-card { padding: 20px 20px 16px; }
.chart-controls { display: flex; justify-content: flex-end; margin-bottom: 12px; }
.windows { display: inline-flex; gap: 2px; background: rgba(255,255,255,.03); border: 1px solid var(--border); border-radius: 10px; padding: 3px; }
.windows .w {
  font-family: var(--mono); font-size: 12px; font-weight: 500; color: var(--muted);
  background: transparent; border: 0; border-radius: 7px; padding: 6px 13px; cursor: pointer;
  transition: color .18s, background .18s;
}
.windows .w:hover { color: var(--ink); }
.windows .w.active { color: #00150f; background: var(--mint); font-weight: 700; }

.chart-wrap { position: relative; width: 100%; }
#chart { width: 100%; height: auto; display: block; }
.chart-tooltip {
  position: absolute; pointer-events: none; transform: translate(-50%, -120%);
  background: #04130f; border: 1px solid var(--border-bright); border-radius: 8px;
  padding: 7px 10px; font-family: var(--mono); font-size: 12px; white-space: nowrap; z-index: 5;
  box-shadow: 0 6px 20px rgba(0,0,0,.5);
}
.chart-tooltip .tt-val { color: var(--mint); font-weight: 700; }
.chart-tooltip .tt-time { color: var(--muted); font-size: 11px; margin-top: 2px; }

.chart-foot { display: flex; align-items: center; gap: 16px; margin-top: 14px; flex-wrap: wrap; }
.modes { display: inline-flex; gap: 2px; background: rgba(255,255,255,.03); border: 1px solid var(--border); border-radius: 10px; padding: 3px; }
.modes .m {
  display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; color: var(--muted);
  background: transparent; border: 0; border-radius: 7px; padding: 7px 13px; cursor: pointer; transition: color .18s, background .18s;
}
.modes .m.active { color: var(--ink); background: var(--panel-2); }
.modes .m .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); }
.modes .m .line-ico { width: 12px; height: 2px; background: var(--muted); border-radius: 2px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; }
.legend .lg { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); font-family: var(--mono); }
.legend .sw { width: 10px; height: 10px; border-radius: 3px; }
.rebase-note { margin-left: auto; color: var(--muted-2); font-size: 12px; }

/* COMPOSITION */
.comp-grid { display: grid; grid-template-columns: 320px 1fr; gap: 16px; margin-top: 16px; }
.card-title { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 18px 20px 0; }
.donut-card { display: flex; flex-direction: column; }
.donut-wrap { position: relative; flex: 1; display: grid; place-items: center; padding: 14px; }
#donut { width: 240px; height: 240px; }
.donut-center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; pointer-events: none; }
.donut-n { font-size: 34px; font-weight: 800; line-height: 1; }
.donut-label { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

.table-card { padding: 6px 4px; overflow: hidden; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
thead th {
  text-align: left; font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  color: var(--muted-2); padding: 14px 16px 12px; white-space: nowrap;
}
thead th.num { text-align: right; }
tbody td { padding: 14px 16px; border-top: 1px solid var(--border); font-size: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; }
tbody td.num { text-align: right; font-family: var(--mono); font-size: 13px; }
tbody tr { transition: background .15s; }
tbody tr:hover { background: rgba(255,255,255,.02); }
.asset-cell { display: flex; align-items: center; gap: 10px; }
.asset-dot { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.asset-name { font-weight: 700; }
.asset-sub { color: var(--muted); font-size: 12px; font-weight: 500; }
.rank-badge { font-family: var(--mono); font-size: 11px; color: var(--muted-2); width: 18px; }
.pin { color: var(--mint); font-size: 11px; }
.mech-pill { font-size: 11px; font-weight: 600; color: var(--muted); border: 1px solid var(--border); border-radius: 6px; padding: 3px 8px; }
.chg.up { color: var(--up); }
.chg.down { color: var(--down); }
.wbar { position: relative; }
.wbar-track { height: 4px; background: rgba(255,255,255,.06); border-radius: 2px; margin-top: 5px; overflow: hidden; }
.wbar-fill { height: 100%; border-radius: 2px; }

/* FOOTER */
.foot { margin-top: 30px; color: var(--muted-2); font-size: 12.5px; line-height: 1.6; }
.foot .updated { margin-top: 8px; }

/* number ticker */
.tick { display: inline-block; }

@media (max-width: 820px) {
  .comp-grid { grid-template-columns: 1fr; }
  .donut-card { order: 2; }
}


/* ============================================================ PINNED TOKEN CARD */
.price-block { display: flex; flex-direction: column; justify-content: center; flex: 0 0 auto; }
.pin-card {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 16px; padding: 14px 18px;
  margin: 0; flex: 1 1 480px; min-width: 0;
  position: relative; overflow: hidden;
}
.pin-card::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(180deg, var(--mint), #38bdf8);
}
.pin-left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.pin-logo {
  width: 46px; height: 46px; border-radius: 12px; flex-shrink: 0;
  background: #fff; display: grid; place-items: center;
  box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 6px 16px rgba(0,255,200,.12);
}
.pin-diamond {
  width: 18px; height: 18px; transform: rotate(45deg);
  background: #04100d; border: 2px solid #04100d; border-radius: 3px;
  position: relative;
}
.pin-diamond::after {
  content: ""; position: absolute; inset: 3px; border-radius: 1px;
  background: linear-gradient(135deg, var(--mint), #38bdf8);
}
.pin-titles { min-width: 0; }
.pin-row1 { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.pin-name {
  font-family: "Inter Tight", sans-serif; font-weight: 800;
  font-size: 19px; color: var(--ink); letter-spacing: -.01em;
}
.pin-tag {
  font-family: "JetBrains Mono", monospace; font-weight: 700; font-size: 10px;
  letter-spacing: .06em; color: #04100d; background: var(--mint);
  padding: 3px 8px; border-radius: 999px;
}
.pin-pinned {
  font-family: "JetBrains Mono", monospace; font-weight: 700; font-size: 11px;
  letter-spacing: .04em; color: var(--mint);
}
.pin-addr {
  display: inline-flex; align-items: center; gap: 7px; margin-top: 5px;
  background: none; border: 0; padding: 0; cursor: pointer;
  font-family: "JetBrains Mono", monospace; font-size: 12.5px;
  color: var(--muted); transition: color .15s;
}
.pin-addr:hover { color: var(--ink); }
.pin-copy { color: inherit; opacity: .7; }
.pin-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.pin-btn {
  font-family: "Inter Tight", sans-serif; font-weight: 700; font-size: 13.5px;
  padding: 9px 16px; border-radius: 999px; text-decoration: none;
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  transition: transform .12s, background .15s, border-color .15s, opacity .15s;
}
.pin-btn-line { color: var(--ink); border: 1px solid var(--border); background: transparent; }
.pin-btn-line:hover { border-color: var(--mint); }
.pin-btn-fill { color: #04100d; background: var(--mint); border: 1px solid var(--mint); }
.pin-btn-fill:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(0,255,200,.28); }
.pin-btn .ext { font-size: 12px; }
.pin-btn .ext-arrow { flex-shrink: 0; margin-left: -1px; }

/* pending state — token not launched yet */
.pin-card[data-state="pending"] .pin-tag { background: var(--muted); color: #04100d; }
.pin-card[data-state="pending"] .pin-pinned { color: var(--muted); }
.pin-card[data-state="pending"] .pin-diamond::after { background: var(--muted); }
.pin-card[data-state="pending"] .pin-logo { box-shadow: 0 0 0 1px rgba(255,255,255,.08); }
.pin-card[data-state="pending"] .pin-btn-fill { background: rgba(255,255,255,.08); color: var(--muted); border-color: var(--border); pointer-events: none; }
.pin-card[data-state="pending"] .pin-btn-line { opacity: .55; pointer-events: none; }
.pin-card[data-state="pending"] .pin-addr { pointer-events: none; }
.pin-card[data-state="pending"]::before { background: var(--muted); opacity: .4; }
.pin-card[data-state="pending"] .pin-name::after {
  content: "soon"; margin-left: 8px; font-family: "JetBrains Mono", monospace;
  font-size: 10px; font-weight: 700; letter-spacing: .05em; color: var(--muted);
  border: 1px solid var(--border); padding: 2px 7px; border-radius: 999px; vertical-align: middle;
}

@media (max-width: 880px) {
  .pin-card { flex: 1 1 100%; }
}
@media (max-width: 680px) {
  .pin-card { flex-direction: column; align-items: stretch; gap: 14px; }
  .pin-actions { justify-content: stretch; }
  .pin-btn { flex: 1; justify-content: center; }
}
