/* ═══════════════════════════════════════════════════════════
   AItrading by Jorch Lab — Design System
   Based on Jorch-Lab Landing Design System v1.0
   Colors: void (#050510), chrome (#c8c8d4), neon (green/cyan)
   Fonts: Inter (sans) + JetBrains Mono (mono)
   ═══════════════════════════════════════════════════════════ */

/* ── Base ──────────────────────────────────────────────── */
* { border-color: rgba(200, 200, 212, 0.10); }

body {
  cursor: crosshair;
}

::selection {
  background: rgba(16, 185, 129, 0.30);
  color: #ffffff;
}

/* ── Scrollbar ─────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(200, 200, 212, 0.20);
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(200, 200, 212, 0.30);
}

.scrollbar-thin::-webkit-scrollbar { width: 4px; }

/* ── Glass Panels ──────────────────────────────────────── */
.glass-panel {
  background: rgba(13, 13, 34, 0.60);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(200, 200, 212, 0.05);
  border-radius: 1rem;
}

.glass-card {
  background: rgba(13, 13, 34, 0.50);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(200, 200, 212, 0.05);
  border-radius: 1rem;
  transition: all 500ms;
}
.glass-card:hover {
  border-color: rgba(16, 185, 129, 0.20);
  background: rgba(17, 17, 40, 0.50);
}

.glow-border {
  border: 1px solid rgba(16, 185, 129, 0.20);
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.08),
              0 0 60px rgba(139, 92, 246, 0.03);
}

/* ── Text Gradients ────────────────────────────────────── */
.text-gradient {
  background: linear-gradient(to right, #00d4ff, #10b981, #a3e635);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.text-gradient-green {
  background: linear-gradient(to right, #10b981, #059669);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ── Starfield Canvas ──────────────────────────────────── */
#starfield {
  display: block;
}

/* ── Nav Scroll Effect ─────────────────────────────────── */
#navbar.scrolled {
  background: rgba(5, 5, 16, 0.80);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(200, 200, 212, 0.05);
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

/* ── Sessions Bar (Horizontal Pills) ──────────────────── */
.session-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  border-radius: 9999px;
  background: rgba(13, 13, 34, 0.40);
  border: 1px solid rgba(200, 200, 212, 0.04);
  transition: all 300ms;
  white-space: nowrap;
}
.session-pill.active {
  border-color: rgba(16, 185, 129, 0.25);
  background: rgba(16, 185, 129, 0.08);
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.06);
}
.session-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(200, 200, 212, 0.10);
  transition: all 300ms;
  flex-shrink: 0;
}
.session-dot.on {
  background: #10b981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
  animation: glow-pulse-dot 2s ease-in-out infinite;
}
@keyframes glow-pulse-dot {
  0%, 100% { box-shadow: 0 0 6px rgba(16, 185, 129, 0.5); }
  50%      { box-shadow: 0 0 14px rgba(16, 185, 129, 0.9); }
}

/* ── Timeframe Pills ──────────────────────────────────── */
.tf-pill {
  cursor: pointer;
  user-select: none;
  transition: all 200ms;
}
.tf-pill:hover {
  color: rgba(200, 200, 212, 0.7) !important;
}

.volatility-bar {
  height: 6px;
  border-radius: 9999px;
  background: rgba(200, 200, 212, 0.08);
  overflow: hidden;
}
.volatility-fill {
  height: 100%;
  border-radius: 9999px;
  transition: width 1s ease;
}
.volatility-fill.low    { background: linear-gradient(to right, #10b981, #34d399); }
.volatility-fill.medium { background: linear-gradient(to right, #f59e0b, #fbbf24); }
.volatility-fill.high   { background: linear-gradient(to right, #ef4444, #f87171); }

.sentiment-bar {
  height: 8px;
  border-radius: 9999px;
  overflow: hidden;
  display: flex;
}
.sentiment-buyers  { background: linear-gradient(to right, #10b981, #34d399); transition: width 0.8s ease; }
.sentiment-sellers { background: linear-gradient(to right, #ef4444, #f87171); transition: width 0.8s ease; }

/* ── News Impact Stars ─────────────────────────────────── */
.impact-star {
  color: rgba(250, 204, 21, 0.85);
  font-size: 10px;
  letter-spacing: 1px;
}

/* ── Chat Typing Indicator ─────────────────────────────── */
.typing-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(200, 200, 212, 0.40);
  animation: typingBounce 1.4s ease-in-out infinite;
}
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
  0%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-6px); }
}

/* ── Animation Delays ──────────────────────────────────── */
.animate-delay-100 { animation-delay: 100ms; }
.animate-delay-200 { animation-delay: 200ms; }
.animate-delay-300 { animation-delay: 300ms; }
.animate-delay-400 { animation-delay: 400ms; }
.animate-delay-500 { animation-delay: 500ms; }

/* ── CTA Button Shine ──────────────────────────────────── */
.cta-shine {
  position: relative;
  overflow: hidden;
}
.cta-shine::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  animation: shine 3s ease-in-out infinite;
}
@keyframes shine {
  0% { left: -100%; }
  40%, 100% { left: 100%; }
}

/* ── Mobile tweaks ─────────────────────────────────────── */
@media (max-width: 1024px) {
  /* On mobile/tablet, sidebar goes below chat naturally via flex order */
  #sessions-bar {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}
@media (max-width: 640px) {
  .glass-panel {
    border-radius: 0.75rem;
  }
  .session-pill {
    padding: 0.25rem 0.5rem;
  }
}

/* ── Link hover glow ───────────────────────────────────── */
a:not(.no-glow):hover {
  text-shadow: 0 0 15px rgba(0, 212, 255, 0.3);
}

/* ── Pulse ring for online status ──────────────────────── */
@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
  70% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}
