/* ═══════════════════════════════════════════════════════════════════════════
   Crypto Signal Bot — Custom CSS
   Tailwind handles utilities; this file adds component-level custom styles
   ═══════════════════════════════════════════════════════════════════════════ */

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

/* ── Timeframe Buttons ─────────────────────────────────────────────────────── */
.tf-btn {
  background: transparent;
  color: #6b7280;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  transition: all 0.15s ease;
}
.tf-btn:hover { background: #1f2937; color: #e5e7eb; }
.tf-btn.active {
  background: #1d4ed8;
  color: #ffffff;
  box-shadow: inset 0 0 0 1px #3b82f6;
}

/* ── Signal Cards ──────────────────────────────────────────────────────────── */
.signal-card {
  border-radius: 12px;
  padding: 12px 14px;
  border: 1px solid transparent;
  cursor: default;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  animation: cardIn 0.3s ease;
}
.signal-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(0,0,0,0.5);
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.signal-card.buy {
  background: linear-gradient(135deg, rgba(16,185,129,0.07) 0%, rgba(5,150,105,0.03) 100%);
  border-color: rgba(16,185,129,0.25);
}
.signal-card.sell {
  background: linear-gradient(135deg, rgba(239,68,68,0.07) 0%, rgba(220,38,38,0.03) 100%);
  border-color: rgba(239,68,68,0.25);
}

/* ── Signal Type Badge ─────────────────────────────────────────────────────── */
.sig-badge {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 10px; font-weight: 800;
  padding: 2px 7px; border-radius: 5px;
  letter-spacing: 0.06em;
}
.sig-badge.buy  { background: rgba(16,185,129,0.18); color: #34d399; }
.sig-badge.sell { background: rgba(239,68,68,0.18);  color: #f87171; }

/* ── Status Badges ─────────────────────────────────────────────────────────── */
.status-badge {
  font-size: 10px; font-weight: 700;
  padding: 2px 6px; border-radius: 4px;
  letter-spacing: 0.04em; white-space: nowrap;
}
.status-ACTIVE   { background:rgba(59,130,246,0.2);  color:#60a5fa; }
.status-TP1_HIT  { background:rgba(16,185,129,0.2);  color:#34d399; }
.status-TP2_HIT  { background:rgba(16,185,129,0.28); color:#10b981; }
.status-TP3_HIT  { background:rgba(16,185,129,0.35); color:#059669; }
.status-SL_HIT   { background:rgba(239,68,68,0.2);   color:#f87171; }

/* ── Signal Flash on New Signal ────────────────────────────────────────────── */
@keyframes flashPulse {
  0%   { box-shadow: 0 0 0 0  rgba(37,99,235,0.8); }
  60%  { box-shadow: 0 0 0 12px rgba(37,99,235,0);   }
  100% { box-shadow: 0 0 0 0  rgba(37,99,235,0);   }
}
.signal-new { animation: flashPulse 0.9s ease-out 2; }

/* ── Indicator Rows ────────────────────────────────────────────────────────── */
.ind-row {
  display: flex; align-items: center;
  justify-content: space-between;
}
.ind-lbl { font-size: 11px; color: #9ca3af; font-weight: 500; }
.ind-badge {
  font-size: 10px; font-weight: 700;
  padding: 1px 7px; border-radius: 4px;
  letter-spacing: 0.04em;
}
.ind-badge.bullish    { background:rgba(16,185,129,0.2);  color:#34d399; }
.ind-badge.bearish    { background:rgba(239,68,68,0.2);   color:#f87171; }
.ind-badge.neutral    { background:rgba(107,114,128,0.2); color:#9ca3af; }
.ind-badge.overbought { background:rgba(239,68,68,0.18);  color:#f87171; }
.ind-badge.oversold   { background:rgba(16,185,129,0.18); color:#34d399; }
.ind-badge.high-vol   { background:rgba(234,179,8,0.18);  color:#facc15; }

/* ── Scan Progress Bar ─────────────────────────────────────────────────────── */
@keyframes scanBarAnim {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%);  }
}
.animate-scan-bar { animation: scanBarAnim 1.4s linear infinite; }

/* ── Table Rows ────────────────────────────────────────────────────────────── */
#historyTableBody tr:hover { background: rgba(55,65,81,0.35); }

/* ── Toast ─────────────────────────────────────────────────────────────────── */
#toast { animation: slideUp 0.25s ease; }
@keyframes slideUp {
  from { opacity:0; transform: translateY(10px); }
  to   { opacity:1; transform: translateY(0);    }
}

/* ── S/R Level Pills ───────────────────────────────────────────────────────── */
.level-pill {
  font-size: 11px; font-family: monospace;
  padding: 2px 8px; border-radius: 4px;
  font-weight: 600; display: inline-block;
}
.level-support    { color:#34d399; background:rgba(16,185,129,0.12); }
.level-resistance { color:#f87171; background:rgba(239,68,68,0.12); }

/* ── Responsive Chart ──────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  #chartContainer { min-height: 260px; }
}
@media (max-width: 640px) {
  #chartContainer { min-height: 220px; }
}

/* ── Font ──────────────────────────────────────────────────────────────────── */
body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.font-mono { font-family: 'Cascadia Code', 'Courier New', 'Consolas', monospace; }

/* ── Selection Color ───────────────────────────────────────────────────────── */
::selection { background: #1d4ed8; color: #fff; }

/* ── Live Price Flash Animations ───────────────────────────────────────────── */
@keyframes priceUpPulse {
  0%   { color: #34d399; text-shadow: 0 0 12px rgba(52, 211, 153, 0.8); }
  50%  { color: #10b981; }
  100% { color: #ffffff; text-shadow: none; }
}
@keyframes priceDownPulse {
  0%   { color: #f87171; text-shadow: 0 0 12px rgba(248, 113, 113, 0.8); }
  50%  { color: #ef4444; }
  100% { color: #ffffff; text-shadow: none; }
}
.price-flash-up {
  animation: priceUpPulse 0.5s ease-out;
}
.price-flash-down {
  animation: priceDownPulse 0.5s ease-out;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #10b981;
  display: inline-block;
  box-shadow: 0 0 8px #10b981;
  animation: liveBlink 1.4s infinite ease-in-out;
}
@keyframes liveBlink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.35; transform: scale(0.7); }
}
