/* ==========================================================================
   TOP 100 GLOBAL MARKET CAP LEADERBOARD — JUPITER HEAVY SPACE
   ========================================================================== */

/* Background Effects */
#map-starfield {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, #101626 0%, #050608 85%);
  z-index: -2;
}

#map-scanlines {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.12) 50%);
  background-size: 100% 4px;
  z-index: 1000;
  pointer-events: none;
}

/* Continuous Live Ticker Banner Animation */
@keyframes tickerMove {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.animate-ticker {
  display: flex;
  width: max-content;
  animation: tickerMove 35s linear infinite;
}

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

/* Table Hover Row */
.table-row-hover {
  transition: background-color 0.2s ease;
  cursor: pointer;
}

.table-row-hover:hover {
  background-color: rgba(0, 242, 255, 0.12);
}

/* Treemap Tile Hover */
.treemap-tile {
  transition: transform 0.2s ease, filter 0.2s ease;
  cursor: pointer;
}

.treemap-tile:hover {
  transform: scale(1.03);
  filter: brightness(1.2);
  z-index: 10;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.3);
}

::-webkit-scrollbar-thumb {
  background: rgba(235, 175, 55, 0.35);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(235, 175, 55, 0.7);
}

/* Light Mode Overrides */
body.light-mode {
  background-color: #f8fafc !important;
  color: #0f172a !important;
}

body.light-mode #map-starfield {
  background: radial-gradient(circle at center, #e2e8f0 0%, #cbd5e1 85%) !important;
}

body.light-mode #map-scanlines {
  display: none !important;
}

body.light-mode header,
body.light-mode #ticker-bar,
body.light-mode .bg-jhsDark\/95,
body.light-mode .bg-jhsPanel {
  background-color: rgba(255, 255, 255, 0.96) !important;
  border-color: rgba(203, 213, 225, 0.8) !important;
  color: #0f172a !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06) !important;
}

/* Table Header & Rows in Light Mode */
body.light-mode thead {
  background-color: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
}

body.light-mode thead th {
  color: #b45309 !important;
}

body.light-mode tbody {
  background-color: #ffffff !important;
  color: #0f172a !important;
}

body.light-mode tr {
  border-bottom-color: #e2e8f0 !important;
}

body.light-mode .table-row-hover:hover {
  background-color: rgba(14, 165, 233, 0.08) !important;
}

/* Sector Pill Badges Fix */
body.light-mode .bg-slate-800 {
  background-color: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}

/* High-Contrast Colors for Gold & Cyan Accents in Light Mode */
body.light-mode .text-jhsGold {
  color: #b45309 !important;
  text-shadow: none !important;
}

body.light-mode .text-jhsCyan {
  color: #0284c7 !important;
  text-shadow: none !important;
}

body.light-mode .text-white {
  color: #0f172a !important;
}

body.light-mode .text-slate-100,
body.light-mode .text-slate-200,
body.light-mode .text-slate-300 {
  color: #1e293b !important;
}

body.light-mode .text-slate-400,
body.light-mode .text-slate-500 {
  color: #475569 !important;
}

/* Percentage Badges & Inspect Buttons */
body.light-mode .text-emerald-400 {
  color: #15803d !important;
}

body.light-mode .bg-emerald-500\/10 {
  background-color: rgba(34, 197, 94, 0.12) !important;
  border-color: rgba(34, 197, 94, 0.4) !important;
}

body.light-mode .text-rose-400 {
  color: #b91c1c !important;
}

body.light-mode .bg-rose-500\/10 {
  background-color: rgba(239, 68, 68, 0.12) !important;
  border-color: rgba(239, 68, 68, 0.4) !important;
}

body.light-mode .inspect-btn {
  background-color: rgba(2, 132, 199, 0.1) !important;
  border-color: rgba(2, 132, 199, 0.35) !important;
  color: #0284c7 !important;
}

body.light-mode .inspect-btn:hover {
  background-color: rgba(2, 132, 199, 0.22) !important;
  color: #0369a1 !important;
}

body.light-mode input,
body.light-mode select {
  background-color: #ffffff !important;
  color: #0f172a !important;
  border-color: #cbd5e1 !important;
}

body.light-mode #stock-modal > div,
body.light-mode .bg-slate-900,
body.light-mode .bg-slate-950,
body.light-mode #ticker-bar {
  background-color: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}

