/* ============================================================
   QUANTEX AI — BINARY SIGNAL GENERATOR
   Retro-Futuristic Terminal Aesthetic · Acid Neon Palette
   ============================================================ */

:root {
  --bg-base:       #050508;
  --bg-panel:      #0a0a10;
  --bg-card:       #0f0f18;
  --bg-hover:      #141420;
  --border:        #1e1e30;
  --border-bright: #2a2a45;

  --neon-green:    #00ff88;
  --neon-pink:     #ff3cac;
  --neon-cyan:     #00e5ff;
  --neon-yellow:   #ccff00;
  --neon-orange:   #ff6b2b;
  --neon-purple:   #b44fff;

  --buy-color:     #00ff88;
  --sell-color:    #ff3cac;
  --neutral-color: #ccff00;

  --text-primary:  #e8e8f0;
  --text-secondary:#8888aa;
  --text-dim:      #44445a;

  --font-display:  'Syne', sans-serif;
  --font-mono:     'Space Mono', monospace;
  --font-body:     'Outfit', sans-serif;

  --radius-sm:     4px;
  --radius-md:     8px;
  --radius-lg:     12px;

  --glow-green:    0 0 12px rgba(0,255,136,0.4), 0 0 30px rgba(0,255,136,0.15);
  --glow-pink:     0 0 12px rgba(255,60,172,0.4), 0 0 30px rgba(255,60,172,0.15);
  --glow-cyan:     0 0 12px rgba(0,229,255,0.4), 0 0 30px rgba(0,229,255,0.15);
  --glow-yellow:   0 0 12px rgba(204,255,0,0.4), 0 0 30px rgba(204,255,0,0.15);
}

/* ── RESET & BASE ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 14px; scroll-behavior: smooth; }

body {
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-body);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* ── SCANLINES ── */
.scanlines {
  position: fixed; inset: 0; z-index: 9999;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.08) 2px,
    rgba(0,0,0,0.08) 4px
  );
}

/* ── PARTICLE CANVAS ── */
#particleCanvas {
  position: fixed; inset: 0; z-index: 0;
  pointer-events: none;
  opacity: 0.35;
}

/* ── HEADER ── */
.header {
  position: relative; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 24px;
  background: linear-gradient(180deg, rgba(10,10,20,0.98) 0%, rgba(5,5,8,0.95) 100%);
  border-bottom: 1px solid var(--border-bright);
  box-shadow: 0 2px 30px rgba(0,229,255,0.08);
}

.logo { display: flex; align-items: center; gap: 12px; }

.logo-icon {
  font-size: 28px; color: var(--neon-cyan);
  filter: drop-shadow(0 0 8px var(--neon-cyan));
  animation: logoSpin 8s linear infinite;
}
@keyframes logoSpin {
  0%   { filter: drop-shadow(0 0 8px var(--neon-cyan)); }
  33%  { filter: drop-shadow(0 0 8px var(--neon-pink)); }
  66%  { filter: drop-shadow(0 0 8px var(--neon-green)); }
  100% { filter: drop-shadow(0 0 8px var(--neon-cyan)); }
}

.logo-text { display: flex; flex-direction: column; }
.logo-main {
  font-family: var(--font-display);
  font-size: 20px; font-weight: 800;
  letter-spacing: 3px; color: #fff;
  text-shadow: 0 0 20px rgba(0,229,255,0.5);
}
.logo-accent { color: var(--neon-cyan); }
.logo-sub {
  font-family: var(--font-mono);
  font-size: 9px; color: var(--text-secondary);
  letter-spacing: 2px; margin-top: 2px;
}

.status-bar {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-mono); font-size: 10px;
  color: var(--text-secondary); letter-spacing: 1px;
}
.status-item { display: flex; align-items: center; gap: 6px; }
.status-divider { color: var(--border-bright); }

.status-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--text-dim);
}
.status-dot.active { background: var(--neon-green); box-shadow: var(--glow-green); }
.status-dot.pulse {
  background: var(--neon-cyan);
  box-shadow: var(--glow-cyan);
  animation: dotPulse 1.5s ease-in-out infinite;
}
@keyframes dotPulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.4; transform: scale(0.7); }
}

.header-right { display: flex; align-items: center; gap: 16px; }

.win-rate-badge {
  display: flex; flex-direction: column; align-items: flex-end;
  font-family: var(--font-mono);
}
.wr-label { font-size: 9px; color: var(--text-secondary); letter-spacing: 1px; }
.wr-value { font-size: 18px; font-weight: 700; color: var(--neon-yellow); }

.btn-scan {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 20px;
  background: transparent;
  border: 1px solid var(--neon-cyan);
  color: var(--neon-cyan);
  font-family: var(--font-display); font-size: 12px; font-weight: 700;
  letter-spacing: 2px; cursor: pointer; border-radius: var(--radius-sm);
  transition: all 0.2s;
  text-transform: uppercase;
}
.btn-scan:hover {
  background: rgba(0,229,255,0.1);
  box-shadow: var(--glow-cyan);
  transform: translateY(-1px);
}
.btn-scan.scanning {
  border-color: var(--neon-pink);
  color: var(--neon-pink);
  animation: scanPulse 0.8s ease-in-out infinite;
}
@keyframes scanPulse {
  0%,100% { box-shadow: none; }
  50%      { box-shadow: var(--glow-pink); }
}

/* ── TICKER TAPE ── */
.ticker-wrap {
  position: relative; z-index: 50;
  overflow: hidden;
  background: rgba(0,229,255,0.04);
  border-bottom: 1px solid var(--border);
  height: 32px;
}
.ticker-track {
  display: flex; align-items: center;
  height: 100%;
  white-space: nowrap;
  animation: tickerScroll 60s linear infinite;
  font-family: var(--font-mono); font-size: 11px;
  color: var(--text-secondary);
}
@keyframes tickerScroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.ticker-item {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 0 20px;
  border-right: 1px solid var(--border);
}
.ticker-item .t-pair { color: var(--text-primary); font-weight: 700; }
.ticker-item .t-up   { color: var(--neon-green); }
.ticker-item .t-down { color: var(--neon-pink); }

/* ── MAIN LAYOUT ── */
.main-layout {
  position: relative; z-index: 10;
  display: grid;
  grid-template-columns: 240px 1fr 280px;
  gap: 0;
  height: calc(100vh - 110px);
  overflow: hidden;
}

/* ── PANELS ── */
.panel {
  display: flex; flex-direction: column;
  background: var(--bg-panel);
  border-right: 1px solid var(--border);
  overflow: hidden;
}
.panel-center { border-right: 1px solid var(--border); }
.panel-right  { border-right: none; }

.panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: rgba(0,0,0,0.3);
  flex-shrink: 0;
}
.panel-title {
  font-family: var(--font-display);
  font-size: 11px; font-weight: 700;
  letter-spacing: 2px; color: var(--text-secondary);
}

/* ── PAIR FILTER ── */
.pair-filter { display: flex; gap: 4px; }
.filter-btn {
  padding: 3px 8px;
  background: transparent;
  border: 1px solid var(--border-bright);
  color: var(--text-secondary);
  font-family: var(--font-mono); font-size: 9px;
  letter-spacing: 1px; cursor: pointer; border-radius: 3px;
  transition: all 0.15s;
}
.filter-btn.active, .filter-btn:hover {
  border-color: var(--neon-cyan);
  color: var(--neon-cyan);
  background: rgba(0,229,255,0.08);
}

/* ── PAIR SEARCH ── */
.pair-search-wrap {
  position: relative; padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.pair-search {
  width: 100%; padding: 7px 30px 7px 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-bright);
  color: var(--text-primary);
  font-family: var(--font-mono); font-size: 11px;
  border-radius: var(--radius-sm); outline: none;
  transition: border-color 0.2s;
}
.pair-search:focus { border-color: var(--neon-cyan); }
.pair-search::placeholder { color: var(--text-dim); }
.search-icon {
  position: absolute; right: 22px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim); font-size: 16px; pointer-events: none;
}

/* ── PAIR LIST ── */
.pair-list {
  flex: 1; overflow-y: auto;
  padding: 6px 0;
}
.pair-list::-webkit-scrollbar { width: 4px; }
.pair-list::-webkit-scrollbar-track { background: transparent; }
.pair-list::-webkit-scrollbar-thumb { background: var(--border-bright); border-radius: 2px; }

.pair-group-label {
  padding: 8px 14px 4px;
  font-family: var(--font-mono); font-size: 9px;
  letter-spacing: 2px; color: var(--text-dim);
  text-transform: uppercase;
}

.pair-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 14px; cursor: pointer;
  transition: background 0.15s;
  border-left: 2px solid transparent;
}
.pair-item:hover { background: var(--bg-hover); }
.pair-item.active {
  background: rgba(0,229,255,0.06);
  border-left-color: var(--neon-cyan);
}
.pair-item.has-signal-buy  { border-left-color: var(--neon-green); }
.pair-item.has-signal-sell { border-left-color: var(--neon-pink); }

.pair-name {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--text-primary); font-weight: 700;
}
.pair-type-badge {
  font-size: 8px; padding: 2px 5px;
  border-radius: 2px; letter-spacing: 1px;
  font-family: var(--font-mono);
}
.pair-type-badge.otc  { background: rgba(180,79,255,0.15); color: var(--neon-purple); border: 1px solid rgba(180,79,255,0.3); }
.pair-type-badge.live { background: rgba(0,229,255,0.1);   color: var(--neon-cyan);   border: 1px solid rgba(0,229,255,0.25); }

.pair-signal-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--text-dim);
}
.pair-signal-dot.buy  { background: var(--neon-green); box-shadow: 0 0 6px var(--neon-green); }
.pair-signal-dot.sell { background: var(--neon-pink);  box-shadow: 0 0 6px var(--neon-pink); }

/* ── SIGNAL CONTROLS ── */
.signal-controls { display: flex; align-items: center; gap: 20px; }

.countdown-wrap { display: flex; align-items: center; gap: 10px; }
.countdown-label {
  font-family: var(--font-mono); font-size: 9px;
  color: var(--text-secondary); letter-spacing: 1px;
}
.countdown-ring { position: relative; width: 48px; height: 48px; }
.ring-svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-bg {
  fill: none; stroke: var(--border-bright); stroke-width: 3;
}
.ring-progress {
  fill: none; stroke: var(--neon-cyan); stroke-width: 3;
  stroke-dasharray: 163.4; stroke-dashoffset: 0;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s linear, stroke 0.3s;
}
.countdown-num {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 13px; font-weight: 700;
  color: var(--neon-cyan);
}

.strategy-selector { display: flex; flex-direction: column; gap: 3px; }
.strategy-label {
  font-family: var(--font-mono); font-size: 9px;
  color: var(--text-secondary); letter-spacing: 1px;
}
.strategy-select {
  background: var(--bg-card);
  border: 1px solid var(--border-bright);
  color: var(--neon-yellow);
  font-family: var(--font-mono); font-size: 10px;
  padding: 5px 8px; border-radius: var(--radius-sm);
  outline: none; cursor: pointer;
}
.strategy-select:focus { border-color: var(--neon-yellow); }

/* ── STATS ROW ── */
.stats-row {
  display: flex; gap: 1px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.stat-card {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 10px 6px;
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  transition: background 0.2s;
}
.stat-card:last-child { border-right: none; }
.stat-card:hover { background: var(--bg-hover); }
.stat-val {
  font-family: var(--font-display); font-size: 22px; font-weight: 800;
  color: var(--text-primary); line-height: 1;
}
.stat-lbl {
  font-family: var(--font-mono); font-size: 8px;
  color: var(--text-dim); letter-spacing: 1px; margin-top: 3px;
}
.stat-card.green .stat-val { color: var(--neon-green); }
.stat-card.red   .stat-val { color: var(--neon-pink); }
.stat-card.yellow .stat-val { color: var(--neon-yellow); }
.stat-card.cyan  .stat-val { color: var(--neon-cyan); }

/* ── SPOTLIGHT ── */
.spotlight-wrap {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  min-height: 120px;
  display: flex; align-items: center; justify-content: center;
}
.spotlight-idle {
  text-align: center; color: var(--text-dim);
  font-family: var(--font-body); font-size: 13px;
}
.idle-icon {
  font-size: 32px; color: var(--border-bright);
  margin-bottom: 8px;
  animation: idlePulse 3s ease-in-out infinite;
}
@keyframes idlePulse {
  0%,100% { opacity: 0.3; } 50% { opacity: 0.8; }
}

/* ── SPOTLIGHT SIGNAL CARD ── */
.spotlight-card {
  width: 100%; display: flex; gap: 16px; align-items: stretch;
}
.spotlight-direction {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  min-width: 100px; border-radius: var(--radius-md);
  padding: 16px;
  font-family: var(--font-display); font-weight: 800;
}
.spotlight-direction.buy {
  background: rgba(0,255,136,0.08);
  border: 1px solid rgba(0,255,136,0.3);
  color: var(--neon-green);
  box-shadow: inset 0 0 30px rgba(0,255,136,0.05), var(--glow-green);
}
.spotlight-direction.sell {
  background: rgba(255,60,172,0.08);
  border: 1px solid rgba(255,60,172,0.3);
  color: var(--neon-pink);
  box-shadow: inset 0 0 30px rgba(255,60,172,0.05), var(--glow-pink);
}
.spotlight-arrow { font-size: 36px; line-height: 1; }
.spotlight-dir-text { font-size: 18px; letter-spacing: 3px; margin-top: 4px; }

.spotlight-info { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.spotlight-pair {
  font-family: var(--font-display); font-size: 20px; font-weight: 800;
  color: #fff; letter-spacing: 1px;
}
.spotlight-meta {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.meta-chip {
  padding: 3px 8px; border-radius: 3px;
  font-family: var(--font-mono); font-size: 10px;
  background: var(--bg-card); border: 1px solid var(--border-bright);
  color: var(--text-secondary);
}
.meta-chip.highlight { border-color: var(--neon-yellow); color: var(--neon-yellow); }

.confidence-bar-wrap { display: flex; flex-direction: column; gap: 4px; }
.confidence-label {
  display: flex; justify-content: space-between;
  font-family: var(--font-mono); font-size: 10px; color: var(--text-secondary);
}
.confidence-bar {
  height: 6px; background: var(--border);
  border-radius: 3px; overflow: hidden;
}
.confidence-fill {
  height: 100%; border-radius: 3px;
  transition: width 0.8s cubic-bezier(0.4,0,0.2,1);
}
.confidence-fill.high   { background: linear-gradient(90deg, var(--neon-green), #00ffcc); }
.confidence-fill.medium { background: linear-gradient(90deg, var(--neon-yellow), #ffcc00); }
.confidence-fill.low    { background: linear-gradient(90deg, var(--neon-orange), #ff9900); }

.indicator-row {
  display: flex; gap: 6px; flex-wrap: wrap;
}
.indicator-chip {
  padding: 2px 7px; border-radius: 2px;
  font-family: var(--font-mono); font-size: 9px;
  letter-spacing: 0.5px;
}
.indicator-chip.bull { background: rgba(0,255,136,0.12); color: var(--neon-green); border: 1px solid rgba(0,255,136,0.2); }
.indicator-chip.bear { background: rgba(255,60,172,0.12); color: var(--neon-pink);  border: 1px solid rgba(255,60,172,0.2); }
.indicator-chip.neut { background: rgba(204,255,0,0.1);   color: var(--neon-yellow); border: 1px solid rgba(204,255,0,0.2); }

/* ── SIGNAL GRID ── */
.signal-grid {
  flex: 1; overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px; padding: 14px;
  align-content: start;
}
.signal-grid::-webkit-scrollbar { width: 4px; }
.signal-grid::-webkit-scrollbar-thumb { background: var(--border-bright); border-radius: 2px; }

/* ── SIGNAL CARD ── */
.signal-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative; overflow: hidden;
  animation: cardIn 0.4s cubic-bezier(0.4,0,0.2,1) both;
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(10px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.signal-card::before {
  content: ''; position: absolute;
  top: 0; left: 0; right: 0; height: 2px;
}
.signal-card.buy::before  { background: linear-gradient(90deg, transparent, var(--neon-green), transparent); }
.signal-card.sell::before { background: linear-gradient(90deg, transparent, var(--neon-pink), transparent); }

.signal-card.buy  { border-color: rgba(0,255,136,0.2); }
.signal-card.sell { border-color: rgba(255,60,172,0.2); }

.signal-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-bright);
}
.signal-card.buy:hover  { box-shadow: 0 4px 20px rgba(0,255,136,0.15); }
.signal-card.sell:hover { box-shadow: 0 4px 20px rgba(255,60,172,0.15); }

.sc-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; }
.sc-pair { font-family: var(--font-mono); font-size: 11px; font-weight: 700; color: var(--text-primary); }
.sc-badge {
  padding: 2px 8px; border-radius: 2px;
  font-family: var(--font-display); font-size: 11px; font-weight: 700;
  letter-spacing: 1px;
}
.sc-badge.buy  { background: rgba(0,255,136,0.15); color: var(--neon-green); border: 1px solid rgba(0,255,136,0.3); }
.sc-badge.sell { background: rgba(255,60,172,0.15); color: var(--neon-pink);  border: 1px solid rgba(255,60,172,0.3); }

.sc-confidence { margin-bottom: 8px; }
.sc-conf-row {
  display: flex; justify-content: space-between;
  font-family: var(--font-mono); font-size: 9px;
  color: var(--text-secondary); margin-bottom: 3px;
}
.sc-conf-val { color: var(--neon-yellow); font-weight: 700; }
.sc-bar { height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; }
.sc-bar-fill { height: 100%; border-radius: 2px; transition: width 1s ease; }
.sc-bar-fill.high   { background: var(--neon-green); }
.sc-bar-fill.medium { background: var(--neon-yellow); }
.sc-bar-fill.low    { background: var(--neon-orange); }

.sc-indicators { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 8px; }
.sc-ind {
  font-family: var(--font-mono); font-size: 8px;
  padding: 1px 5px; border-radius: 2px;
}
.sc-ind.bull { background: rgba(0,255,136,0.1); color: var(--neon-green); }
.sc-ind.bear { background: rgba(255,60,172,0.1); color: var(--neon-pink); }
.sc-ind.neut { background: rgba(204,255,0,0.08); color: var(--neon-yellow); }

.sc-footer {
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-mono); font-size: 9px; color: var(--text-dim);
}
.sc-time { color: var(--text-secondary); }
.sc-strategy { color: var(--neon-purple); }

/* Sparkline canvas inside card */
.sc-sparkline { width: 100%; height: 30px; margin-bottom: 6px; }

/* ── RIGHT PANEL ── */
.analytics-block {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 6px;
  flex-shrink: 0;
}
.analytics-row {
  display: flex; justify-content: space-between; align-items: center;
}
.analytics-label {
  font-family: var(--font-mono); font-size: 9px;
  color: var(--text-dim); letter-spacing: 1px;
}
.analytics-val {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--neon-cyan); font-weight: 700;
}

.wl-bar-wrap { padding: 10px 16px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.wl-bar {
  height: 8px; background: var(--border);
  border-radius: 4px; overflow: hidden;
  display: flex;
}
.wl-fill { height: 100%; transition: width 0.6s ease; }
.win-fill  { background: var(--neon-green); }
.loss-fill { background: var(--neon-pink); }
.wl-labels {
  display: flex; justify-content: space-between;
  margin-top: 5px; font-family: var(--font-mono); font-size: 9px;
}
.wl-lbl.green { color: var(--neon-green); }
.wl-lbl.red   { color: var(--neon-pink); }

.clear-btn {
  background: transparent; border: 1px solid var(--border-bright);
  color: var(--text-dim); font-family: var(--font-mono); font-size: 9px;
  padding: 3px 8px; border-radius: 3px; cursor: pointer; letter-spacing: 1px;
  transition: all 0.15s;
}
.clear-btn:hover { border-color: var(--neon-pink); color: var(--neon-pink); }

/* ── HISTORY LIST ── */
.history-list {
  flex: 1; overflow-y: auto; padding: 6px 0;
}
.history-list::-webkit-scrollbar { width: 4px; }
.history-list::-webkit-scrollbar-thumb { background: var(--border-bright); border-radius: 2px; }

.history-empty {
  padding: 20px 16px; text-align: center;
  font-family: var(--font-body); font-size: 12px;
  color: var(--text-dim); line-height: 1.6;
}

.history-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 14px;
  border-bottom: 1px solid rgba(30,30,48,0.5);
  transition: background 0.15s;
  animation: histIn 0.3s ease both;
}
@keyframes histIn {
  from { opacity: 0; transform: translateX(10px); }
  to   { opacity: 1; transform: translateX(0); }
}
.history-item:hover { background: var(--bg-hover); }

.hi-direction {
  width: 28px; height: 28px; border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; flex-shrink: 0;
}
.hi-direction.buy  { background: rgba(0,255,136,0.12); color: var(--neon-green); }
.hi-direction.sell { background: rgba(255,60,172,0.12); color: var(--neon-pink); }

.hi-info { flex: 1; min-width: 0; }
.hi-pair {
  font-family: var(--font-mono); font-size: 10px;
  font-weight: 700; color: var(--text-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hi-meta {
  font-family: var(--font-mono); font-size: 9px;
  color: var(--text-dim); margin-top: 1px;
}

.hi-result {
  font-family: var(--font-mono); font-size: 10px;
  font-weight: 700; flex-shrink: 0;
}
.hi-result.win     { color: var(--neon-green); }
.hi-result.loss    { color: var(--neon-pink); }
.hi-result.pending { color: var(--neon-yellow); }

/* ── SIGNAL ALERT POPUP ── */
.signal-alert {
  position: fixed; bottom: 60px; right: 24px; z-index: 1000;
  width: 280px;
  background: var(--bg-card);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transform: translateX(320px);
  transition: transform 0.4s cubic-bezier(0.4,0,0.2,1);
  box-shadow: 0 8px 40px rgba(0,0,0,0.6);
}
.signal-alert.show { transform: translateX(0); }
.signal-alert.buy-alert  { border-color: rgba(0,255,136,0.4); box-shadow: 0 8px 40px rgba(0,255,136,0.2); }
.signal-alert.sell-alert { border-color: rgba(255,60,172,0.4); box-shadow: 0 8px 40px rgba(255,60,172,0.2); }

.alert-inner { padding: 16px; }
.alert-pair {
  font-family: var(--font-mono); font-size: 12px;
  color: var(--text-secondary); letter-spacing: 1px; margin-bottom: 4px;
}
.alert-direction {
  font-family: var(--font-display); font-size: 28px; font-weight: 800;
  margin-bottom: 8px;
}
.alert-direction.buy  { color: var(--neon-green); text-shadow: var(--glow-green); }
.alert-direction.sell { color: var(--neon-pink);  text-shadow: var(--glow-pink); }

.alert-meta {
  display: flex; gap: 8px; margin-bottom: 8px;
  font-family: var(--font-mono); font-size: 10px;
}
.alert-meta span:first-child { color: var(--neon-yellow); }
.alert-meta span:last-child  { color: var(--neon-purple); }

.alert-timer {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--text-secondary);
}
.alert-timer span { color: var(--neon-cyan); font-weight: 700; }

/* ── FOOTER ── */
.footer {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 200;
  display: flex; justify-content: space-between; align-items: center;
  padding: 6px 24px;
  background: rgba(5,5,8,0.97);
  border-top: 1px solid var(--border);
  font-family: var(--font-mono); font-size: 9px;
  color: var(--text-dim); letter-spacing: 0.5px;
}
.footer-right { color: var(--border-bright); }

/* ── SCROLLBAR GLOBAL ── */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-bright); border-radius: 2px; }

/* ── RESPONSIVE ── */
@media (max-width: 1100px) {
  .main-layout { grid-template-columns: 200px 1fr 240px; }
}
@media (max-width: 900px) {
  .main-layout { grid-template-columns: 1fr; grid-template-rows: auto 1fr auto; height: auto; }
  .panel-left, .panel-right { max-height: 300px; }
  .header { flex-wrap: wrap; gap: 10px; }
  .header-center { order: 3; width: 100%; }
}

/* ── UTILITY ANIMATIONS ── */
@keyframes glowPulse {
  0%,100% { opacity: 1; }
  50%      { opacity: 0.5; }
}
@keyframes slideInRight {
  from { transform: translateX(20px); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}
@keyframes fadeIn {
  from { opacity: 0; } to { opacity: 1; }
}

.new-signal-flash {
  animation: newSignalFlash 0.6s ease;
}
@keyframes newSignalFlash {
  0%   { background: rgba(0,229,255,0.2); }
  100% { background: var(--bg-card); }
}