/* ============================================
   MARKET HEALTH DARK MODE - Smart Money Club
   ============================================ */

:root[data-theme="dark"],
body[data-theme="dark"] {
  /* Primary Colors - Pure Black Theme */
  --bg-primary: #000000;
  --bg-secondary: #0a0a0a;
  --bg-tertiary: #1a1a1a;

  /* Text Colors */
  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-tertiary: #94a3b8;
  --text-muted: #64748b;

  /* Border Colors */
  --border-primary: #2a2a2a;
  --border-secondary: #3a3a3a;

  /* Card & Surface */
  --card-bg: #0f0f0f;
  --card-border: #2a2a2a;
  --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5);

  /* Table Colors */
  --table-header-bg: #0a0a0a;
  --table-row-hover: #1a1a1a;
  --table-border: #2a2a2a;

  /* Gradient Headers */
  --gradient-blue-from: #1e3a8a;
  --gradient-blue-to: #1e40af;
  --gradient-orange-from: #7c2d12;
  --gradient-orange-to: #9a3412;
  --gradient-green-from: #064e3b;
  --gradient-green-to: #065f46;
  --gradient-yellow-from: #78350f;
  --gradient-yellow-to: #92400e;
  --gradient-purple-from: #4c1d95;
  --gradient-purple-to: #5b21b6;
  --gradient-red-from: #7f1d1d;
  --gradient-red-to: #991b1b;
}

/* Global Dark Mode Styles */
body[data-theme="dark"] {
  background-color: #0a0a0a !important;
  color: #f1f5f9 !important;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Header / Navigation */
body[data-theme="dark"] header {
  background-color: rgba(0, 0, 0, 0.95) !important;
  backdrop-filter: blur(10px);
  border-bottom-color: #2a2a2a !important;
}

body[data-theme="dark"] header .bg-white\/80 {
  background-color: rgba(0, 0, 0, 0.95) !important;
}

body[data-theme="dark"] header .border-slate-200 {
  border-color: #2a2a2a !important;
}

body[data-theme="dark"] header span,
body[data-theme="dark"] header a,
body[data-theme="dark"] header button {
  color: #f1f5f9 !important;
}

body[data-theme="dark"] header .text-slate-600 {
  color: #cbd5e1 !important;
}

body[data-theme="dark"] header .text-slate-900 {
  color: #f1f5f9 !important;
}

body[data-theme="dark"] header .hover\:text-slate-900:hover {
  color: #f1f5f9 !important;
}

body[data-theme="dark"] header .bg-white {
  background-color: #0f0f0f !important;
}

body[data-theme="dark"] header .hover\:bg-slate-50:hover {
  background-color: #1a1a1a !important;
}

body[data-theme="dark"] header .hover\:bg-slate-100:hover {
  background-color: #1a1a1a !important;
}

body[data-theme="dark"] header .text-slate-500 {
  color: #94a3b8 !important;
}

/* Main Content Area */
body[data-theme="dark"] main {
  background-color: #0a0a0a !important;
}

/* Cards & Tables */
body[data-theme="dark"] .bg-white {
  background-color: #0f0f0f !important;
}

body[data-theme="dark"] .border-slate-200 {
  border-color: #2a2a2a !important;
}

body[data-theme="dark"] .rounded-xl,
body[data-theme="dark"] .rounded-lg {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
}

/* Table Headers */
body[data-theme="dark"] .bg-gray-50 {
  background-color: #0a0a0a !important;
}

body[data-theme="dark"] .border-gray-200,
body[data-theme="dark"] .border-gray-300 {
  border-color: #2a2a2a !important;
}

/* Table Rows */
body[data-theme="dark"] .border-gray-100 {
  border-color: #2a2a2a !important;
}

body[data-theme="dark"] .hover\:bg-gray-50:hover {
  background-color: #1a1a1a !important;
}

body[data-theme="dark"] .hover\:bg-gray-100:hover {
  background-color: #1a1a1a !important;
}

/* Text Colors */
body[data-theme="dark"] .text-gray-900 {
  color: #f1f5f9 !important;
}

body[data-theme="dark"] .text-gray-800 {
  color: #f1f5f9 !important;
}

body[data-theme="dark"] .text-gray-700 {
  color: #cbd5e1 !important;
}

body[data-theme="dark"] .text-gray-600 {
  color: #94a3b8 !important;
}

body[data-theme="dark"] .text-gray-500 {
  color: #64748b !important;
}

body[data-theme="dark"] .text-slate-700 {
  color: #f1f5f9 !important;
}

/* Gradient Headers for Tables - Original vibrant colors */
body[data-theme="dark"] .bg-gradient-to-r.from-blue-50 {
  background: linear-gradient(to right, #1e3a8a, #1e40af) !important;
}

body[data-theme="dark"] .bg-gradient-to-r.from-orange-50 {
  background: linear-gradient(to right, #7c2d12, #9a3412) !important;
}

body[data-theme="dark"] .bg-gradient-to-r.from-green-50 {
  background: linear-gradient(to right, #064e3b, #065f46) !important;
}

body[data-theme="dark"] .bg-gradient-to-r.from-yellow-50 {
  background: linear-gradient(to right, #78350f, #92400e) !important;
}

body[data-theme="dark"] .bg-gradient-to-r.from-purple-50 {
  background: linear-gradient(to right, #4c1d95, #5b21b6) !important;
}

body[data-theme="dark"] .bg-gradient-to-r.from-red-50 {
  background: linear-gradient(to right, #7f1d1d, #991b1b) !important;
}

/* Market Breadth Table - All column headers and data grey styling */
body[data-theme="dark"] #breadthTable thead th {
  background-color: #27272a !important;
  color: #a1a1aa !important;
}

body[data-theme="dark"] #breadthTable tbody td:first-child {
  background-color: #27272a !important;
  color: #a1a1aa !important;
}

/* Keep positive/negative colors vibrant */
body[data-theme="dark"] .positive-value,
body[data-theme="dark"] .text-green-600 {
  color: #22c55e !important;
}

body[data-theme="dark"] .negative-value,
body[data-theme="dark"] .text-red-600 {
  color: #ef4444 !important;
}

body[data-theme="dark"] .neutral-value {
  color: #94a3b8 !important;
}

/* Market Status Colors */
body[data-theme="dark"] .market-timing-text.market-open {
  color: #22c55e !important;
}

body[data-theme="dark"] .market-timing-text.market-closed {
  color: #ef4444 !important;
}

/* Footer */
body[data-theme="dark"] footer {
  background-color: #0f0f0f !important;
  border-top-color: #2a2a2a !important;
  color: #94a3b8 !important;
}

/* Scrollbar for Dark Mode */
body[data-theme="dark"] .breadth-scroll::-webkit-scrollbar-track {
  background: transparent;
}

body[data-theme="dark"] .breadth-scroll::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.2);
}

body[data-theme="dark"] .breadth-scroll::-webkit-scrollbar-thumb:hover {
  background-color: rgba(255, 255, 255, 0.3);
}

body[data-theme="dark"] .overflow-y-auto::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.2);
}

body[data-theme="dark"] .overflow-y-auto::-webkit-scrollbar-thumb:hover {
  background-color: rgba(255, 255, 255, 0.3);
}

/* Mobile Menu */
body[data-theme="dark"] #mobileMenu {
  background-color: #0f0f0f !important;
  border-color: #2a2a2a !important;
}

body[data-theme="dark"] #mobileMenu .text-slate-700 {
  color: #f1f5f9 !important;
}

/* Breadth Table Sticky Header */
body[data-theme="dark"] .sticky.top-0.bg-white {
  background-color: #0a0a0a !important;
}

/* Link Colors */
body[data-theme="dark"] .text-blue-400 {
  color: #60a5fa !important;
}

body[data-theme="dark"] .hover\:text-blue-300:hover {
  color: #93c5fd !important;
}

/* Heatmap Container */
body[data-theme="dark"] #heatmap-container {
  background-color: #0f0f0f !important;
}

/* Side Navigation Dark Mode */
body[data-theme="dark"] #sideNav {
  background-color: #0f0f0f !important;
  border-right: 1px solid #2a2a2a;
}

body[data-theme="dark"] #sideNav .border-gray-200 {
  border-color: #2a2a2a !important;
}

body[data-theme="dark"] #sideNav .border-gray-700 {
  border-color: #2a2a2a !important;
}

body[data-theme="dark"] #sideNav .text-gray-700 {
  color: #cbd5e1 !important;
}

body[data-theme="dark"] #sideNav .text-gray-200 {
  color: #cbd5e1 !important;
}

body[data-theme="dark"] #sideNav .hover\:bg-gray-100:hover {
  background-color: #1a1a1a !important;
}

body[data-theme="dark"] #sideNav .hover\:bg-gray-800:hover {
  background-color: #1a1a1a !important;
}

body[data-theme="dark"] #sideNav .bg-blue-50 {
  background-color: rgba(37, 99, 235, 0.1) !important;
}

body[data-theme="dark"] #sideNav .text-blue-600 {
  color: #60a5fa !important;
}

body[data-theme="dark"] #sideNav .text-blue-400 {
  color: #60a5fa !important;
}

body[data-theme="dark"] #sideNav .text-gray-500 {
  color: #71717a !important;
}

body[data-theme="dark"] #sideNav .text-gray-400 {
  color: #71717a !important;
}

body[data-theme="dark"] #sideNav .text-gray-900 {
  color: #f1f5f9 !important;
}

body[data-theme="dark"] #sideNav .text-gray-100 {
  color: #f1f5f9 !important;
}

/* Smooth Transitions */
body[data-theme="dark"] * {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
