/* ==========================================
   FNOCHAIN - Main Stylesheet
   Optimized for performance and SEO
   ========================================== */

/* ==========================================
   1. CSS CUSTOM PROPERTIES (Variables)
   ========================================== */
:root {
  /* Colors */
  --bg-main: #f8fafc;
  --bg-white: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --brand-gold: #d97706;
  --brand-blue: #2563eb;
  --brand-dark: #1e293b;
  --border-color: #e2e8f0;
  --border-light: #cbd5e1;
  
  /* Accent Colors */
  --accent-green: #22c55e;
  --accent-red: #ef4444;
  --accent-purple: #a855f7;
  --accent-yellow: #f59e0b;
  --accent-orange: #dc2626;
  
  /* Green Shades */
  --green-bg: #dcfce7;
  --green-text: #166534;
  --green-light-bg: #f0fdf4;
  
  /* Red Shades */
  --red-bg: #fee2e2;
  --red-text: #991b1b;
  --red-light-bg: #fef2f2;
  
  /* Purple Shades */
  --purple-bg: #f3e8ff;
  --purple-text: #6b21a8;
  --purple-light-bg: #faf5ff;
  
  /* Yellow Shades */
  --yellow-bg: #fef3c7;
  --yellow-text: #92400e;
  
  /* Gray Shades */
  --gray-bg: #f1f5f9;
  --gray-light-bg: #f3f4f6;
  --gray-text: #374151;
  --gray-hover: #334155;
  
  /* Blue Shades */
  --blue-bg: #eff6ff;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  
  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 50px;
  --radius-full: 50%;
  
  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;
  
  /* Typography */
  --font-primary: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

/* ==========================================
   2. CSS RESET
   ========================================== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ==========================================
   3. BASE STYLES
   ========================================== */
html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  background: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

button {
  cursor: pointer;
  font-family: inherit;
}

/* ==========================================
   4. ACCESSIBILITY
   ========================================== */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--brand-gold);
  color: #fff;
  padding: 8px 16px;
  z-index: 1000;
  transition: top var(--transition-base);
  text-decoration: none;
  font-weight: 600;
}

.skip-link:focus {
  top: 0;
  outline: 3px solid var(--brand-blue);
  outline-offset: 2px;
}

/* Focus visible styles */
:focus-visible {
  outline: 3px solid var(--brand-blue);
  outline-offset: 2px;
}

/* Reduced motion preferences */
@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;
  }
}

/* ==========================================
   5. NAVIGATION
   ========================================== */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  will-change: transform;
}

.brand {
  font-weight: 800;
  font-size: 20px;
  text-decoration: none;
  color: var(--brand-gold);
  letter-spacing: -0.5px;
  transition: color var(--transition-base);
}

.brand span {
  color: var(--brand-dark);
}

.brand:hover {
  color: var(--brand-blue);
}

.nav-links {
  display: flex;
  gap: 8px;
  align-items: center;
  list-style: none;
}

.nav-link {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-base);
  position: relative;
}

.nav-link:hover,
.nav-link:focus {
  background: var(--gray-bg);
  color: var(--text-main);
  outline: none;
}

.nav-link:focus-visible {
  outline: 3px solid var(--brand-blue);
  outline-offset: 2px;
}

.nav-link.active {
  background: var(--blue-bg);
  color: var(--brand-blue);
  font-weight: 600;
}

/* CTA Button */
.btn-cta {
  background: var(--brand-dark);
  color: white;
  padding: 8px 20px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition-base);
  display: inline-block;
}

.btn-cta:hover,
.btn-cta:focus {
  background: var(--gray-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-cta:focus-visible {
  outline: 3px solid var(--brand-blue);
  outline-offset: 2px;
  border-color: var(--brand-blue);
}

/* Mobile Menu Button */
.mobile-toggle {
  display: none;
  background: none;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-sm);
  transition: background var(--transition-base);
}

.mobile-toggle:hover {
  background: var(--gray-bg);
}

.mobile-toggle:focus-visible {
  outline: 3px solid var(--brand-blue);
  outline-offset: 2px;
  border-color: var(--brand-blue);
}

.mobile-toggle[aria-expanded="true"] {
  background: var(--blue-bg);
}

/* ==========================================
   6. BREAKING NEWS TICKER
   ========================================== */
.ticker-wrapper {
  background: var(--red-light-bg);
  border-bottom: 1px solid #fecaca;
  overflow: hidden;
  height: 40px;
  position: relative;
}

.ticker-label {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background: var(--accent-red);
  color: white;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  z-index: 2;
  white-space: nowrap;
  gap: 8px;
}

.pulse-dot {
  width: 6px;
  height: 6px;
  background: white;
  border-radius: var(--radius-full);
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { 
    opacity: 1; 
    transform: scale(1); 
  }
  50% { 
    opacity: 0.4; 
    transform: scale(0.7); 
  }
}

.ticker-track {
  display: flex;
  align-items: center;
  height: 100%;
  animation: ticker-scroll 45s linear infinite;
  margin-left: 130px;
  gap: 32px;
}

.ticker-track:hover {
  animation-play-state: paused;
}

@keyframes ticker-scroll {
  0% { 
    transform: translateX(0); 
  }
  100% { 
    transform: translateX(-50%); 
  }
}

.ticker-item {
  white-space: nowrap;
  font-size: 13px;
  color: var(--text-main);
  font-weight: 500;
  cursor: pointer;
  transition: color var(--transition-base);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ticker-item:hover,
.ticker-item:focus {
  color: var(--brand-blue);
}

.ticker-item:focus-visible {
  outline: 2px solid var(--brand-blue);
  outline-offset: 2px;
}

.ticker-time {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  background: #fff;
  padding: 2px 8px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
}

.ticker-sep {
  color: var(--border-light);
  font-size: 8px;
}

/* ==========================================
   7. HERO SECTION
   ========================================== */
.hero {
  padding: clamp(40px, 5vw, 60px) 24px clamp(30px, 4vw, 40px);
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
  color: var(--brand-dark);
  letter-spacing: -1px;
}

.hero h1 b {
  color: var(--brand-blue);
}

.hero p {
  font-size: clamp(16px, 2vw, 18px);
  color: var(--text-muted);
  max-width: 700px;
  margin: 0 auto 24px;
}

.hero-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-light);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-white);
  padding: 8px 16px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-color);
}

/* Market Status Indicators */
.pulse-dot-live {
  width: 8px;
  height: 8px;
  background: var(--accent-green);
  border-radius: var(--radius-full);
  animation: pulseLive 2s infinite;
}

.pulse-dot-off {
  width: 8px;
  height: 8px;
  background: var(--text-light);
  border-radius: var(--radius-full);
}

.pulse-dot-warning {
  width: 8px;
  height: 8px;
  background: var(--accent-yellow);
  border-radius: var(--radius-full);
  animation: pulseLive 2s infinite;
}

@keyframes pulseLive {
  0% { 
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); 
  }
  70% { 
    box-shadow: 0 0 0 10px rgba(34, 197, 94, 0); 
  }
  100% { 
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); 
  }
}

.market-badge {
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
  margin: 0 4px;
}

.badge-live { 
  background: var(--green-bg); 
  color: var(--green-text); 
}

.badge-warning { 
  background: var(--yellow-bg); 
  color: var(--yellow-text); 
}

.badge-closed { 
  background: var(--red-bg); 
  color: var(--red-text); 
}

.badge-weekend { 
  background: var(--gray-light-bg); 
  color: var(--gray-text); 
}

/* ==========================================
   8. TOOL SLIDER (SCROLL SNAP)
   ========================================== */
.slider-section {
  padding: 0 24px 60px;
  max-width: 1400px;
  margin: 0 auto;
}

.slider-track {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding: 10px 0;
}

.slider-track::-webkit-scrollbar {
  display: none;
}

.slide-card {
  min-width: 320px;
  height: 220px;
  scroll-snap-align: start;
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-base);
}

.slide-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.slide-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.slide-card:hover img {
  transform: scale(1.05);
}

.slide-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  padding: 24px 20px;
  color: white;
}

.slide-overlay h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
}

.slide-overlay p {
  font-size: 14px;
  color: var(--border-light);
}

/* ==========================================
   9. FEATURES GRID
   ========================================== */
.features {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px 80px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.feature-card {
  background: var(--bg-white);
  padding: 32px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  transition: all var(--transition-base);
  position: relative;
}

.feature-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
  border-color: transparent;
}

.feature-icon {
  width: 48px;
  height: 48px;
  background: var(--blue-bg);
  color: var(--brand-blue);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 20px;
}

.feature-card h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-main);
}

.feature-card p {
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 16px;
  line-height: 1.6;
}

.feature-list {
  list-style: none;
  padding: 0;
}

.feature-list li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 8px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.5;
}

.feature-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent-green);
  font-weight: 700;
}

/* ==========================================
   10. TABS & CONTENT SECTIONS
   ========================================== */
.content-section {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

.tab-header {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border-color);
  margin-bottom: 32px;
}

.tab-btn {
  background: none;
  border: none;
  padding: 16px 24px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  position: relative;
  transition: all var(--transition-fast);
  font-family: inherit;
}

.tab-btn:hover {
  color: var(--text-main);
}

.tab-btn.active {
  color: var(--brand-blue);
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--brand-blue);
}

.tab-panel {
  display: none;
  animation: fadeIn 0.4s ease;
}

.tab-panel.active {
  display: block;
}

@keyframes fadeIn {
  from { 
    opacity: 0; 
    transform: translateY(10px); 
  }
  to { 
    opacity: 1; 
    transform: translateY(0); 
  }
}

/* ==========================================
   11. SENTIMENT FILTERS
   ========================================== */
.sentiment-filters {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.sentiment-pill {
  padding: 6px 16px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  background: var(--bg-white);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
}

.sentiment-pill:hover {
  border-color: var(--brand-blue);
  color: var(--brand-blue);
}

.sentiment-pill.active {
  font-weight: 700;
}

.sentiment-pill.active.all-active {
  border-color: var(--brand-blue);
  color: var(--brand-blue);
  background: var(--blue-bg);
}

.sentiment-pill.active.bullish-active {
  border-color: var(--accent-green);
  color: var(--green-text);
  background: var(--green-light-bg);
}

.sentiment-pill.active.bearish-active {
  border-color: var(--accent-red);
  color: var(--red-text);
  background: var(--red-light-bg);
}

.sentiment-pill.active.neutral-active {
  border-color: var(--accent-purple);
  color: var(--purple-text);
  background: var(--purple-light-bg);
}

/* ==========================================
   12. TRENDING TAGS & YOUTUBE SECTION
   ========================================== */
.trending-section {
  margin-bottom: 32px;
  padding: 0;
}

.trending-label {
  font-family: var(--font-mono);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 20px;
  position: relative;
  animation: fireFlicker 1.5s ease-in-out infinite;
}

.trending-label::after {
  content: '';
  display: block;
  width: 40px;
  height: 2px;
  background: var(--accent-yellow);
  margin: 12px auto 0;
  border-radius: 2px;
}

@keyframes fireFlicker {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.8; }
}

.trending-tags {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

.trending-item-heading {
  margin: 0;
  padding: 0;
}

.trending-tag {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--text-main);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.trending-tag::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.06), rgba(239, 68, 68, 0.06));
  transition: width var(--transition-base);
}

.trending-tag:hover {
  border-color: var(--accent-yellow);
  color: var(--brand-gold);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(245, 158, 11, 0.15);
}

.trending-tag:hover::before {
  width: 100%;
}

/* Play icon on hover */
.trending-tag::after {
  content: '▶';
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%) translateX(10px);
  font-size: 10px;
  color: var(--accent-yellow);
  opacity: 0;
  transition: all var(--transition-base);
}

.trending-tag:hover::after {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

/* Rank Badge */
.rank {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--accent-yellow), var(--accent-red));
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  min-width: 28px;
  text-align: center;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

/* Top 3 special styles */
.trending-item-heading:nth-child(-n+3) .trending-tag {
  background: var(--bg-white);
  border-left: 4px solid var(--accent-yellow);
  font-weight: 600;
}

.trending-item-heading:nth-child(1) .trending-tag {
  border-left: 4px solid var(--accent-red);
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.1);
}

.trending-item-heading:nth-child(1) .rank {
  background: linear-gradient(135deg, var(--accent-red), var(--accent-orange));
  animation: rankGlow 2s ease-in-out infinite;
}

.trending-item-heading:nth-child(2) .rank,
.trending-item-heading:nth-child(3) .rank {
  background: linear-gradient(135deg, var(--accent-yellow), var(--brand-gold));
}

@keyframes rankGlow {
  0%, 100% { 
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.3); 
  }
  50% { 
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.6); 
  }
}

/* Float animation for top 3 */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}

.trending-item-heading:nth-child(-n+3):hover .trending-tag {
  animation: float 1.5s ease-in-out infinite;
}

/* Rest of the videos */
.trending-item-heading:nth-child(n+4) .rank {
  background: var(--text-light);
  font-size: 11px;
  padding: 3px 6px;
}

.trending-item-heading:nth-child(n+4) .trending-tag {
  font-size: 13px;
  padding: 12px 14px;
}

/* Loading state */
.trending-tag.loading {
  background: linear-gradient(90deg, var(--gray-bg) 25%, var(--border-color) 50%, var(--gray-bg) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  color: transparent;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ==========================================
   13. NEWS GRID
   ========================================== */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}

.news-card {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  padding: 24px;
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  transition: all var(--transition-base);
  position: relative;
}

.news-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--brand-blue);
  transform: translateY(-2px);
}

.news-source {
  font-size: 12px;
  font-weight: 700;
  color: var(--brand-blue);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.news-title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 12px;
  text-decoration: none;
  color: var(--text-main);
  flex-grow: 1;
}

.news-title:hover {
  color: var(--brand-blue);
}

.news-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-meta {
  font-size: 12px;
  color: var(--text-light);
  font-family: var(--font-mono);
  border-top: 1px solid var(--border-color);
  padding-top: 12px;
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Sentiment Badges */
.sentiment-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 700;
}

.sentiment-badge.bullish {
  color: var(--green-text);
  background: var(--green-bg);
}

.sentiment-badge.bearish {
  color: var(--red-text);
  background: var(--red-bg);
}

.sentiment-badge.neutral {
  color: var(--purple-text);
  background: var(--purple-bg);
}

/* Bookmark Button */
.bookmark-btn {
  background: none;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 14px;
  transition: all var(--transition-fast);
}

.bookmark-btn:hover {
  color: var(--brand-gold);
  border-color: var(--brand-gold);
  background: #fefce8;
}

.bookmark-btn.bookmarked {
  color: var(--brand-gold);
  border-color: var(--brand-gold);
  background: #fefce8;
}

/* ==========================================
   14. TWEET GRID
   ========================================== */
.tweet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}

.tweet-card {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  padding: 24px;
  border: 1px solid var(--border-color);
  position: relative;
}

.tweet-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.tweet-avatar {
  width: 40px;
  height: 40px;
  background: var(--border-color);
  border-radius: var(--radius-full);
}

.tweet-user {
  font-weight: 700;
  font-size: 15px;
}

.tweet-handle {
  color: var(--text-muted);
  font-size: 14px;
}

.tweet-text {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-main);
  margin-bottom: 16px;
}

.tweet-time {
  font-size: 12px;
  color: var(--text-light);
  font-family: var(--font-mono);
}

/* ==========================================
   15. SEO LONG FORM CONTENT
   ========================================== */
.seo-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

.seo-content h2 {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 24px;
  text-align: center;
  color: var(--brand-dark);
}

.seo-text {
  font-size: 17px;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 24px;
  text-align: justify;
}

.seo-text b {
  color: var(--text-main);
  font-weight: 700;
}

/* Q&A Items */
.qa-item {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 20px;
}

.qa-item h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-main);
}

.qa-item p {
  font-size: 15px;
  color: #475569;
  line-height: 1.8;
}

/* Info Boxes */
.info-box {
  background: var(--blue-bg);
  border-left: 4px solid var(--brand-blue);
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  margin: 20px 0;
}

.info-box strong {
  color: var(--brand-blue);
}

.warning-box {
  background: var(--yellow-bg);
  border-left: 4px solid var(--accent-yellow);
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  margin: 20px 0;
}

.warning-box strong {
  color: var(--yellow-text);
}

/* ==========================================
   16. FOOTER
   ========================================== */
.footer {
  background: var(--brand-dark);
  color: var(--text-light);
  padding: 60px 24px 30px;
  margin-top: 40px;
}

.footer-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
}

.footer-brand {
  font-size: 24px;
  font-weight: 800;
  color: white;
  margin-bottom: 16px;
}

.footer-brand span {
  color: var(--brand-gold);
}

.footer-desc {
  font-size: 14px;
  line-height: 1.6;
  max-width: 300px;
}

.footer-title {
  color: white;
  font-weight: 700;
  margin-bottom: 16px;
  font-size: 16px;
}

.footer-links {
  list-style: none;
  padding: 0;
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  color: var(--text-light);
  text-decoration: none;
  font-size: 14px;
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: white;
}

.footer-bottom {
  max-width: 1200px;
  margin: 40px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--gray-hover);
  text-align: center;
  font-size: 13px;
  font-family: var(--font-mono);
}

/* ==========================================
   17. TOAST NOTIFICATIONS
   ========================================== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 12px 20px;
  background: var(--brand-dark);
  color: white;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.3s ease, toastOut 0.3s ease 2.5s forwards;
  display: flex;
  align-items: center;
  gap: 8px;
}

@keyframes toastIn {
  from { 
    opacity: 0; 
    transform: translateY(16px); 
  }
  to { 
    opacity: 1; 
    transform: translateY(0); 
  }
}

@keyframes toastOut {
  to { 
    opacity: 0; 
    transform: translateY(-8px); 
  }
}

/* ==========================================
   18. SCROLL ANIMATIONS
   ========================================== */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================
   19. DARK MODE SUPPORT
   ========================================== */
@media (prefers-color-scheme: dark) {
  .trending-tag {
    background: #1e293b;
    border-color: var(--gray-hover);
    color: #e2e8f0;
  }
  
  .trending-tag:hover {
    background: var(--gray-hover);
    border-color: var(--accent-yellow);
  }
  
  .trending-tag.loading {
    background: linear-gradient(90deg, #1e293b 25%, var(--gray-hover) 50%, #1e293b 75%);
  }
}

/* ==========================================
   20. RESPONSIVE DESIGN
   ========================================== */

/* Tablet and below */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }
}

/* Mobile Landscape */
@media (max-width: 768px) {
  .mobile-toggle {
    display: block;
  }
  
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg-white);
    flex-direction: column;
    padding: 16px;
    box-shadow: var(--shadow-lg);
    border-bottom: 1px solid var(--border-color);
  }
  
  .nav-links.active {
    display: flex;
  }
  
  .nav-links .nav-link {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    width: 100%;
  }
  
  .nav-links .nav-link:last-child {
    border-bottom: none;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  .slide-card {
    min-width: 280px;
    height: 180px;
  }
  
  .news-grid,
  .tweet-grid {
    grid-template-columns: 1fr;
  }
  
  .features {
    grid-template-columns: 1fr;
  }
  
  .ticker-label {
    font-size: 9px;
    padding: 0 8px;
  }
  
  .ticker-track {
    margin-left: 100px;
  }
  
  .trending-tags {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 0 12px;
  }
  
  .trending-tag {
    font-size: 13px;
    padding: 12px 14px;
  }
  
  .rank {
    font-size: 11px;
    padding: 3px 6px;
    min-width: 24px;
  }
  
  .trending-item-heading:nth-child(-n+3) .trending-tag {
    border-left-width: 3px;
  }
  
  .seo-content h2 {
    font-size: 24px;
  }
  
  .seo-text {
    font-size: 15px;
  }
}

/* Mobile Portrait */
@media (max-width: 480px) {
  .hero {
    padding: 30px 16px 20px;
  }
  
  .nav {
    padding: 0 16px;
  }
  
  .hero h1 {
    font-size: 1.75rem;
  }
  
  .hero p {
    font-size: 14px;
  }
  
  .feature-card {
    padding: 24px;
  }
  
  .news-card {
    padding: 20px;
  }
  
  .trending-label {
    font-size: 11px;
    letter-spacing: 1px;
  }
  
  .trending-tag {
    font-size: 12px;
    padding: 10px 12px;
    border-radius: 10px;
  }
  
  .trending-tag::after {
    display: none;
  }
  
  .tab-btn {
    padding: 12px 16px;
    font-size: 14px;
  }
}

/* ==========================================
   21. PRINT STYLES
   ========================================== */
@media print {
  .nav,
  .ticker-wrapper,
  .mobile-toggle,
  .toast-container,
  .bookmark-btn {
    display: none !important;
  }
  
  body {
    background: white;
    color: black;
  }
  
  a {
    text-decoration: underline;
  }
}
/* ==========================================
   FAQ ACCORDION STYLES
   ========================================== */
.faq-accordion {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.faq-item {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all var(--transition-base);
}

.faq-item:hover {
  border-color: var(--brand-blue);
  box-shadow: var(--shadow-sm);
}

.faq-item.active {
  border-color: var(--brand-blue);
  box-shadow: var(--shadow-md);
}

/* Question Button */
.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  font-size: 17px;
  font-weight: 600;
  color: var(--text-main);
  transition: all var(--transition-base);
  position: relative;
}

.faq-question:hover {
  background: var(--gray-bg);
}

.faq-question:focus-visible {
  outline: 3px solid var(--brand-blue);
  outline-offset: -3px;
  background: var(--blue-bg);
}

/* Question Number */
.faq-number {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--brand-blue);
  background: var(--blue-bg);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  min-width: 48px;
  text-align: center;
  flex-shrink: 0;
  transition: all var(--transition-base);
}

.faq-item.active .faq-number {
  background: var(--brand-blue);
  color: white;
}

/* Question Text */
.faq-text {
  flex-grow: 1;
  line-height: 1.4;
}

/* Icon */
.faq-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all var(--transition-base);
}

.faq-item.active .faq-icon {
  transform: rotate(45deg);
  color: var(--brand-blue);
}

/* Answer Container */
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
}

.faq-item.active .faq-answer {
  max-height: 1000px; /* Large enough to fit content */
}

.faq-answer-content {
  padding: 0 24px 24px 88px; /* Aligned with question text */
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.8;
}

.faq-answer-content p {
  margin-bottom: 12px;
}

.faq-answer-content p:last-child {
  margin-bottom: 0;
}

.faq-answer-content strong {
  color: var(--text-main);
  font-weight: 700;
}

/* Tips inside answers */
.faq-tip {
  background: #fffbeb;
  border-left: 4px solid var(--accent-yellow);
  padding: 12px 16px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-top: 16px !important;
  font-size: 14px;
  line-height: 1.6;
}

.faq-tip strong {
  color: var(--brand-gold);
}

/* Animation for opening */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.faq-item.active .faq-answer-content {
  animation: slideDown 0.3s ease forwards;
}

/* Responsive Design */
@media (max-width: 768px) {
  .faq-question {
    padding: 16px 20px;
    font-size: 16px;
    gap: 12px;
  }
  
  .faq-number {
    font-size: 12px;
    padding: 4px 10px;
    min-width: 40px;
  }
  
  .faq-answer-content {
    padding: 0 20px 20px 72px;
    font-size: 14px;
  }
  
  .faq-tip {
    padding: 10px 14px;
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .faq-question {
    padding: 14px 16px;
    font-size: 15px;
    gap: 10px;
  }
  
  .faq-number {
    font-size: 11px;
    padding: 4px 8px;
    min-width: 36px;
  }
  
  .faq-answer-content {
    padding: 0 16px 16px 62px;
    font-size: 13px;
  }
  
  .faq-icon {
    width: 20px;
    height: 20px;
  }
}
        .subtitle {
            text-align: center;
            color: #666;
            margin-bottom: 20px;
            font-size: 0.85em;
        }
        
        .section {
            margin-bottom: 25px;
        }
        
        .section-title {
            font-size: 1.2em;
            color: #fff;
            padding: 10px 20px;
            border-radius: 8px;
            margin-bottom: 15px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        
        .nifty-title {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        }
        
        .banknifty-title {
            background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
        }
        
        .stock-count {
            font-size: 0.8em;
            opacity: 0.9;
            font-weight: normal;
        }
        
        .stocks-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
            gap: 10px;
        }
        
        .stock-card {
            background: white;
            border-radius: 8px;
            box-shadow: 0 1px 3px rgba(0,0,0,0.1);
            transition: all 0.2s;
            overflow: hidden;
            cursor: pointer;
            border: 1px solid #e8e8e8;
        }
        
        .stock-card:hover {
            box-shadow: 0 3px 10px rgba(0,0,0,0.15);
            transform: translateY(-1px);
        }
        
        .stock-card.active {
            border-color: #1a73e8;
            box-shadow: 0 3px 15px rgba(26,115,232,0.2);
        }
        
        .stock-header {
            padding: 12px 15px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            background: #fff;
        }
        
        .stock-name-section {
            flex: 1;
            min-width: 0;
        }
        
        .stock-name {
            font-weight: 600;
            font-size: 0.9em;
            color: #1a237e;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        
        .stock-sector {
            font-size: 0.75em;
            color: #666;
            margin-top: 2px;
        }
        
        .stock-price-section {
            text-align: right;
            margin-left: 10px;
        }
        
        .stock-price {
            font-weight: bold;
            font-size: 0.95em;
            color: #333;
        }
        
        .stock-change {
            font-size: 0.8em;
            font-weight: 600;
        }
        
        .positive { color: #0f9d58; }
        .negative { color: #ea4335; }
        
        .weight-badge {
            display: inline-block;
            padding: 2px 8px;
            border-radius: 10px;
            font-size: 0.7em;
            font-weight: bold;
            margin-top: 3px;
        }
        
        .nifty-badge {
            background: #e8eaf6;
            color: #3f51b5;
        }
        
        .banknifty-badge {
            background: #fce4ec;
            color: #e91e63;
        }
        
        .stock-details {
            display: none;
            padding: 15px;
            border-top: 1px solid #f0f0f0;
            background: #fafafa;
            font-size: 0.85em;
        }
        
        .stock-details.show {
            display: block;
        }
        
        .details-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 8px;
            margin-bottom: 10px;
        }
        
        .detail-item {
            padding: 6px 8px;
            background: white;
            border-radius: 4px;
            border: 1px solid #f0f0f0;
        }
        
        .detail-label {
            font-size: 0.7em;
            color: #999;
            text-transform: uppercase;
        }
        
        .detail-value {
            font-weight: 600;
            color: #333;
            font-size: 0.9em;
        }
        
        .videos-section {
            margin-top: 10px;
            padding: 10px;
            background: #fff8e1;
            border-radius: 6px;
            border-left: 3px solid #ff9800;
        }
        
        .videos-section h4 {
            font-size: 0.8em;
            color: #e65100;
            margin-bottom: 8px;
        }
        
        .video-item {
            margin-bottom: 6px;
            padding: 8px;
            background: white;
            border-radius: 4px;
            border: 1px solid #ffe0b2;
        }
        
        .video-item b {
            font-size: 0.8em;
            color: #1a73e8;
            display: block;
            margin-bottom: 3px;
        }
        
        .video-item p {
            font-size: 0.75em;
            color: #666;
            margin: 0;
        }
        
        .video-link {
            font-size: 0.75em;
            color: #1a73e8;
            text-decoration: none;
            margin-top: 3px;
            display: inline-block;
        }
        
        .keywords-tags {
            display: flex;
            flex-wrap: wrap;
            gap: 3px;
            margin-top: 8px;
        }
        
        .keyword-tag {
            padding: 2px 6px;
            background: #e3f2fd;
            color: #1565c0;
            border-radius: 10px;
            font-size: 0.65em;
            white-space: nowrap;
        }
        
        .expand-icon {
            font-size: 0.8em;
            color: #999;
            transition: transform 0.2s;
            margin-left: 5px;
        }
        
        .stock-card.active .expand-icon {
            transform: rotate(180deg);
        }
        
        .refresh-btn {
            display: block;
            margin: 20px auto;
            padding: 8px 25px;
            background: #1a73e8;
            color: white;
            border: none;
            border-radius: 20px;
            cursor: pointer;
            font-size: 0.9em;
        }
        
        .refresh-btn:hover {
            background: #1557b0;
        }
        
        .last-updated {
            text-align: center;
            color: #999;
            font-size: 0.75em;
            margin: 10px 0;
        }
        
        @media (max-width: 600px) {
            .stocks-grid {
                grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
                gap: 8px;
            }
            
            .stock-header {
                padding: 10px;
            }
            
            .stock-name {
                font-size: 0.8em;
            }
            
            .stock-price {
                font-size: 0.85em;
            }
        }