/* ============================================================
   PointOneTrade — Premium glass terminal (v4.0)
   BullX/Axiom-inspired: glassmorphism, mint accents, layered glow bg.
   Fonts: Inter (UI) + JetBrains Mono (numbers).
   Logic untouched — every class app.js generates is restyled here.
   ============================================================ */

/* Fonts (Inter + JetBrains Mono) are loaded via <link> in index.html <head> for faster, non-render-blocking delivery. */

:root {
  /* ===== Premium glass terminal theme (BullX/Axiom-inspired) ===== */
  --bg:        #050816;
  --bg-deep:   #02040A;
  --bg-chart:  #070B16;
  --panel:        rgba(255,255,255,.045);
  --panel2:       rgba(255,255,255,.065);
  --panel-strong: rgba(10,16,32,.72);
  --elev:  rgba(255,255,255,.085);
  --hover: rgba(255,255,255,.07);
  --line:      rgba(255,255,255,.08);
  --line-soft: rgba(255,255,255,.05);
  --text:  rgba(255,255,255,.92);
  --muted: rgba(255,255,255,.55);
  --faint: rgba(255,255,255,.40);
  --dim:   rgba(255,255,255,.22);
  --up:    #00FFA3;
  --down:  #FF4D6D;
  --amber: #F3BA2F;
  --indigo:  #6C5CE7;
  --indigo-d:#5a4bd4;
  --cyan:    #28D7FF;
  --accent:  #00FFA3;
  --bnb:    #F3BA2F;
  --sol:    #9945FF;
  --btc:    #F7931A;
  --eth:    #28D7FF;
  --font-ui:  "Inter", system-ui, sans-serif;
  --font-num: "JetBrains Mono", ui-monospace, monospace;
  --radius: 14px;
  --glass-blur: blur(18px);
  --shadow-glass: 0 18px 60px rgba(0,0,0,.45);
  --shadow-mint:  0 0 22px rgba(0,255,163,.22);
}

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

html { background: var(--bg); }
body {
  background: var(--bg); color: var(--text);
  font-family: var(--font-ui); font-size: 12px; line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh; display: flex; flex-direction: column;
  overflow-x: hidden;
}
body > * { flex-shrink: 0; }
main { flex: 1 0 auto; }

.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 11px; }
b, strong { font-weight: 600; }
a { color: var(--indigo); }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #232830; border-radius: 4px; }
::-webkit-scrollbar-track { background: transparent; }

.chg-up, .pnl-up, .up { color: var(--up); }
.chg-down, .pnl-down, .down { color: var(--down); }
.k { color: var(--faint); }
.num, .mono { font-family: var(--font-num); font-variant-numeric: tabular-nums; }

/* ============================================================
   TOP APP BAR
   ============================================================ */
.top {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 16px;
  height: 48px; padding: 0 12px;
  background: rgba(6,7,10,.9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand-row { display: flex; align-items: center; gap: 16px; min-width: 0; }
.brand {
  display: flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: 14px; letter-spacing: -.02em; white-space: nowrap;
}
.mark {
  width: 24px; height: 24px; border-radius: 6px;
  display: inline-grid; place-items: center;
  font-family: var(--font-num); font-size: 11px; font-weight: 700;
  color: #06120D; background: var(--up);
}
.brand .tld { color: var(--up); font-weight: 700; }
.brand .pro {
  font-size: 8.5px; font-weight: 700; letter-spacing: .12em; color: var(--faint);
  border: 1px solid var(--line); border-radius: 4px; padding: 2px 4px;
}
.views { display: flex; gap: 2px; }
.view-tab {
  font-family: var(--font-ui); font-size: 12.5px; font-weight: 500;
  background: transparent; border: none; border-radius: 6px;
  color: var(--muted); padding: 6px 10px; cursor: pointer; white-space: nowrap;
}
.view-tab:hover { color: var(--text); background: var(--panel2); }
.view-tab.active { color: var(--text); }

/* header search = #tokenInput, global token loader */
.header-search { flex: 1 1 auto; max-width: 420px; margin: 0 auto; display: flex; align-items: center; gap: 8px; }
.header-search .sicon { color: var(--faint); flex: 0 0 auto; display: grid; place-items: center; }
#tokenInput {
  flex: 1; width: 100%; height: 32px; padding: 0 12px;
  font-family: var(--font-num); font-size: 12px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  color: var(--text); outline: none; transition: border-color .15s;
}
#tokenInput::placeholder { color: var(--faint); font-family: var(--font-ui); }
#tokenInput:focus { border-color: rgba(91,108,255,.5); }

.wallets { display: flex; gap: 8px; align-items: center; }

/* chain switch (chB/chS) styled as header pill toggle */
.chain-switch {
  display: flex; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; flex: 0 0 auto; background: var(--panel); padding: 2px; gap: 2px;
}
.ch-btn {
  display: flex; align-items: center; gap: 6px;
  background: transparent; border: none; border-radius: 6px; color: var(--muted);
  font-family: var(--font-ui); font-size: 11.5px; font-weight: 600; padding: 4px 10px; cursor: pointer;
}
.ch-btn.active { background: var(--panel2); color: var(--text); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  font-family: var(--font-ui); font-size: 12px; font-weight: 500;
  background: var(--panel); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 7px 12px; cursor: pointer;
  transition: border-color .15s, background .15s, transform .05s;
}
.btn:hover { border-color: var(--dim); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-wallet { display: flex; align-items: center; gap: 7px; height: 30px; white-space: nowrap; font-family: var(--font-num); font-size: 11.5px; }
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.dot-bnb { background: var(--bnb); } .dot-sol { background: var(--sol); }
.dot-btc { background: var(--btc); } .dot-eth { background: var(--eth); }
.btn-deposit {
  height: 30px; padding: 0 16px; border: none; border-radius: var(--radius);
  background: var(--indigo); color: #fff; font-family: var(--font-ui);
  font-size: 12.5px; font-weight: 600; cursor: pointer;
}
.btn-deposit:hover { background: var(--indigo-d); }
.avatar {
  width: 30px; height: 30px; border-radius: 8px; flex: 0 0 auto;
  display: grid; place-items: center; font-weight: 700; font-size: 11px; color: #06120D;
  background: linear-gradient(135deg, var(--up), var(--indigo));
}
.btn-buy {
  background: var(--up); color: #06120D; border: none;
  font-weight: 700; width: 100%; padding: 12px; font-size: 13.5px; letter-spacing: .01em;
  border-radius: var(--radius);
}
.btn-buy:hover { filter: brightness(1.06); }
.btn-sell {
  background: var(--down); color: #fff; border: none;
  font-weight: 700; width: 100%; padding: 12px; font-size: 13.5px; letter-spacing: .01em;
  border-radius: var(--radius);
}
.btn-sell:hover { filter: brightness(1.08); }
.btn-ghost { background: transparent; padding: 5px 9px; font-size: 11px; color: var(--muted); border: 1px solid transparent; }
.btn-ghost:hover { color: var(--text); background: var(--panel2); }
.iconbtn { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 7px; color: var(--muted); cursor: pointer; border: 1px solid transparent; }
.iconbtn:hover { background: var(--panel2); color: var(--text); }

.security-badge {
  background: rgba(46,211,160,.08); border: 1px solid rgba(46,211,160,.25);
  color: var(--up); font-family: var(--font-ui);
  font-size: 10px; font-weight: 600; letter-spacing: .06em;
  height: 30px; padding: 0 10px; border-radius: var(--radius); cursor: pointer;
}
.security-badge:hover { background: rgba(46,211,160,.14); }

.link-btn { background: none; border: none; color: var(--indigo); cursor: pointer; font-family: inherit; font-size: inherit; text-decoration: underline; padding: 0; }
.link-btn:hover { color: var(--text); }

/* ============================================================
   BANNER
   ============================================================ */
.banner {
  background: rgba(232,195,90,.07); color: var(--amber);
  border-bottom: 1px solid rgba(232,195,90,.25); padding: 9px 14px; font-size: 12px;
}
.banner code { color: var(--text); font-family: var(--font-num); font-size: 11px; }

/* ============================================================
   LAYOUT
   ============================================================ */
main { width: 100%; max-width: 1640px; margin: 0 auto; padding: 12px 12px 46px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }

/* hero #heroBox repurposed as the terminal empty-state (app.js hides on load) */
.hero { text-align: center; max-width: 520px; margin: 40px auto; padding: 40px 20px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.hero h1 { font-size: 19px; font-weight: 700; letter-spacing: -.02em; margin-bottom: 8px; }
.hero p { color: var(--muted); font-size: 13px; line-height: 1.6; }
.hero .paste-hint { margin-top: 14px; font-size: 12px; color: var(--faint); }
.paste-zone { display: none; }

/* ============================================================
   TOKEN CONTEXT BAR (.stats-bar)
   ============================================================ */
.stats-bar {
  display: flex; align-items: center; gap: 10px 18px; flex-wrap: wrap;
  padding: 9px 14px; margin-bottom: 8px;
}
.sb-name { min-width: 0; display: flex; align-items: center; }
.tk-name { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 15px; letter-spacing: -.01em; }
.tk-meta { color: var(--faint); font-size: 10.5px; margin-left: 2px; font-family: var(--font-num); max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-price { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-size: 22px; font-weight: 600; transition: color .2s; }
.sb-price.up { color: var(--up); } .sb-price.down { color: var(--down); }
.sb-price sub, .tk-price sub { font-size: .6em; color: var(--muted); }
.sb-changes { display: flex; gap: 12px; font-size: 12px; font-family: var(--font-num); }
.sb-stats { display: flex; align-items: center; gap: 4px 8px; flex-wrap: wrap; font-size: 12px; font-family: var(--font-num); }
.sb-stats .k { margin-right: 3px; font-size: 9.5px; letter-spacing: .05em; text-transform: uppercase; }
.sb-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.sb-actions .btn { border: 1px solid var(--line); border-radius: 6px; font-family: var(--font-num); }

.live-pill {
  display: flex; align-items: center; gap: 6px;
  font-size: 10px; font-weight: 600; letter-spacing: .08em;
  border: 1px solid rgba(46,211,160,.3); color: var(--up);
  border-radius: 6px; padding: 4px 8px;
}
.pulse { width: 6px; height: 6px; border-radius: 50%; background: var(--up); animation: pulse 1.6s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(46,211,160,.45); } 100% { box-shadow: 0 0 0 7px rgba(46,211,160,0); } }
@media (prefers-reduced-motion: reduce) { .pulse { animation: none; } }

.tk-logo { width: 30px; height: 30px; border-radius: 8px; margin-right: 2px; }
.tok-logo { width: 26px; height: 26px; border-radius: 50%; flex: 0 0 auto; object-fit: cover; background: var(--panel2); vertical-align: middle; }
.tok-logo-fb { display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-ui); font-weight: 700; font-size: 11px; color: #06120D; background: linear-gradient(150deg,var(--up),#1f7d8f); }

/* ============================================================
   LIVE PNL STRIP
   ============================================================ */
.pnl-strip {
  display: flex; align-items: center; gap: 24px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 11px 16px; margin-bottom: 8px;
}
.strip-label { font-size: 9.5px; font-weight: 600; letter-spacing: .06em; color: var(--faint); text-transform: uppercase; }
.strip-main { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-size: 22px; font-weight: 600; transition: text-shadow .2s; }
.strip-main.up { color: var(--up); } .strip-main.down { color: var(--down); }
.strip-main.flash { text-shadow: 0 0 16px currentColor; }
.strip-pct, .strip-real { font-size: 15px; font-family: var(--font-num); font-weight: 600; }
.strip-side { margin-left: auto; text-align: right; }
.strip-side + .strip-side { margin-left: 0; }

/* ============================================================
   WORKSPACE — Layout A three columns
   tool rail | chart + bottom panel | order rail
   ============================================================ */
.term-grid {
  display: grid;
  grid-template-columns: 44px minmax(0,1fr) 332px;
  gap: 1px; background: var(--line);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  margin-bottom: 8px;
}

/* vertical tool rail (decorative chart tools) */
.toolrail { background: var(--bg); display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0; }
.toolrail .tool { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 7px; color: var(--faint); cursor: pointer; }
.toolrail .tool:hover { background: var(--panel2); color: var(--text); }
.toolrail .tool.on { background: var(--panel2); color: var(--up); }
.toolrail .sep { width: 18px; height: 1px; background: var(--line); margin: 5px 0; }
.toolrail .tool.soon { opacity: 0.35; }
.toolrail .tool.soon:hover { color: var(--faint); background: transparent; }

/* middle column: chart (top) + bottom panel */
.col-mid { display: flex; flex-direction: column; min-width: 0; background: var(--bg-chart); }

.term-chart { display: flex; flex-direction: column; padding: 0; min-height: 0; flex: 1 1 auto; background: var(--bg-chart); }
.chart-head { display: flex; align-items: center; gap: 4px; height: 34px; flex: 0 0 34px; padding: 0 10px; border-bottom: 1px solid var(--line); background: var(--bg); position: relative; z-index: 2; }
.chart-head h2 { font-size: 12px; font-weight: 600; font-family: var(--font-num); color: var(--text); white-space: nowrap; }
.chart-ivals { display: flex; gap: 3px; margin-left: 10px; }
.chart-ivals.hidden { display: none; }
.iv-btn { background: transparent; border: 1px solid transparent; color: var(--muted); font-family: var(--font-num); font-size: 11px; padding: 3px 8px; border-radius: 5px; cursor: pointer; }
.iv-btn:hover { color: var(--text); background: var(--panel2); }
.iv-btn.active { background: var(--panel2); color: var(--text); border-color: var(--line); }
.chart-head-right { display: flex; align-items: center; gap: 8px; margin-left: auto; white-space: nowrap; }
.chart-mode { display: inline-flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.cm-btn { background: transparent; border: none; color: var(--muted); font-family: var(--font-num); font-size: 11px; padding: 5px 10px; cursor: pointer; }
.cm-btn.active { background: var(--panel2); color: var(--text); }
.chart-wrap { position: relative; flex: 1 1 auto; min-height: 420px; width: 100%; overflow: hidden; background: var(--bg-chart); }
.chart-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
#chartEl { position: absolute; inset: 0; width: 100%; height: 100%; }
.chart-ranges { display: flex; align-items: center; gap: 3px; height: 30px; flex: 0 0 30px; padding: 0 10px; border-top: 1px solid var(--line); background: var(--bg); position: relative; z-index: 2; }
.chart-ranges.hidden { display: none; }
.rg-btn { background: transparent; border: 1px solid transparent; font-family: var(--font-num); font-size: 10.5px; color: var(--faint); padding: 3px 9px; border-radius: 5px; cursor: pointer; }
.rg-btn:hover { color: var(--text); }
.rg-btn.active { background: var(--panel2); color: var(--text); }

/* ============================================================
   ORDER RAIL (.term-side)
   ============================================================ */
.term-side { background: var(--panel); padding: 10px; display: flex; flex-direction: column; gap: 9px; min-width: 0; overflow-y: auto; }

/* 5m vol / buys / sells / net mini-stats */
.volstat-row { display: grid; grid-template-columns: repeat(4,1fr); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.volstat { padding: 7px 9px; border-left: 1px solid var(--line); }
.volstat:first-child { border-left: none; }
.volstat .l { font-size: 9px; font-weight: 600; letter-spacing: .04em; color: var(--faint); text-transform: uppercase; }
.volstat .v { font-family: var(--font-num); font-size: 12px; font-weight: 600; margin-top: 3px; }

.trade-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 0; background: var(--panel2); border: 1px solid var(--line); border-radius: var(--radius); padding: 3px; }
.tab { padding: 8px; font-family: var(--font-ui); font-size: 13px; font-weight: 700; background: transparent; border: none; border-radius: 6px; color: var(--muted); cursor: pointer; }
#tabBuy.active { background: rgba(46,211,160,.16); color: var(--up); }
#tabSell.active { background: rgba(246,70,93,.16); color: var(--down); }

.preset-row { display: flex; gap: 6px; }
.preset { flex: 1; padding: 9px 4px; background: var(--panel2); border: 1px solid var(--line); border-radius: 7px; color: var(--text); font-family: var(--font-num); cursor: pointer; font-size: 11.5px; }
.preset:hover { border-color: var(--dim); }
.custom-row { display: flex; align-items: center; gap: 8px; }
.custom-row input { flex: 1; min-width: 0; padding: 10px 11px; background: var(--panel2); border: 1px solid var(--line); border-radius: 7px; color: var(--text); font-family: var(--font-num); font-size: 13px; outline: none; }
.custom-row input::placeholder { color: var(--faint); }
.custom-row input:focus { border-color: rgba(91,108,255,.5); }
.unit { color: var(--muted); font-size: 12px; min-width: 34px; font-family: var(--font-num); display: flex; align-items: center; gap: 5px; }

.trade-foot { display: flex; justify-content: space-between; align-items: center; font-size: 11.5px; color: var(--muted); }
.trade-foot input { width: 52px; background: var(--panel2); border: 1px solid var(--line); border-radius: 5px; color: var(--text); padding: 4px 6px; font-family: var(--font-num); font-size: 11.5px; outline: none; }
.trade-foot input:focus { border-color: rgba(91,108,255,.5); }
.fee-note { font-family: var(--font-num); font-size: 11px; color: var(--faint); }
.fast-row { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--muted); cursor: pointer; line-height: 1.45; }
.fast-row input { accent-color: var(--up); }
.slip-warn { background: rgba(232,195,90,.07); border: 1px solid rgba(232,195,90,.25); color: var(--amber); border-radius: 7px; padding: 8px 10px; font-size: 11.5px; line-height: 1.45; }
.status { font-size: 12px; min-height: 16px; word-break: break-all; font-family: var(--font-num); }
.status a { color: var(--indigo); }
.status.err { color: var(--down); }

/* Bought / Sold / Holding / PnL strip */
.pos-strip { display: grid; grid-template-columns: repeat(4,1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.ps-cell { background: var(--panel); padding: 8px 9px; }
.ps-label { font-size: 9.5px; color: var(--faint); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 3px; }
.ps-val { font-family: var(--font-num); font-size: 12.5px; color: var(--text); font-weight: 600; }
.ps-val.pnl-up { color: var(--up); } .ps-val.pnl-down { color: var(--down); }

/* preset 1/2/3 quick-config tabs (decorative) */
.preset-tabs { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 5px; }
.preset-tab { height: 28px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel2); color: var(--muted); font-size: 10.5px; font-weight: 600; letter-spacing: .03em; cursor: pointer; display: grid; place-items: center; }
.preset-tab.on { background: rgba(91,108,255,.14); color: var(--indigo); border-color: rgba(91,108,255,.4); }

/* rail token-info card grid header */
.rail-hd { display: flex; align-items: center; gap: 8px; padding: 2px; }
.rail-hd .t { font-size: 12px; font-weight: 600; }
.rail-hd .r { margin-left: auto; color: var(--faint); display: flex; gap: 6px; }

/* ============================================================
   BOTTOM PANEL — trades / token info / positions / history
   ============================================================ */
.term-bottom { background: var(--panel); border-top: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; max-height: 280px; }
.bt-tabs { display: flex; align-items: center; gap: 0; border-bottom: 1px solid var(--line); padding: 0 4px; overflow-x: auto; scrollbar-width: none; flex: 0 0 auto; }
.bt-tabs::-webkit-scrollbar { display: none; }
.bt-tab {
  position: relative; background: transparent; border: none; color: var(--muted);
  font-family: var(--font-ui); font-size: 12.5px; font-weight: 600; white-space: nowrap;
  letter-spacing: -0.01em; padding: 11px 14px; cursor: pointer; transition: color .14s;
}
.bt-tab::after {
  content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px;
  background: var(--indigo); border-radius: 2px 2px 0 0; transform: scaleX(0);
  transition: transform .16s ease;
}
.bt-tab:hover { color: var(--text); }
.bt-tab.active { color: var(--text); }
.bt-tab.active::after { transform: scaleX(1); }
.bt-tab .ct { color: var(--faint); font-weight: 500; margin-left: 4px; }
.bt-panel { padding: 4px 14px 8px; overflow-y: auto; flex: 1 1 auto; min-height: 0; }
.feed-row { display: grid; grid-template-columns: 56px 64px 1fr 1fr 1.2fr; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line-soft); font-size: 12px; font-family: var(--font-num); font-variant-numeric: tabular-nums; }
.feed-row:last-child { border-bottom: none; }
.feed-head { color: var(--faint); font-size: 10px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; position: sticky; top: 0; background: var(--panel); z-index: 1; border-bottom: 1px solid var(--line); font-family: var(--font-ui); }
.feed-body { font-family: var(--font-num); font-size: 12px; color: var(--muted); }
.feed-trader { color: var(--faint); text-decoration: none; }
.feed-trader:hover { color: var(--text); }

/* ============================================================
   SECTIONS / LISTS (positions, history, ref)
   ============================================================ */
.section { margin-bottom: 10px; padding: 14px; }
.section h2 { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.section p { font-size: 12.5px; line-height: 1.6; color: var(--muted); }
.section p b { color: var(--text); }
.pos-list { font-size: 12.5px; }
.pos-row { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line-soft); gap: 10px; flex-wrap: wrap; font-family: var(--font-num); font-size: 12px; }
.pos-row:last-child { border-bottom: none; }
.pos-closed { opacity: .6; }
.pos-open { color: var(--indigo); cursor: pointer; text-decoration: none; }
.pos-open:hover { color: var(--text); }
.ref-box { background: var(--panel2); border: 1px dashed var(--line); border-radius: 8px; padding: 12px; font-size: 12px; word-break: break-all; margin: 8px 0; font-family: var(--font-num); color: var(--muted); }

.chip { display: inline-block; font-size: 9px; font-weight: 600; letter-spacing: .05em; border-radius: 4px; padding: 2px 6px; vertical-align: middle; font-family: var(--font-ui); }
.chip-closed { background: var(--panel2); color: var(--muted); border: 1px solid var(--line); }
.chip-buy { background: rgba(46,211,160,.14); color: var(--up); }
.chip-sell { background: rgba(246,70,93,.14); color: var(--down); }

.hist-row { display: grid; grid-template-columns: auto 1.2fr 1fr 1fr auto; gap: 12px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line-soft); font-size: 12px; cursor: pointer; font-family: var(--font-num); }
.hist-row:hover { background: var(--panel2); }
.hist-row:last-child { border-bottom: none; }
.hist-when { font-size: 10.5px; }

/* ============================================================
   DISCOVER
   ============================================================ */
#discoverView { padding-top: 2px; }
.disc-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 8px; }
.disc-tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.disc-tab { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); color: var(--muted); font-family: var(--font-ui); font-size: 12.5px; font-weight: 500; padding: 7px 13px; cursor: pointer; }
.disc-tab:hover { color: var(--text); }
.disc-tab.active { background: var(--panel2); color: var(--text); border-color: var(--up); }
.disc-chain { display: flex; gap: 4px; }
.dch-btn { display: flex; align-items: center; gap: 6px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); color: var(--muted); font-family: var(--font-num); font-size: 12px; padding: 7px 12px; cursor: pointer; }
.dch-btn.active { background: var(--panel2); color: var(--text); }
.disc-note { margin: 0 0 12px 2px; color: var(--muted); }
.disc-table { padding: 4px 16px; }
.disc-row { display: grid; grid-template-columns: 28px 2fr 1fr .8fr .8fr .8fr 1fr 1fr 1fr .7fr 110px; gap: 10px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line-soft); font-size: 12.5px; font-family: var(--font-num); }
.disc-row:last-child { border-bottom: none; }
.disc-row:hover { background: var(--panel2); }
.disc-h { color: var(--faint); font-size: 10px; letter-spacing: .05em; text-transform: uppercase; font-family: var(--font-ui); border-bottom: 1px solid var(--line); }
.dr-num { text-align: right; }
.dr-act { text-align: right; }
.dr-tok { display: flex; align-items: center; gap: 10px; cursor: pointer; line-height: 1.3; }
.dr-sym { font-weight: 700; font-family: var(--font-ui); }
.dr-name { font-size: 11px; }
.dr-chain { font-size: 8.5px; font-weight: 700; padding: 1px 5px; border-radius: 4px; vertical-align: middle; }
.c-bnb { background: rgba(240,185,11,.16); color: var(--bnb); }
.c-sol { background: rgba(156,91,255,.16); color: #b98bff; }
.qb-btn { background: rgba(46,211,160,.14); color: var(--up); border: none; border-radius: var(--radius); font-family: var(--font-num); font-size: 12px; font-weight: 700; padding: 8px 10px; cursor: pointer; white-space: nowrap; }
.qb-btn:hover { background: rgba(46,211,160,.26); }
.disc-loading { padding: 40px; text-align: center; color: var(--muted); }
.disc-row .dr-num:not(.dr-act) { cursor: pointer; }
@media (max-width: 1180px) { .dr-hide2 { display: none; } .disc-row { grid-template-columns: 26px 2fr 1fr .8fr .8fr .8fr 1fr 1fr .7fr 108px; } }
@media (max-width: 820px) {
  .dr-hide { display: none; }
  .disc-table { padding: 4px 10px; }
  /* phone: token + price + 24h + buy — 4 columns that fit one line */
  .disc-row { grid-template-columns: minmax(0,1.6fr) minmax(0,.9fr) minmax(0,.7fr) auto; gap: 8px; font-size: 12px; }
  /* grid items default to min-width:auto and refuse to shrink below their content,
     which forced the row wider than the screen — min-width:0 lets them compress. */
  .disc-row > * { min-width: 0; }
  .disc-row .dr-rank { display: none; }   /* drop the # on phones */
  .disc-row .dr-1h { display: none; }      /* drop 1H, keep 24H */
  .dr-name { display: none; }              /* symbol + chain is enough on phones */
  .dr-tok { overflow: hidden; gap: 7px; }
  .dr-sym { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .qb-btn { padding: 7px 8px; font-size: 11px; white-space: nowrap; }
}

/* ============================================================
   TOKEN INFO PANEL
   ============================================================ */
.info-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 24px; }
@media (max-width: 760px) { .info-grid { grid-template-columns: 1fr; } }
.sf-row { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid var(--line-soft); font-size: 12.5px; }
.sf-row span:first-child { color: var(--muted); }
.sf-risks, .sf-src { margin-top: 8px; }
.sf-src a, .info-safety a { color: var(--indigo); }
.info-h-title { color: var(--faint); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 10px; }
.holder-row { display: grid; grid-template-columns: 22px 1fr 56px 90px; gap: 8px; align-items: center; padding: 4px 0; font-size: 12px; font-family: var(--font-num); }
.hd-bar { height: 7px; background: var(--panel2); border-radius: 4px; overflow: hidden; }
.hd-fill { display: block; height: 100%; background: var(--up); }
.hd-pct { text-align: right; }
.hd-tag { font-size: 11px; text-align: right; overflow: hidden; text-overflow: ellipsis; color: var(--muted); }

/* ============================================================
   PORTFOLIO
   ============================================================ */
.pf-totals { display: grid; grid-template-columns: repeat(5,1fr); gap: 10px; margin-bottom: 10px; }
@media (max-width: 1000px) { .pf-totals { grid-template-columns: repeat(2,1fr); } }
.pf-stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 13px 15px; }
.pf-big { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-size: 19px; font-weight: 600; margin-top: 7px; }
.pf-big.up { color: var(--up); } .pf-big.down { color: var(--down); }
.pf-row { display: grid; grid-template-columns: 1.2fr 1fr 1fr 1fr 1fr auto; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line-soft); align-items: center; font-size: 12px; font-family: var(--font-num); }
.pf-row.head { color: var(--faint); font-size: 10px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; border-bottom: 1px solid var(--line); font-family: var(--font-ui); }
.pf-row:last-child { border-bottom: none; }
@media (max-width: 820px) { .pf-row { grid-template-columns: 1fr 1fr 1fr; } .pf-row .pf-c4, .pf-row .pf-c5 { display: none; } }
.perf-cards { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; margin-bottom: 14px; }
@media (max-width: 760px) { .perf-cards { grid-template-columns: repeat(2,1fr); } }
.perf-card { background: var(--panel2); border: 1px solid var(--line); border-radius: var(--radius); padding: 13px; }
.perf-big { font-family: var(--font-num); font-size: 18px; font-weight: 600; margin: 4px 0; }
.perf-big.up { color: var(--up); } .perf-big.down { color: var(--down); }
.perf-bytoken { margin-top: 6px; }
.perf-tok-row { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid var(--line-soft); font-size: 12.5px; font-family: var(--font-num); }
.perf-tok-row:last-child { border-bottom: none; }

/* ============================================================
   PROFILE + SETTINGS
   ============================================================ */
.prof-row { display: flex; gap: 18px; align-items: center; margin-bottom: 12px; }
.prof-avatar { width: 64px; height: 64px; border-radius: 16px; flex: 0 0 auto; background: linear-gradient(135deg,var(--up),var(--indigo)); display: flex; align-items: center; justify-content: center; font-family: var(--font-ui); font-weight: 700; font-size: 26px; color: #06120D; cursor: pointer; background-size: cover; background-position: center; overflow: hidden; }
.prof-avatar.has-photo { background-image: var(--av); }
.prof-id { flex: 1; }
.prof-name-row { display: flex; gap: 8px; margin: 6px 0; max-width: 440px; }
.prof-name-row .btn-buy { width: auto; flex: 0 0 auto; }
.prof-name-row input { flex: 1; max-width: 320px; padding: 10px 12px; background: var(--panel2); border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); font-family: var(--font-num); }
.prof-pic-actions { display: flex; gap: 14px; margin: 6px 0 4px; }
#profWallets code { font-size: 11px; font-family: var(--font-num); }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 8px 0 16px; }
@media (max-width: 760px) { .settings-grid { grid-template-columns: 1fr; } }
.set-block { background: var(--panel2); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.set-title { display: flex; align-items: center; gap: 8px; font-family: var(--font-ui); font-weight: 700; font-size: 13px; margin-bottom: 12px; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12.5px; color: var(--muted); margin: 10px 0 4px; }
.set-row input { background: var(--panel); border: 1px solid var(--line); border-radius: 7px; color: var(--text); font-family: var(--font-num); padding: 7px 9px; width: 80px; text-align: right; }
.gas-input { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.set-presets { flex-direction: column; align-items: stretch; }
.preset-inputs { display: flex; gap: 8px; margin-top: 6px; }
.preset-inputs input { width: 100%; flex: 1; text-align: center; }
.set-block > .muted { display: block; margin: 6px 0 2px; line-height: 1.5; }
.set-actions { display: flex; gap: 10px; }
.set-actions .btn { flex: 0 0 auto; padding: 11px 24px; }
.set-actions .btn-buy { width: auto; }
.pf-totals .strip-label, .perf-card .strip-label { color: var(--faint); }

/* referral grid */
.ref-grid, .ref-stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; margin: 10px 0; }
@media (max-width: 760px) { .ref-grid, .ref-stats { grid-template-columns: repeat(2,1fr); } }
.sec-hero, .sec-steps { /* see security */ }
.sec-hero { text-align: left; padding: 8px 2px 16px; }
.sec-hero h1 { font-size: 22px; font-weight: 700; letter-spacing: -.02em; margin-bottom: 8px; }
.sec-hero p { color: var(--muted); max-width: 640px; font-size: 13px; line-height: 1.6; }
.sec-hero p em { color: var(--text); font-style: normal; font-weight: 600; }

/* ============================================================
   SECURITY VIEW
   ============================================================ */
.sec-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin-bottom: 10px; }
@media (max-width: 900px) { .sec-grid { grid-template-columns: 1fr; } }
.sec-card { padding: 14px; }
.sec-card h3 { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.sec-card ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 7px; font-size: 12.5px; line-height: 1.5; }
.sec-card ul li { padding-left: 18px; position: relative; color: var(--muted); }
.sec-card ul li::before { position: absolute; left: 0; font-family: var(--font-num); font-size: 11px; content: '·'; color: var(--faint); }
.sec-card a, .sec-explain a { color: var(--indigo); }
.sec-explain { margin-bottom: 10px; padding: 14px; }
.sec-explain h2 { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.sec-explain p { font-size: 12.5px; line-height: 1.65; margin-bottom: 9px; color: var(--muted); }
.sec-explain p strong { color: var(--text); }
.sec-explain ul { padding-left: 18px; font-size: 12.5px; line-height: 1.65; color: var(--muted); }
.sec-explain ul li { margin-bottom: 5px; }
.sec-explain code { background: var(--panel2); border: 1px solid var(--line); border-radius: 4px; padding: 2px 6px; font-size: 11px; word-break: break-all; font-family: var(--font-num); }
.sec-steps { counter-reset: step; padding-left: 0; list-style: none; }
.sec-steps li { counter-increment: step; padding-left: 36px; position: relative; font-size: 12.5px; line-height: 1.6; margin-bottom: 10px; color: var(--muted); }
.sec-steps li strong { color: var(--text); }
.sec-steps li::before { content: counter(step, decimal-leading-zero); position: absolute; left: 0; top: 1px; font-family: var(--font-num); color: var(--up); font-size: 11.5px; font-weight: 600; }

/* ============================================================
   MODALS / PICKER / TOAST
   ============================================================ */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.78); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 20px; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.modal-inner { max-width: 720px; width: 100%; }
.modal-inner img { width: 100%; border-radius: 10px; border: 1px solid var(--line); }
.modal-actions { display: flex; gap: 10px; margin-top: 12px; justify-content: center; }
.modal-actions .btn-buy, .modal-actions .btn-sell { width: auto; padding: 10px 20px; }
.picker { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 18px; max-width: 380px; }
.picker h3 { font-size: 14px; font-weight: 600; margin-bottom: 6px; color: var(--text); }
.evm-list { display: flex; flex-direction: column; gap: 6px; margin: 12px 0; }
.evm-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: var(--panel2); border: 1px solid var(--line); border-radius: 8px; cursor: pointer; color: var(--text); font-family: var(--font-ui); font-size: 13px; font-weight: 500; width: 100%; text-align: left; }
.evm-item:hover { border-color: var(--dim); }
.evm-item img { width: 24px; height: 24px; border-radius: 6px; }
.toast { position: fixed; bottom: 40px; left: 50%; transform: translateX(-50%); background: var(--panel2); border: 1px solid var(--line); border-radius: 8px; padding: 10px 16px; font-size: 12.5px; z-index: 60; max-width: 90vw; box-shadow: 0 8px 28px rgba(0,0,0,.6); }

/* ============================================================
   BOTTOM STATUS BAR (#priceBar)
   ============================================================ */
.price-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: flex; gap: 14px; align-items: center;
  height: 30px; padding: 0 14px;
  background: rgba(6,7,10,.94); backdrop-filter: blur(10px);
  border-top: 1px solid var(--line); font-family: var(--font-num); font-size: 11.5px;
}
.pb-left { display: flex; align-items: center; gap: 14px; color: var(--muted); }
.pb-left .sb-item { cursor: pointer; }
.pb-left .sb-item:hover { color: var(--text); }
.pb-sep { width: 1px; height: 14px; background: var(--line); }
.pb-spacer { flex: 1 1 auto; }
.pb-item { display: flex; align-items: center; gap: 6px; color: var(--muted); }
.pb-item b { color: var(--text); font-weight: 600; }
.pb-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.pb-conn { display: flex; align-items: center; gap: 6px; color: var(--up); }
.pb-conn .pb-dot { background: var(--up); animation: blink 1.8s ease-in-out infinite; }
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

/* ============================================================
   FOOTER
   ============================================================ */
footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 14px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--faint); flex-wrap: wrap; margin-bottom: 30px; }
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--text); }
main { padding-bottom: 40px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1080px) {
  .term-grid { grid-template-columns: 44px minmax(0,1fr) 300px; }
}
@media (max-width: 1120px) {
  .top { flex-wrap: wrap; height: auto; padding: 8px 10px; gap: 8px; }
  .brand-row { flex: 1 1 auto; order: 1; }
  .wallets { order: 2; }
  .header-search { order: 3; flex: 1 0 100%; max-width: none; margin: 0; }
  .views { order: 4; flex: 1 0 100%; overflow-x: auto; scrollbar-width: none; border-top: 1px solid var(--line); padding-top: 6px; }
  .views::-webkit-scrollbar { display: none; }
  .term-grid { grid-template-columns: 1fr; }
  .toolrail { flex-direction: row; justify-content: flex-start; gap: 4px; padding: 6px 10px; overflow-x: auto; }
  .toolrail .sep { width: 1px; height: 18px; margin: 0 4px; }
  .term-side { order: -1; }
  .chart-wrap { min-height: 300px; }
  .security-badge { display: none; }
}
@media (max-width: 560px) {
  .pf-totals, .perf-cards, .ref-grid, .ref-stats { grid-template-columns: 1fr 1fr; }
  .price-bar { gap: 10px; overflow-x: auto; }
  .sb-price { font-size: 20px; }
}

/* ============= Leaderboard ============= */
.lb-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin: 4px 0 16px; flex-wrap: wrap; }
.lb-title { font-size: 26px; margin: 0 0 4px; }
.lb-sub { color: var(--muted); font-size: 13px; margin: 0; }
.lb-tabs { display: flex; gap: 4px; }
.lb-tab {
  background: var(--panel2); border: 1px solid var(--line); color: var(--muted);
  font-family: var(--font-num); font-size: 12px; padding: 7px 14px; border-radius: 7px; cursor: pointer;
}
.lb-tab:hover { color: var(--text); }
.lb-tab.active { background: var(--line); color: var(--text); border-color: var(--faint); }

.lb-table { padding: 4px 0; overflow: hidden; }
.lb-row {
  display: grid; grid-template-columns: 54px 1fr 130px 150px 90px; align-items: center;
  padding: 11px 18px; gap: 10px; border-bottom: 1px solid var(--line); font-family: var(--font-num); font-size: 13px;
}
.lb-row:last-child { border-bottom: none; }
.lb-header { color: var(--muted); font-size: 10px; letter-spacing: .05em; border-bottom: 1px solid var(--line); }
.lb-rank { font-weight: 600; }
.lb-wallet { color: var(--text); }
.lb-num { text-align: right; }
.lb-me { background: rgba(46,189,133,0.06); }
.lb-youtag { font-size: 9px; background: var(--up); color: #001b10; padding: 1px 5px; border-radius: 4px; margin-left: 6px; vertical-align: middle; letter-spacing: .03em; }
.lb-empty { padding: 32px 18px; text-align: center; color: var(--muted); font-size: 13px; }
.lb-note { color: var(--faint); font-size: 11px; margin: 12px 2px; line-height: 1.5; }
.pnl-up { color: var(--up); } .pnl-down { color: var(--down); }

@media (max-width: 720px) {
  .lb-table { overflow-x: auto; }
  .lb-row { grid-template-columns: 44px 120px 100px 110px 70px; min-width: 460px; }
  .lb-head { flex-direction: column; align-items: stretch; }
  .lb-tabs { overflow-x: auto; }
}

/* ============= sortable table headers ============= */
.sortable { cursor: pointer; user-select: none; position: relative; transition: color .12s; }
.sortable:hover { color: var(--text); }
.sortable::after { content: "⇅"; opacity: 0.3; font-size: 9px; margin-left: 4px; }
.sortable.sort-asc::after { content: "↑"; opacity: 1; color: var(--up); }
.sortable.sort-desc::after { content: "↓"; opacity: 1; color: var(--up); }

/* ===== wallet balance bar + trade controls ===== */
.bal-bar {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--panel2); border: 1px solid var(--line); border-radius: 8px;
  padding: 8px 12px; margin-bottom: 10px; font-family: var(--font-num); font-size: 13px;
}
.bal-label { color: var(--muted); font-size: 11px; letter-spacing: .04em; text-transform: uppercase; }
.bal-val { color: var(--text); }
.bal-val b { color: var(--text); font-weight: 600; }

.slip-presets { display: inline-flex; gap: 4px; }
.slip-presets .chip {
  background: var(--panel2); border: 1px solid var(--line); color: var(--muted);
  font-family: var(--font-num); font-size: 11px; padding: 3px 8px; border-radius: 6px; cursor: pointer;
}
.slip-presets .chip:hover { color: var(--text); border-color: var(--faint); }
.prio-row { margin-top: 6px; }
.prio-row .prio-unit { color: var(--faint); font-size: 11px; }
.prio-row input { width: 86px; }

/* ===== coming-soon cards (Top Traders / Dev Tokens) ===== */
.soon-card { text-align: center; padding: 36px 20px; color: var(--muted); }
.soon-icon { font-size: 34px; margin-bottom: 10px; }
.soon-title { font-family: var(--font-ui); font-weight: 700; font-size: 15px; color: var(--text); margin-bottom: 8px; }
.soon-body { font-size: 13px; line-height: 1.55; max-width: 380px; margin: 0 auto 16px; }
.soon-btn { display: inline-block; }

/* holder count fallback box (BSC when top-10 list unavailable) */
.holder-count-box { text-align: center; padding: 14px 0 6px; }
.holder-count-box .hc-num { font-family: var(--font-num); font-size: 26px; font-weight: 700; color: var(--text); }

/* clickable copy-contract address on the trade page */
.tk-ca { display: inline-flex; align-items: center; gap: 6px; background: var(--panel2);
  border: 1px solid var(--line); color: var(--muted); font-family: var(--font-num);
  font-size: 11px; padding: 3px 9px; border-radius: 6px; cursor: pointer; margin-top: 4px;
  transition: color .14s, border-color .14s; }
.tk-ca:hover { color: var(--text); border-color: var(--faint); }
.tk-ca.copied { color: var(--up); border-color: var(--up); }
.tk-ca-icon { font-size: 12px; }

/* chart reset button — pushed to the right of the range bar */
.rg-reset { margin-left: auto; color: var(--muted); border-color: var(--line) !important; }
.rg-reset:hover { color: var(--text); background: var(--panel2); }

/* ===== docs hub ===== */
.docs-layout { display: grid; grid-template-columns: 200px 1fr; gap: 28px; max-width: 1000px; margin: 0 auto; padding: 28px 20px 60px; }
.docs-nav { position: sticky; top: 20px; align-self: start; }
.docs-nav-title { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); margin-bottom: 10px; }
.docs-link { display: block; padding: 7px 10px; border-radius: 7px; color: var(--muted); font-size: 13.5px; cursor: pointer; text-decoration: none; transition: color .12s, background .12s; }
.docs-link:hover { color: var(--text); background: var(--panel2); }
.docs-link.active { color: var(--text); background: var(--panel2); border-left: 2px solid var(--indigo); }
.docs-body { min-width: 0; }
.docs-body h1 { font-size: 24px; margin: 0 0 14px; color: var(--text); }
.docs-body h2 { font-size: 16px; margin: 26px 0 10px; color: var(--text); }
.docs-body h3 { font-size: 14px; margin: 0 0 8px; color: var(--text); }
.docs-body p { color: var(--muted); line-height: 1.65; margin: 0 0 12px; font-size: 14px; }
.docs-body ul, .docs-body ol { color: var(--muted); line-height: 1.7; padding-left: 20px; margin: 0 0 12px; font-size: 14px; }
.docs-body li { margin-bottom: 6px; }
.docs-body a { color: var(--indigo); }
.doc-steps li { margin-bottom: 10px; }
@media (max-width: 720px) {
  .docs-layout { grid-template-columns: 1fr; gap: 14px; }
  .docs-nav { position: static; display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
  .docs-nav-title { width: 100%; }
  .docs-link.active { border-left: none; border-bottom: 2px solid var(--indigo); }
}


/* ============================================================
   PREMIUM GLASS OVERRIDES  (appended — restyle only, no markup change)
   Dark futuristic terminal · neon mint + purple/cyan · glassmorphism
   ============================================================ */

html, body {
  background:
    radial-gradient(circle at 18% 4%,  rgba(0,255,163,.10), transparent 30%),
    radial-gradient(circle at 84% 12%, rgba(108,92,231,.12), transparent 34%),
    radial-gradient(circle at 50% 130%, rgba(40,215,255,.06), transparent 46%),
    linear-gradient(180deg, #050816 0%, #0A1020 52%, #02040A 100%) !important;
  background-attachment: fixed !important;
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.016) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.016) 1px, transparent 1px);
  background-size: 40px 40px;
  -webkit-mask-image: radial-gradient(circle at 50% 28%, #000, transparent 80%);
          mask-image: radial-gradient(circle at 50% 28%, #000, transparent 80%);
}

/* ---- glass app bar ---- */
.top {
  height: auto; min-height: 48px;
  background: rgba(5,8,22,.72) !important;
  backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.mark {
  border-radius: 8px; color: #04140C;
  background: linear-gradient(150deg,#00FFA3,#14F195);
  box-shadow: 0 0 16px rgba(0,255,163,.42), inset 0 1px 0 rgba(255,255,255,.4);
}
.brand .tld { color: var(--up); }
.brand .pro { border-radius: 5px; }
.view-tab { border-radius: 9px; transition: color .15s; }
.view-tab:hover { background: rgba(255,255,255,.05); color: var(--text); }
.view-tab.active { position: relative; font-weight: 700; }
.view-tab.active::after {
  content: ""; position: absolute; left: 10px; right: 10px; bottom: -2px; height: 2px;
  border-radius: 2px; background: var(--up); box-shadow: 0 0 12px rgba(0,255,163,.7);
}

/* ---- glass search ---- */
#tokenInput {
  height: 38px; border-radius: var(--radius);
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08);
  backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
  transition: border-color .15s, box-shadow .15s;
}
#tokenInput:focus {
  border-color: rgba(0,255,163,.55);
  box-shadow: 0 0 0 3px rgba(0,255,163,.09), inset 0 1px 0 rgba(255,255,255,.05);
}

/* ---- glass chain toggle ---- */
.chain-switch {
  border-radius: 13px; background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08); backdrop-filter: var(--glass-blur);
}
.ch-btn { border-radius: 10px; font-weight: 600; }
.ch-btn.active {
  background: rgba(0,255,163,.10); color: #fff;
  border: 1px solid rgba(0,255,163,.4); box-shadow: 0 0 14px rgba(0,255,163,.16);
}

/* ---- buttons → glass ---- */
.btn {
  border-radius: var(--radius);
  background: rgba(255,255,255,.045); border: 1px solid rgba(255,255,255,.08);
  backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  transition: border-color .15s, background .15s, transform .06s, box-shadow .15s;
}
.btn:hover { border-color: rgba(255,255,255,.2); background: rgba(255,255,255,.07); }
.btn-wallet { border-radius: 12px; }
.btn-buy {
  background: linear-gradient(180deg, #00FFA3, #11d98c); color: #04140C;
  box-shadow: 0 0 22px rgba(0,255,163,.28), inset 0 1px 0 rgba(255,255,255,.35);
}
.btn-buy:hover { filter: brightness(1.05); box-shadow: 0 0 28px rgba(0,255,163,.4); }
.btn-sell {
  background: linear-gradient(180deg, #FF4D6D, #e23457); color: #fff;
  box-shadow: 0 0 22px rgba(255,77,109,.26), inset 0 1px 0 rgba(255,255,255,.18);
}
.avatar { border-radius: 11px; background: linear-gradient(135deg, var(--up), var(--indigo)); box-shadow: 0 0 16px rgba(0,255,163,.22); }
.security-badge {
  border-radius: 11px; background: rgba(0,255,163,.08);
  border: 1px solid rgba(0,255,163,.28); color: var(--up);
}
a, .link-btn { color: var(--cyan); }

/* ---- glass cards everywhere ---- */
.card, .hero, .pf-stat, .set-block, .perf-card, .picker {
  background: var(--panel-strong) !important;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 18px;
  backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow-glass), inset 0 1px 0 rgba(255,255,255,.04);
}
.hero { border-radius: 22px; }

/* ---- DISCOVER filter pills → floating glass ---- */
.disc-tab, .dch-btn {
  height: 38px; border-radius: var(--radius); font-weight: 500;
  background: rgba(255,255,255,.035); border: 1px solid rgba(255,255,255,.08);
  backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  transition: transform .12s, border-color .15s, background .15s, box-shadow .15s;
}
.disc-tab:hover, .dch-btn:hover {
  transform: translateY(-1px); color: var(--text);
  border-color: rgba(255,255,255,.2); background: rgba(255,255,255,.06);
}
.disc-tab.active, .dch-btn.active {
  background: rgba(0,255,163,.10); color: #fff;
  border-color: rgba(0,255,163,.55); box-shadow: 0 0 18px rgba(0,255,163,.2);
}

/* ---- DISCOVER table → glass terminal ---- */
.disc-table {
  background: rgba(10,16,32,.55) !important;
  border: 1px solid rgba(255,255,255,.07); border-radius: 20px;
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow-glass), inset 0 1px 0 rgba(255,255,255,.04);
}
.disc-row { transition: background .14s; }
.disc-row:not(.disc-h) { border-radius: 12px; }
.disc-row:hover {
  background: linear-gradient(90deg, rgba(0,255,163,.06), rgba(108,92,231,.05)) !important;
  box-shadow: inset 0 0 0 1px rgba(0,255,163,.12);
}
.disc-h { border-bottom: 1px solid rgba(255,255,255,.06); }
.dr-sym { font-weight: 700; }
.dr-chain { border-radius: 5px; }
.c-bnb { background: rgba(243,186,47,.14); color: var(--bnb); }
.c-sol { background: rgba(153,69,255,.16); color: #b98bff; }

/* ---- quick-buy → premium action button ---- */
.qb-btn {
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(0,255,163,.16), rgba(0,255,163,.05));
  border: 1px solid rgba(0,255,163,.5); color: var(--up); font-weight: 700;
  box-shadow: 0 0 14px rgba(0,255,163,.14), inset 0 1px 0 rgba(255,255,255,.1);
  transition: box-shadow .15s, transform .06s, background .15s;
}
.qb-btn:hover {
  background: linear-gradient(180deg, rgba(0,255,163,.24), rgba(0,255,163,.09));
  box-shadow: 0 0 22px rgba(0,255,163,.3), inset 0 1px 0 rgba(255,255,255,.14);
}
.qb-btn:active { transform: translateY(1px); }

/* ---- trade panel chrome ---- */
.preset, .custom-row input, .trade-foot input, .slip-presets .chip, .bal-bar, .volstat-row, .pos-strip, .trade-tabs {
  border-radius: 11px;
}
.custom-row input:focus, .trade-foot input:focus {
  border-color: rgba(0,255,163,.5); box-shadow: 0 0 0 3px rgba(0,255,163,.08);
}
#tabBuy.active  { background: rgba(0,255,163,.16); color: var(--up); box-shadow: 0 0 14px rgba(0,255,163,.14); }
#tabSell.active { background: rgba(255,77,109,.16); color: var(--down); box-shadow: 0 0 14px rgba(255,77,109,.14); }
.live-pill { border-radius: 8px; border-color: rgba(0,255,163,.32); }

/* ---- terminal grid panels ---- */
.term-grid { border-radius: 18px; border-color: rgba(255,255,255,.08); box-shadow: var(--shadow-glass); }
.col-mid, .toolrail { background: rgba(7,11,22,.55); }
.term-side, .term-bottom { background: var(--panel-strong); backdrop-filter: var(--glass-blur); }
.bt-tab.active::after { background: var(--up); box-shadow: 0 0 10px rgba(0,255,163,.6); }

/* ---- glass bottom status bar ---- */
.price-bar {
  height: 34px; background: rgba(5,8,22,.82) !important;
  backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px);
  border-top: 1px solid rgba(255,255,255,.08);
}
.pb-conn { color: var(--up); }
.dot-bnb { background: var(--bnb); } .dot-sol { background: var(--sol); }
.dot-btc { background: var(--btc); } .dot-eth { background: var(--cyan); }

/* ---- leaderboard / modal polish ---- */
.lb-table { background: var(--panel-strong) !important; border-radius: 18px; backdrop-filter: var(--glass-blur); box-shadow: var(--shadow-glass); }
.lb-tab.active { background: rgba(0,255,163,.1); color: #fff; border-color: rgba(0,255,163,.4); }
.modal { background: rgba(2,4,10,.7); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.toast { border-radius: 12px; background: var(--panel-strong); backdrop-filter: var(--glass-blur); box-shadow: var(--shadow-glass); }
.evm-item { border-radius: 12px; }

::selection { background: rgba(0,255,163,.25); }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 4px; }
