/* Hero Trader — Custom Styles */

/* Base */
:root {
  --color-brand:   #6366f1;
  --color-surface: #111827;
  --color-border:  #1f2937;
}

*,*::before,*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  background: #030712;
}

/* Scrollbar */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: #111827; }
::-webkit-scrollbar-thumb { background: #374151; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #4b5563; }

/* Sidebar nav active state */
.nav-active {
  background: rgba(99,102,241,0.15);
  color: #818cf8;
  border: 1px solid rgba(99,102,241,0.3);
}

/* Code blocks */
pre, code {
  font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
}

/* Spinner */
.spinner {
  border: 2px solid rgba(255,255,255,0.1);
  border-top-color: var(--color-brand);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Chart.js canvas */
canvas {
  max-width: 100%;
}

/* Details/summary reset */
details > summary { list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details[open] > summary .chevron { transform: rotate(180deg); }

/* Toggle switch */
.toggle-input:checked + .toggle-bg { background-color: var(--color-brand); }
.toggle-input:checked + .toggle-bg .toggle-dot { transform: translateX(100%); }

/* Flash message animation */
.flash-in {
  animation: flashIn 0.3s ease-out;
}
@keyframes flashIn {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Tooltip */
[data-tooltip] { position: relative; cursor: help; }
[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: #1f2937;
  color: #f3f4f6;
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  border: 1px solid #374151;
  transition: opacity 0.2s;
  z-index: 100;
}
[data-tooltip]:hover::after { opacity: 1; }

/* Price ticker flash */
.price-up   { color: #34d399 !important; transition: color 0.5s; }
.price-down { color: #f87171 !important; transition: color 0.5s; }

/* Equity curve line glow */
.chart-glow { filter: drop-shadow(0 0 6px rgba(99,102,241,0.4)); }

/* Mobile sidebar overlay */
@media (max-width: 767px) {
  aside.fixed { transform: translateX(-100%); transition: transform 0.3s; }
  aside.fixed.open { transform: translateX(0); }
  main { margin-left: 0 !important; }
}

/* Print styles */
@media print {
  aside, nav, .no-print { display: none !important; }
  main { margin: 0 !important; }
}
