/* ============================================
   AI Spending Leaderboard - Dark Theme Styles
   ============================================ */

/* Base Reset & Variables */
:root {
  --bg-primary: #0a0a1a;
  --bg-secondary: #111128;
  --bg-card: #1a1a2e;
  --bg-card-hover: #22223a;
  --text-primary: #f0f0f5;
  --text-secondary: #a0a0b8;
  --text-muted: #6b6b80;
  --accent-purple: #7c3aed;
  --accent-blue: #3b82f6;
  --accent-green: #10b981;
  --accent-red: #ef4444;
  --accent-orange: #f59e0b;
  --border-color: rgba(255, 255, 255, 0.06);
  --glow-purple: rgba(124, 58, 237, 0.3);
  --glow-blue: rgba(59, 130, 246, 0.3);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: #333355;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #444477;
}

/* Background Grid Pattern */
.bg-grid {
  background-image:
    linear-gradient(rgba(124, 58, 237, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124, 58, 237, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
}

/* Hero Section */
.hero {
  position: relative;
  padding: 80px 20px 60px;
  text-align: center;
  background: linear-gradient(135deg, #0a0a1a 0%, #1a1040 50%, #0a0a1a 100%);
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.4;
  pointer-events: none;
  animation: glowFloat 8s ease-in-out infinite;
}

.hero-glow-1 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.35), transparent 70%);
  top: -100px;
  left: 10%;
  animation-delay: 0s;
}

.hero-glow-2 {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.25), transparent 70%);
  bottom: -80px;
  right: 10%;
  animation-delay: -4s;
}

@keyframes glowFloat {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-20px) scale(1.05); }
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 20px;
  border: 1px solid rgba(124, 58, 237, 0.3);
  background: rgba(124, 58, 237, 0.1);
  color: #a78bfa;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #f0f0f5 0%, #a78bfa 50%, #7c3aed 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero .subtitle {
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  color: var(--text-secondary);
  margin-top: 16px;
  line-height: 1.7;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

/* Hero Stats */
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-top: 36px;
  flex-wrap: wrap;
}

.hero-stat {
  text-align: center;
}

.hero-stat .value {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
  color: var(--text-primary);
}

.hero-stat .value .dollar {
  color: var(--accent-purple);
}

.hero-stat .label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 4px;
}

/* Hero Features */
.hero-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 36px;
  text-align: left;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.hero-feature {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--text-secondary);
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.hero-feature-icon {
  font-size: 1rem;
  flex-shrink: 0;
}

@media (max-width: 600px) {
  .hero-features {
    grid-template-columns: 1fr;
  }
}

/* Filter Bar */
.filter-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 26, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  padding: 16px 20px;
}

.filter-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.filter-categories {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 6px 16px;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.filter-btn:hover {
  border-color: var(--accent-purple);
  color: var(--text-primary);
}

.filter-btn.active {
  background: var(--accent-purple);
  border-color: var(--accent-purple);
  color: white;
}

.sort-select {
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-family: inherit;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  padding-right: 28px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23a0a0b8' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}

.search-input {
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-family: inherit;
  width: 180px;
  transition: all 0.2s ease;
}

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

.search-input:focus {
  outline: none;
  border-color: var(--accent-purple);
  width: 240px;
}

/* Main Content */
.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

/* Leaderboard */
.leaderboard {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.leaderboard-row {
  display: grid;
  grid-template-columns: 50px 48px 1fr auto auto;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--bg-card);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  color: inherit;
  opacity: 0;
  transform: translateY(20px);
}

.leaderboard-row.visible {
  opacity: 1;
  transform: translateY(0);
}

.leaderboard-row.leaderboard-hidden {
  display: none;
}

.leaderboard-see-more {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px;
  margin-top: 4px;
  background: rgba(124, 58, 237, 0.08);
  border: 1px solid rgba(124, 58, 237, 0.2);
  border-radius: 12px;
  color: var(--accent-purple);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
}

.leaderboard-see-more:hover {
  background: rgba(124, 58, 237, 0.15);
  border-color: rgba(124, 58, 237, 0.4);
  box-shadow: 0 0 24px rgba(124, 58, 237, 0.12);
}

.toggle-chevron {
  transition: transform 0.3s ease;
}

.toggle-chevron.expanded {
  transform: rotate(180deg);
}

.leaderboard-row:hover {
  background: var(--bg-card-hover);
  border-color: rgba(124, 58, 237, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.leaderboard-row .rank {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--text-muted);
  text-align: center;
  min-width: 40px;
}

.leaderboard-row .rank.top3 {
  color: var(--accent-purple);
}

/* Company Logo */
.company-logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.company-logo img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.company-logo .fallback {
  font-size: 1.1rem;
  font-weight: 700;
  color: white;
}

/* Company Info + Bar */
.company-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.company-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.company-name {
  font-size: 1rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.company-ticker {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.category-badge {
  font-size: 0.65rem;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.category-badge.bigtech { background: rgba(124, 58, 237, 0.2); color: #a78bfa; }
.category-badge.chip { background: rgba(16, 185, 129, 0.2); color: #6ee7b7; }
.category-badge.cloud { background: rgba(59, 130, 246, 0.2); color: #93c5fd; }
.category-badge.china { background: rgba(239, 68, 68, 0.2); color: #fca5a5; }
.category-badge.ainative { background: rgba(245, 158, 11, 0.2); color: #fcd34d; }
.category-badge.other { background: rgba(107, 107, 128, 0.15); color: #a0a0b8; }

/* Bar Chart */
.bar-container {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 4px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 4px;
  width: 0%;
  transition: width 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
}

.bar-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  animation: shimmer 2s infinite;
}

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

/* Amount & YoY */
.amount-section {
  text-align: right;
  min-width: 80px;
}

.amount {
  font-size: 1.25rem;
  font-weight: 800;
  white-space: nowrap;
}

.amount .unit {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.amount-label {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.amount.estimated {
  opacity: 0.75;
  font-style: italic;
}

.est-badge {
  font-size: 0.6rem;
  color: var(--accent-orange);
  font-weight: 600;
  opacity: 0.8;
}

.yoy-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 700;
  min-width: 70px;
  justify-content: center;
}

.yoy-badge.positive {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-green);
}

.yoy-badge.negative {
  background: rgba(239, 68, 68, 0.15);
  color: var(--accent-red);
}

.yoy-badge.neutral {
  background: rgba(107, 107, 128, 0.15);
  color: var(--text-muted);
}

/* Stat Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 40px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
}

.stat-card.purple::before { background: linear-gradient(90deg, var(--accent-purple), transparent); }
.stat-card.blue::before { background: linear-gradient(90deg, var(--accent-blue), transparent); }
.stat-card.green::before { background: linear-gradient(90deg, var(--accent-green), transparent); }
.stat-card.orange::before { background: linear-gradient(90deg, var(--accent-orange), transparent); }

.stat-card .stat-value {
  font-size: 2rem;
  font-weight: 900;
  margin-bottom: 4px;
}

.stat-card .stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.stat-card .stat-detail {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 8px;
}

/* News Ticker */
.news-ticker {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px 24px;
  margin-top: 40px;
  overflow: hidden;
}

.news-ticker h3 {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}

.news-scroll {
  display: flex;
  gap: 40px;
  animation: scroll-news 60s linear infinite;
  white-space: nowrap;
}

.news-scroll:hover {
  animation-play-state: paused;
}

.news-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.news-item .news-date {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.news-item a {
  color: var(--accent-blue);
  text-decoration: none;
}

.news-item a:hover {
  text-decoration: underline;
}

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

/* News Box */
.news-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px;
  margin-top: 32px;
}

.news-box-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.news-box-header h3 {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 0;
}

.news-count {
  font-size: 0.75rem;
  color: var(--text-muted);
  background: rgba(124, 58, 237, 0.1);
  border: 1px solid rgba(124, 58, 237, 0.2);
  padding: 2px 10px;
  border-radius: 12px;
}

.news-list {
  display: flex;
  flex-direction: column;
}

.news-item-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 14px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  text-decoration: none;
  color: inherit;
  border-radius: 8px;
  transition: background 0.2s ease;
}

.news-item-card:hover {
  background: rgba(124, 58, 237, 0.06);
}

.news-item-card:last-child {
  border-bottom: none;
}

.news-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  min-width: 90px;
  flex-shrink: 0;
}

.news-meta .news-date {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.news-meta .news-source {
  font-size: 0.7rem;
  color: var(--accent-blue);
  white-space: nowrap;
  max-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.news-content {
  flex: 1;
  min-width: 0;
}

.news-title {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.4;
  transition: color 0.2s ease;
}

.news-item-card:hover .news-title {
  color: var(--text-primary);
}

.news-companies {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.company-pill {
  font-size: 0.65rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1px 8px;
  border-radius: 10px;
  white-space: nowrap;
}

.news-summary {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-top: 4px;
}

.news-see-all-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px;
  margin-top: 12px;
  background: rgba(124, 58, 237, 0.08);
  border: 1px solid rgba(124, 58, 237, 0.2);
  border-radius: 10px;
  color: var(--accent-purple);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.25s ease;
}

.news-see-all-btn:hover {
  background: rgba(124, 58, 237, 0.15);
  border-color: rgba(124, 58, 237, 0.4);
  box-shadow: 0 0 20px rgba(124, 58, 237, 0.1);
}

@media (max-width: 768px) {
  .news-box {
    padding: 16px;
  }
  .news-item-card {
    flex-direction: column;
    gap: 6px;
    padding: 12px 8px;
  }
  .news-meta {
    flex-direction: row;
    align-items: center;
    min-width: unset;
  }
}

/* News Page */
.news-page-filters {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.news-filter-select {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  padding: 8px 14px;
  font-size: 0.85rem;
  cursor: pointer;
}

.news-total-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.news-page-list {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px 60px;
  display: flex;
  flex-direction: column;
}

.news-page-card {
  display: flex;
  gap: 20px;
  padding: 18px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  text-decoration: none;
  color: inherit;
  border-radius: 8px;
  transition: background 0.2s ease;
}

.news-page-card:hover {
  background: rgba(124, 58, 237, 0.06);
}

.news-page-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  min-width: 120px;
  flex-shrink: 0;
}

.news-page-date {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.news-page-source {
  font-size: 0.72rem;
  color: var(--accent-blue);
  white-space: nowrap;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.news-page-content {
  flex: 1;
  min-width: 0;
}

.news-page-title {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.4;
  font-weight: 500;
  transition: color 0.2s ease;
}

.news-page-card:hover .news-page-title {
  color: var(--text-primary);
}

.news-page-summary {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-top: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 768px) {
  .news-page-card {
    flex-direction: column;
    gap: 6px;
  }
  .news-page-meta {
    flex-direction: row;
    min-width: unset;
    align-items: center;
  }
}

/* Footer */
.footer {
  max-width: 1200px;
  margin: 60px auto 0;
  padding: 30px 20px;
  border-top: 1px solid var(--border-color);
  text-align: center;
}

.footer p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.8;
}

.footer a {
  color: var(--accent-purple);
  text-decoration: none;
}

.footer .methodology {
  max-width: 700px;
  margin: 0 auto 16px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ========================
   Company Detail Page
   ======================== */

.detail-header {
  padding: 40px 20px;
  background: linear-gradient(135deg, #0a0a1a 0%, #1a1040 100%);
}

.detail-header-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

.detail-logo {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.detail-logo img {
  width: 52px;
  height: 52px;
  object-fit: contain;
}

.detail-logo .fallback {
  font-size: 2rem;
  font-weight: 700;
}

.detail-title h1 {
  font-size: 2rem;
  font-weight: 900;
}

.detail-title .meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
}

.detail-title .ticker {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  margin-bottom: 20px;
  transition: color 0.2s;
}

.back-btn:hover {
  color: var(--text-primary);
}

/* Detail Stats Row */
.detail-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  max-width: 1200px;
  margin: 24px auto;
  padding: 0 20px;
}

.detail-stat {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
}

.detail-stat .value {
  font-size: 1.5rem;
  font-weight: 800;
}

.detail-stat .label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 4px;
}

/* Chart Sections */
.chart-section {
  max-width: 1200px;
  margin: 32px auto;
  padding: 0 20px;
}

.chart-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 24px;
}

.chart-card h2 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.chart-card .chart-container {
  width: 100%;
  min-height: 350px;
}

/* News List on Detail Page */
.news-list {
  list-style: none;
}

.news-list li {
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.news-list li:last-child {
  border-bottom: none;
}

.news-list .news-source {
  font-size: 0.75rem;
  color: var(--accent-purple);
  font-weight: 600;
  min-width: 80px;
}

.news-list .news-title {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.news-list .news-title a {
  color: var(--text-primary);
  text-decoration: none;
}

.news-list .news-title a:hover {
  color: var(--accent-blue);
}

/* Sector Comparison */
.comparison-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

/* Funding Badge (for private companies) */
.funding-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-orange);
}

/* Loading State */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  color: var(--text-muted);
}

.loading::after {
  content: '';
  width: 24px;
  height: 24px;
  border: 2px solid var(--border-color);
  border-top-color: var(--accent-purple);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-left: 12px;
}

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

/* Tooltip */
.tooltip {
  position: absolute;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  z-index: 1000;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
  min-width: 240px;
}

.tooltip.visible {
  opacity: 1;
}

.tooltip .tip-name {
  font-weight: 700;
  margin-bottom: 8px;
}

.tooltip .tip-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  padding: 2px 0;
}

.tooltip .tip-row .tip-label {
  color: var(--text-muted);
}

.tooltip .tip-row .tip-value {
  font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
  .hero {
    padding: 50px 16px 40px;
  }

  .hero-stats {
    gap: 20px;
  }

  .filter-container {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-categories {
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }

  .search-input {
    width: 100%;
  }

  .search-input:focus {
    width: 100%;
  }

  .leaderboard-row {
    grid-template-columns: 36px 36px 1fr;
    gap: 10px;
    padding: 12px 14px;
  }

  .amount-section {
    grid-column: 3;
    text-align: left;
    margin-top: -4px;
  }

  .yoy-badge {
    grid-column: 3;
  }

  .bar-container {
    grid-column: 1 / -1;
  }

  .company-logo {
    width: 36px;
    height: 36px;
  }

  .detail-header-content {
    flex-direction: column;
    text-align: center;
  }

  .detail-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .comparison-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 2rem;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
