/* ============================================
   OptionTradeHub - Enhanced Styles
   Dark Theme Trading Platform
   ============================================ */

/* CSS Variables */
:root {
  --dark-bg: #0a0e17;
  --dark-card: #111827;
  --dark-card-hover: #1a2234;
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.7);
  --text-muted: rgba(255, 255, 255, 0.5);
  --accent-blue: #3b82f6;
  --accent-purple: #8b5cf6;
  --accent-cyan: #06b6d4;
  --accent-emerald: #10b981;
  --accent-rose: #f43f5e;
  --accent-orange: #f97316;
  --gradient-primary: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  --gradient-secondary: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
  --gradient-success: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
  --glass-bg: rgba(17, 24, 39, 0.8);
  --glass-border: rgba(255, 255, 255, 0.1);
  --shadow-glow: 0 0 40px rgba(59, 130, 246, 0.3);
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  background-color: var(--dark-bg);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Typography */
.font-syne {
  font-family: 'Syne', sans-serif;
}

.font-plus-jakarta {
  font-family: 'Plus Jakarta Sans', sans-serif;
}

/* Gradient Text */
.text-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-gradient-cyan {
  background: var(--gradient-secondary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Section Styles */
.section-padding {
  padding: 6rem 0;
}

.section-subtitle {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 9999px;
  color: var(--accent-blue);
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  font-family: 'Syne', sans-serif;
  color: var(--text-primary);
  margin-bottom: 1rem;
  line-height: 1.2;
}

.section-description {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* Glass Card Effect */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 1.5rem;
  transition: var(--transition-normal);
}

.glass-card:hover {
  border-color: rgba(59, 130, 246, 0.3);
  box-shadow: var(--shadow-glow);
  transform: translateY(-4px);
}

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 2rem;
  background: var(--gradient-primary);
  color: white;
  font-weight: 600;
  border-radius: 1rem;
  border: none;
  cursor: pointer;
  transition: var(--transition-normal);
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: 0.5s;
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(59, 130, 246, 0.4);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 2rem;
  background: transparent;
  color: white;
  font-weight: 600;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: var(--transition-normal);
  text-decoration: none;
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
}

/* Navigation */
#mainNav {
  background: transparent;
  transition: var(--transition-normal);
}

#mainNav.scrolled {
  background: rgba(10, 14, 23, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-link {
  color: var(--text-secondary);
  font-weight: 500;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  transition: var(--transition-fast);
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-primary);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: var(--transition-normal);
  transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 60%;
}

.nav-link-mobile {
  color: var(--text-secondary);
  font-weight: 500;
  text-decoration: none;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: var(--transition-fast);
}

.nav-link-mobile:hover {
  color: var(--text-primary);
}

/* Preloader */
#preloader {
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

#preloader.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader {
  width: 60px;
  height: 60px;
  border: 3px solid rgba(59, 130, 246, 0.2);
  border-top-color: var(--accent-blue);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Gradient Orbs */
.gradient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  animation: float-orb 10s ease-in-out infinite;
}

.gradient-orb-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.5), transparent);
  top: -10%;
  right: -10%;
  animation-delay: 0s;
}

.gradient-orb-2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.5), transparent);
  bottom: -10%;
  left: -10%;
  animation-delay: -3s;
}

.gradient-orb-3 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.4), transparent);
  top: 50%;
  left: 30%;
  animation-delay: -6s;
}

@keyframes float-orb {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(30px, -30px) scale(1.1); }
  50% { transform: translate(-20px, 20px) scale(0.9); }
  75% { transform: translate(20px, 10px) scale(1.05); }
}

/* Floating Animation */
.animate-float {
  animation: float 3s ease-in-out infinite;
}

.animate-float-delayed {
  animation: float 3s ease-in-out infinite;
  animation-delay: 1.5s;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-15px); }
}

/* Pulse Animation */
.animate-pulse-glow {
  animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 20px rgba(59, 130, 246, 0.3); }
  50% { box-shadow: 0 0 40px rgba(59, 130, 246, 0.6); }
}

/* Shimmer Effect */
.shimmer {
  position: relative;
  overflow: hidden;
}

.shimmer::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  to { left: 100%; }
}

/* Live Ticker Styles */
.live-ticker {
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.1), rgba(6, 182, 212, 0.1));
  border-top: 1px solid rgba(16, 185, 129, 0.2);
  border-bottom: 1px solid rgba(16, 185, 129, 0.2);
  overflow: hidden;
  position: relative;
}

.ticker-wrap {
  display: flex;
  animation: ticker-scroll 30s linear infinite;
}

.ticker-item {
  display: flex;
  align-items: center;
  padding: 0.75rem 2rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.ticker-symbol {
  font-weight: 600;
  color: var(--text-primary);
  margin-right: 0.5rem;
}

.ticker-price {
  font-weight: 700;
  color: var(--text-primary);
  margin-right: 0.5rem;
}

.ticker-change {
  font-size: 0.875rem;
  font-weight: 600;
}

.ticker-change.up {
  color: var(--accent-emerald);
}

.ticker-change.down {
  color: var(--accent-rose);
}

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

/* Market Cards */
.market-card {
  position: relative;
  overflow: hidden;
}

.market-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-primary);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.market-card:hover::before {
  transform: scaleX(1);
}

.market-tab {
  color: var(--text-secondary);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: var(--transition-fast);
}

.market-tab.active,
.market-tab:hover {
  color: var(--text-primary);
  background: rgba(59, 130, 246, 0.2);
}

/* Feature Cards */
.feature-card {
  position: relative;
  overflow: hidden;
}

.feature-icon {
  width: 60px;
  height: 60px;
  border-radius: 1rem;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  position: relative;
  overflow: hidden;
}

.feature-icon::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.3), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.feature-card:hover .feature-icon::before {
  opacity: 1;
}

/* Step Numbers */
.step-number {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.25rem;
  color: white;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* Testimonial Cards */
.testimonial-card {
  position: relative;
}

.testimonial-card::before {
  content: '"';
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  font-size: 4rem;
  color: rgba(59, 130, 246, 0.2);
  font-family: Georgia, serif;
  line-height: 1;
}

/* FAQ Styles */
.faq-item {
  transition: var(--transition-normal);
}

.faq-question {
  background: transparent;
  border: none;
  cursor: pointer;
  transition: var(--transition-fast);
}

.faq-question:hover {
  background: rgba(255, 255, 255, 0.02);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.active .faq-answer {
  max-height: 500px;
}

.faq-item.active .faq-question i {
  transform: rotate(180deg);
}

/* Social Links */
.social-link {
  width: 40px;
  height: 40px;
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition-fast);
  border: 1px solid transparent;
}

.social-link:hover {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.3);
  color: var(--accent-blue);
  transform: translateY(-2px);
}

/* Footer Styles */
.footer-title {
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  font-size: 1rem;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition-fast);
  font-size: 0.9375rem;
}

.footer-links a:hover {
  color: var(--accent-blue);
  padding-left: 4px;
}

/* Back to Top Button */
#backToTop {
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
}

#backToTop.visible {
  opacity: 1;
  visibility: visible;
}

#backToTop:hover {
  transform: translateY(-4px);
}

/* Grid Pattern Background */
.bg-grid-pattern {
  background-image: 
    linear-gradient(rgba(59, 130, 246, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59, 130, 246, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
}

/* Background Colors */
.bg-dark-bg {
  background-color: var(--dark-bg);
}

.bg-dark-card {
  background-color: var(--dark-card);
}

/* Calculator Section Styles */
.calculator-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 1.5rem;
  padding: 2rem;
}

.calculator-input {
  width: 100%;
  padding: 1rem 1.25rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  color: var(--text-primary);
  font-size: 1rem;
  transition: var(--transition-fast);
}

.calculator-input:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.calculator-input::placeholder {
  color: var(--text-muted);
}

.calculator-label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
}

.calculator-result {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(6, 182, 212, 0.1));
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 1rem;
  padding: 1.5rem;
  text-align: center;
}

.calculator-result-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent-emerald);
}

/* Slider/Carousel Styles */
.slider-container {
  position: relative;
  overflow: hidden;
}

.slider-track {
  display: flex;
  transition: transform 0.5s ease;
}

.slider-slide {
  flex: 0 0 100%;
  padding: 0 1rem;
}

.slider-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2rem;
}

.slider-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  cursor: pointer;
  transition: var(--transition-fast);
}

.slider-dot.active {
  background: var(--accent-blue);
  width: 30px;
  border-radius: 5px;
}

.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
  z-index: 10;
}

.slider-arrow:hover {
  background: rgba(59, 130, 246, 0.3);
  border-color: var(--accent-blue);
}

.slider-arrow.prev {
  left: 1rem;
}

.slider-arrow.next {
  right: 1rem;
}

/* Video Section Styles */
.video-container {
  position: relative;
  border-radius: 1.5rem;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.video-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10, 14, 23, 0.8), transparent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.play-button {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  transition: var(--transition-normal);
  box-shadow: 0 0 40px rgba(59, 130, 246, 0.5);
}

.play-button:hover {
  transform: scale(1.1);
  box-shadow: 0 0 60px rgba(59, 130, 246, 0.7);
}

/* Stats Counter Animation */
.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Price Change Indicators */
.price-up {
  color: var(--accent-emerald);
}

.price-down {
  color: var(--accent-rose);
}

/* Badge Styles */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-success {
  background: rgba(16, 185, 129, 0.2);
  color: var(--accent-emerald);
}

.badge-danger {
  background: rgba(244, 63, 94, 0.2);
  color: var(--accent-rose);
}

.badge-warning {
  background: rgba(249, 115, 22, 0.2);
  color: var(--accent-orange);
}

/* Tab Styles */
.tab-container {
  display: flex;
  gap: 0.5rem;
  padding: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 1rem;
}

.tab-btn {
  padding: 0.75rem 1.5rem;
  border-radius: 0.75rem;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-fast);
}

.tab-btn.active {
  background: var(--gradient-primary);
  color: white;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Responsive Adjustments */
@media (max-width: 1024px) {
  .section-title {
    font-size: 2rem;
  }
  
  .gradient-orb {
    opacity: 0.2;
  }
}

@media (max-width: 768px) {
  .section-padding {
    padding: 4rem 0;
  }
  
  .section-title {
    font-size: 1.75rem;
  }
  
  .slider-arrow {
    display: none;
  }
  
  .stat-number {
    font-size: 2rem;
  }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--dark-bg);
}

::-webkit-scrollbar-thumb {
  background: rgba(59, 130, 246, 0.5);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(59, 130, 246, 0.7);
}

/* Selection Color */
::selection {
  background: rgba(59, 130, 246, 0.3);
  color: white;
}

/* Focus Styles */
:focus-visible {
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .ticker-wrap {
    animation: none;
  }
}
