@font-face {
  font-family: 'AntonSC';
  src: url('/assets/AntonSC-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ── Compact header: inline ML stats ── */
.rs-ml-stats-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  font-size: 11px;
  flex-shrink: 1;
  min-width: 0;
  overflow: hidden;
}

/* RSIgnals Floating Indicator Panels v11 */

.chart-wrapper {
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
}
.chart-wrapper-inner {
  background: #050409 !important;
  position: relative !important;
}
.mesh-bg::before {
  background: none !important;
}

/* ── Trend-based bottom glow canvas ── */
#rs-glow-canvas {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  mix-blend-mode: screen;
}

/* ── Signal glow pulse ── */
.chart-wrapper.signal-active {
  animation: signal-pulse 3.5s ease-in-out;
}
@keyframes signal-pulse {
  0%   { box-shadow: none; }
  20%  { box-shadow: 0 0 30px rgba(224,64,251,0.5), 0 0 60px rgba(106,27,154,0.3) !important; }
  50%  { box-shadow: 0 0 40px rgba(224,64,251,0.55), 0 0 70px rgba(106,27,154,0.35) !important; }
  100% { box-shadow: none; }
}

/* ── Floating indicator cards ── */
.rs-indicator-section {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
  padding: 20px 16px 32px;
  background: #040308;
}
.rs-float-card {
  border-radius: 14px;
  padding: 1px;
  background: linear-gradient(135deg, #e040fb 0%, #9c27b0 35%, #00e5ff 100%);
  box-shadow:
    0 0 6px rgba(224,64,251,0.45),
    0 0 14px rgba(224,64,251,0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.rs-float-card:hover {
  transform: translateY(-3px);
  box-shadow:
    0 0 10px rgba(224,64,251,0.65),
    0 0 20px rgba(224,64,251,0.3),
    0 0 40px rgba(0,229,255,0.15);
}
.rs-float-card-inner {
  background: #06050c;
  border-radius: 13px;
  padding: 14px 16px 10px;
  position: relative;
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
  /* Subtle scanline texture for futurism */
  background-image:
    repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(224,64,251,0.015) 2px, rgba(224,64,251,0.015) 4px);
}
.rs-float-card-inner::before {
  content: '';
  position: absolute;
  top: 0; left: 8%; right: 8%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0,229,255,0.3) 50%, transparent);
  pointer-events: none;
}
.rs-float-card-inner::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 35%;
  background: linear-gradient(180deg, rgba(224,64,251,0.04), transparent);
  pointer-events: none;
}
.rs-float-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
}
.rs-float-card-title {
  font-family: Inter, -apple-system, sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #00e5ff;
  text-shadow: none;
}
.rs-float-card-value {
  font-family: 'AntonSC', 'JetBrains Mono', monospace;
  font-size: 1.3rem;
  font-weight: 600;
  color: #ffffff;
  -webkit-font-smoothing: antialiased;
  text-shadow: none;
}
.rs-float-card-value.ls-big {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 3.5rem;
  font-weight: 400;
  font-family: 'AntonSC', sans-serif;
  z-index: 2;
  color: #ffffff;
  text-shadow: 0 0 25px rgba(224,64,251,0.35);
}
.rs-float-card-canvas {
  flex: 1;
  min-height: 0;
  aspect-ratio: 5 / 3;
  position: relative;
}
.rs-float-card-macd .rs-float-card-canvas { aspect-ratio: 10 / 3; }
.rs-float-card-canvas canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}
@media (max-width: 1024px) {
  .rs-indicator-section { grid-template-columns: repeat(6, 1fr); gap: 10px; padding: 12px 8px 24px; }
}
@media (max-width: 768px) {
  .rs-indicator-section { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .rs-float-card-value.ls-big { font-size: 2.5rem; }
}
@media (max-width: 480px) {
  .rs-indicator-section { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .rs-float-card-inner { padding: 10px 12px 8px; }
  .rs-float-card-value.ls-big { font-size: 2rem; }
}

/* ═══════════════════════════════════════════════
   Dashboard Redesign — cyan/purple glass theme
   ═══════════════════════════════════════════════ */

/* ── Nav gradient bottom border ── */
.nav-gradient-border {
  background: linear-gradient(180deg, rgba(17,24,39,1), rgba(10,14,23,0.95)) !important;
  border-bottom: 1px solid transparent !important;
  background-clip: padding-box !important;
  position: relative !important;
}
.nav-gradient-border::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, rgba(224,64,251,0.5), rgba(156,39,176,0.3) 50%, rgba(0,229,255,0.4));
  box-shadow: 0 0 4px rgba(224,64,251,0.2);
  pointer-events: none;
}

/* ── Dashboard token cards — gradient border + glass ── */
/* NOTE: React sets inline border + boxShadow for active trades (long=green, short=red glow).
   Do NOT use !important on border/box-shadow here — it would override active trade styling. */
.dash-cards .glass-card {
  background: linear-gradient(160deg, rgba(10,8,18,0.97), rgba(6,4,12,0.99));
  border-radius: 10px !important;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease !important;
  position: relative !important;
  overflow: hidden !important;
}
.dash-cards .glass-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 40%;
  background: linear-gradient(180deg, rgba(224,64,251,0.03), transparent);
  pointer-events: none;
}
.dash-cards .glass-card:hover {
  transform: translateY(-2px) !important;
}

/* Active trade cards styled via JS (order: -1) */

/* ── Dashboard Pump panel — gradient card ── */
.dash-pump > .glass-card {
  border: 1px solid rgba(224,64,251,0.25) !important;
  background: linear-gradient(160deg, rgba(10,8,18,0.95), rgba(6,4,12,0.98)) !important;
  border-radius: 14px !important;
  position: relative !important;
  overflow: hidden !important;
  box-shadow: 0 0 6px rgba(224,64,251,0.08), 0 4px 16px rgba(0,0,0,0.5), inset 0 1px 0 rgba(224,64,251,0.08) !important;
}

/* ── PumpShort title ── */
.dash-pump .text-lg,
.dash-pump .font-bold {
  font-family: 'AntonSC', sans-serif !important;
  letter-spacing: 0.05em !important;
}

/* ── PumpShort stat numbers — AntonSC ── */
.dash-pump .text-2xl,
.dash-pump .text-3xl {
  font-family: 'AntonSC', sans-serif !important;
  color: #ffffff !important;
}

/* ── PumpShort inner stat cards ── */
.dash-pump .glass-card .glass-card {
  border: 1px solid rgba(224,64,251,0.15) !important;
  background: linear-gradient(160deg, rgba(10,8,18,0.85), rgba(6,4,12,0.93)) !important;
  border-radius: 10px !important;
  position: relative;
  overflow: hidden;
}
.dash-pump .glass-card .glass-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 35%;
  background: linear-gradient(180deg, rgba(224,64,251,0.03), transparent);
  pointer-events: none;
}

/* ── Signals table styling ── */
.dash-pump table {
  border-collapse: separate !important;
  border-spacing: 0 2px !important;
}
.dash-pump table thead th {
  color: #64748b !important;
  font-size: 0.65rem !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  border-bottom: 1px solid rgba(224,64,251,0.15) !important;
  padding-bottom: 6px !important;
}
.dash-pump table tbody tr {
  transition: background 0.2s ease !important;
}
.dash-pump table tbody tr:hover {
  background: rgba(224,64,251,0.06) !important;
}

/* ── Signal result badges ── */
.dash-pump .bg-yellow-500\/20 {
  background: rgba(249,115,22,0.12) !important;
  color: #fb923c !important;
  border: 1px solid rgba(249,115,22,0.25) !important;
}

/* ── Top movers badges ── */
.dash-pump .inline-flex,
.dash-pump [class*="rounded-full"] {
  border: 1px solid rgba(224,64,251,0.15) !important;
  background: rgba(224,64,251,0.06) !important;
}

/* ── Active pumps PEAK badge ── */
.dash-pump .bg-green-500\/20 {
  background: rgba(249,115,22,0.12) !important;
  color: #fb923c !important;
  border: 1px solid rgba(249,115,22,0.3) !important;
}

/* ── Nav active tab ── */
.nav-gradient-border a[href="/"],
.nav-gradient-border a.bg-sky-400\/10 {
  background: linear-gradient(135deg, rgba(224,64,251,0.12), rgba(156,39,176,0.08)) !important;
  border: 1px solid rgba(224,64,251,0.25) !important;
  color: #ffffff !important;
}

/* ── Dashboard filter buttons ── */
.dash-root button {
  border: 1px solid rgba(224,64,251,0.12) !important;
  transition: all 0.2s ease !important;
}
.dash-root button:hover {
  border-color: rgba(224,64,251,0.3) !important;
  background: rgba(224,64,251,0.1) !important;
  color: #ffffff !important;
}
.dash-root button.bg-sky-400\/10,
.dash-root button[class*="bg-sky"] {
  background: linear-gradient(135deg, rgba(224,64,251,0.15), rgba(224,64,251,0.08)) !important;
  border-color: rgba(224,64,251,0.3) !important;
  color: #ffffff !important;
}

/* ── Conf input ── */
.dash-root input[type="number"] {
  border: 1px solid rgba(224,64,251,0.2) !important;
  background: rgba(224,64,251,0.06) !important;
  border-radius: 4px !important;
  transition: border-color 0.2s ease !important;
}
.dash-root input[type="number"]:focus {
  border-color: rgba(224,64,251,0.4) !important;
  outline: none !important;
  box-shadow: 0 0 8px rgba(224,64,251,0.15) !important;
}

/* ── Filter text input ── */
.dash-root input[placeholder="Filter..."] {
  border: 1px solid rgba(224,64,251,0.15) !important;
  background: rgba(224,64,251,0.04) !important;
  border-radius: 6px !important;
}
.dash-root input[placeholder="Filter..."]:focus {
  border-color: rgba(224,64,251,0.35) !important;
  box-shadow: 0 0 10px rgba(224,64,251,0.1) !important;
}

/* ── Mobile tabs ── */
.dash-mobile-tabs button {
  border: 1px solid rgba(224,64,251,0.12) !important;
}
.dash-mobile-tabs button.bg-sky-400\/10 {
  background: linear-gradient(135deg, rgba(224,64,251,0.15), rgba(224,64,251,0.08)) !important;
  border-color: rgba(224,64,251,0.3) !important;
  color: #ffffff !important;
}

/* ── Stats in nav — clean colors, no glow ── */
.nav-gradient-border .text-green-400 {
  color: #00e5ff !important;
  text-shadow: none !important;
}
.nav-gradient-border .text-red-400 {
  color: #e040fb !important;
  text-shadow: none !important;
}

/* ── Section headers (PumpShort, Top Movers, Signals) ── */
.dash-pump .text-sm.font-bold,
.dash-pump .uppercase {
  color: rgba(255,255,255,0.85) !important;
  letter-spacing: 0.06em;
  text-shadow: none !important;
}

/* ── Online indicator ── */
.dash-pump .text-green-400 {
  color: #00e5ff !important;
  text-shadow: none !important;
}

/* ── Token card R-value — clean ── */
.dash-cards .text-green-400 {
  color: #00e5ff !important;
  text-shadow: none !important;
}
.dash-cards .text-red-400 {
  color: #e040fb !important;
  text-shadow: none !important;
}

/* ═══════════════════════════════════════════════
   Nav & Toolbar — unified purple palette
   ═══════════════════════════════════════════════ */

/* ── RSignals logo — clean magenta, no blur ── */
.nav-gradient-border a:first-child,
.nav-gradient-border > div:first-child {
  color: #e040fb !important;
  text-shadow: none !important;
  letter-spacing: 0.08em !important;
}

/* ── Nav background deeper ── */
.nav-gradient-border {
  background: #050409 !important;
}

/* ── Trade stats in nav (OPEN, CLOSED, TOTAL, TRADES) ── */
.nav-gradient-border .text-xs,
.nav-gradient-border .text-sm {
  color: rgba(255,255,255,0.7) !important;
}

/* ── Chart toolbar buttons (MACD, Liqs, L/S etc) ── */
.chart-desktop-toolbar button,
.chart-desktop-toolbar a {
  border: 1px solid rgba(224,64,251,0.2) !important;
  color: rgba(255,255,255,0.65) !important;
  transition: all 0.2s ease !important;
  text-shadow: none !important;
  font-size: 0.8rem !important;
  letter-spacing: 0.03em !important;
}
.chart-desktop-toolbar button:hover,
.chart-desktop-toolbar a:hover {
  border-color: rgba(224,64,251,0.35) !important;
  color: #ffffff !important;
  background: rgba(224,64,251,0.1) !important;
}
.chart-desktop-toolbar button.bg-sky-400\/10,
.chart-desktop-toolbar button[class*="bg-sky"],
.chart-desktop-toolbar .bg-sky-400\/10 {
  background: rgba(224,64,251,0.12) !important;
  border-color: rgba(224,64,251,0.3) !important;
  color: #ffffff !important;
}

/* ── Go button accent ── */
.chart-desktop-toolbar button.bg-green-500,
.chart-desktop-toolbar button[class*="bg-green"] {
  background: #e040fb !important;
  border-color: #e040fb !important;
  color: #ffffff !important;
  box-shadow: 0 0 8px rgba(224,64,251,0.4) !important;
}

/* ── Chart info text (SOLUSDT · 5, Time, OHLCV labels) ── */
.chart-wrapper-inner .text-xs {
  color: rgba(255,255,255,0.5) !important;
}

/* ── Separator between panes ── */
.chart-wrapper-inner hr,
.chart-wrapper-inner [class*="border-b"] {
  border-color: rgba(224,64,251,0.1) !important;
}

/* ── Search token input ── */
input[placeholder*="Search"] {
  border: 1px solid rgba(224,64,251,0.15) !important;
  background: rgba(8,6,16,0.95) !important;
  color: #ffffff !important;
}
input[placeholder*="Search"]:focus {
  border-color: rgba(224,64,251,0.4) !important;
}

/* ── Token list sidebar ── */
.overflow-y-auto a,
.overflow-y-auto button {
  color: rgba(255,255,255,0.6) !important;
}
.overflow-y-auto a:hover,
.overflow-y-auto button:hover {
  background: rgba(224,64,251,0.08) !important;
  color: #ffffff !important;
}
.overflow-y-auto .bg-sky-400\/10,
.overflow-y-auto [class*="bg-sky"] {
  background: rgba(224,64,251,0.10) !important;
  color: #ffffff !important;
}

/* ═══════════════════════════════════════════════
   Mobile — hide chart toolbar & indicator panels
   ═══════════════════════════════════════════════ */
@media (max-width: 768px) {
  /* Hide chart toolbar (ML, trade, conf, 7d buttons) — prevents horizontal scroll */
  .chart-desktop-toolbar {
    display: none !important;
  }
  /* Hide ML stats row */
  .chart-desktop-toolbar ~ .rounded-lg.font-mono-nums {
    display: none !important;
  }
  /* Chart wrapper — ensure enough height on mobile */
  .chart-wrapper {
    min-height: 55vh !important;
  }
}

/* ═══════════════════════════════════════════════
   ML Stats — injected into toolbar via JS
   ═══════════════════════════════════════════════ */

/* Wrapper — push to right side of toolbar */
.rs-stats-block {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  margin-left: auto !important;
}

/* Stats pill — one connected block */
.rs-stats-pill {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  border: 1px solid rgba(224,64,251,0.2) !important;
  background: rgba(224,64,251,0.04) !important;
  border-radius: 8px !important;
  padding: 4px 12px !important;
  font-size: 0.8rem !important;
  color: rgba(255,255,255,0.65) !important;
  white-space: nowrap !important;
  letter-spacing: 0.03em !important;
}
.rs-stats-pill span:first-child {
  color: #22d3a5 !important;
  font-weight: 600 !important;
}

/* Conf pill */
.rs-conf-pill {
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
  border: 1px solid rgba(224,64,251,0.2) !important;
  background: rgba(224,64,251,0.04) !important;
  border-radius: 8px !important;
  padding: 4px 10px !important;
  font-size: 0.8rem !important;
  color: rgba(255,255,255,0.5) !important;
  white-space: nowrap !important;
}
.rs-conf-pill input[type=number] {
  background: transparent !important;
  border: none !important;
  color: rgba(255,255,255,0.7) !important;
  font-size: 0.8rem !important;
  width: 2.5rem !important;
  padding: 0 2px !important;
  text-align: center !important;
  outline: none !important;
}

/* Dates pill */
.rs-dates-pill {
  display: flex !important;
  align-items: center !important;
  gap: 0 !important;
  border: 1px solid rgba(224,64,251,0.2) !important;
  background: rgba(224,64,251,0.04) !important;
  border-radius: 8px !important;
  overflow: hidden !important;
  white-space: nowrap !important;
}
.rs-dates-pill button {
  background: transparent !important;
  border: none !important;
  border-right: 1px solid rgba(224,64,251,0.15) !important;
  color: rgba(255,255,255,0.65) !important;
  font-size: 0.8rem !important;
  padding: 5px 10px !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
}
.rs-dates-pill button:last-of-type {
  border-right: none !important;
}
.rs-dates-pill button:hover {
  background: rgba(224,64,251,0.1) !important;
  color: #ffffff !important;
}
.rs-dates-pill input[type=date] {
  background: transparent !important;
  border: none !important;
  border-left: 1px solid rgba(224,64,251,0.15) !important;
  color: rgba(255,255,255,0.7) !important;
  font-size: 0.75rem !important;
  padding: 4px 6px !important;
  outline: none !important;
}

/* Hide original stats bar (backup in case JS misses it) */
.chart-desktop-toolbar ~ .flex.items-center.font-mono-nums {
  display: none !important;
}

/* ═══════════════════════════════════════════════
   Mobile — show indicators below chart, scrollable
   ═══════════════════════════════════════════════ */
@media (max-width: 768px) {
  /* The chart page outer container: flex row + fixed height
     → make it a column, remove fixed height, allow scroll */
  .h-\[calc\(100vh-64px\)\] {
    flex-direction: column !important;
    height: auto !important;
    min-height: auto !important;
    overflow: visible !important;
  }
  /* The chart column inside */
  .flex-col.flex-1.min-w-0 {
    flex: none !important;
    width: 100% !important;
  }
  .rs-indicator-section {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
    padding: 10px 8px 16px !important;
    width: 100% !important;
  }
  .rs-stats-block {
    display: none !important;
  }
  .chart-wrapper {
    min-height: 50vh !important;
    max-height: 60vh !important;
  }
  .chart-wrapper-inner {
    overflow: hidden !important;
  }
  body, html {
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    height: auto !important;
  }
  #root {
    height: auto !important;
    overflow: visible !important;
  }
  .min-h-screen {
    min-height: auto !important;
    overflow: visible !important;
  }
}
