/* ==========================================================================
   F5 MARKETS - PREMIUM FINANCIAL-TECH DESIGN SYSTEM & CUSTOM STYLES
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --bg-dark: #030712;
  --bg-navy: #0B132B;
  --bg-card: rgba(15, 23, 42, 0.7);
  --border-glass: rgba(59, 130, 246, 0.18);
  --border-glass-hover: rgba(0, 240, 255, 0.4);
  
  --accent-blue: #0066FF;
  --accent-cyan: #00F0FF;
  --accent-glow: rgba(0, 240, 255, 0.15);
  
  --bull-green: #10B981;
  --bull-green-glow: rgba(16, 185, 129, 0.2);
  --bear-red: #EF4444;
  --bear-red-glow: rgba(239, 68, 68, 0.2);
  
  --text-white: #F8FAFC;
  --text-muted: #94A3B8;
  --text-dim: #64748B;
}

/* Base resets & typography */
html {
  scroll-behavior: smooth;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-white);
  overflow-x: hidden;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-dark);
  color: var(--text-white);
  min-height: 100vh;
  position: relative;
}

.font-mono {
  font-family: 'JetBrains Mono', monospace;
}

/* Ambient Radial Background Glows */
.bg-hero-glow {
  background: radial-gradient(circle at 50% 20%, rgba(0, 102, 255, 0.18) 0%, rgba(0, 240, 255, 0.08) 35%, rgba(3, 7, 18, 0) 70%);
}

.bg-radial-cyan {
  background: radial-gradient(circle at 50% 50%, rgba(0, 240, 255, 0.12) 0%, rgba(3, 7, 18, 0) 70%);
}

.bg-radial-blue {
  background: radial-gradient(circle at 80% 30%, rgba(0, 102, 255, 0.15) 0%, rgba(3, 7, 18, 0) 65%);
}

/* Financial Grid Background Pattern */
.bg-grid-pattern {
  background-size: 40px 40px;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
}

/* Glassmorphism Panels */
.glass-nav {
  background: rgba(3, 7, 18, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(59, 130, 246, 0.12);
  transition: all 0.3s ease;
}

.glass-nav.scrolled {
  background: rgba(3, 7, 18, 0.92);
  border-bottom-color: rgba(0, 240, 255, 0.25);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.glass-card {
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.glass-card:hover {
  border-color: var(--border-glass-hover);
  transform: translateY(-4px);
  box-shadow: 0 16px 40px 0 rgba(0, 102, 255, 0.2);
}

.glass-panel {
  background: rgba(11, 19, 43, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(0, 240, 255, 0.15);
  border-radius: 20px;
}

/* Text Gradient Utilities */
.text-gradient-cyan {
  background: linear-gradient(135deg, #FFFFFF 0%, #00F0FF 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-blue {
  background: linear-gradient(135deg, #0066FF 0%, #00F0FF 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-gold {
  background: linear-gradient(135deg, #F59E0B 0%, #FCD34D 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Glowing Accent Border */
.glow-border {
  position: relative;
}

.glow-border::after {
  content: '';
  position: absolute;
  inset: -1px;
  background: linear-gradient(90deg, #0066FF, #00F0FF, #0066FF);
  border-radius: inherit;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.glow-border:hover::after {
  opacity: 0.6;
}

/* Floating animation for hero cards */
@keyframes float {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-10px) rotate(0.5deg);
  }
}

.animate-float {
  animation: float 6s ease-in-out infinite;
}

/* Glowing pulse effect */
@keyframes pulseGlow {
  0%, 100% {
    opacity: 0.4;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.05);
  }
}

.animate-pulse-glow {
  animation: pulseGlow 4s ease-in-out infinite;
}

/* Live Market Ticker Animation */
.ticker-wrap {
  width: 100%;
  overflow: hidden;
  background: rgba(3, 7, 18, 0.9);
  border-top: 1px solid rgba(59, 130, 246, 0.15);
  border-bottom: 1px solid rgba(59, 130, 246, 0.15);
  white-space: nowrap;
}

.ticker-track {
  display: inline-flex;
  gap: 2rem;
  animation: ticker 35s linear infinite;
}

.ticker-track:hover {
  animation-play-state: paused;
}

@keyframes ticker {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* Button Styling & Magnetic Effect */
.btn-primary {
  background: linear-gradient(135deg, #0066FF 0%, #00C8FF 100%);
  color: #FFFFFF;
  font-weight: 700;
  padding: 0.85rem 2rem;
  border-radius: 9999px;
  box-shadow: 0 0 20px rgba(0, 102, 255, 0.4);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: none;
  cursor: pointer;
  text-decoration: none;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(0, 240, 255, 0.6);
  background: linear-gradient(135deg, #0052CC 0%, #00F0FF 100%);
}

.btn-secondary {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(0, 240, 255, 0.3);
  color: #FFFFFF;
  font-weight: 600;
  padding: 0.85rem 2rem;
  border-radius: 9999px;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  text-decoration: none;
}

.btn-secondary:hover {
  background: rgba(0, 240, 255, 0.1);
  border-color: #00F0FF;
  color: #00F0FF;
}

/* Canvas Styles */
canvas#heroParticlesCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

canvas#tradingCanvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* Tab active state */
.tab-btn.active {
  background: linear-gradient(135deg, rgba(0, 102, 255, 0.3) 0%, rgba(0, 240, 255, 0.2) 100%);
  border-color: #00F0FF;
  color: #00F0FF;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #030712;
}
::-webkit-scrollbar-thumb {
  background: #1E293B;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #0066FF;
}

/* Responsive Overrides & Motion Protection */
@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
