:root {
  --impact-high: #ff3366;
  --impact-medium: #ffa500;
  --impact-low: #00d4ff;
  --cat-forex: #00d4ff;
  --cat-gold: #ffd700;
  --cat-crypto: #a78bfa;
  --cat-macro: #00ff88;
  --cat-banks: #fb923c;
}

.nav-active {
  color: var(--neon-blue) !important;
}

.news-ticker-wrap {
  position: sticky;
  top: 64px;
  z-index: 90;
  background: rgba(3, 3, 8, 0.98);
  border-top: 1px solid rgba(0, 212, 255, 0.15);
  border-bottom: 1px solid rgba(0, 212, 255, 0.15);
  display: flex;
  align-items: center;
  height: 36px;
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.news-ticker-label {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 16px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  color: var(--impact-high);
  white-space: nowrap;
  border-right: 1px solid rgba(0, 212, 255, 0.15);
  height: 100%;
}

.ticker-live-dot {
  width: 6px;
  height: 6px;
  background: var(--impact-high);
  border-radius: 50%;
  animation: tickerPulse 1s ease infinite;
}

@keyframes tickerPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.4); }
}

.news-ticker-track {
  flex: 1;
  overflow: hidden;
  position: relative;
}

.news-ticker-inner {
  display: flex;
  gap: 0;
  white-space: nowrap;
  animation: tickerScroll 60s linear infinite;
  width: max-content;
}

.news-ticker-inner:hover {
  animation-play-state: paused;
}

@keyframes tickerScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 32px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.2s;
}

.ticker-item:hover {
  color: var(--neon-blue);
}

.ticker-item-dot {
  width: 4px;
  height: 4px;
  background: var(--neon-blue);
  border-radius: 50%;
  opacity: 0.5;
}

.news-page-header {
  padding: 48px 0 24px;
}

.news-page-title {
  font-size: clamp(28px, 5vw, 48px);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.title-accent {
  color: var(--neon-blue);
}

.news-page-subtitle {
  color: var(--text-secondary);
}

.news-page-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 20px;
}

.refresh-widget {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.refresh-label {
  font-size: 13px;
  color: var(--text-muted);
}

.refresh-countdown {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  color: var(--neon-blue);
  font-weight: 700;
  min-width: 32px;
}

.refresh-bar-wrap {
  width: 100px;
  height: 3px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 2px;
  overflow: hidden;
}

.refresh-bar-fill {
  height: 100%;
  width: 0;
  background: var(--neon-blue);
  border-radius: 2px;
  transition: width 1s linear;
  box-shadow: 0 0 6px rgba(0, 212, 255, 0.6);
}

.breaking-hero-section {
  padding: 24px 0;
}

.breaking-card {
  position: relative;
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.08) 0%, rgba(11, 11, 24, 0.95) 50%, rgba(0, 255, 136, 0.05) 100%);
  border: 1px solid rgba(0, 212, 255, 0.3);
  border-radius: 20px;
  padding: 40px;
  overflow: hidden;
  min-height: 220px;
  box-shadow: 0 0 40px rgba(0, 212, 255, 0.08), 0 20px 60px rgba(0, 0, 0, 0.5);
}

.breaking-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 51, 102, 0.15);
  border: 1px solid rgba(255, 51, 102, 0.5);
  color: var(--impact-high);
  padding: 4px 14px;
  border-radius: 20px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  margin-bottom: 20px;
}

.breaking-dot {
  width: 6px;
  height: 6px;
  background: var(--impact-high);
  border-radius: 50%;
  animation: tickerPulse 1s ease infinite;
}

.breaking-content {
  position: relative;
  z-index: 1;
}

.breaking-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(20px, 3vw, 30px);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
  margin: 12px 0;
}

.breaking-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
  margin-bottom: 8px;
}

.breaking-desc {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 20px;
  max-width: 700px;
}

.breaking-pairs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.pair-chip {
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid rgba(0, 212, 255, 0.3);
  color: var(--neon-blue);
  padding: 3px 10px;
  border-radius: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 600;
}

.breaking-bg-decoration {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 400px;
  height: 120px;
  opacity: 0.6;
  pointer-events: none;
}

.news-filters-section {
  padding: 20px 0;
}

.news-filter-bar {
  margin-bottom: 0;
}

.news-meta-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  padding: 0 4px;
}

.news-count {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--text-muted);
}

.view-toggle {
  display: flex;
  gap: 8px;
}

.view-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.2s;
}

.view-btn.active,
.view-btn:hover {
  border-color: var(--border-active);
  color: var(--neon-blue);
}

.news-content-section {
  padding: 32px 0 80px;
}

.news-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 32px;
  align-items: start;
}

.news-sidebar {
  position: sticky;
  top: 120px;
}

.news-loading {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.skeleton-card {
  height: 260px;
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: 16px;
  background-image: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(0, 212, 255, 0.04) 50%, rgba(255, 255, 255, 0) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.news-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  transition: all 0.3s ease;
  cursor: default;
  min-width: 0;
}

.news-card:hover {
  border-color: var(--border-active);
  transform: translateY(-2px);
}

.news-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.news-cat-badge,
.breaking-cat {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  font-family: 'JetBrains Mono', monospace;
}

.cat-forex {
  background: rgba(0, 212, 255, 0.12);
  color: var(--cat-forex);
  border: 1px solid rgba(0, 212, 255, 0.3);
}

.cat-gold {
  background: rgba(255, 215, 0, 0.12);
  color: var(--cat-gold);
  border: 1px solid rgba(255, 215, 0, 0.3);
}

.cat-crypto {
  background: rgba(167, 139, 250, 0.12);
  color: var(--cat-crypto);
  border: 1px solid rgba(167, 139, 250, 0.3);
}

.cat-macro {
  background: rgba(0, 255, 136, 0.12);
  color: var(--cat-macro);
  border: 1px solid rgba(0, 255, 136, 0.3);
}

.cat-central-banks {
  background: rgba(251, 146, 60, 0.12);
  color: var(--cat-banks);
  border: 1px solid rgba(251, 146, 60, 0.3);
}

.news-card-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.news-time {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--text-muted);
}

.save-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  color: var(--text-muted);
  transition: all 0.2s;
  padding: 0;
  line-height: 1;
}

.save-btn:hover,
.save-btn.saved {
  color: var(--impact-high);
  transform: scale(1.2);
}

.news-card-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.impact-bar-wrap {
  margin-top: auto;
}

.impact-bar-header {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  margin-bottom: 6px;
}

.impact-label {
  color: var(--text-muted);
}

.impact-level {
  font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
}

.impact-bar-bg {
  height: 4px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 2px;
  overflow: hidden;
}

.impact-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.6s ease;
}

.news-card-pairs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.news-read-more {
  font-size: 13px;
  color: var(--neon-blue);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s;
  margin-top: 4px;
}

.news-read-more:hover {
  color: var(--neon-green);
  text-shadow: 0 0 8px rgba(0, 255, 136, 0.5);
}

.timeline-group {
  margin-bottom: 40px;
}

.timeline-day-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--neon-blue);
  text-transform: uppercase;
  margin-bottom: 20px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(0, 212, 255, 0.15);
}

.timeline-items {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  padding-left: 100px;
  border-left: 1px solid rgba(0, 212, 255, 0.1);
  margin-left: 56px;
}

.timeline-item {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  position: relative;
}

.timeline-time {
  position: absolute;
  left: -100px;
  top: 18px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}

.timeline-dot {
  position: absolute;
  left: -5px;
  top: 22px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 2px solid var(--bg-primary);
  flex-shrink: 0;
}

.timeline-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.timeline-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
  line-height: 1.4;
  transition: color 0.2s;
}

.timeline-title:hover {
  color: var(--neon-blue);
}

.timeline-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
}

.load-more-wrap {
  display: flex;
  justify-content: center;
  padding: 40px 0;
}

.sidebar-card {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 20px;
}

.sidebar-card-title {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.saved-count-badge {
  background: var(--neon-blue);
  color: var(--bg-primary);
  border-radius: 10px;
  padding: 1px 7px;
  font-size: 11px;
  font-weight: 700;
  margin-left: auto;
}

#saved-panel {
  height: 360px;
  display: flex;
  flex-direction: column;
}

#saved-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 6px;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 212, 255, 0.45) rgba(255, 255, 255, 0.04);
}

#saved-list::-webkit-scrollbar {
  width: 6px;
}

#saved-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 999px;
}

#saved-list::-webkit-scrollbar-thumb {
  background: rgba(0, 212, 255, 0.45);
  border-radius: 999px;
}

.sidebar-empty,
.sidebar-sub {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

.sidebar-empty {
  text-align: center;
}

.saved-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.saved-title {
  flex: 1;
  font-size: 12px;
  color: var(--text-secondary);
  text-decoration: none;
  line-height: 1.4;
  transition: color 0.2s;
}

.saved-title:hover {
  color: var(--neon-blue);
}

.saved-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 11px;
  padding: 0;
  flex-shrink: 0;
  transition: color 0.2s;
}

.saved-remove:hover {
  color: var(--impact-high);
}

.sentiment-row {
  margin-bottom: 14px;
}

.sentiment-pair-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 5px;
}

.sentiment-pair {
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-secondary);
  font-weight: 600;
}

.sentiment-signal {
  font-size: 11px;
  font-weight: 600;
}

.sentiment-bar-dual {
  display: flex;
  height: 5px;
  border-radius: 3px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
  margin-bottom: 3px;
}

.s-bull {
  background: var(--neon-green);
  box-shadow: 0 0 6px rgba(0, 255, 136, 0.5);
  transition: width 0.6s ease;
}

.s-bear {
  background: var(--impact-high);
  box-shadow: 0 0 6px rgba(255, 51, 102, 0.5);
  transition: width 0.6s ease;
}

.sentiment-pcts {
  display: flex;
  justify-content: space-between;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
}

.news-error {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  border: 1px solid var(--border-default);
  border-radius: 16px;
  background: var(--bg-card);
  color: var(--text-secondary);
  text-align: center;
  gap: 12px;
}

.news-error-icon {
  font-size: 48px;
  margin-bottom: 8px;
}

.news-error-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 18px;
  color: var(--text-primary);
  font-weight: 600;
}

.news-error-sub {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--text-muted);
}

@media (max-width: 1024px) {
  .news-layout {
    grid-template-columns: 1fr;
  }

  .news-sidebar {
    order: -1;
    position: static;
  }

  .news-grid,
  .news-loading {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .news-grid,
  .news-loading {
    grid-template-columns: 1fr;
  }

  .breaking-card {
    padding: 24px;
  }

  .timeline-items {
    margin-left: 0;
    padding-left: 70px;
  }

  .timeline-time {
    left: -70px;
  }

  .news-ticker-label {
    padding: 0 10px;
  }

  .ticker-item {
    padding: 0 18px;
  }
}

/* RTL support for news page */
[dir="rtl"] .breaking-badge,
[dir="rtl"] .news-card-top,
[dir="rtl"] .news-card-actions,
[dir="rtl"] .impact-bar-header,
[dir="rtl"] .sentiment-pair-label,
[dir="rtl"] .saved-item,
[dir="rtl"] .sidebar-card-title,
[dir="rtl"] .news-page-title-row,
[dir="rtl"] .news-meta-bar,
[dir="rtl"] .refresh-widget,
[dir="rtl"] .breaking-meta,
[dir="rtl"] .breaking-pairs,
[dir="rtl"] .news-card-pairs,
[dir="rtl"] .filter-bar {
  flex-direction: row-reverse;
}

[dir="rtl"] .timeline-items {
  padding-left: 0;
  padding-right: 100px;
  border-left: none;
  border-right: 1px solid rgba(0, 212, 255, 0.1);
  margin-left: 0;
  margin-right: 56px;
}

[dir="rtl"] .timeline-time {
  left: auto;
  right: -100px;
}

[dir="rtl"] .timeline-dot {
  left: auto;
  right: -5px;
}

[dir="rtl"] .footer-brand {
  align-items: flex-end;
}

[dir="rtl"] .breaking-content {
  text-align: right;
}

@media (max-width: 640px) {
  [dir="rtl"] .timeline-items {
    margin-right: 0;
    padding-right: 70px;
  }

  [dir="rtl"] .timeline-time {
    right: -70px;
  }
}

/* Translation loading state */
.translation-loading {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  gap: 20px;
  color: var(--text-secondary);
  font-family: 'Cairo', 'Space Grotesk', sans-serif;
}

.trans-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(0, 212, 255, 0.1);
  border-top-color: var(--neon-blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

[dir="rtl"] .news-card-title,
[dir="rtl"] .breaking-title {
  font-family: 'Cairo', sans-serif;
  line-height: 1.6;
}

[dir="rtl"] .ticker-item {
  font-family: 'Cairo', sans-serif;
  font-size: 13px;
}

[dir="rtl"] .news-ticker-inner {
  animation-name: tickerScrollRTL;
}

@keyframes tickerScrollRTL {
  0% { transform: translateX(0); }
  100% { transform: translateX(50%); }
}

/* Sentiment v2 */
.sentiment-evidence {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  color: var(--text-muted);
  text-align: center;
  flex: 1;
}

.sentiment-pcts {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  margin-top: 3px;
}

.sentiment-signal {
  font-size: 11px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.5px;
}

.sentiment-row:has(.s-bull[style*="width:9"], .s-bull[style*="width:10"]) .s-bull {
  box-shadow: 0 0 10px rgba(0, 255, 136, 0.8);
}
