/* ============================================
   TradePilot AI — Custom Styles
   Works alongside Tailwind CSS v4 CDN
   ============================================ */

/* Base */
* {
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background: #0a0a0f;
  color: #fff;
  margin: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---- Glassmorphism card ---- */
.glass-card {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 1rem;
  padding: 1.5rem;
  transition: all 0.3s ease;
}

.glass-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

/* ---- Skeleton loading ---- */
.skeleton {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.03) 25%,
    rgba(255, 255, 255, 0.06) 50%,
    rgba(255, 255, 255, 0.03) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 0.5rem;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* ---- Fade-in animation ---- */
.fade-in {
  animation: fadeIn 0.6s ease-out forwards;
  opacity: 0;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

/* ---- Staggered children ---- */
.stagger > *:nth-child(1) { animation-delay: 0ms; }
.stagger > *:nth-child(2) { animation-delay: 50ms; }
.stagger > *:nth-child(3) { animation-delay: 100ms; }
.stagger > *:nth-child(4) { animation-delay: 150ms; }
.stagger > *:nth-child(5) { animation-delay: 200ms; }
.stagger > *:nth-child(6) { animation-delay: 250ms; }
.stagger > *:nth-child(7) { animation-delay: 300ms; }
.stagger > *:nth-child(8) { animation-delay: 350ms; }

/* ---- Bullish / Bearish / Neutral colors ---- */
.text-bullish { color: #22c55e; }
.text-bearish { color: #ef4444; }
.text-neutral { color: #3b82f6; }
.bg-bullish  { background: rgba(34, 197, 94, 0.1); }
.bg-bearish  { background: rgba(239, 68, 68, 0.1); }
.bg-neutral  { background: rgba(59, 130, 246, 0.1); }

/* ---- Search input focus ---- */
.search-input:focus {
  outline: none;
  border-color: rgba(59, 130, 246, 0.5);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

/* ---- Section headings ---- */
.section-title {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 1rem;
}

/* ---- TradingView widget overrides ---- */
.tradingview-widget-container {
  border-radius: 1rem;
  overflow: hidden;
}

.tradingview-widget-container iframe {
  border-radius: 1rem;
}

/* Remove TradingView branding link styling bleed */
.tradingview-widget-container__widget {
  border-radius: 1rem;
  overflow: hidden;
}

/* ---- Widget wrapper card ---- */
.widget-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 1rem;
  overflow: hidden;
  transition: border-color 0.3s ease;
}

.widget-card:hover {
  border-color: rgba(255, 255, 255, 0.1);
}

/* ---- Glow effect for hero ---- */
.hero-glow {
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.08) 0%, transparent 70%);
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 0;
}

/* ---- Divider ---- */
.divider {
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.06) 50%,
    transparent
  );
  margin: 2rem 0;
}

/* ---- Scrollbar styling ---- */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Firefox scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

/* ---- Pulse dot (for live indicators) ---- */
.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.5; transform: scale(1.5); }
}

/* ---- Page transition overlay ---- */
#page-transition-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #0a0a0f;
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease-out;
}

#page-transition-overlay.active {
  opacity: 1;
  pointer-events: all;
}

/* ---- Responsive tweaks ---- */
@media (max-width: 768px) {
  .glass-card {
    padding: 1rem;
  }

  .hero-glow {
    width: 300px;
    height: 300px;
    top: -100px;
  }
}
