:root {
  color-scheme: dark;
  --bg: #070a12;
  --panel: rgba(18, 24, 38, 0.82);
  --panel-strong: rgba(23, 31, 50, 0.96);
  --line: rgba(148, 163, 184, 0.16);
  --text: #ecf3ff;
  --muted: #8ea0b8;
  --green: #36d399;
  --red: #fb7185;
  --gold: #fbbf24;
  --blue: #60a5fa;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(96, 165, 250, 0.16), transparent 32rem),
    radial-gradient(circle at top right, rgba(54, 211, 153, 0.10), transparent 30rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.shell { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 32px 0; }
.hero { display: flex; justify-content: space-between; gap: 20px; align-items: center; margin-bottom: 24px; }
.eyebrow { margin: 0 0 8px; color: var(--green); letter-spacing: 0.12em; text-transform: uppercase; font-size: 12px; font-weight: 800; }
h1 { margin: 0; font-size: clamp(32px, 6vw, 64px); letter-spacing: -0.06em; }
h2 { margin: 0; font-size: 18px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.status-card, .card, .panel { border: 1px solid var(--line); background: var(--panel); box-shadow: 0 20px 80px rgba(0,0,0,.25); backdrop-filter: blur(18px); }
.status-card { min-width: 240px; border-radius: 24px; padding: 18px; display: flex; align-items: center; gap: 12px; }
.status-title { font-weight: 800; }
.dot { width: 12px; height: 12px; border-radius: 999px; background: var(--gold); box-shadow: 0 0 24px var(--gold); }
.dot.ok { background: var(--green); box-shadow: 0 0 24px var(--green); }
.dot.bad { background: var(--red); box-shadow: 0 0 24px var(--red); }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.card { border-radius: 28px; padding: 20px; position: relative; overflow: hidden; }
.card::after { content: ""; position: absolute; inset: auto -40px -80px auto; width: 150px; height: 150px; background: rgba(96,165,250,.08); border-radius: 999px; }
.card-head { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.symbol { font-size: 22px; font-weight: 900; letter-spacing: -0.03em; }
.pair-link { color: inherit; text-decoration: none; }
.pair-link:hover { color: var(--green); }
.price { font-size: 36px; font-weight: 900; letter-spacing: -0.05em; margin-bottom: 8px; }
.badge { border-radius: 999px; padding: 6px 10px; font-weight: 800; font-size: 13px; height: fit-content; background: rgba(148,163,184,.12); }
.pos { color: var(--green); background: rgba(54,211,153,.12); }
.neg { color: var(--red); background: rgba(251,113,133,.12); }
.metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.metric { padding: 12px; border-radius: 16px; background: rgba(255,255,255,.035); border: 1px solid var(--line); }
.metric label { display:block; color: var(--muted); font-size: 11px; margin-bottom: 5px; }
.metric strong { font-size: 14px; }
.depth { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; font-size: 12px; }
.depth-row { display:flex; justify-content:space-between; padding: 4px 0; border-bottom: 1px solid rgba(148,163,184,.08); }
.ask { color: var(--red); } .bid { color: var(--green); }
.panel-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 16px; margin-top: 16px; }
.panel { border-radius: 28px; padding: 20px; min-height: 320px; }
.panel-head { display:flex; justify-content:space-between; align-items:center; margin-bottom: 14px; }
.movers-head { align-items: flex-start; gap: 14px; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.tab { border: 1px solid var(--line); color: var(--muted); background: rgba(255,255,255,.035); border-radius: 999px; padding: 8px 11px; font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; transition: .18s ease; }
.tab:hover { color: var(--text); border-color: rgba(96,165,250,.45); }
.tab.active { color: var(--bg); background: linear-gradient(135deg, var(--green), var(--blue)); border-color: transparent; box-shadow: 0 10px 30px rgba(54,211,153,.18); }
.table-row { display: grid; grid-template-columns: 1.25fr 1fr auto; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: center; }
.rank { color: var(--muted); font-size: 12px; margin-right: 6px; }
.trades { display: flex; flex-direction: column; gap: 8px; max-height: 420px; overflow:auto; }
.trade { display:flex; justify-content:space-between; gap: 10px; padding: 10px 12px; background: rgba(255,255,255,.035); border: 1px solid var(--line); border-radius: 14px; }
@media (max-width: 920px) { .hero, .panel-grid { grid-template-columns: 1fr; display:grid; } .grid { grid-template-columns: 1fr; } .status-card { min-width: 0; } .movers-head { display: grid; } .tabs { justify-content: flex-start; } }
.hidden { display: none !important; }
.back-link { display: inline-flex; margin-bottom: 18px; color: var(--muted); text-decoration: none; font-weight: 800; }
.back-link:hover { color: var(--green); }
.detail-page { padding-bottom: 32px; }
.detail-hero { min-height: auto; display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-bottom: 16px; }
.detail-price { text-align: right; }
.detail-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.metric-panel { min-height: auto; padding: 18px; }
.metric-panel label { display: block; color: var(--muted); font-size: 12px; margin-bottom: 8px; }
.metric-panel strong { display: block; font-size: 20px; letter-spacing: -0.03em; }
.metric-panel span { display: block; color: var(--muted); margin-top: 6px; font-size: 12px; }
.detail-message { padding: 10px 14px; border: 1px solid var(--line); border-radius: 14px; background: rgba(251,191,36,.08); }
.detail-chart { min-height: auto; margin-bottom: 16px; }
.detail-depth { margin-top: 0; }
@media (max-width: 920px) { .detail-hero { display: grid; } .detail-price { text-align: left; } .detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .detail-grid { grid-template-columns: 1fr; } .table-row { grid-template-columns: 1fr; } }
.ohlc-strip { display: flex; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: 12px; font-weight: 800; margin: 4px 0 12px; }
.candle-chart { border: 1px solid var(--line); border-radius: 20px; background: rgba(0,0,0,.16); padding: 14px; overflow-x: auto; }
.price-pane { position: relative; height: 210px; display: flex; align-items: stretch; gap: 4px; min-width: 720px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.candle-slot { position: relative; flex: 1; min-width: 8px; height: 190px; }
.wick { position: absolute; left: 50%; width: 1px; transform: translateX(-50%); opacity: .9; }
.body { position: absolute; left: 18%; right: 18%; min-height: 4px; border-radius: 2px; }
.wick.up, .body.up { background: var(--green); }
.wick.down, .body.down { background: var(--red); }
.volume-pane { height: 72px; display: flex; align-items: flex-end; gap: 4px; min-width: 720px; padding-top: 10px; }
.volume-bar { flex: 1; min-width: 8px; border-radius: 3px 3px 0 0; opacity: .55; }
.volume-bar.up { background: var(--green); }
.volume-bar.down { background: var(--red); }
.tv-chart { height: 420px; width: 100%; border: 1px solid var(--line); border-radius: 20px; background: rgba(0,0,0,.16); overflow: hidden; }
.ai-panel { min-height: auto; margin-bottom: 16px; }
.ai-suggestion { line-height: 1.6; padding: 14px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.035); }
.ai-suggestion strong { color: var(--text); }
.tab:disabled { opacity: .55; cursor: wait; }
.prediction-card { display:flex; justify-content:space-between; gap:12px; align-items:center; margin-bottom: 12px; padding: 12px 14px; border-radius: 16px; border: 1px solid var(--line); background: rgba(255,255,255,.045); }
.prediction-card strong { display:block; font-size: 18px; margin-top: 4px; }
.prediction-card.pos { border-color: rgba(54,211,153,.35); background: rgba(54,211,153,.08); }
.prediction-card.neg { border-color: rgba(251,113,133,.35); background: rgba(251,113,133,.08); }
