/* xxtrade redesign — premium pro-trader aesthetic
   Dark obsidian + sky-blue accent + amber (warnings) + violet (premium) */

:root {
  --bg: #07090c;
  --bg-2: #0c0f14;
  --panel: #0f131a;
  --panel-2: #141923;
  --line: #1a2030;
  --line-2: #232a3c;
  --line-3: #2f3a52;
  --text: #e7ecf3;
  --text-2: #9aa3b2;
  --text-3: #5c6577;
  --accent: #87CEEB;
  --accent-2: #5fb4d8;
  --accent-dim: rgba(135, 206, 235, 0.10);
  --green: #2ecc71;
  --green-dim: rgba(46, 204, 113, 0.12);
  --red: #ff5f6d;
  --red-dim: rgba(255, 95, 109, 0.12);
  --amber: #f4b740;
  --amber-dim: rgba(244, 183, 64, 0.12);
  --violet: #b797ff;
  --violet-dim: rgba(183, 151, 255, 0.12);

  --font-sans: 'Geist', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'IBM Plex Mono', ui-monospace, monospace;

  --radius: 10px;
  --radius-lg: 14px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--bg); color: var(--text); font-family: var(--font-sans); -webkit-font-smoothing: antialiased; }
html { font-size: 14px; }
body { font-feature-settings: "ss01", "cv11"; }

.mono, .num { font-family: var(--font-mono); font-feature-settings: "tnum", "zero"; letter-spacing: -0.01em; }

.up { color: var(--green); }
.down { color: var(--red); }
.muted { color: var(--text-2); }
.dim { color: var(--text-3); }

button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input { font: inherit; color: inherit; background: none; border: none; outline: none; }
input::placeholder { color: var(--text-3); }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--line-3); }

/* ─── HEADER ─── */
.hdr {
  display: flex; align-items: center; gap: 16px;
  padding: 0 20px; height: 56px;
  background: rgba(12, 15, 20, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.hdr-logo { display: flex; align-items: center; gap: 8px; padding-right: 12px; border-right: 1px solid var(--line); }
.hdr-logo img { width: 28px; height: 28px; }
.hdr-logo .name { font-size: 16px; font-weight: 700; letter-spacing: -0.02em; }
.hdr-logo .name b { color: var(--accent); }
.hdr-logo .badge { font-size: 9px; font-weight: 700; padding: 2px 6px; border-radius: 999px; background: var(--violet-dim); color: var(--violet); margin-left: 4px; letter-spacing: 0.08em; }

.hdr-nav { display: flex; gap: 2px; }
.hdr-nav button {
  font-size: 13px; font-weight: 500; color: var(--text-2);
  padding: 6px 12px; border-radius: 8px; transition: 0.15s;
}
.hdr-nav button:hover { color: var(--text); background: var(--panel); }
.hdr-nav button.active { color: var(--text); background: var(--panel-2); }
.hdr-nav button.pro { color: var(--violet); }

.hdr-search {
  flex: 1; max-width: 360px; min-width: 180px;
  display: flex; align-items: center; gap: 8px;
  height: 32px; padding: 0 12px;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 8px; color: var(--text-2); font-size: 13px;
}
.hdr-search:focus-within { border-color: var(--line-3); background: var(--panel-2); }
.hdr-search input { flex: 1; }
.hdr-search .kbd { font-family: var(--font-mono); font-size: 10px; padding: 1px 5px; background: var(--bg); border: 1px solid var(--line-2); border-radius: 4px; color: var(--text-3); }

.hdr-right { display: flex; align-items: center; gap: 8px; }
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 12px; border-radius: 8px;
  font-size: 13px; font-weight: 500;
  background: var(--panel); border: 1px solid var(--line);
  color: var(--text); transition: 0.15s;
}
.btn:hover { background: var(--panel-2); border-color: var(--line-2); }
.btn.primary { background: var(--accent); color: #071018; border-color: var(--accent); font-weight: 600; }
.btn.primary:hover { background: #a8dcf0; }
.btn.ghost { background: transparent; }
.btn.sm { height: 28px; padding: 0 10px; font-size: 12px; }
.btn.lg { height: 40px; padding: 0 16px; font-size: 14px; }

/* ─── TICKER ─── */
.ticker {
  display: flex; align-items: center; gap: 0;
  height: 36px; background: var(--bg-2); border-bottom: 1px solid var(--line);
  overflow: hidden; white-space: nowrap;
}
.ticker-label {
  font-size: 10px; font-weight: 700; letter-spacing: 0.12em;
  color: var(--text-3); padding: 0 14px; height: 100%;
  display: flex; align-items: center; border-right: 1px solid var(--line);
  background: var(--bg);
}
.ticker-track { display: flex; gap: 28px; padding-left: 18px; animation: tick 90s linear infinite; }
@keyframes tick { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.ticker-item { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; }
.ticker-item .sym { font-weight: 600; color: var(--text); }
.ticker-item .price { color: var(--text-2); font-family: var(--font-mono); }
.ticker-item img { width: 14px; height: 14px; border-radius: 999px; }

/* ─── PANELS ─── */
.panel {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.panel-h {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid var(--line);
}
.panel-title { font-size: 13px; font-weight: 600; letter-spacing: -0.005em; display: flex; align-items: center; gap: 8px; }
.panel-title .accent { color: var(--accent); }

/* ─── APP SHELL ─── */
.app { display: flex; flex-direction: column; min-height: 100vh; }
.main { max-width: 1840px; width: 100%; margin: 0 auto; padding: 18px 20px 40px; }

.footer {
  max-width: 1840px; width: 100%; margin: 0 auto;
  padding: 16px 20px 24px;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 11px; color: var(--text-2); font-family: var(--font-mono);
  border-top: 1px solid var(--line); margin-top: auto;
}
.ftr { display: flex; align-items: center; gap: 8px; }
.status-dot { display: inline-block; width: 6px; height: 6px; border-radius: 999px; background: var(--green); box-shadow: 0 0 6px var(--green); margin-right: 4px; }

.empty-state { display: grid; place-items: center; padding: 80px 16px; }
.app {
  --font-display: 'Instrument Serif', Georgia, serif;
}

/* Add font-family setter */
h1, h2, h3 { font-family: var(--font-sans); }
.serif { font-family: var(--font-display); font-weight: 400; }

/* Top stats row */
.stats {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 16px;
}
.stat {
  padding: 16px 18px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg);
}
.stat .label { font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); display: flex; align-items: center; gap: 6px; }
.stat .v { font-family: var(--font-mono); font-size: 28px; font-weight: 600; letter-spacing: -0.02em; margin-top: 6px; }
.stat .sub { display: flex; align-items: baseline; gap: 8px; margin-top: 4px; font-size: 12px; }
.stat.hero { background: linear-gradient(135deg, var(--panel) 0%, rgba(135, 206, 235, 0.04) 100%); border-color: var(--accent-dim); position: relative; overflow: hidden; }
.stat.hero .v { font-size: 36px; }
.stat.hero::after {
  content: ''; position: absolute; right: -40px; top: -40px; width: 200px; height: 200px;
  background: radial-gradient(circle, var(--accent-dim) 0%, transparent 70%); pointer-events: none;
}

/* Trade view: 3-pane */
.trade-grid {
  display: grid; grid-template-columns: 1fr 320px 360px; gap: 16px;
  min-height: 660px;
}
@media (max-width: 1400px) {
  .trade-grid { grid-template-columns: 1fr 300px; }
  .trade-orderbook { grid-row: 2; grid-column: 1 / 3; max-height: 380px; }
}
@media (max-width: 1000px) {
  .trade-grid { grid-template-columns: 1fr; }
  .trade-orderbook { grid-column: 1; max-height: 320px; }
  .stats { grid-template-columns: 1fr 1fr; }
}

/* Chart panel */
.chart-pane { display: flex; flex-direction: column; }
.chart-symbol { display: flex; align-items: center; gap: 12px; }
.chart-symbol img { width: 32px; height: 32px; border-radius: 999px; background: var(--panel-2); }
.chart-symbol .nm { display: flex; flex-direction: column; gap: 1px; }
.chart-symbol .sym { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.chart-symbol .full { font-size: 11px; color: var(--text-2); }
.chart-stats { display: flex; gap: 24px; padding: 0 16px; }
.chart-stat { display: flex; flex-direction: column; gap: 2px; }
.chart-stat .label { font-size: 10px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); }
.chart-stat .v { font-family: var(--font-mono); font-size: 13px; font-weight: 500; }

.chart-tools { display: flex; gap: 4px; padding: 8px 16px; border-bottom: 1px solid var(--line); align-items: center; }
.chart-tools .tf-group { display: flex; gap: 1px; background: var(--bg-2); border-radius: 6px; padding: 2px; }
.chart-tools .tf-group button { height: 24px; padding: 0 8px; border-radius: 4px; font-size: 11px; font-weight: 500; color: var(--text-2); }
.chart-tools .tf-group button.active { background: var(--panel-2); color: var(--text); }
.chart-tools .sep { width: 1px; height: 16px; background: var(--line); margin: 0 6px; }

.chart-canvas-wrap { flex: 1; padding: 0; min-height: 360px; position: relative; }
.chart-canvas-wrap canvas { display: block; width: 100%; height: 100%; }

/* Order book */
.ob {
  display: flex; flex-direction: column;
  font-family: var(--font-mono); font-size: 11.5px;
}
.ob-h {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px;
  padding: 6px 12px; color: var(--text-3); font-size: 10px; letter-spacing: 0.04em;
  text-transform: uppercase; border-bottom: 1px solid var(--line);
}
.ob-rows { display: flex; flex-direction: column; }
.ob-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; padding: 2px 12px; position: relative; line-height: 1.6; }
.ob-row .bar { position: absolute; right: 0; top: 0; bottom: 0; pointer-events: none; opacity: 0.18; }
.ob-row.ask .bar { background: var(--red); }
.ob-row.bid .bar { background: var(--green); }
.ob-row .p { position: relative; }
.ob-row.ask .p { color: var(--red); }
.ob-row.bid .p { color: var(--green); }
.ob-row .sz, .ob-row .total { position: relative; color: var(--text-2); text-align: right; }
.ob-spread {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 12px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  font-size: 11px;
}
.ob-spread .last { font-family: var(--font-mono); font-size: 14px; font-weight: 600; }

/* Swap panel */
.swap { padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.swap-tabs { display: flex; gap: 2px; padding: 2px; background: var(--bg-2); border-radius: 8px; }
.swap-tabs button { flex: 1; height: 30px; border-radius: 6px; font-size: 12px; font-weight: 500; color: var(--text-2); }
.swap-tabs button.active { background: var(--panel-2); color: var(--text); }

.swap-side { display: flex; gap: 2px; padding: 2px; background: var(--bg-2); border-radius: 8px; }
.swap-side button { flex: 1; height: 34px; border-radius: 6px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.swap-side button.buy.active { background: var(--green-dim); color: var(--green); border: 1px solid var(--green); }
.swap-side button.sell.active { background: var(--red-dim); color: var(--red); border: 1px solid var(--red); }

.swap-input {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px;
}
.swap-input .row1 { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-3); margin-bottom: 6px; }
.swap-input .row2 { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.swap-input input { font-family: var(--font-mono); font-size: 22px; font-weight: 500; flex: 1; min-width: 0; }
.swap-input .token-pill { display: flex; align-items: center; gap: 6px; padding: 5px 9px 5px 5px; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; font-size: 12px; font-weight: 600; cursor: pointer; }
.swap-input .token-pill img { width: 22px; height: 22px; border-radius: 999px; }
.swap-input .row3 { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-2); margin-top: 6px; }

.swap-arrow { display: flex; justify-content: center; margin: -4px 0; position: relative; z-index: 1; }
.swap-arrow button {
  width: 28px; height: 28px; border-radius: 8px; background: var(--panel-2); border: 1px solid var(--line-2);
  display: grid; place-items: center; color: var(--text-2);
}
.swap-arrow button:hover { color: var(--accent); border-color: var(--accent); }

.swap-info { display: flex; flex-direction: column; gap: 4px; padding: 8px 2px; font-size: 11.5px; }
.swap-info .row { display: flex; justify-content: space-between; }
.swap-info .row .l { color: var(--text-3); }
.swap-info .row .v { font-family: var(--font-mono); color: var(--text-2); }

.slip-presets { display: flex; gap: 4px; }
.slip-presets button { flex: 1; height: 26px; border-radius: 6px; font-size: 11px; background: var(--bg-2); color: var(--text-2); border: 1px solid var(--line); }
.slip-presets button.active { background: var(--accent-dim); color: var(--accent); border-color: var(--accent); }

/* Markets table */
.mkt {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg);
}
.mkt-h {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; gap: 12px;
}
.mkt-cats { display: flex; gap: 2px; padding: 2px; background: var(--bg-2); border-radius: 8px; flex-wrap: wrap; }
.mkt-cats button { height: 28px; padding: 0 12px; border-radius: 6px; font-size: 12px; font-weight: 500; color: var(--text-2); white-space: nowrap; }
.mkt-cats button.active { background: var(--panel-2); color: var(--text); }

.mkt-table { width: 100%; border-collapse: collapse; }
.mkt-table thead th {
  font-size: 10px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--text-3); text-align: right; padding: 8px 16px; background: var(--bg-2);
  border-bottom: 1px solid var(--line); position: sticky; top: 0;
}
.mkt-table thead th:first-child { text-align: left; }
.mkt-table thead th .sort { font-size: 9px; opacity: 0.5; margin-left: 4px; }
.mkt-table tbody tr { border-bottom: 1px solid var(--line); cursor: pointer; transition: 0.1s; }
.mkt-table tbody tr:hover { background: rgba(135, 206, 235, 0.025); }
.mkt-table tbody tr.active { background: var(--accent-dim); }
.mkt-table tbody tr.active::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--accent); }
.mkt-table td { padding: 10px 16px; font-size: 13px; vertical-align: middle; text-align: right; }
.mkt-table td:first-child { text-align: left; }
.mkt-table td.sym-cell { display: flex; align-items: center; gap: 10px; padding: 10px 16px; }
.mkt-table td.sym-cell img { width: 26px; height: 26px; border-radius: 999px; background: var(--bg-2); }
.mkt-table td.sym-cell .nm { display: flex; flex-direction: column; gap: 1px; line-height: 1.2; }
.mkt-table td.sym-cell .sym { font-weight: 600; font-size: 13px; }
.mkt-table td.sym-cell .name { font-size: 11px; color: var(--text-3); }
.mkt-table td .star { color: var(--text-3); transition: 0.15s; cursor: pointer; }
.mkt-table td .star.on { color: var(--amber); }
.mkt-table td .num { font-family: var(--font-mono); font-size: 12.5px; }

.spark-cell { width: 110px; height: 32px; }
.cat-pill {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 9px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 2px 6px; border-radius: 4px;
  background: var(--violet-dim); color: var(--violet);
}
.cat-pill.live { background: var(--green-dim); color: var(--green); }
.cat-pill.pre { background: var(--violet-dim); color: var(--violet); }
.cat-pill.closed { background: var(--amber-dim); color: var(--amber); }

/* Portfolio panel */
.port-h {
  display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 1px;
  background: var(--line); border-bottom: 1px solid var(--line);
}
.port-h .cell { background: var(--panel); padding: 14px 16px; }
.port-h .label { font-size: 10px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); }
.port-h .v { font-family: var(--font-mono); font-size: 18px; font-weight: 500; margin-top: 4px; }

.alloc-bar { display: flex; height: 6px; border-radius: 3px; overflow: hidden; margin-top: 10px; gap: 1px; }
.alloc-bar > span { height: 100%; }
.alloc-legend { display: flex; flex-wrap: wrap; gap: 12px 18px; padding: 12px 16px; }
.alloc-legend .item { display: flex; align-items: center; gap: 6px; font-size: 11px; }
.alloc-legend .dot { width: 8px; height: 8px; border-radius: 2px; }
.alloc-legend .pct { color: var(--text-3); font-family: var(--font-mono); }

.port-row { display: grid; grid-template-columns: minmax(180px, 2fr) 1fr 1fr 1fr 1fr 1fr; gap: 8px; padding: 12px 16px; align-items: center; border-bottom: 1px solid var(--line); }
.port-row:hover { background: rgba(135, 206, 235, 0.025); }
.port-row .tk { display: flex; align-items: center; gap: 10px; }
.port-row .tk img { width: 28px; height: 28px; border-radius: 999px; background: var(--bg-2); }
.port-row .tk .nm { display: flex; flex-direction: column; gap: 1px; line-height: 1.2; }
.port-row .tk .sym { font-weight: 600; font-size: 13px; }
.port-row .tk .name { font-size: 11px; color: var(--text-3); }
.port-row .v { font-family: var(--font-mono); font-size: 12.5px; text-align: right; }
.port-row .head { font-size: 10px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); text-align: right; }
.port-row.head-row { padding: 8px 16px; background: var(--bg-2); border-bottom: 1px solid var(--line); }
.port-row .head:first-child { text-align: left; }

/* Backing panel */
.back-card {
  background: linear-gradient(135deg, rgba(135, 206, 235, 0.04), rgba(183, 151, 255, 0.03));
  border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 16px;
}
.back-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; margin-top: 12px; }
.back-cell { padding: 12px; background: var(--bg-2); border-radius: 10px; border: 1px solid var(--line); }
.back-cell .lbl { font-size: 10px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); }
.back-cell .v { font-family: var(--font-mono); font-size: 16px; font-weight: 500; margin: 4px 0; }
.back-cell .bar { height: 4px; background: var(--line); border-radius: 2px; overflow: hidden; }
.back-cell .bar > span { display: block; height: 100%; transition: width 0.4s; }
.back-cell.gold .bar > span { background: var(--amber); }
.back-cell.btc .bar > span { background: #f7931a; }
.back-cell.stable .bar > span { background: var(--accent); }

/* Movers strip */
.movers { display: flex; gap: 10px; overflow-x: auto; padding: 2px; }
.mover {
  min-width: 200px; padding: 12px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 10px; display: flex; flex-direction: column; gap: 6px;
}
.mover .top { display: flex; justify-content: space-between; align-items: center; }
.mover .ti { display: flex; align-items: center; gap: 8px; }
.mover .ti img { width: 22px; height: 22px; border-radius: 999px; }
.mover .ti .s { font-size: 12px; font-weight: 600; }
.mover .ti .n { font-size: 10px; color: var(--text-3); }
.mover .pr { font-family: var(--font-mono); font-size: 14px; font-weight: 500; }
.mover .ch { font-family: var(--font-mono); font-size: 11px; }
.mover .spark { height: 24px; }

/* Trades feed */
.trades { padding: 8px 0; font-family: var(--font-mono); font-size: 11.5px; }
.trades-h { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; padding: 6px 14px; color: var(--text-3); font-size: 10px; letter-spacing: 0.04em; text-transform: uppercase; }
.trades-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; padding: 2px 14px; line-height: 1.7; }
.trades-row .p.b { color: var(--green); }
.trades-row .p.s { color: var(--red); }
.trades-row .sz, .trades-row .t { color: var(--text-2); text-align: right; }

/* Hero (logged-out) */
.hero {
  position: relative; min-height: 80vh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 80px 24px; overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0; background:
    radial-gradient(800px 500px at 50% 30%, rgba(135, 206, 235, 0.08), transparent 60%),
    radial-gradient(600px 400px at 20% 80%, rgba(183, 151, 255, 0.05), transparent 60%);
  pointer-events: none;
}
.hero-grid { position: absolute; inset: 0; background-image: linear-gradient(rgba(135, 206, 235, 0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(135, 206, 235, 0.03) 1px, transparent 1px); background-size: 48px 48px; mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%); pointer-events: none; }
.hero-eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 11px; color: var(--text-2); margin-bottom: 24px; background: var(--panel); position: relative; }
.hero-eyebrow .dot { width: 6px; height: 6px; border-radius: 999px; background: var(--green); box-shadow: 0 0 8px var(--green); }
.hero h1 { font-size: clamp(44px, 6vw, 84px); font-weight: 700; letter-spacing: -0.04em; line-height: 1; text-align: center; max-width: 1100px; position: relative; }
.hero h1 .accent { color: var(--accent); }
.hero p.lead { color: var(--text-2); font-size: 18px; max-width: 660px; text-align: center; margin: 24px 0 32px; line-height: 1.5; position: relative; }
.hero-cta { display: flex; gap: 10px; position: relative; }
.hero-stats { display: flex; gap: 36px; margin-top: 56px; position: relative; }
.hero-stat { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.hero-stat .v { font-family: var(--font-mono); font-size: 22px; font-weight: 600; }
.hero-stat .l { font-size: 11px; color: var(--text-3); letter-spacing: 0.06em; text-transform: uppercase; }
.hero-tickers { position: relative; margin-top: 56px; max-width: 1100px; width: 100%; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; }
.hero-ticker {
  padding: 12px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  display: flex; align-items: center; gap: 10px; transition: 0.2s;
}
.hero-ticker:hover { border-color: var(--accent); transform: translateY(-2px); }
.hero-ticker img { width: 32px; height: 32px; border-radius: 999px; }
.hero-ticker .info { flex: 1; min-width: 0; }
.hero-ticker .info .s { font-size: 12px; font-weight: 600; }
.hero-ticker .info .n { font-size: 10px; color: var(--text-3); }
.hero-ticker .pr { display: flex; flex-direction: column; align-items: flex-end; }
.hero-ticker .pr .p { font-family: var(--font-mono); font-size: 12px; font-weight: 500; }
.hero-ticker .pr .c { font-family: var(--font-mono); font-size: 10px; }

/* Modal */
.modal-bg {
  position: fixed; inset: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(8px);
  display: grid; place-items: center; z-index: 100;
}
.modal {
  width: 480px; max-width: calc(100vw - 32px);
  background: var(--panel); border: 1px solid var(--line-2);
  border-radius: 16px; box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  overflow: hidden;
}
.modal-h { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal-h .t { font-size: 15px; font-weight: 600; }
.modal-body { padding: 20px; }

.qr-wrap { padding: 16px; background: white; border-radius: 12px; display: grid; place-items: center; }
.address-pill {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 10px; font-family: var(--font-mono); font-size: 12px; word-break: break-all; margin-top: 12px;
}

/* Section divider */
.section-h { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 4px; }
.section-h .t { font-size: 14px; font-weight: 600; }
.section-h .meta { font-size: 11px; color: var(--text-3); }

/* Misc */
.chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 500;
  background: var(--panel-2); color: var(--text-2); border: 1px solid var(--line);
}
.chip.up { background: var(--green-dim); color: var(--green); border-color: transparent; }
.chip.down { background: var(--red-dim); color: var(--red); border-color: transparent; }
.chip.warn { background: var(--amber-dim); color: var(--amber); border-color: transparent; }
.chip.pro { background: var(--violet-dim); color: var(--violet); border-color: transparent; }

/* Pair picker (Hyperliquid-style) */
.picker-trigger {
  display: flex; align-items: center; gap: 12px;
  padding: 4px 10px 4px 4px; margin: -4px 0 -4px -4px;
  border-radius: 10px; transition: 0.15s; background: transparent;
  border: 1px solid transparent;
}
.picker-trigger:hover { background: var(--panel-2); border-color: var(--line-2); }
.picker-trigger .picker-chev { color: var(--text-3); transition: 0.2s; margin-left: -4px; }
.picker-trigger:hover .picker-chev { color: var(--text); }
.picker-trigger .picker-chev[data-open="true"] { transform: rotate(180deg); color: var(--accent); }

.pair-picker {
  position: absolute; top: calc(100% + 4px); left: 12px;
  width: 580px; max-width: calc(100vw - 32px); max-height: 540px;
  background: var(--panel); border: 1px solid var(--line-2);
  border-radius: 14px; box-shadow: 0 24px 60px rgba(0,0,0,0.5), 0 0 0 1px rgba(135,206,235,0.06);
  z-index: 60; display: flex; flex-direction: column; overflow: hidden;
  animation: ppIn 0.14s ease-out;
}
@keyframes ppIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }
.pp-search { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); color: var(--text-2); }
.pp-search input { flex: 1; font-size: 14px; }
.pp-search .kbd { font-family: var(--font-mono); font-size: 10px; padding: 2px 6px; background: var(--bg); border: 1px solid var(--line-2); border-radius: 4px; color: var(--text-3); }
.pp-cats { display: flex; gap: 2px; padding: 8px 10px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.pp-cats button { height: 26px; padding: 0 10px; border-radius: 6px; font-size: 11.5px; font-weight: 500; color: var(--text-2); white-space: nowrap; }
.pp-cats button:hover { color: var(--text); background: var(--panel-2); }
.pp-cats button.active { background: var(--accent-dim); color: var(--accent); }

.pp-head {
  display: grid; grid-template-columns: 1.6fr 1fr 0.7fr 1fr; gap: 10px;
  padding: 8px 14px; font-size: 10px; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--text-3);
  background: var(--bg-2); border-bottom: 1px solid var(--line);
}
.pp-rows { overflow-y: auto; flex: 1; }
.pp-row {
  display: grid; grid-template-columns: 1.6fr 1fr 0.7fr 1fr; gap: 10px;
  align-items: center; padding: 8px 14px; width: 100%;
  border-bottom: 1px solid var(--line); cursor: pointer; transition: 0.1s;
  text-align: right;
}
.pp-row:hover { background: rgba(135, 206, 235, 0.04); }
.pp-row.active { background: var(--accent-dim); }
.pp-row .m { display: flex; align-items: center; gap: 10px; text-align: left; }
.pp-row .nm { display: flex; flex-direction: column; gap: 1px; line-height: 1.2; }
.pp-row .s { font-size: 13px; font-weight: 600; }
.pp-row .sl { color: var(--text-3); font-weight: 500; }
.pp-row .n { font-size: 11px; color: var(--text-3); }
.pp-row .num { font-family: var(--font-mono); font-size: 12px; }
.pp-row .vol { color: var(--text-2); }

.pp-foot {
  display: flex; justify-content: space-between; padding: 8px 14px;
  font-size: 10px; color: var(--text-3); font-family: var(--font-mono);
  border-top: 1px solid var(--line); background: var(--bg-2);
}

/* Source pill — shows whether data is LIVE or simulated */
.src-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 7px 2px 6px; border-radius: 4px;
  font-size: 9px; font-weight: 600; letter-spacing: 0.04em;
  font-family: var(--font-sans); white-space: nowrap;
}
.src-pill .dot { width: 5px; height: 5px; border-radius: 999px; }
.src-pill.live { background: var(--green-dim); color: var(--green); }
.src-pill.live .dot { background: var(--green); box-shadow: 0 0 6px var(--green); animation: livepulse 1.6s ease-in-out infinite; }
.src-pill.live.ws .dot { animation-duration: 0.8s; }
.src-pill.sim { background: var(--amber-dim); color: var(--amber); }
.src-pill.sim .dot { background: var(--amber); }
@keyframes livepulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

/* Indicative-data banner over pre-IPO charts */
.indicative-banner {
  position: absolute; top: 12px; left: 12px; right: 12px; z-index: 2;
  display: flex; align-items: center; gap: 10px; padding: 8px 12px;
  background: rgba(244, 183, 64, 0.08); border: 1px solid rgba(244, 183, 64, 0.25);
  color: var(--amber); border-radius: 8px; font-size: 11.5px; line-height: 1.4;
  backdrop-filter: blur(6px);
}
.indicative-banner b { color: #f4c97a; font-weight: 600; }
.indicative-banner svg { flex-shrink: 0; opacity: 0.9; }

