@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@300;400;500;700&family=Orbitron:wght@400;500;700;900&family=Share+Tech+Mono&display=swap');

/* Main CSS vars */
:root {
  --color-bg: #020617; /* Slate-950 */
  --color-cyan: #06b6d4; /* Cyan-500 */
  --color-yellow: #eab308; /* Yellow-500 */
  --color-emerald: #10b981; /* Emerald-500 */
  --color-rose: #f43f5e; /* Rose-500 */
  --color-violet: #8b5cf6; /* Violet-500 */
}

body {
  font-family: 'JetBrains Mono', monospace;
  background-color: var(--color-bg);
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(6, 182, 212, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(16, 185, 129, 0.05) 0%, transparent 40%);
  background-attachment: fixed;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.6); /* Slate-900 */
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: rgba(6, 182, 212, 0.3); /* Cyan thumb */
  border-radius: 4px;
  border: 1px solid rgba(6, 182, 212, 0.1);
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(6, 182, 212, 0.6);
  box-shadow: 0 0 8px rgba(6, 182, 212, 0.5);
}

/* Neon Glows */
.glow-cyan {
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.15);
  border-color: rgba(6, 182, 212, 0.3);
}

.glow-cyan-hover:hover {
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.3);
  border-color: rgba(6, 182, 212, 0.6);
}

.glow-emerald {
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.3);
}

.glow-rose {
  box-shadow: 0 0 15px rgba(244, 63, 94, 0.15);
  border-color: rgba(244, 63, 94, 0.3);
}

.text-glow-cyan {
  text-shadow: 0 0 8px rgba(6, 182, 212, 0.6);
}

.text-glow-yellow {
  text-shadow: 0 0 8px rgba(234, 179, 8, 0.6);
}

.text-glow-emerald {
  text-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
}

.text-glow-rose {
  text-shadow: 0 0 8px rgba(244, 63, 94, 0.6);
}

/* Unified liquidation map */
.liquidation-map-card {
  background: #0f172a;
}

.liquidation-chart-shell {
  position: relative;
  min-height: 460px;
  overflow: hidden;
  border: 1px solid #1e293b;
  border-radius: 8px;
  background: #020617;
}

.liquidation-chart,
.liquidation-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.liquidation-overlay {
  z-index: 2;
  pointer-events: none;
}

.liquidation-tooltip {
  position: absolute;
  z-index: 4;
  width: 220px;
  padding: 10px;
  border: 1px solid #334155;
  border-radius: 6px;
  background: #0f172a;
  color: #cbd5e1;
  box-shadow: 0 12px 30px rgba(2, 6, 23, 0.65);
  font: 10px/1.55 'JetBrains Mono', monospace;
  pointer-events: none;
}

.liquidation-tooltip strong { color: #f8fafc; }
.liquidation-tooltip em { color: #eab308; }
.liquidation-tooltip hr { border: 0; border-top: 1px solid #334155; margin: 6px 0; }

.liquidation-empty {
  position: absolute;
  z-index: 3;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  font: 11px 'JetBrains Mono', monospace;
  pointer-events: none;
}

.liq-source-toggle,
.liq-source-preset {
  border: 1px solid #334155;
  border-radius: 5px;
  padding: 6px 10px;
  background: #020617;
  color: #94a3b8;
  font: 700 10px 'JetBrains Mono', monospace;
  transition: border-color 150ms ease, color 150ms ease, background 150ms ease;
}

.liq-source-toggle.active,
.liq-source-preset.active {
  border-color: #06b6d4;
  background: #164e63;
  color: #cffafe;
}

.liq-quality-warning {
  max-width: 100%;
  border: 1px solid #eab308;
  border-radius: 5px;
  padding: 5px 8px;
  color: #fde047;
  background: #422006;
  font: 9px/1.4 'JetBrains Mono', monospace;
}

.liq-legend-volume,
.liq-legend-long,
.liq-legend-short {
  border-radius: 3px;
  padding: 3px 6px;
  color: #f8fafc;
}
.liq-legend-volume { background: #334155; }
.liq-legend-long { background: #b45309; }
.liq-legend-short { background: #0369a1; }

.liq-health-row {
  display: grid;
  grid-template-columns: minmax(90px, 1fr) auto;
  gap: 2px 12px;
  border-left: 2px solid #10b981;
  padding: 7px 9px;
  background: #0f172a;
  color: #cbd5e1;
  font: 10px 'JetBrains Mono', monospace;
}
.liq-health-row small { grid-column: 1 / -1; overflow-wrap: anywhere; color: #64748b; }
.liq-health-row[data-quality='degraded'],
.liq-health-row[data-quality='stale'] { border-left-color: #eab308; }
.liq-health-row[data-quality='missing'] { border-left-color: #f43f5e; }

@media (max-width: 767px) {
  .liquidation-chart-shell { min-height: 380px; }
}

/* Futuristic Scanline Effect */
.scanline {
  position: relative;
}
.scanline::before {
  content: "";
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: linear-gradient(
    rgba(18, 16, 16, 0) 50%, 
    rgba(0, 0, 0, 0.25) 50%
  );
  background-size: 100% 4px;
  z-index: 10;
  pointer-events: none;
  opacity: 0.4;
}

/* Thought Stream Terminal styling */
.terminal-line {
  border-left: 2px solid rgba(6, 182, 212, 0.2);
  transition: all 0.3s ease;
}

.terminal-line:hover {
  border-left-color: var(--color-cyan);
  background: rgba(6, 182, 212, 0.02);
}

/* Markdown Rendering Styles for Market Wiki */
.markdown-body {
  color: #cbd5e1; /* Slate-300 */
  line-height: 1.6;
}

.markdown-body h1 {
  font-family: 'Orbitron', sans-serif;
  color: #f1f5f9;
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 1.5rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid rgba(6, 182, 212, 0.2);
  padding-bottom: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-shadow: 0 0 8px rgba(6, 182, 212, 0.3);
}

.markdown-body h2 {
  font-family: 'Orbitron', sans-serif;
  color: #f1f5f9;
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 1.25rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  padding-bottom: 0.2rem;
}

.markdown-body h3 {
  font-family: 'Orbitron', sans-serif;
  color: #e2e8f0;
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

.markdown-body p {
  margin-bottom: 1rem;
}

.markdown-body strong {
  color: var(--color-cyan);
  font-weight: 600;
}

.markdown-body em {
  color: var(--color-yellow);
  font-style: italic;
}

.markdown-body ul, .markdown-body ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.markdown-body ul {
  list-style-type: square;
}

.markdown-body ul li {
  margin-bottom: 0.25rem;
}

.markdown-body ul li::marker {
  color: var(--color-emerald);
}

.markdown-body ol {
  list-style-type: decimal;
}

.markdown-body ol li::marker {
  color: var(--color-cyan);
}

.markdown-body pre {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(6, 182, 212, 0.2);
  border-radius: 4px;
  padding: 1rem;
  overflow-x: auto;
  margin-bottom: 1rem;
  font-family: 'JetBrains Mono', monospace;
}

.markdown-body code {
  font-family: 'JetBrains Mono', monospace;
  background: rgba(15, 23, 42, 0.6);
  padding: 0.1rem 0.3rem;
  border-radius: 3px;
  color: var(--color-yellow);
  font-size: 0.9em;
}

.markdown-body pre code {
  background: transparent;
  padding: 0;
  color: #f8fafc;
}

.markdown-body blockquote {
  border-left: 4px solid var(--color-cyan);
  background: rgba(6, 182, 212, 0.05);
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  border-radius: 0 4px 4px 0;
}

.markdown-body table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.markdown-body th, .markdown-body td {
  border: 1px solid rgba(148, 163, 184, 0.2);
  padding: 0.5rem 0.75rem;
  text-align: left;
}

.markdown-body th {
  background: rgba(15, 23, 42, 0.9);
  color: var(--color-cyan);
  font-weight: 600;
  text-transform: uppercase;
}

.markdown-body tr:nth-child(even) {
  background: rgba(30, 41, 59, 0.3);
}

.markdown-body hr {
  border: 0;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  margin: 1.5rem 0;
}

.markdown-body a {
  color: var(--color-cyan);
  text-decoration: none;
  border-bottom: 1px dashed var(--color-cyan);
}

.markdown-body a:hover {
  color: #22d3ee;
  border-bottom-style: solid;
}
