/* Font Scanner - Terminal Style CSS */

/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Font imports with optimal font-display */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@300;400;500;600;700&family=Space+Mono:wght@400;700&display=swap');

/* ===================================================================
   UNIFIED COLOR SYSTEM - Dark & Light Themes
   =================================================================== */

/* DARK THEME (Default) */
:root {
  /* Font Size Control - Dynamic multiplier */
  --font-size-multiplier: 1.0;
  --base-font-size: 18px; /* Increased from 16px for better readability */
  --app-title-size: 1.35rem; /* Keep header title consistent across pages */
  
  /* Background Colors */
  --bg-primary: #000000;
  --bg-secondary: #111111;
  --bg-tertiary: #1a1a1a;
  --bg-hover: #222222;
  --bg-input: #0a0a0a;
  
  /* Text Colors */
  --text-primary: #ffffff;
  --text-secondary: #d0d0d0;
  --text-tertiary: #a0a0a0;
  --text-muted: #808080;
  
  /* Accent Colors */
  --accent-primary: #00ff41;      /* Terminal green - primary actions */
  --accent-primary-dark: #00cc33;
  --accent-secondary: #bb86fc;    /* Purple - secondary actions */
  --accent-secondary-dark: #9d5fdb;
  
  /* Status Colors */
  --status-success: #00ff41;
  --status-warning: #ffa500;
  --status-error: #ff4444;
  --status-info: #00d9ff;
  
  /* Border Colors */
  --border-primary: #333333;
  --border-secondary: #555555;
  --border-accent: #00ff41;
  
  /* Semantic Colors */
  --score-excellent: #00ff41;     /* 90-100 */
  --score-good: #00d9ff;          /* 70-89 */
  --score-fair: #ffa500;          /* 50-69 */
  --score-poor: #ff4444;          /* 0-49 */
  
  /* Shadow & Effects */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 12px 24px rgba(0, 0, 0, 0.6);
  --shadow-2xl: 0 20px 40px rgba(0, 0, 0, 0.7);
  --glow-primary: 0 0 10px rgba(0, 255, 65, 0.5);
  --glow-secondary: 0 0 10px rgba(187, 134, 252, 0.5);
  
  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 24px;
  
  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
  --spacing-2xl: 4rem;
  
  /* Progress Bar Colors */
  --progress-bg: #1a1a1a;
  --progress-border: #404040;
  --text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

/* LIGHT THEME */
body.white-theme {
  /* Force background change with !important */
  background-color: #ffffff !important;
  color: #1a1a1a !important;
  
  /* Background Colors - Better visual hierarchy */
  --bg-base: #ffffff;          /* FIX: Override layout.css background */
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;     /* Softer secondary background */
  --bg-tertiary: #f1f3f5;      /* Clear tertiary level */
  --bg-hover: #e9ecef;         /* Visible hover state */
  --bg-input: #ffffff;         /* White inputs for better contrast */
  
  /* Text Colors - WCAG AA compliant (4.5:1 contrast) */
  --color-white: #1a1a1a;      /* FIX: Override layout.css text color */
  --text-primary: #1a1a1a;     /* Darker for better readability (13.6:1) */
  --text-secondary: #495057;   /* Clear secondary text (7.4:1) */
  --text-tertiary: #6c757d;    /* Muted but readable (4.6:1) */
  --text-muted: #868e96;       /* Subtle text, still readable (3.8:1 - large text only) */
  
  /* Accent Colors - Vibrant but accessible */
  --accent-primary: #00994d;      /* Darker green for better contrast (4.5:1) */
  --accent-primary-dark: #007a3d;
  --accent-secondary: #6d28d9;    /* Darker purple for accessibility (5.2:1) */
  --accent-secondary-dark: #5b21b6;
  
  /* Status Colors - WCAG compliant */
  --status-success: #00994d;   /* Green (4.5:1) */
  --status-warning: #d97706;   /* Orange (4.5:1) */
  --status-error: #c92a2a;     /* Red (5.1:1) */
  --status-info: #0c7792;      /* Teal (4.5:1) */
  
  /* Border Colors - Clear definition */
  --border-primary: #dee2e6;   /* Softer primary border */
  --border-secondary: #ced4da; /* Clear secondary border */
  --border-accent: #00994d;
  
  /* Semantic Colors - Score indicators */
  --score-excellent: #00994d;  /* Accessible green */
  --score-good: #0c7792;       /* Accessible teal */
  --score-fair: #d97706;       /* Accessible orange */
  --score-poor: #c92a2a;       /* Accessible red */
  
  /* Shadow & Effects - Subtle depth */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1), 0 10px 10px rgba(0, 0, 0, 0.04);
  --shadow-2xl: 0 25px 50px rgba(0, 0, 0, 0.15);
  --glow-primary: 0 0 0 3px rgba(0, 153, 77, 0.15);
  --glow-secondary: 0 0 0 3px rgba(109, 40, 217, 0.15);
  
  /* Border Radius (same as dark theme) */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 24px;
  
  /* Spacing (same as dark theme) */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
  --spacing-2xl: 4rem;
  
  /* Progress Bar Colors - Light theme specific */
  --progress-bg: #f0f0f0;
  --progress-border: #d0d0d0;
  --text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* ============================================
   PROGRESS BAR PROTECTION - LIGHT THEME
   Prevent progress bars from being overridden
   ============================================ */

/* Force progress bars to work using SOLID COLORS (no gradients to override) */

/* The progress bar track (gray container) */
body.white-theme .seo-progress-track {
  background: #f0f0f0 !important;
  background-color: #f0f0f0 !important;
  border: 2px solid #d0d0d0 !important;
}

/* The colored progress fills - SOLID COLORS */
body.white-theme .seo-progress-fill[data-color="#00ff41"] {
  background: #00ff41 !important;
  background-color: #00ff41 !important;
  box-shadow: 0 0 20px rgba(0, 255, 65, 0.4) !important;
}

body.white-theme .seo-progress-fill[data-color="#ffd700"] {
  background: #ffd700 !important;
  background-color: #ffd700 !important;
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.4) !important;
}

body.white-theme .seo-progress-fill[data-color="#ff8c00"] {
  background: #ff8c00 !important;
  background-color: #ff8c00 !important;
  box-shadow: 0 0 20px rgba(255, 140, 0, 0.4) !important;
}

body.white-theme .seo-progress-fill[data-color="#ff4444"] {
  background: #ff4444 !important;
  background-color: #ff4444 !important;
  box-shadow: 0 0 20px rgba(255, 68, 68, 0.4) !important;
}

/* Ensure the shimmer effect works */
body.white-theme .seo-progress-shimmer {
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.3) 50%, transparent 100%) !important;
  pointer-events: none !important;
}

/* ============================================
   UNIVERSAL LIGHT THEME DARK BACKGROUND FIX
   Catches all remaining dark backgrounds
   ============================================ */

/* NUCLEAR OPTION: Override ALL dark backgrounds with extreme specificity */
body.white-theme * {
  /* This will be overridden by more specific rules below if needed */
}

/* Target ALL elements with inline dark backgrounds */
body.white-theme *[style*="background"] {
  /* Reset dark backgrounds - will be overridden if inline style is lighter */
}

/* Force light backgrounds on common containers */
body.white-theme .section,
body.white-theme .results-container,
body.white-theme #resultsContainer,
body.white-theme #seoResults,
body.white-theme #performanceResults,
body.white-theme .summary-section,
body.white-theme .accordion-content {
  background: #ffffff !important;
  background-color: #ffffff !important;
  color: #000000 !important;
}

/* Fix all divs, sections, and containers with dark backgrounds */
body.white-theme div:not(.hamburger-line):not(.progress-fill):not([class*="ring"]):not([class*="circle"]):not(.seo-progress-container):not(.seo-progress-container *),
body.white-theme section:not(.seo-progress-container):not(.seo-progress-container *),
body.white-theme main,
body.white-theme aside,
body.white-theme article {
  /* Only override if background is dark (0-50 range in hex) */
  background-color: inherit;
}

/* Specifically target common dark background patterns */
body.white-theme div[style*="background:#000"],
body.white-theme div[style*="background: #000"],
body.white-theme div[style*="background-color:#000"],
body.white-theme div[style*="background-color: #000"],
body.white-theme div[style*="background:#111"],
body.white-theme div[style*="background: #111"],
body.white-theme div[style*="background:#1a1a1a"],
body.white-theme div[style*="background: #1a1a1a"],
body.white-theme div[style*="background:#0f0f0f"],
body.white-theme div[style*="background: #0f0f0f"],
body.white-theme section[style*="background:#000"],
body.white-theme section[style*="background-color:#000"] {
  background: #f8f9fa !important;
  background-color: #f8f9fa !important;
  color: #000000 !important;
  border: 1px solid #e0e0e0 !important;
}

/* Fix any text that's hard to read */
body.white-theme [style*="color:#888"],
body.white-theme [style*="color: #888"],
body.white-theme [style*="color:#999"],
body.white-theme [style*="color: #999"],
body.white-theme [style*="color:#aaa"],
body.white-theme [style*="color: #aaa"],
body.white-theme [style*="color:#bbb"],
body.white-theme [style*="color: #bbb"],
body.white-theme [style*="color:#ccc"],
body.white-theme [style*="color: #ccc"],
body.white-theme [style*="color:#ddd"],
body.white-theme [style*="color: #ddd"],
body.white-theme [style*="color:#e0e0e0"],
body.white-theme [style*="color: #e0e0e0"] {
  color: #495057 !important; /* WCAG AA compliant dark gray (7.4:1) */
}

/* JetBrains Mono Font - using Google Fonts CDN */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@300;400;500;600;700&display=swap');

/* Base body styling */
body {
  font-family: 'JetBrains Mono', 'Space Mono', Consolas, Monaco, 'Courier New', monospace;
  background-color: var(--bg-primary);
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  overflow-x: hidden;
  /* Dynamic font size using multiplier */
  font-size: calc(var(--base-font-size) * var(--font-size-multiplier));
}

.site-footer-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  color: #f8fbff;
  padding: 0.65rem 1.75rem;
  font-size: 0.85rem;
  text-align: center;
  z-index: 9999;
  border-top: 1px solid rgba(94, 243, 154, 0.3);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
  font-weight: 600;
  letter-spacing: 0.015em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

.site-footer-link {
  color: #5ef39a;
  text-decoration: none;
  font-weight: 600;
}

.site-footer-link:hover,
.site-footer-link:focus {
  text-decoration: underline;
}

body.white-theme .site-footer-bar {
  background: linear-gradient(135deg, #ffffff 0%, #e8f4ff 100%);
  color: #0b1f33;
  border-top: 1px solid rgba(15, 55, 105, 0.2);
  box-shadow: 0 -6px 18px rgba(15, 23, 42, 0.15);
  text-shadow: none;
}

body.white-theme .site-footer-link {
  color: #0b7a4d;
  text-decoration-color: rgba(11, 122, 77, 0.5);
}

.site-footer-bar strong {
  font-weight: 700;
}

/* Headings - use rem units so they scale with root multiplier */
h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin: 1rem 0;
  color: var(--text-primary);
}

h2 {
  font-size: 2rem;
  font-weight: 600;
  margin: 0.875rem 0;
  color: var(--text-primary);
}

h3 {
  font-size: 1.75rem;
  font-weight: 600;
  margin: 0.75rem 0;
  color: var(--text-primary);
}

h4 {
  font-size: 1.5rem;
  font-weight: 500;
  margin: 0.625rem 0;
  color: var(--text-secondary);
}

h5 {
  font-size: 1.25rem;
  font-weight: 500;
  margin: 0.5rem 0;
  color: var(--text-secondary);
}

h6 {
  font-size: 1.1rem;
  font-weight: 500;
  margin: 0.5rem 0;
  color: var(--text-secondary);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

/* Paragraphs and general text - increased readability */
p {
  font-size: 1.05rem;
  line-height: 1.7;
  margin: 0.75rem 0;
}

/* List items */
li {
  font-size: 1.05rem;
  line-height: 1.7;
  margin: 0.5rem 0;
}

/* Labels and form text */
label {
  font-size: 1.05rem;
  line-height: 1.6;
}

/* General text containers */
.text-content,
.description,
.details {
  font-size: 1.05rem;
  line-height: 1.7;
}

/* Headers - Better contrast ratios for accessibility */
h1 {
  font-size: 2.25rem;
  font-weight: 300;
  text-align: center;
  margin-bottom: 1rem;
  letter-spacing: 0.1em;
  color: var(--text-primary);
}

h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 2.5rem 0 1.25rem 0;
  color: var(--text-primary);
  border-bottom: 2px solid var(--border-secondary);
  padding-bottom: 0.75rem;
  letter-spacing: 0.02em;
}

h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 1rem 0 0.75rem 0;
  color: var(--text-primary);
  letter-spacing: 0.02em;
}

h4 {
  font-size: 0.975rem;
  font-weight: 500;
  margin: 1rem 0 0.5rem 0;
  color: var(--text-secondary);
}

/* Paragraphs and text - Better contrast (minimum 4.5:1) */
p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

/* Theme Toggle Button - Accessible with proper contrast */
/* ===== UNIFIED HEADER SYSTEM ===== */

/* Main Header Bar - Contains all top controls */
.unified-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-primary);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.5rem;
  gap: 2rem;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  overflow: visible; /* Allow dropdowns to overflow header */
}

/* Left section - Font size controls */
.unified-header-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

/* Center section - App title and subtitle */
.unified-header-center {
  flex: 1;
  text-align: center;
  min-width: 0; /* Allow text truncation */
}

.app-title {
  font-size: var(--app-title-size, 1.35rem);
  font-weight: 700;
  color: var(--accent-primary);
  margin: 0;
  line-height: 1.2;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.app-subtitle {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  margin: 0.125rem 0 0 0;
  line-height: 1.2;
  text-transform: lowercase;
  letter-spacing: 0.02em;
}

/* Right section - Theme toggle */
.unified-header-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  position: relative;
  overflow: visible; /* Allow dropdowns to overflow */
}

/* Theme Toggle - Now in unified header */
.theme-toggle {
  background: var(--bg-hover);
  color: var(--text-primary);
  border: 1px solid var(--border-secondary);
  padding: 8px 12px;
  cursor: pointer;
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.theme-toggle:hover,
.theme-toggle:focus {
  background: var(--bg-tertiary);
  border-color: var(--accent-primary);
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

/* Hamburger Menu Button - Hidden on desktop, visible on mobile */
.hamburger-btn {
  display: none; /* Hidden by default on desktop */
  flex-direction: column;
  justify-content: space-around;
  width: 36px;
  height: 36px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 6px;
  z-index: 1001;
  transition: all 0.3s ease;
}

.hamburger-line {
  width: 100%;
  height: 3px;
  background: var(--accent-primary);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.hamburger-btn.active .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.hamburger-btn.active .hamburger-line:nth-child(2) {
  opacity: 0;
}

.hamburger-btn.active .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile Navigation Overlay */
.mobile-nav-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  opacity: 0;
  pointer-events: none; /* Don't block clicks when invisible */
  transition: opacity 0.3s ease;
}

.mobile-nav-overlay.active {
  opacity: 1;
  pointer-events: auto; /* Allow clicks when visible */
}

/* Mobile Navigation Drawer */
.mobile-nav {
  display: none;
  position: fixed;
  top: 0;
  left: -100%;
  width: 280px;
  max-width: 85vw;
  height: 100vh;
  background: var(--bg-primary);
  border-right: 1px solid var(--border-primary);
  z-index: 1001;
  overflow-y: auto;
  transition: left 0.3s ease;
  box-shadow: 4px 0 12px rgba(0, 0, 0, 0.3);
}

.mobile-nav.active {
  left: 0;
}

.mobile-nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1rem;
  border-bottom: 1px solid var(--border-primary);
  background: var(--bg-secondary);
}

.mobile-nav-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.mobile-nav-close {
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  line-height: 1;
  transition: all 0.2s ease;
  border-radius: 4px;
}

.mobile-nav-close:hover {
  background: var(--bg-hover);
  color: var(--accent-primary);
}

.mobile-nav-items {
  display: flex;
  flex-direction: column;
  padding: 0.5rem 0;
}

.mobile-nav-items .nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 1rem;
  border-left: 3px solid transparent;
  transition: all 0.2s ease;
  background: transparent;
}

.mobile-nav-items .nav-link:hover {
  background: var(--bg-hover);
  border-left-color: var(--accent-primary);
}

.mobile-nav-items .nav-link.active {
  background: var(--bg-tertiary);
  border-left-color: var(--accent-primary);
  color: var(--accent-primary);
  font-weight: 600;
}

.mobile-nav-items .nav-icon {
  font-size: 1.25rem;
}

.mobile-nav-items .hot-badge {
  margin-left: auto;
  background: var(--accent-primary);
  color: var(--bg-primary);
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  font-size: 0.65rem;
  font-weight: 700;
}

/* Mobile Navigation Footer */
.mobile-nav-footer {
  margin-top: auto;
  padding: 1rem;
  border-top: 1px solid var(--border-primary);
  background: var(--bg-secondary);
}

.mobile-theme-toggle {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.875rem 1rem;
  background: var(--bg-hover);
  border: 1px solid var(--border-secondary);
  border-radius: 6px;
  color: var(--text-primary);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mobile-theme-toggle:hover {
  background: var(--bg-tertiary);
  border-color: var(--accent-primary);
  transform: translateY(-1px);
}

.mobile-theme-toggle .theme-icon {
  font-size: 1.25rem;
}

.mobile-theme-toggle .theme-label {
  flex: 1;
  text-align: left;
}

/* Top Navigation Bar - Now full width below unified header */
.top-nav {
  position: fixed;
  top: 70px; /* Positioned below unified header */
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start; /* Left-align for better mobile scrolling */
  gap: 0.5rem;
  z-index: 900; /* Reduced to allow dropdowns to appear above */
  background: var(--bg-secondary);
  padding: 0.5rem 1rem;
  border-bottom: 1px solid var(--border-primary);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
}

/* Ensure dropdowns, selects, and translation widgets appear above navigation and header */
select,
.goog-te-combo,
.goog-te-gadget,
.goog-te-gadget-simple,
.goog-te-menu-frame,
.goog-te-menu-frame *,
.goog-te-banner-frame,
[role="combobox"],
[role="listbox"],
.skiptranslate,
.skiptranslate *,
.goog-te-menu2,
.goog-te-menu-value {
  z-index: 99999 !important;
}

/* Make sure the dropdown container itself has proper stacking */
.skiptranslate iframe,
.goog-te-menu-frame iframe {
  z-index: 100000 !important;
  position: fixed !important;
}

/* Ensure parent containers don't restrict z-index */
.unified-header,
.unified-header-right,
.unified-header-left,
.unified-header-center {
  overflow: visible !important;
}

/* Force the header to not clip children */
body > header,
#nav-placeholder,
#nav-placeholder * {
  overflow: visible !important;
}

/* Hide scrollbar but keep functionality */
.top-nav::-webkit-scrollbar {
  height: 4px;
}

.top-nav::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

.top-nav::-webkit-scrollbar-thumb {
  background: var(--accent-primary);
  border-radius: 2px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  color: var(--text-tertiary);
  text-decoration: none;
  font-size: 0.85rem;
  border-radius: 4px;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0; /* Prevent links from shrinking */
}

.nav-link:hover {
  background: var(--bg-hover);
  color: var(--accent-primary);
}

.nav-link.active {
  background: var(--bg-tertiary);
  color: var(--accent-primary);
  border: 1px solid var(--border-accent);
}

.nav-icon {
  font-size: 1rem;
}

.nav-badge {
  background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-primary-dark) 100%);
  color: #000000;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(0.95); }
}

/* Font size controls - Accessible touch targets (min 44x44px) */
/* Font Size Controls - Now in unified header */
.font-size-controls {
  display: flex;
  gap: 0.5rem;
}

.font-size-btn {
  background: var(--bg-hover);
  color: var(--text-primary);
  border: 1px solid #707070;
  padding: 0.375rem 0.625rem;
  min-width: 44px;
  min-height: 44px;
  font-size: 0.75rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.font-size-btn:active {
  transform: scale(0.95);
}

.font-size-btn:hover,
.font-size-btn:focus {
  background: #606060;
  border-color: var(--text-muted);
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

.font-size-btn.active {
  background: #00ff41;
  color: #000000;
  border-color: var(--accent-primary);
  box-shadow: 0 0 10px rgba(0, 255, 65, 0.5), 0 0 20px rgba(0, 255, 65, 0.3);
  font-weight: 700;
  transform: scale(1.05);
  animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.5), 0 0 20px rgba(0, 255, 65, 0.3);
  }
  50% {
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.7), 0 0 30px rgba(0, 255, 65, 0.4);
  }
}

/* Adjust main content to account for fixed headers */
body {
  padding-top: 130px; /* Space for unified header (70px) + nav bar (60px) */
}

/* ===== RESPONSIVE DESIGN ===== */

/* Large tablets and small laptops - Compact navigation */
@media (max-width: 1100px) {
  .top-nav {
    gap: 0.35rem; /* Reduced from 0.5rem */
    padding: 0.4rem 0.75rem; /* Reduced from 0.5rem 1rem */
  }

  .nav-link {
    padding: 6px 10px; /* Reduced from 8px 14px */
    font-size: 0.8rem; /* Reduced from 0.85rem */
    gap: 5px; /* Reduced from 6px */
  }

  .nav-icon {
    font-size: 0.95rem; /* Slightly smaller */
  }

  .nav-badge {
    font-size: 0.6rem; /* Slightly smaller */
    padding: 1px 4px; /* More compact */
  }
}

/* Medium tablets - More compact navigation */
@media (max-width: 900px) {
  .top-nav {
    gap: 0.25rem; /* Further reduced */
    padding: 0.35rem 0.5rem; /* Further reduced */
  }

  .nav-link {
    padding: 5px 8px; /* Further reduced */
    font-size: 0.75rem; /* Further reduced */
    gap: 4px; /* Further reduced */
  }

  .nav-icon {
    font-size: 0.9rem; /* Smaller icons */
  }

  .nav-badge {
    font-size: 0.55rem; /* Smaller */
    padding: 1px 3px; /* More compact */
  }
}

/* Tablets and smaller */
@media (max-width: 768px) {
  /* Show hamburger menu */
  .hamburger-btn {
    display: flex;
    order: 1;
    flex-shrink: 0;
  }
  
  /* Hide horizontal top nav, show mobile drawer instead */
  .top-nav {
    display: none;
  }
  
  /* Enable mobile nav */
  .mobile-nav-overlay,
  .mobile-nav {
    display: block;
  }
  
  .unified-header {
    padding: 0.5rem 0.75rem;
    gap: 0.75rem;
  }
  
  .unified-header-center {
    order: 2;
    flex: 1;
    text-align: center;
  }
  
  .app-subtitle {
    font-size: 0.65rem;
  }
  
  .unified-header-right {
    order: 3;
    flex-shrink: 0;
  }
  
  /* Hide desktop theme toggle on mobile - it's now in the drawer */
  .theme-toggle {
    display: none;
  }
  
  body {
    padding-top: 70px; /* Compact header */
  }
}

/* Mobile phones */
@media (max-width: 480px) {
  .hamburger-btn {
    width: 32px;
    height: 32px;
    padding: 5px;
  }
  
  .hamburger-line {
    height: 2.5px;
  }
  
  .mobile-nav {
    width: 260px;
  }
  
  .unified-header {
    padding: 0.35rem 0.5rem;
    gap: 0.5rem;
  }
  
  .app-subtitle {
    font-size: 0.6rem;
    display: none; /* Hide subtitle on very small screens */
  }
  
  body {
    padding-top: 55px; /* Very compact header */
  }
}

/* Extra small phones (iPhone SE, etc.) */
@media (max-width: 375px) {
  .hamburger-btn {
    width: 28px;
    height: 28px;
    padding: 4px;
  }
  
  .hamburger-line {
    height: 2px;
  }
  
  .mobile-nav {
    width: 240px;
  }
  
  .unified-header {
    padding: 0.3rem 0.4rem;
    gap: 0.4rem;
  }
  
  body {
    padding-top: 50px;
  }
}

/* Form container styling */
.form-container {
  text-align: center;
  margin-bottom: 2rem;
}

/* Input field styling - Accessible with proper contrast */
input[type="url"],
input[type="text"] {
  width: 70%;
  max-width: 500px;
  padding: 1.2rem;
  margin-right: 1rem;
  background-color: var(--bg-input);
  border: 2px solid var(--border-secondary);
  color: var(--text-primary);
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.1rem; /* Increased for better readability */
  border-radius: 4px;
  min-height: 48px; /* Increased from 44px */
}

input[type="url"]:focus,
input[type="text"]:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: var(--glow-primary);
}

input[type="url"]::placeholder,
input[type="text"]::placeholder {
  color: var(--text-muted);
  font-size: 1rem;
}

/* Button styling - Accessible touch targets */
button {
  padding: 1.2rem 2.2rem;
  min-width: 48px; /* Increased from 44px */
  min-height: 48px; /* Increased from 44px */
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
  border: 2px solid var(--border-secondary);
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.05rem; /* Increased for better readability */
  font-size: 1rem;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.3s ease;
  font-weight: 500;
}

button:hover {
  background-color: var(--bg-hover);
  border-color: var(--border-accent);
}

button:focus {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

button:active {
  transform: translateY(1px);
}

/* Unified Analyze Button Styling - Consistent across all analyzers */
#analyzeButton,
#dashboardAnalyzeButton,
#seoAnalyzeButton,
#perfAnalyzeButton,
#cwvAnalyzeButton,
.analyze-button,
#analyzeBtn,
#scanButton {
  background-color: var(--accent-primary) !important;
  color: #000000 !important;
  border: 2px solid var(--accent-primary) !important;
  font-weight: 600 !important;
  /* Remove conflicting inline styles */
  background: var(--accent-primary) !important;
  box-shadow: 0 4px 12px rgba(0, 255, 65, 0.3) !important;
}

#analyzeButton:hover,
#dashboardAnalyzeButton:hover,
#seoAnalyzeButton:hover,
#perfAnalyzeButton:hover,
#cwvAnalyzeButton:hover,
#scanButton:hover,
.analyze-button:hover,
#analyzeBtn:hover {
  background-color: #00cc34 !important;
  border-color: #00cc34 !important;
  background: #00cc34 !important;
  box-shadow: 0 6px 16px rgba(0, 255, 65, 0.4) !important;
}

#analyzeButton:focus,
#dashboardAnalyzeButton:focus,
#seoAnalyzeButton:focus,
#perfAnalyzeButton:focus,
#cwvAnalyzeButton:focus,
#scanButton:focus,
.analyze-button:focus,
#analyzeBtn:focus {
  outline: 2px solid var(--accent-primary) !important;
  outline-offset: 2px !important;
}

/* Results container */
.results-container {
  margin-top: 2rem !important;
}

.results-container.hidden {
  display: none !important;
}

/* Utility classes */
.hidden {
  display: none;
}

/* Visually hidden but accessible to screen readers */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Section styling */
.section {
  margin-bottom: 1.5rem;
  padding: 1.5rem;
  background-color: #0f0f0f;
  border: 1px solid #303030;
  border-radius: 6px;
}

.security-summary-panel {
  position: relative;
  margin-bottom: 2rem;
  padding: 2rem;
  border: 2px solid rgba(255, 68, 68, 0.6);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(49, 10, 10, 0.95), rgba(20, 3, 3, 0.92));
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55), 0 0 40px rgba(255, 68, 68, 0.2);
  overflow: hidden;
}

.security-summary-panel::after {
  content: '';
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(255, 68, 68, 0.35);
  border-radius: 10px;
  pointer-events: none;
  box-shadow: 0 0 30px rgba(255, 68, 68, 0.18);
}

.security-summary-panel h2 {
  color: #ff7878;
  text-shadow: 0 0 15px rgba(255, 68, 68, 0.65);
  margin-top: 0;
}

body.white-theme .security-summary-panel {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(255, 240, 240, 0.9));
  border-color: rgba(210, 50, 50, 0.4);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.15);
  color: #111;
}

body.white-theme .security-summary-panel::after {
  border-color: rgba(210, 50, 50, 0.2);
  box-shadow: none;
}

body.white-theme .security-summary-panel h2 {
  color: #b00020;
  text-shadow: none;
}

/* Accordion styling */
.accordion {
  border: 1px solid var(--border-primary) !important;
  border-radius: 4px !important;
  margin-bottom: 1rem !important;
  overflow: hidden !important;
}

.accordion-header {
  background: var(--bg-tertiary) !important;
  border: none !important;
  color: var(--text-primary) !important;
  cursor: pointer !important;
  padding: 1rem !important;
  text-align: left !important;
  font-size: 1rem !important;
  font-weight: 600 !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  transition: background-color 0.3s ease !important;
  width: 100% !important;
}

.accordion-header:hover {
  background: var(--bg-hover) !important;
}

.accordion-header.active {
  background: #0f0f14 !important;
  color: var(--text-primary) !important;
  text-shadow: 0 0 5px rgba(0, 255, 65, 0.5) !important;
}

.accordion-toggle {
  font-size: 1rem !important;
  font-weight: bold !important;
  color: var(--accent-primary) !important;
  text-shadow: 0 0 3px rgba(0, 255, 65, 0.5) !important;
  transition: all 0.3s ease !important;
}

.accordion-toggle.rotated {
  transform: none !important;
}

.accordion-content {
  padding: 0 !important;
  background: var(--bg-primary) !important;
  border-top: 1px solid #333333 !important;
  max-height: 0 !important;
  overflow: hidden !important;
  transition: max-height 0.3s ease-out !important;
}

.accordion-content.expanded {
  max-height: none !important;
  padding: 1.5rem !important;
}

/* Font group styling */
.font-group {
  margin-bottom: 2rem !important;
  padding: 1.5rem !important;
  background-color: #0f0f0f !important;
  border: 1px solid var(--border-primary) !important;
  border-radius: 4px !important;
}

.font-preview {
  margin: 1rem 0 !important;
  padding: 1rem !important;
  background-color: var(--bg-tertiary) !important;
  border: 1px solid #444444 !important;
  border-radius: 4px !important;
  position: relative !important;
}

/* Font preview text - HIGH SPECIFICITY to override body styles */
.font-preview-text {
  /* Don't set font-family here - will be set dynamically per font */
  display: block;
  color: inherit;
}

.font-weight {
  margin: 0.5rem 0 !important;
  padding: 0.5rem !important;
  background-color: var(--bg-hover) !important;
  border-radius: 2px !important;
}

/* Findings Table Styling */
.findings-table {
  width: 100% !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  margin: 1.5rem 0 0 !important;
  background-color: var(--bg-primary) !important;
}

.findings-table thead th {
  border: 2px solid var(--border-primary) !important;
  padding: 0.75rem !important;
  text-align: left !important;
  color: var(--text-primary) !important;
  font-weight: 700 !important;
  font-size: 0.8rem !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
}

.findings-table tbody td {
  border: 1px solid #222222 !important;
  padding: 0.5rem !important;
  color: #cccccc !important;
  vertical-align: middle !important;
  font-size: 0.9rem !important;
}

.findings-table tbody tr:hover {
  background-color: var(--bg-secondary) !important;
}

/* Status Box Styling */
.status-box {
  display: inline-block !important;
  width: 18px !important;
  height: 18px !important;
  line-height: 18px !important;
  text-align: center !important;
  font-size: 0.9rem !important;
  font-weight: bold !important;
  border: 1px solid !important;
  border-radius: 2px !important;
}

.status-pass {
  background-color: rgba(0, 255, 65, 0.15) !important;
  color: #00ff41 !important;
  border-color: #00ff41 !important;
  box-shadow: 0 0 8px rgba(0, 255, 65, 0.4) !important;
  text-shadow: 0 0 3px rgba(0, 255, 65, 0.8) !important;
}

.status-fail {
  background-color: rgba(255, 68, 68, 0.15) !important;
  color: #ff4444 !important;
  border-color: #ff4444 !important;
  box-shadow: 0 0 8px rgba(255, 68, 68, 0.4) !important;
  text-shadow: 0 0 3px rgba(255, 68, 68, 0.8) !important;
}

.status-warning {
  background-color: rgba(255, 170, 0, 0.15) !important;
  color: #ffaa00 !important;
  border-color: #ffaa00 !important;
  box-shadow: 0 0 8px rgba(255, 170, 0, 0.4) !important;
  text-shadow: 0 0 3px rgba(255, 170, 0, 0.8) !important;
}

.status-info {
  background-color: var(--bg-tertiary) !important;
  color: #66c6cc !important;
  border-color: #66c6cc !important;
  box-shadow: 0 0 5px rgba(102, 198, 204, 0.3) !important;
}

/* Health Summary */
.health-summary {
  background-color: #0f0f0f !important;
  border: 1px solid var(--border-primary) !important;
  border-radius: 6px !important;
  padding: 2rem !important;
  margin-top: 2rem !important;
}

.health-summary h3 {
  margin-top: 0 !important;
  margin-bottom: 1.5rem !important;
  color: var(--text-primary) !important;
}

.health-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) !important;
  gap: 1.5rem !important;
  margin-bottom: 2rem !important;
}

.health-item {
  display: flex !important;
  min-width: 200px !important;
  display: flex !important;
  align-items: center !important;
  gap: 1rem !important;
  padding: 1rem !important;
  background-color: var(--bg-secondary) !important;
  border: 2px solid var(--border-primary) !important;
  border-radius: 4px !important;
  transition: all 0.3s ease !important;
}

.health-item:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5) !important;
}

.health-icon {
  font-size: 1.5rem !important;
  font-weight: bold !important;
  width: 35px !important;
  height: 35px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 4px !important;
  border: 2px solid !important;
}

.health-text {
  flex: 1 !important;
}

.health-label {
  font-size: 0.8rem !important;
  color: #999999 !important;
  min-width: 120px !important;
  text-transform: uppercase !important;
  font-size: 0.7rem !important;
  letter-spacing: 0.05em !important;
}

.health-value {
  font-size: 1.1rem !important;
  color: var(--text-primary) !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  margin-bottom: 2rem !important;
}

/* Metrics grid */
.metrics-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)) !important;
  gap: 1.5rem !important;
  margin-bottom: 2rem !important;
}

/* Score Cards */
.score-card {
  background-color: var(--bg-tertiary) !important;
  border: 2px solid var(--border-primary) !important;
  border-radius: 6px !important;
  padding: 1.5rem !important;
  transition: all 0.3s ease !important;
}

.score-card:hover {
  border-color: var(--border-secondary) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5) !important;
}

.score-card-header {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  margin-bottom: 1rem !important;
}

.score-card-label {
  font-size: 0.9rem !important;
  font-weight: 600 !important;
  color: #cccccc !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
}

.score-card-icon {
  font-size: 1.5rem !important;
  font-weight: bold !important;
}

.score-card-value {
  font-size: 3rem !important;
  font-weight: 700 !important;
  color: var(--text-primary) !important;
  line-height: 1 !important;
  margin-bottom: 2rem !important;
}

.metric-content {
  flex: 1 !important;
}

.metric-value {
  font-size: 1.1rem !important;
  font-weight: bold !important;
  color: var(--text-primary) !important;
}

.health-bar {
  display: flex !important;
  gap: 1rem !important;
  flex-wrap: wrap !important;
}

.health-indicator {
  flex: 1 !important;
  min-width: 200px !important;
  display: flex !important;
  align-items: center !important;
  gap: 1rem !important;
  padding: 1rem !important;
  background-color: var(--bg-secondary) !important;
  border: 2px solid var(--border-primary) !important;
  border-radius: 4px !important;
}

.health-icon {
  font-size: 1.5rem !important;
  font-weight: bold !important;
}

.health-text {
  font-size: 0.9rem !important;
  font-weight: 600 !important;
  color: #cccccc !important;
  text-transform: uppercase !important;
  font-size: 0.7rem !important;
  letter-spacing: 0.05em !important;
}

/* Score-based coloring for summary metrics */
.summary-metric.score-excellent .metric-icon,
.health-indicator.health-good .health-icon {
  color: #00ff14 !important;
}

.summary-metric.score-good .metric-icon,
.health-indicator.health-warning .health-icon {
  color: #ffaa00 !important;
}

.summary-metric.score-warning .metric-icon,
.health-indicator.health-poor .health-icon {
  color: var(--status-error) !important;
}

/* WHITE THEME OVERRIDES - Main definition is at line 85, this section just handles specific elements */

body.white-theme h1,
body.white-theme h2,
body.white-theme h3,
body.white-theme h4 {
  color: var(--text-secondary) !important;
}

body.white-theme h2 {
  border-bottom-color: #cccccc !important;
}

body.white-theme p {
  color: var(--text-tertiary) !important;
}

/* Container uses the default --bg-base which is overridden in body.white-theme at line 85 */

/* Fix font size controls in white theme */
body.white-theme .font-size-btn {
  background: #e0e0e0 !important;
  color: var(--text-secondary) !important;
  border-color: #999999 !important;
}

body.white-theme .font-size-btn:hover {
  background: #d0d0d0 !important;
  border-color: #777777 !important;
}

body.white-theme .font-size-btn.active {
  background: #2563eb !important;
  color: var(--text-primary) !important;
  border-color: #1d4ed8 !important;
}

/* Fix URL input and analyze button in white theme */
body.white-theme input[type="url"],
body.white-theme input[type="text"] {
  background-color: #ffffff !important;
  border: 2px solid #ced4da !important; /* Softer border color */
  color: #1a1a1a !important;
}

body.white-theme input[type="url"]:focus,
body.white-theme input[type="text"]:focus {
  border-color: #00994d !important; /* Match button color */
  box-shadow: 0 0 0 3px rgba(0, 153, 77, 0.15) !important; /* Subtle focus ring */
  outline: none;
}

body.white-theme input[type="url"]::placeholder,
body.white-theme input[type="text"]::placeholder {
  color: #6c757d !important; /* More readable placeholder (4.6:1) */
  opacity: 1;
}

/* Light Mode: Unified Analyze Button Styling */
body.white-theme #analyzeButton,
body.white-theme #dashboardAnalyzeButton,
body.white-theme #seoAnalyzeButton,
body.white-theme #perfAnalyzeButton,
body.white-theme #cwvAnalyzeButton,
body.white-theme #scanButton,
body.white-theme .analyze-button,
body.white-theme #analyzeBtn {
  background-color: #00994d !important; /* Darker, accessible green (4.5:1 contrast) */
  background: #00994d !important; /* Override any gradient */
  color: #ffffff !important;
  border: 2px solid #00994d !important;
  box-shadow: 0 4px 12px rgba(0, 153, 77, 0.3) !important;
}

body.white-theme #analyzeButton:hover,
body.white-theme #dashboardAnalyzeButton:hover,
body.white-theme #seoAnalyzeButton:hover,
body.white-theme #perfAnalyzeButton:hover,
body.white-theme #cwvAnalyzeButton:hover,
body.white-theme #scanButton:hover,
body.white-theme .analyze-button:hover,
body.white-theme #analyzeBtn:hover {
  background-color: #007a3d !important; /* Darker on hover */
  background: #007a3d !important;
  border-color: #007a3d !important;
  box-shadow: 0 6px 16px rgba(0, 122, 61, 0.4) !important;
}

body.white-theme #analyzeButton:focus,
body.white-theme #dashboardAnalyzeButton:focus,
body.white-theme #seoAnalyzeButton:focus,
body.white-theme #perfAnalyzeButton:focus,
body.white-theme #cwvAnalyzeButton:focus,
body.white-theme #scanButton:focus,
body.white-theme .analyze-button:focus,
body.white-theme #analyzeBtn:focus {
  outline: 2px solid #00994d !important;
  outline-offset: 2px !important;
}

/* Light Mode: Generic buttons (not analyze buttons) */
body.white-theme button {
  background-color: #f8f9fa !important; /* Light neutral background */
  color: #1a1a1a !important; /* Dark text */
  border: 2px solid #dee2e6 !important; /* Subtle border */
}

/* Exception: Buttons with inline color styles (like purple gradient buttons) keep their colors */
body.white-theme button[style*="color"] {
  color: inherit !important; /* Respect inline color for special buttons */
}

body.white-theme button:hover {
  background-color: #e9ecef !important; /* Slightly darker on hover */
  border-color: #adb5bd !important;
}

body.white-theme button:disabled {
  background-color: #e9ecef !important; /* Subtle disabled state */
  color: #6c757d !important; /* Muted but readable text */
  border-color: #dee2e6 !important;
  cursor: not-allowed;
  opacity: 0.65;
}

/* Mobile Navigation Light Theme */
body.white-theme .mobile-nav {
  background: #ffffff;
  border-right: 1px solid #dee2e6; /* Softer border */
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
}

body.white-theme .mobile-nav-header {
  background: #f8f9fa; /* Subtle contrast */
  border-bottom: 1px solid #dee2e6;
}

body.white-theme .mobile-nav-title {
  color: #4caf50;
}

body.white-theme .mobile-nav-close {
  color: #333;
}

body.white-theme .mobile-nav-close:hover {
  background: #e8e8e8;
  color: #4caf50;
}

body.white-theme .mobile-nav-items .nav-link {
  color: #333;
  border-bottom: 1px solid #f0f0f0;
}

body.white-theme .mobile-nav-items .nav-link:hover,
body.white-theme .mobile-nav-items .nav-link.active {
  background: #f5f5f5;
  color: #4caf50;
}

body.white-theme .mobile-nav-footer {
  background: #f5f5f5;
  border-top: 1px solid #e0e0e0;
}

body.white-theme .hamburger-line {
  background: #333;
}

/* Accordion Light Theme - Fix dark backgrounds */
body.white-theme .accordion {
  background: #ffffff !important;
}

body.white-theme .accordion-header {
  background-color: #f5f5f5 !important;
  color: #000000 !important;
  border-color: #dddddd !important;
}

body.white-theme .accordion-header:hover {
  background-color: #eeeeee !important;
}

body.white-theme .accordion-header.active {
  background-color: #4caf50 !important;
  color: #ffffff !important;
}

body.white-theme .accordion-toggle {
  color: #000000 !important;
}

body.white-theme .accordion-header.active .accordion-toggle {
  color: #ffffff !important;
}

body.white-theme .accordion-content {
  background-color: #ffffff !important;
  color: #000000 !important;
  border-color: #dddddd !important;
}

body.white-theme .accordion-content * {
  color: inherit !important;
}

/* DISABLED - This rule was too aggressive and broke progress bars
   Progress bars now use class-based styling which is more reliable
body.white-theme .accordion-content div[style*="background"]:not(.breakdown-bar-fill):not(.progress-bar):not([class*="bar-fill"]):not(.seo-progress-fill):not(.seo-progress-track):not(.seo-progress-label):not(.seo-progress-shimmer),
body.white-theme .section div[style*="background"]:not(.breakdown-bar-fill):not(.progress-bar):not([class*="bar-fill"]):not(.seo-progress-fill):not(.seo-progress-track):not(.seo-progress-label):not(.seo-progress-shimmer) {
  background: transparent !important;
}
*/

/* Ensure chart containers have clean backgrounds */
body.white-theme .accordion-content > div,
body.white-theme .section > div {
  background-color: transparent !important;
}

/* Info/Alert boxes in light theme - add visible borders */
body.white-theme div[style*="border-left: 4px solid #ff6b6b"],
body.white-theme div[style*="background: rgba(255, 107, 107"] {
  background: #fff5f5 !important;
  border: 3px solid #ff6b6b !important;
  border-left-width: 5px !important;
  box-shadow: 0 4px 12px rgba(255, 107, 107, 0.25) !important;
}

body.white-theme div[style*="background: rgba(0, 255, 65"] {
  background: #f0fdf4 !important;
  border: 3px solid #00ff41 !important;
  border-left-width: 5px !important;
  box-shadow: 0 4px 12px rgba(0, 255, 65, 0.25) !important;
}

/* Text colors in info boxes - more specific targeting */
body.white-theme div[style*="border-left"] p[style*="color: #ff6b6b"] {
  color: #c92a2a !important; /* Accessible red (5.1:1) */
}

body.white-theme div[style*="border-left"] p[style*="color: #e0e0e0"] {
  color: #495057 !important; /* Readable gray (7.4:1) */
}

body.white-theme div[style*="border-left"] p[style*="color: #ff8c00"] {
  color: #d97706 !important; /* Accessible orange (4.5:1) */
  font-weight: 600 !important;
}

body.white-theme div[style*="border-left"] strong {
  color: #1a1a1a !important; /* Darker for better readability */
  font-weight: 700 !important;
}

/* Competitor sections in competitive analysis */
body.white-theme .competitor-section {
  border: 2px solid #c92a2a !important; /* Accessible red */
  background: #fff5f5 !important;
  box-shadow: 0 4px 6px rgba(201, 42, 42, 0.1) !important;
}

/* Improve contrast for all text elements */
body.white-theme h1,
body.white-theme h2,
body.white-theme h3,
body.white-theme h4,
body.white-theme h5,
body.white-theme h6 {
  color: #1a1a1a !important; /* Darker for maximum readability */
  font-weight: 700 !important;
}

body.white-theme p,
body.white-theme span,
body.white-theme div,
body.white-theme label {
  color: #1a1a1a !important;
}

/* Stronger borders for sections and containers */
body.white-theme .section,
body.white-theme section,
body.white-theme .card,
body.white-theme .container > div {
  border: 1px solid #dee2e6 !important; /* Softer, more modern border */
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.08) !important;
}

/* Chart containers - white background with border */
body.white-theme canvas,
body.white-theme .chart-container {
  background: #ffffff !important;
  border: 2px solid #e0e0e0 !important;
  border-radius: 8px !important;
  padding: 1rem !important;
}

/* Score badges and metrics - higher contrast */
body.white-theme .score,
body.white-theme .metric,
body.white-theme .badge {
  color: #000000 !important;
  font-weight: 700 !important;
  border: 2px solid #333333 !important;
}

/* Button contrast improvements */
body.white-theme .btn,
body.white-theme button:not(.theme-toggle) {
  font-weight: 600 !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) !important;
}

/* Competitive Analysis specific styles */
body.white-theme .status-winning {
  color: #00a000 !important;
  font-weight: 700 !important;
}

body.white-theme .status-losing {
  color: #d63031 !important;
  font-weight: 700 !important;
}

body.white-theme .status-tied {
  color: #d68000 !important;
  font-weight: 700 !important;
}

body.white-theme .stat-card,
body.white-theme .insight-card {
  background: #ffffff !important;
  border: 2px solid #d0d0d0 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
  color: #1a1a1a !important;
}

body.white-theme .stat-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
  border-color: #4caf50 !important;
}

body.white-theme .your-site {
  background: #e8f5e9 !important;
  border: 2px solid #4caf50 !important;
  box-shadow: 0 2px 12px rgba(76, 175, 80, 0.3) !important;
}

body.white-theme .insight-success {
  background: #e8f5e9 !important;
  border-left: 4px solid #2e7d32 !important;
  color: #1b5e20 !important;
}

body.white-theme .insight-warning {
  background: #fff3e0 !important;
  border-left: 4px solid #f57c00 !important;
  color: #e65100 !important;
}

body.white-theme .insight-critical {
  background: #ffebee !important;
  border-left: 4px solid #d32f2f !important;
  color: #b71c1c !important;
}

body.white-theme .comparison-table {
  background: #ffffff !important;
  border: 2px solid #d0d0d0 !important;
}

body.white-theme .comparison-table th {
  background: #f5f5f5 !important;
  color: #000000 !important;
  border-bottom: 2px solid #d0d0d0 !important;
  font-weight: 700 !important;
}

body.white-theme .comparison-table td {
  color: #1a1a1a !important;
  border-bottom: 1px solid #e0e0e0 !important;
}

body.white-theme .comparison-table .your-site {
  background: #e8f5e9 !important;
  font-weight: 700 !important;
  color: #000000 !important;
}

/* Override all inline styled backgrounds and text in light theme */
body.white-theme [style*="background: rgba"]:not(.seo-progress-container):not(.seo-progress-container *),
body.white-theme [style*="background:rgba"]:not(.seo-progress-container):not(.seo-progress-container *) {
  background: #ffffff !important;
}

/* Removed overly-broad gradient override - was killing colored progress bars */
/* body.white-theme [style*="background: linear-gradient"],
body.white-theme [style*="background:linear-gradient"] {
  background: #ffffff !important;
} */

body.white-theme [style*="color: rgba"],
body.white-theme [style*="color:rgba"] {
  color: #1a1a1a !important;
}

body.white-theme [style*="color: #e0e0e0"],
body.white-theme [style*="color:#e0e0e0"] {
  color: #495057 !important; /* Readable dark gray (7.4:1) */
}

body.white-theme [style*="color: #ccc"],
body.white-theme [style*="color:#ccc"] {
  color: #495057 !important; /* Readable dark gray (7.4:1) */
}

body.white-theme [style*="color: #999"],
body.white-theme [style*="color:#999"] {
  color: #495057 !important; /* Readable dark gray (7.4:1) */
}

/* Force all containers to have proper backgrounds */
body.white-theme > * {
  background-color: #ffffff !important;
}

body.white-theme main,
body.white-theme .main-content,
body.white-theme .content-wrapper {
  background-color: #ffffff !important;
}

/* Results cards and sections */
body.white-theme .results-card,
body.white-theme .results-section,
body.white-theme [class*="result"] {
  background: #ffffff !important;
  color: #000000 !important;
  border: 2px solid #d0d0d0 !important;
}

/* Competitive Analysis - Executive Summary Banner */
body.white-theme .score-banner {
  background: #ffffff !important;
  border: 3px solid #4caf50 !important;
  box-shadow: 0 4px 20px rgba(76, 175, 80, 0.2) !important;
}

body.white-theme .score-banner > div {
  background: transparent !important;
}

body.white-theme .score-banner * {
  color: #000000 !important;
}

body.white-theme .score-banner strong {
  color: #2e7d32 !important;
}

body.white-theme .score-banner [style*="opacity: 0.9"],
body.white-theme .score-banner [style*="opacity: 0.8"],
body.white-theme .score-banner [style*="opacity: 0.7"] {
  color: #333333 !important;
  opacity: 1 !important;
}

/* Score circle in banner */
body.white-theme .score-banner [style*="border-radius: 50%"] {
  background: #ffffff !important; /* White background for contrast */
  border-color: currentColor !important; /* Use score color for border */
}

/* CRITICAL: All score numbers must be dark and readable in light mode */
body.white-theme .score-banner [style*="font-size: 2.5rem"],
body.white-theme .score-banner [style*="font-size: 3rem"],
body.white-theme .score-banner [style*="font-size:2.5rem"],
body.white-theme .score-banner [style*="font-size:3rem"],
body.white-theme [style*="border-radius: 50%"] [style*="font-size"],
body.white-theme [style*="border-radius:50%"] [style*="font-size"],
body.white-theme div[style*="border-radius: 50%"] > div,
body.white-theme div[style*="border-radius:50%"] > div {
  color: #1a1a1a !important; /* Very dark grey - maximum readability */
  font-weight: 700 !important;
  opacity: 1 !important;
}

/* Dial score text - default (dark mode) with glow */
.circular-progress text,
.dial-score-text {
  fill: #ffffff;
  filter: drop-shadow(0 0 8px currentColor) drop-shadow(0 0 15px currentColor);
}

/* CRITICAL: SVG text elements in score circles must be dark for light mode */
body.white-theme svg text,
body.white-theme .circular-progress text,
body.white-theme svg.circular-progress text,
body.white-theme .dial-score-text {
  fill: #1a1a1a !important; /* Dark grey for SVG text */
  filter: none !important; /* Remove glow effect */
}

/* Fix: Any circular score containers with inline dark radial gradients should be white in light theme */
body.white-theme div[style*="border-radius: 50%"] {
  background: #ffffff !important;
  /* Tone down heavy glows that look odd on white backgrounds */
  box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
}

/* Fix: Neutralize inline dark radial gradients inside sections for light theme */
body.white-theme .section [style*="background: radial-gradient"][style*="rgba(0,0,0"] {
  background: #ffffff !important;
}

/* Simple outline icons - light grey for light mode */
body.white-theme a svg {
  stroke: #6c757d !important; /* Medium grey outline icons */
}

body.white-theme a:hover svg {
  stroke: #00994d !important; /* Green on hover */
}

/* Status symbols (✓, ✗, ⚠) - appropriate colors for light mode */
body.white-theme span[style*="color: #00ff41"],
body.white-theme span[style*="color:#00ff41"] {
  color: #00994d !important; /* Accessible green for checkmarks */
}

body.white-theme span[style*="color: #ff4444"],
body.white-theme span[style*="color:#ff4444"] {
  color: #c92a2a !important; /* Accessible red for X marks */
}

body.white-theme span[style*="color: #ffa500"],
body.white-theme span[style*="color:#ffa500"] {
  color: #d97706 !important; /* Accessible orange for warnings */
}

body.white-theme .score-banner [style*="font-size: 0.9rem"] {
  color: #495057 !important; /* Readable gray for labels */
  opacity: 1 !important;
  font-weight: 600 !important;
}

/* Summary stats area */
body.white-theme .score-banner [style*="background: rgba(255, 255, 255, 0.2)"] {
  background: #e8f5e9 !important;
}

/* Chart containers */
body.white-theme .chart-container,
body.white-theme .section {
  background: #ffffff !important;
  color: #000000 !important;
  border: 2px solid #d0d0d0 !important;
}

body.white-theme .chart-title,
body.white-theme .chart-subtitle {
  color: #000000 !important;
}

/* Tables in results */
body.white-theme table {
  background: #ffffff !important;
  border: 2px solid #d0d0d0 !important;
}

body.white-theme thead {
  background: #f5f5f5 !important;
}

body.white-theme thead th {
  color: #000000 !important;
  font-weight: 700 !important;
  border-bottom: 2px solid #d0d0d0 !important;
}

body.white-theme tbody tr {
  background: #ffffff !important;
  border-bottom: 2px solid #d0d0d0 !important;
}

body.white-theme tbody tr:nth-child(even) {
  background: #f9f9f9 !important;
}

body.white-theme tbody td {
  color: #1a1a1a !important;
  padding: 0.75rem !important;
}

/* Chart legend improvements */
body.white-theme .chart-legend,
body.white-theme [class*="legend"] {
  background: #ffffff !important;
  border: 2px solid #e0e0e0 !important;
  padding: 1rem !important;
  border-radius: 8px !important;
}

body.white-theme .chart-legend span,
body.white-theme [class*="legend"] span,
body.white-theme .chart-legend div,
body.white-theme [class*="legend"] div {
  color: #000000 !important;
  font-weight: 600 !important;
  font-size: 0.95rem !important;
}

/* Chart.js legend items */
body.white-theme canvas + div,
body.white-theme .chartjs-legend,
body.white-theme #legend {
  color: #000000 !important;
}

body.white-theme .chartjs-legend li,
body.white-theme #legend li {
  color: #000000 !important;
  font-weight: 600 !important;
  margin: 0.5rem 0 !important;
}

body.white-theme .section {
  background-color: #ffffff !important;
  color: #000000 !important;
  border-color: #dddddd !important;
}

body.white-theme .findings-table {
  background-color: #ffffff !important;
  color: #000000 !important;
  border-color: #ddd !important;
}

body.white-theme .findings-table thead th {
  background-color: #f0f0f0 !important;
  color: #000000 !important;
  border-color: #ddd !important;
}

body.white-theme .findings-table tbody tr:hover {
  background-color: #f8f8f8 !important;
}

body.white-theme .findings-table tbody td {
  color: var(--text-secondary) !important;
  border-color: #eeeeee !important;
}

body.white-theme .theme-toggle {
  background: #f0f0f0 !important;
  color: #333 !important;
  border-color: #ccc !important;
}

body.white-theme .theme-toggle:hover {
  background: #e0e0e0 !important;
  border-color: #aaa !important;
}

/* Fix score cards and health indicators in white theme */
body.white-theme .score-card {
  background-color: #f8f8f8 !important;
  border-color: #dddddd !important;
}

body.white-theme .score-card:hover {
  border-color: #bbbbbb !important;
}

body.white-theme .health-item {
  background-color: #f8f8f8 !important;
  border-color: #dddddd !important;
}

/* SEO Analyzer light mode styles */
body.white-theme .score-grid > div {
  background: rgba(37, 99, 235, 0.05) !important;
  border: 1px solid rgba(37, 99, 235, 0.2) !important;
}

body.white-theme .seo-summary {
  background-color: #f8f8f8 !important;
  border-color: #dddddd !important;
}

body.white-theme .stat-item {
  color: var(--text-secondary) !important;
}

body.white-theme .stat-value {
  color: #2563eb !important;
}

body.white-theme .stat-label {
  color: var(--text-tertiary) !important;
}

/* Light mode table styles */
body.white-theme .seo-table thead tr {
  border-bottom-color: rgba(37, 99, 235, 0.5) !important;
}

body.white-theme .seo-table thead th {
  color: #2563eb !important;
  background: rgba(37, 99, 235, 0.08) !important;
}

body.white-theme .seo-table tbody tr {
  border-bottom-color: rgba(37, 99, 235, 0.15) !important;
}

body.white-theme .seo-table tbody tr:nth-child(odd) {
  background: rgba(37, 99, 235, 0.03) !important;
}

body.white-theme .seo-table tbody td {
  color: var(--text-secondary) !important;
}

body.white-theme .score-card-label {
  color: var(--text-tertiary) !important;
}

/* Enhanced score display light mode */
body.white-theme div[style*="linear-gradient(135deg, rgba(0,255,65"] {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.08) 0%, rgba(37, 99, 235, 0.03) 100%) !important;
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.15) !important;
}

body.white-theme .health-summary {
  background-color: #f8f8f8 !important;
  border-color: #dddddd !important;
}

body.white-theme .health-summary h3 {
  color: var(--text-secondary) !important;
}

/* Fix any remaining black boxes in white theme */
body.white-theme div[style*="background: #000"],
body.white-theme div[style*="background-color: #000"],
body.white-theme span[style*="background: #000"],
body.white-theme span[style*="background-color: #000"],
body.white-theme div[style*="background: #111"],
body.white-theme div[style*="background-color: #111"],
body.white-theme div[style*="background: var(--bg-input)"],
body.white-theme div[style*="background-color: var(--bg-input)"],
body.white-theme div[style*="background: #1a0000"],
body.white-theme div[style*="background-color: #1a0000"],
body.white-theme div[style*="background: #110000"],
body.white-theme div[style*="background-color: #110000"],
body.white-theme div[style*="background: #220000"],
body.white-theme div[style*="background-color: #220000"],
body.white-theme pre[style*="background: #110000"],
body.white-theme pre[style*="background-color: #110000"],
body.white-theme div[style*="background: #0f0f0f"],
body.white-theme div[style*="background-color: #0f0f0f"],
body.white-theme div[style*="background: #000000"],
body.white-theme div[style*="background-color: #000000"],
body.white-theme div[style*="background: #1a1a1a"],
body.white-theme div[style*="background-color: #1a1a1a"],
body.white-theme pre,
body.white-theme code {
  background: #f8f8f8 !important;
  color: #000000 !important;
  border-color: #ddd !important;
}

/* Fix font display containers specifically */
body.white-theme #systemFontsDisplay > div,
body.white-theme #webFontsDisplay > div,
body.white-theme #googleFontsDisplay > div,
body.white-theme #iconFontsDisplay > div {
  background: #f8f8f8 !important;
  color: #000000 !important;
  border: 1px solid #ddd !important;
}

/* Fix font preview text within containers */
body.white-theme #systemFontsDisplay div[style*="color: #888"],
body.white-theme #webFontsDisplay div[style*="color: #888"],
body.white-theme #googleFontsDisplay div[style*="color: #888"],
body.white-theme #iconFontsDisplay div[style*="color: #888"] {
  color: var(--text-tertiary) !important;
}

/* Fix icon font green text */
body.white-theme div[style*="color: var(--accent-primary)"] {
  color: #059669 !important;
}

/* Fix performance summary boxes for white theme */
body.white-theme .performance-summary {
  color: #000000 !important;
}

body.white-theme .performance-summary.success {
  background-color: #f0fdf4 !important;
  border-left-color: #22c55e !important;
}

body.white-theme .performance-summary.warning {
  background-color: #fffbeb !important;
  border-left-color: #f59e0b !important;
}

body.white-theme .performance-summary.critical {
  background-color: #fef2f2 !important;
  border-left-color: #ef4444 !important;
}

body.white-theme .font-preview {
  background-color: #f8f8f8 !important;
  border-color: #ddd !important;
}

body.white-theme .font-preview-text {
  color: #000000 !important;
}

/* Fix Font Loading Architecture section in white theme */
/* Font Loading Architecture - Light Mode */
body.white-theme .font-loading-architecture {
  background: #ffffff !important;
  border-color: #dee2e6 !important;
}

/* Override inline dark background */
body.white-theme .font-loading-architecture[style*="background: #0a0a0a"] {
  background: #ffffff !important;
}

/* Replace dark blue gradient header with light gradient */
body.white-theme .font-loading-architecture div[style*="background: linear-gradient"] {
  background: linear-gradient(90deg, #f1f3f5, #e9ecef, #f1f3f5) !important;
  border-bottom-color: #dee2e6 !important;
}

/* Make header title dark and readable in light mode */
body.white-theme .font-loading-architecture h4 {
  color: #1a1a1a !important;
}

/* All text in gradient header should be dark */
body.white-theme .font-loading-architecture div[style*="background: linear-gradient"] * {
  color: #1a1a1a !important;
}

/* Secondary text (uppercase labels) */
body.white-theme .font-loading-architecture div[style*="color: #888"],
body.white-theme .font-loading-architecture div[style*="color: #aaa"] {
  color: #495057 !important;
}

/* Metric boxes - adjust backgrounds and text */
body.white-theme .font-loading-architecture div[style*="background: rgba(0, 255, 65"] {
  background: rgba(0, 153, 77, 0.1) !important;
  border-color: #00994d !important;
}

body.white-theme .font-loading-architecture div[style*="background: rgba(245, 158, 11"] {
  background: rgba(217, 119, 6, 0.1) !important;
  border-color: #d97706 !important;
}

/* Metric values - keep colored but ensure readability */
body.white-theme .font-loading-architecture div[style*="background: rgba(0, 255, 65"] div[style*="color: #00ff41"] {
  color: #00994d !important;
}

body.white-theme .font-loading-architecture div[style*="color: #00ff41"] {
  color: #00994d !important;
}

/* Table styling */
body.white-theme .font-loading-architecture .font-sources-table {
  background: #ffffff !important;
}

body.white-theme .font-loading-architecture .font-sources-header {
  background: #f1f3f5 !important;
}

body.white-theme .font-loading-architecture .font-sources-th {
  color: #1a1a1a !important;
  background: #f1f3f5 !important;
  border-color: #dee2e6 !important;
}

body.white-theme .font-loading-architecture td {
  color: #1a1a1a !important;
  border-color: #dee2e6 !important;
  background: #ffffff !important;
}

body.white-theme .font-loading-architecture tr {
  border-bottom-color: #dee2e6 !important;
}

/* Font source labels and descriptions */
body.white-theme .font-loading-architecture td div[style*="font-weight: bold"] {
  color: #1a1a1a !important;
}

body.white-theme .font-loading-architecture td div[style*="font-size: 0.8rem"] {
  color: #495057 !important;
}

/* Override any remaining dark backgrounds */
body.white-theme .font-loading-architecture div[style*="background: #111"],
body.white-theme .font-loading-architecture div[style*="background: var(--bg-input)"],
body.white-theme .font-loading-architecture div[style*="background: #0a0a0a"] {
  background: #f8f9fa !important;
  border-color: #dee2e6 !important;
}

/* WCAG Compliance Tables - Light Mode */
body.white-theme .wcag-compliance-table thead tr,
body.white-theme .wcag-requirements-table thead tr {
  background: #f1f3f5 !important;
  border-bottom-color: #dee2e6 !important;
}

body.white-theme .wcag-compliance-table th,
body.white-theme .wcag-requirements-table th {
  color: #1a1a1a !important;
  border-color: #dee2e6 !important;
  background: #f1f3f5 !important;
}

body.white-theme .wcag-compliance-table td,
body.white-theme .wcag-requirements-table td {
  color: #1a1a1a !important;
  border-color: #dee2e6 !important;
  background: #ffffff !important;
}

body.white-theme .wcag-compliance-table tbody tr,
body.white-theme .wcag-requirements-table tbody tr {
  border-bottom-color: #dee2e6 !important;
}

/* Override inline dark backgrounds in table headers */
body.white-theme table[style*="border-collapse"] thead tr[style*="background: #1a1a1a"] {
  background: #f1f3f5 !important;
}

body.white-theme table[style*="border-collapse"] th[style*="color: #fff"] {
  color: #1a1a1a !important;
}

/* Improvement Priority Section - Light Mode */
body.white-theme .improvement-priority-section {
  background: #ffffff !important;
  border-width: 1px !important;
}

body.white-theme .improvement-priority-section .priority-label {
  color: #1a1a1a !important;
}

body.white-theme .improvement-priority-section .priority-description {
  color: #495057 !important;
  background: #f8f9fa !important;
}

/* Analysis Tables - Light Mode (Font Categories, Readability, Font Size, Mobile Accessibility) */
body.white-theme table.analysis-table {
  background: #ffffff !important;
  border-color: #dee2e6 !important;
}

body.white-theme table.analysis-table thead tr {
  background: #f1f3f5 !important;
  border-bottom-color: #dee2e6 !important;
}

body.white-theme table.analysis-table th {
  color: #1a1a1a !important;
  border-color: #dee2e6 !important;
  background: #f1f3f5 !important;
}

body.white-theme table.analysis-table td {
  color: #1a1a1a !important;
  border-color: #dee2e6 !important;
  background: #ffffff !important;
}

body.white-theme table.analysis-table tbody tr {
  border-bottom-color: #dee2e6 !important;
}

/* Font Status Badges - Light Mode (GOOGLE, FALLBACK, SYSTEM, LOADED) */
body.white-theme span[style*="background: #1a3d5c"] {
  /* GOOGLE badge - keep dark blue but ensure white text */
  background: #1e40af !important;
  color: #ffffff !important;
}

body.white-theme span[style*="background: #4d3a1a"] {
  /* FALLBACK badge - keep brown but ensure white text */
  background: #92400e !important;
  color: #ffffff !important;
}

body.white-theme span[style*="background: #1a4d1a"] {
  /* SYSTEM badge - keep green but ensure readable text */
  background: #166534 !important;
  color: #ffffff !important;
}

body.white-theme span[style*="background: #2d1a4d"] {
  /* LOADED badge - keep purple but ensure white text */
  background: #6d28d9 !important;
  color: #ffffff !important;
}

/* Section Headings (Font Categories, Readability Assessment, etc.) */
body.white-theme h4[style*="color: #4A9EFF"] {
  color: #1e40af !important;
}

body.white-theme .font-group {
  background-color: #fafafa !important;
  border-color: #ddd !important;
}

body.white-theme .font-weight {
  background-color: #f0f0f0 !important;
  color: #000000 !important;
}

/* Override table backgrounds in white theme */
body.white-theme .findings-table {
  background-color: var(--text-primary) !important;
  border-color: #ddd !important;
}

body.white-theme .findings-table thead th {
  background-color: #f0f0f0 !important;
  color: #000000 !important;
  border-color: #ddd !important;
}

body.white-theme .findings-table tbody tr:hover {
  background-color: #f8f8f8 !important;
}

/* Override all metric containers, analysis sections, and error displays */
body.white-theme .readability-metrics,
body.white-theme .font-size-metrics,
body.white-theme .screen-reader-metrics,
body.white-theme .wcag-compliance,
body.white-theme .error-display {
  background-color: #f8f8f8 !important;
  color: #000000 !important;
  border-color: #ddd !important;
}

/* Ensure all text is readable in white theme */
body.white-theme p,
body.white-theme span,
body.white-theme div {
  color: #000000 !important;
}

/* Progress and loading styles */
.animate-pulse {
  animation: progressGlow 2s cubic-bezier(0.4, 0, 0.6, 1) infinite alternate !important;
  color: var(--text-primary) !important;
  text-shadow: 0 0 5px rgba(0, 255, 20, 0.5) !important;
}

@keyframes progressGlow {
  from {
    text-shadow: 0 0 5px rgba(0, 255, 20, 0.5) !important;
  }
  to {
    text-shadow: 0 0 10px rgba(0, 255, 20, 0.8), 0 0 15px rgba(0, 255, 20, 0.6) !important;
  }
}

#loadingMessage {
  border: 3px solid #00ff41 !important;
  background: linear-gradient(135deg, #001a00 0%, #002200 100%) !important;
  color: var(--text-primary) !important;
  padding: 2.5rem !important;
  margin: 2rem 0 !important;
  border-radius: 8px !important;
  position: relative !important;
  box-shadow: 
    0 0 30px rgba(0, 255, 65, 0.5),
    inset 0 1px 0 rgba(0, 255, 65, 0.5) !important;
}

#loadingMessage h2 {
  color: var(--accent-primary) !important;
  margin-bottom: 1.5rem !important;
  text-shadow: 0 0 10px rgba(0, 255, 65, 0.5) !important;
  font-size: 1.8rem !important;
  letter-spacing: 0.05em !important;
}

#loadingMessage p {
  color: var(--text-primary) !important;
  margin-bottom: 1.5rem !important;
  line-height: 1.8 !important;
}

#loadingMessage p {
  color: #cccccc !important;
  margin-bottom: 1.5rem !important;
}

/* Enhanced Progress container */
.progress-container {
  width: 100% !important;
  height: 24px !important;
  background-color: #001a00 !important;
  border: 2px solid var(--border-accent) !important;
  border-radius: 8px !important;
  margin: 1.5rem 0 !important;
  overflow: hidden !important;
  position: relative !important;
  box-shadow: 
    inset 0 2px 8px rgba(0, 0, 0, 0.5),
    0 0 15px rgba(0, 255, 65, 0.5) !important;
}

.progress-bar {
  height: 100% !important;
  background: linear-gradient(90deg, 
    #00ff41 0%, 
    #00cc33 25%, 
    #00ff41 50%, 
    #00cc33 75%, 
    #00ff41 100%) !important;
  background-size: 200% 100% !important;
  animation: progressGradient 2s linear infinite !important;
  border-radius: 6px !important;
  width: 0% !important;
  transition: width 0.8s ease-out !important;
  box-shadow: 
    0 0 20px rgba(0, 255, 65, 0.5),
    0 0 40px rgba(0, 255, 65, 0.5),
    inset 0 1px 3px rgba(255, 255, 255, 0.3) !important;
  position: relative !important;
  overflow: visible !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* Display percentage inside progress bar */
.progress-bar::after {
  content: attr(data-progress) !important;
  position: absolute !important;
  right: 8px !important;
  color: #000 !important;
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  text-shadow: 0 0 10px var(--accent-primary) !important;
  z-index: 10 !important;
  mix-blend-mode: difference !important;
}

@keyframes progressGradient {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

/* Animated progress bar shimmer effect */
.progress-bar::before {
  content: '' !important;
  position: absolute !important;
  top: 0 !important;
  left: -100% !important;
  width: 100% !important;
  height: 100% !important;
  background: linear-gradient(90deg, 
    transparent, 
    rgba(255, 255, 255, 0.4), 
    transparent) !important;
  animation: shimmer 2s infinite !important;
}

@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* Color-coded progress bars based on score */
.progress-bar.score-excellent {
  background: linear-gradient(90deg, 
    #00ff41 0%, 
    #00ff66 50%, 
    #00ff41 100%) !important;
  box-shadow: 
    0 0 15px rgba(0, 255, 65, 0.6),
    0 0 30px rgba(0, 255, 65, 0.4),
    inset 0 1px 3px rgba(255, 255, 255, 0.3) !important;
}

.progress-bar.score-good {
  background: linear-gradient(90deg, 
    #22c55e 0%, 
    #16a34a 50%, 
    #22c55e 100%) !important;
  box-shadow: 
    0 0 15px rgba(34, 197, 94, 0.5),
    0 0 30px rgba(34, 197, 94, 0.3),
    inset 0 1px 3px rgba(255, 255, 255, 0.3) !important;
}

/* Score: 50-74% - Yellow/Amber (Poor in JS, but visually "needs improvement") */
.progress-bar.score-poor {
  background: linear-gradient(90deg, 
    #facc15 0%, 
    #eab308 50%, 
    #facc15 100%) !important;
  box-shadow: 
    0 0 15px rgba(250, 204, 21, 0.5),
    0 0 30px rgba(250, 204, 21, 0.3),
    inset 0 1px 3px rgba(255, 255, 255, 0.3) !important;
}

/* Score: 0-49% - Red (Critical) */
.progress-bar.score-critical {
  background: linear-gradient(90deg, 
    #ef4444 0%, 
    #dc2626 50%, 
    #ef4444 100%) !important;
  box-shadow: 
    0 0 15px rgba(239, 68, 68, 0.5),
    0 0 30px rgba(239, 68, 68, 0.3),
    inset 0 1px 3px rgba(255, 255, 255, 0.3) !important;
}

/* Heartbeat animation for long-running operations */
@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  10%, 30% { transform: scale(1.05); }
  20%, 40% { transform: scale(0.95); }
}

.heartbeat {
  animation: heartbeat 2s ease-in-out infinite !important;
  display: inline-block !important;
}

/* Progress text styling */
.progress-text {
  color: var(--accent-primary) !important;
  font-size: 1.1rem !important;
  margin-top: 0.75rem !important;
  font-weight: 700 !important;
  text-align: center !important;
  text-shadow: 0 0 5px rgba(0, 255, 65, 0.5) !important;
  letter-spacing: 0.05em !important;
}

/* Button active state when analyzing */
button:disabled {
  background-color: #001100 !important;
  color: #0f0f14 !important;
  border-color: #0f0f14 !important;
  cursor: not-allowed !important;
}

/* White theme loading message */
body.white-theme #loadingMessage {
  border-color: #2563eb !important;
  background-color: #f0f4ff !important;
  color: #1e40af !important;
  box-shadow: 0 0 20px rgba(37, 99, 235, 0.1) !important;
}

body.white-theme #loadingMessage h2 {
  color: #1e40af !important;
  text-shadow: none !important;
}

body.white-theme #loadingMessage p {
  color: #64748b !important;
  text-shadow: none !important;
}

body.white-theme .progress-container {
  background-color: #e0e7ff !important;
  border-color: #c7d2fe !important;
}

body.white-theme .progress-bar {
  background: linear-gradient(90deg, #2563eb, #1d4ed8, #2563eb) !important;
  background-size: 200% 100% !important;
  animation: progressGradient 2s linear infinite !important;
  /* Subtle shadow for light mode - no glow */
  box-shadow: 
    0 2px 4px rgba(37, 99, 235, 0.2),
    inset 0 1px 2px rgba(255, 255, 255, 0.5) !important;
}

/* Color-coded progress bars for light mode */
body.white-theme .progress-bar.score-excellent {
  background: linear-gradient(90deg, #059669, #047857, #059669) !important;
  box-shadow: 
    0 2px 4px rgba(5, 150, 105, 0.3),
    inset 0 1px 2px rgba(255, 255, 255, 0.5) !important;
}

body.white-theme .progress-bar.score-good {
  background: linear-gradient(90deg, #16a34a, #15803d, #16a34a) !important;
  box-shadow: 
    0 2px 4px rgba(22, 163, 74, 0.3),
    inset 0 1px 2px rgba(255, 255, 255, 0.5) !important;
}

/* Light mode: 50-74% - Yellow/Amber */
body.white-theme .progress-bar.score-poor {
  background: linear-gradient(90deg, #eab308, #ca8a04, #eab308) !important;
  box-shadow: 
    0 2px 4px rgba(234, 179, 8, 0.3),
    inset 0 1px 2px rgba(255, 255, 255, 0.5) !important;
}

/* Light mode: 0-49% - Red */
body.white-theme .progress-bar.score-critical {
  background: linear-gradient(90deg, #dc2626, #b91c1c, #dc2626) !important;
  box-shadow: 
    0 2px 4px rgba(220, 38, 38, 0.3),
    inset 0 1px 2px rgba(255, 255, 255, 0.5) !important;
}

body.white-theme .progress-text {
  color: #2563eb !important;
  text-shadow: none !important;
}

body.white-theme .animate-pulse {
  color: #1e40af !important;
  text-shadow: none !important;
  animation: none !important;
}

body.white-theme #loadingMessage div[style*="background: rgba(0, 255, 20"] {
  background: rgba(37, 99, 235, 0.1) !important;
  border: 1px solid rgba(37, 99, 235, 0.3) !important;
}

body.white-theme #loadingMessage span[style*="color: var(--accent-primary)"] {
  color: #2563eb !important;
}

/* Executive Summary Styling */
.executive-summary {
  margin-bottom: 2rem !important;
}

.summary-intro {
  margin-bottom: 2rem !important;
  padding: 1.5rem !important;
  background-color: #0f0f0f !important;
  border: 1px solid var(--border-primary) !important;
  border-radius: 6px !important;
}

.summary-description {
  font-size: 1.1rem !important;
  line-height: 1.6 !important;
  color: #cccccc !important;
  margin-bottom: 1rem !important;
}

.scan-metadata {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 1rem !important;
  margin-bottom: 1.5rem !important;
}

.scan-info {
  font-size: 0.9rem !important;
  color: #888888 !important;
  padding: 0.25rem 0.5rem !important;
  background-color: var(--bg-tertiary) !important;
  border-radius: 3px !important;
}

.performance-summary {
  padding: 1rem !important;
  border-radius: 4px !important;
  border-left: 4px solid #666666 !important;
}

.performance-summary.success {
  background-color: #003300 !important;
  border-left-color: #00ff14 !important;
}

.performance-summary.warning {
  background-color: #332200 !important;
  border-left-color: #ffd000 !important;
}

.performance-summary.critical {
  background-color: #330000 !important;
  border-left-color: var(--status-error) !important;
}

.summary-status {
  display: flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
  margin-bottom: 0.5rem !important;
  font-size: 1rem !important;
}

.status-indicator {
  width: 8px !important;
  height: 8px !important;
  border-radius: 50% !important;
  display: inline-block !important;
}

.status-indicator.success {
  background-color: #00ff14 !important;
}

.status-indicator.warning {
  background-color: #ffd000 !important;
}

.status-indicator.critical {
  background-color: var(--status-error) !important;
}

.summary-recommendations {
  display: flex !important;
  flex-direction: column !important;
  gap: 0.25rem !important;
}

.recommendation {
  font-size: 0.9rem !important;
  color: #cccccc !important;
}

/* 4-Column Executive Grid */
.executive-grid {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 1.5rem !important;
  margin-bottom: 2rem !important;
}

@media (max-width: 1024px) {
  .executive-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 640px) {
  .executive-grid {
    grid-template-columns: 1fr !important;
  }
}

.executive-card {
  background-color: var(--bg-tertiary) !important;
  border: 2px solid var(--border-primary) !important;
  border-radius: 8px !important;
  padding: 1.5rem !important;
  text-align: center !important;
  transition: all 0.3s ease !important;
  position: relative !important;
  overflow: hidden !important;
}

.executive-card:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3) !important;
}

.executive-card.health-good {
  border-color: #00ff14 !important;
  box-shadow: 0 0 15px rgba(0, 255, 20, 0.2) !important;
}

.executive-card.health-warning {
  border-color: #ffd000 !important;
  box-shadow: 0 0 15px rgba(255, 208, 0, 0.2) !important;
}

.executive-card.health-poor {
  border-color: var(--status-error) !important;
  box-shadow: 0 0 15px rgba(255, 68, 68, 0.2) !important;
}

.card-header {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.5rem !important;
  margin-bottom: 1rem !important;
}

.card-icon {
  font-size: 1.25rem !important;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(var(--accent-primary-rgb, 0, 255, 65), 0.08);
  border: 1px solid rgba(var(--accent-primary-rgb, 0, 255, 65), 0.15);
  transition: all 0.3s ease;
  margin: 0 auto 0.5rem;
}

.card-title {
  font-size: 0.9rem !important;
  font-weight: 600 !important;
  color: #cccccc !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
}

.card-score {
  margin-bottom: 1rem !important;
}

.score-value {
  font-size: 2.5rem !important;
  font-weight: 700 !important;
  color: var(--text-primary) !important;
  line-height: 1 !important;
}

.score-max {
  font-size: 1.2rem !important;
  color: #888888 !important;
  font-weight: 400 !important;
}

.card-status {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.5rem !important;
  margin-bottom: 1rem !important;
}

.status-icon {
  font-size: 1rem !important;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(var(--accent-primary-rgb, 0, 255, 65), 0.06);
  border: 1px solid rgba(var(--accent-primary-rgb, 0, 255, 65), 0.12);
  transition: all 0.3s ease;
}

.status-text {
  font-size: 0.8rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.05em !important;
}

.card-progress {
  height: 4px !important;
  background-color: var(--text-secondary) !important;
  border-radius: 2px !important;
  overflow: hidden !important;
}

.progress-fill {
  height: 100% !important;
  border-radius: 2px !important;
  transition: width 0.8s ease !important;
}

.progress-fill.health-good {
  background: linear-gradient(90deg, #00ff14, #00cc11) !important;
}

.progress-fill.health-warning {
  background: linear-gradient(90deg, #ffd000, #ffaa00) !important;
}

.progress-fill.health-poor {
  background: linear-gradient(90deg, #ff4444, #ff6666) !important;
}

/* Secondary Metrics Row */
.secondary-metrics {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 1rem !important;
  margin-top: 1.5rem !important;
}

@media (max-width: 768px) {
  .secondary-metrics {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

.metric-item {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  padding: 1rem !important;
  background-color: var(--bg-secondary) !important;
  border: 1px solid var(--border-primary) !important;
  border-radius: 4px !important;
  transition: all 0.3s ease !important;
}

.metric-item:hover {
  background-color: var(--bg-tertiary) !important;
  border-color: #444444 !important;
}

.metric-icon {
  font-size: 1.25rem !important;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(var(--accent-primary-rgb, 0, 255, 65), 0.08);
  border: 1px solid rgba(var(--accent-primary-rgb, 0, 255, 65), 0.15);
  transition: all 0.3s ease;
  margin: 0 auto 0.5rem !important;
}

.metric-label {
  font-size: 0.8rem !important;
  color: #888888 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  margin-bottom: 0.25rem !important;
}

.metric-value {
  font-size: 1.1rem !important;
  font-weight: 600 !important;
  color: var(--text-primary) !important;
}

/* White Theme Executive Summary */
body.white-theme .summary-intro {
  background-color: #f8f8f8 !important;
  border-color: #dddddd !important;
}

body.white-theme .summary-description {
  color: var(--text-secondary) !important;
}

body.white-theme .scan-info {
  color: var(--text-tertiary) !important;
  background-color: #f0f0f0 !important;
}

body.white-theme .executive-card {
  background-color: #ffffff !important;
  border-color: #dee2e6 !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05) !important;
}

body.white-theme .executive-card:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1) !important;
}

body.white-theme .executive-card.health-good {
  border-color: #00994d !important;
  box-shadow: 0 2px 8px rgba(0, 153, 77, 0.15) !important;
}

body.white-theme .executive-card.health-warning {
  border-color: #d97706 !important;
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.15) !important;
}

body.white-theme .executive-card.health-poor {
  border-color: #c92a2a !important;
  box-shadow: 0 2px 8px rgba(201, 42, 42, 0.15) !important;
}

body.white-theme .card-title {
  color: var(--text-secondary) !important;
}

body.white-theme .score-value {
  color: #1a1a1a !important; /* Very dark grey - maximum readability */
  font-weight: 700 !important;
  opacity: 1 !important;
}

body.white-theme .score-max {
  color: #495057 !important; /* Readable gray for /100 text */
  opacity: 1 !important;
}

/* Catch ANY large text in circles - super aggressive targeting */
body.white-theme [style*="border-radius: 50%"] *,
body.white-theme [style*="border-radius:50%"] * {
  color: #1a1a1a !important;
  font-weight: 700 !important;
}

body.white-theme .status-text {
  color: var(--text-secondary) !important;
}

body.white-theme .card-progress {
  background-color: var(--text-secondary) !important;
}

body.white-theme .metric-item {
  background-color: #f8f8f8 !important;
  border-color: #dddddd !important;
}

body.white-theme .metric-item:hover {
  background-color: #f0f0f0 !important;
  border-color: #cccccc !important;
}

body.white-theme .metric-label {
  color: var(--text-tertiary) !important;
}

body.white-theme .metric-value {
  color: #000000 !important;
}

body.white-theme .metric-icon {
  background: rgba(16, 185, 129, 0.06);
  border-color: rgba(16, 185, 129, 0.12);
  color: #00994d !important;
}

body.white-theme .card-icon {
  background: rgba(16, 185, 129, 0.06);
  border-color: rgba(16, 185, 129, 0.12);
  color: #00994d !important;
}

body.white-theme .status-icon {
  background: rgba(16, 185, 129, 0.06);
  border-color: rgba(16, 185, 129, 0.12);
  color: #00994d !important;
}

/* Fix status boxes for white theme */
body.white-theme .status-pass {
  background-color: rgba(34, 197, 94, 0.15) !important;
  color: #16a34a !important;
  border-color: #22c55e !important;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.3) !important;
  text-shadow: 0 0 2px rgba(34, 197, 94, 0.5) !important;
}

body.white-theme .status-fail {
  background-color: rgba(239, 68, 68, 0.15) !important;
  color: #dc2626 !important;
  border-color: #ef4444 !important;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.3) !important;
  text-shadow: 0 0 2px rgba(239, 68, 68, 0.5) !important;
}

body.white-theme .status-warning {
  background-color: rgba(234, 179, 8, 0.15) !important;
  color: #ca8a04 !important;
  border-color: #eab308 !important;
  box-shadow: 0 0 8px rgba(234, 179, 8, 0.3) !important;
  text-shadow: 0 0 2px rgba(234, 179, 8, 0.5) !important;
}

body.white-theme .status-info {
  background-color: #eff6ff !important;
  color: #2563eb !important;
  border-color: #3b82f6 !important;
  box-shadow: 0 0 5px rgba(59, 130, 246, 0.2) !important;
}

/* Audit Categories Table Styling */
.audit-categories-table {
  width: 100% !important;
  border-collapse: collapse !important;
  margin: 1rem 0 !important;
  background-color: var(--bg-secondary) !important;
  border: 1px solid var(--border-primary) !important;
  border-radius: 4px !important;
  overflow: hidden !important;
}

.audit-categories-table th {
  background-color: var(--bg-hover) !important;
  color: var(--text-primary) !important;
  padding: 1rem !important;
  text-align: left !important;
  font-weight: 600 !important;
  border-bottom: 2px solid #444444 !important;
  font-size: 0.9rem !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
}

.audit-categories-table td {
  padding: 1rem !important;
  border-bottom: 1px solid var(--border-primary)333 !important;
  color: #cccccc !important;
  vertical-align: top !important;
  font-size: 0.9rem !important;
  line-height: 1.4 !important;
}

.audit-categories-table td strong {
  color: var(--text-primary) !important;
  font-weight: 600 !important;
}

.audit-categories-table tr:hover {
  background-color: var(--bg-tertiary) !important;
}

/* White theme overrides for audit categories table */
body.white-theme .audit-categories-table {
  background-color: var(--text-primary) !important;
  border-color: #dddddd !important;
}

body.white-theme .audit-categories-table th {
  background-color: #f8f9fa !important;
  color: var(--text-secondary) !important;
  border-bottom-color: #dddddd !important;
}

body.white-theme .audit-categories-table td {
  color: #555555 !important;
  border-bottom-color: #eeeeee !important;
}

body.white-theme .audit-categories-table td strong {
  color: #000000 !important;
}

body.white-theme .audit-categories-table tr:hover {
  background-color: #f8f9fa !important;
}

/* Contrast Card Color Coding */
.contrast-card {
  transition: all 0.3s ease !important;
}

.contrast-excellent {
  border-left: 4px solid #00ff41 !important;
  box-shadow: 0 0 8px rgba(0, 255, 65, 0.5) !important;
}

.contrast-good {
  border-left: 4px solid #ffaa00 !important;
  box-shadow: 0 0 8px rgba(255, 170, 0, 0.2) !important;
}

.contrast-fair {
  border-left: 4px solid #ff6b6b !important;
  box-shadow: 0 0 8px rgba(255, 107, 107, 0.2) !important;
}

.contrast-poor {
  border-left: 4px solid #ff4444 !important;
  box-shadow: 0 0 8px rgba(255, 68, 68, 0.3) !important;
}

.contrast-unknown {
  border-left: 4px solid #666666 !important;
  box-shadow: 0 0 8px rgba(102, 102, 102, 0.2) !important;
}

/* White theme overrides for contrast cards */
body.white-theme .contrast-excellent {
  background-color: #f0fdf4 !important;
  border-color: #22c55e !important;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.15) !important;
}

body.white-theme .contrast-good {
  background-color: #fffbeb !important;
  border-color: #f59e0b !important;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.15) !important;
}

body.white-theme .contrast-fair {
  background-color: #fef2f2 !important;
  border-color: #f87171 !important;
  box-shadow: 0 0 8px rgba(248, 113, 113, 0.15) !important;
}

body.white-theme .contrast-poor {
  background-color: #fef2f2 !important;
  border-color: #ef4444 !important;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.2) !important;
}

body.white-theme .contrast-unknown {
  background-color: #f8f9fa !important;
  border-color: #6b7280 !important;
  box-shadow: 0 0 8px rgba(107, 114, 128, 0.15) !important;
}

/* Action Column Styling */
.action-cell {
  font-size: 0.85rem !important;
  line-height: 1.3 !important;
}

.action-code {
  background-color: var(--bg-tertiary) !important;
  border: 1px solid var(--border-primary) !important;
  border-radius: 4px !important;
  padding: 0.5rem !important;
  font-family: 'JetBrains Mono', 'Courier New', monospace !important;
  margin: 0.25rem 0 !important;
}

.action-code code {
  background-color: var(--bg-tertiary) !important;
  color: var(--accent-primary) !important;
  padding: 0.2rem 0.4rem !important;
  border-radius: 3px !important;
  font-size: 0.8rem !important;
  display: block !important;
  margin: 0.2rem 0 !important;
  border: 1px solid #444444 !important;
}

.action-note {
  color: #888888 !important;
  font-style: italic !important;
  font-size: 0.75rem !important;
  display: block !important;
  margin-top: 0.25rem !important;
}

/* White theme overrides for action column */
body.white-theme .action-code {
  background-color: #f8f9fa !important;
  border-color: #dee2e6 !important;
  color: var(--text-secondary) !important;
}

body.white-theme .action-code code {
  background-color: #e9ecef !important;
  color: #0d6efd !important;
  border-color: #ced4da !important;
}

body.white-theme .action-note {
  color: #6c757d !important;
}

/* Analysis Tables Styling */
.analysis-table {
  width: 100% !important;
  border-collapse: collapse !important;
  margin: 1rem 0 !important;
  font-size: 0.9rem !important;
  background-color: var(--bg-secondary) !important;
  border: 1px solid var(--border-primary) !important;
  border-radius: 4px !important;
  overflow: hidden !important;
}

.analysis-table td {
  padding: 0.75rem 1rem !important;
  border-bottom: 1px solid var(--border-primary)333 !important;
  color: #cccccc !important;
  vertical-align: middle !important;
}

.analysis-table td:first-child {
  font-weight: 600 !important;
  color: var(--text-primary) !important;
  background-color: var(--bg-tertiary) !important;
  width: 30% !important;
}

.analysis-table td:nth-child(2) {
  font-weight: 500 !important;
  width: 40% !important;
}

.analysis-table td:last-child {
  text-align: center !important;
  font-weight: bold !important;
  width: 30% !important;
}

.analysis-table tr:hover {
  background-color: var(--bg-tertiary) !important;
}

.analysis-table tr:last-child td {
  border-bottom: none !important;
}

/* Status indicators in analysis tables */
.analysis-table td:last-child {
  color: var(--accent-primary) !important;
}

.analysis-table td:contains("⚠️"),
.analysis-table td:contains("✗") {
  color: #ff6666 !important;
}

/* White theme overrides for analysis tables */
body.white-theme .analysis-table {
  background-color: var(--text-primary) !important;
  border-color: #dddddd !important;
}

body.white-theme .analysis-table td {
  color: #555555 !important;
  border-bottom-color: #eeeeee !important;
}

body.white-theme .analysis-table td:first-child {
  color: #000000 !important;
  background-color: #f8f9fa !important;
}

body.white-theme .analysis-table tr:hover {
  background-color: #f8f9fa !important;
}

body.white-theme .analysis-table td:last-child {
  color: #22c55e !important;
}

/* Section headers styling for readability sections */
.readability-metrics h4,
.font-size-metrics h4,
.screen-reader-metrics h4,
.wcag-compliance h4 {
  color: var(--accent-primary) !important;
  margin: 1.5rem 0 0.5rem 0 !important;
  font-size: 1.1rem !important;
  font-weight: 600 !important;
}

body.white-theme .readability-metrics h4,
body.white-theme .font-size-metrics h4,
body.white-theme .screen-reader-metrics h4,
body.white-theme .wcag-compliance h4 {
  color: #1e40af !important;
}

/* Font Loading Diagram Styles */
.font-loading-diagram {
  background: var(--bg-input) !important;
  border: 1px solid var(--border-primary) !important;
  padding: 2rem !important;
  margin: 1rem 0 !important;
  border-radius: 8px !important;
}

.diagram-title {
  text-align: center !important;
  color: var(--accent-primary) !important;
  margin-bottom: 2rem !important;
  font-size: 1.25rem !important;
  font-weight: 600 !important;
}

.diagram-container {
  position: relative !important;
  height: 500px !important;
  background: var(--bg-secondary) !important;
  border-radius: 8px !important;
  overflow: hidden !important;
}

.webpage-container {
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  width: 200px !important;
  height: 250px !important;
  background: linear-gradient(145deg, #1a1a1a, #2a2a2a) !important;
  border: 2px solid var(--border-accent) !important;
  border-radius: 8px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 4px 20px rgba(0, 255, 65, 0.5) !important;
  z-index: 10 !important;
}

.webpage-icon {
  color: var(--accent-primary) !important;
  font-weight: bold !important;
  margin-bottom: 1rem !important;
  font-size: 0.9rem !important;
}

.webpage-content {
  color: #888888 !important;
  font-size: 0.8em !important;
  text-align: center !important;
  line-height: 1.4 !important;
}

.webpage-count {
  margin-top: 1rem !important;
  font-size: 0.7em !important;
  color: #555555 !important;
}

.font-source {
  position: absolute !important;
  width: 140px !important;
  height: 100px !important;
  border-radius: 6px !important;
  padding: 0.75rem !important;
  transition: all 0.3s ease !important;
}

.font-source:hover {
  transform: scale(1.05) !important;
  z-index: 15 !important;
}

.system-fonts {
  top: 20px !important;
  left: 20px !important;
  background: linear-gradient(145deg, #2a1a4a, #3a2a5a) !important;
  border: 1px solid #6666ff !important;
  animation: pulse-blue 4s infinite !important;
}

.web-fonts {
  top: 20px !important;
  right: 20px !important;
  background: linear-gradient(145deg, #4a2a1a, #5a3a2a) !important;
  border: 1px solid #ff6666 !important;
  animation: pulse-red 4s infinite 1s !important;
}

.google-fonts {
  bottom: 20px !important;
  left: 20px !important;
  background: linear-gradient(145deg, #1a4a2a, #2a5a3a) !important;
  border: 1px solid #66ff66 !important;
  animation: pulse-green 4s infinite 2s !important;
}

.icon-fonts {
  bottom: 20px !important;
  right: 20px !important;
  background: linear-gradient(145deg, #4a4a1a, #5a5a2a) !important;
  border: 1px solid #ffff66 !important;
  animation: pulse-yellow 4s infinite 3s !important;
}

.source-header {
  display: flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
  margin-bottom: 0.5rem !important;
}

.source-icon {
  font-size: 0.8em !important;
}

.source-title {
  font-weight: bold !important;
  font-size: 0.75em !important;
}

.system-fonts .source-title {
  color: #6666ff !important;
}

.web-fonts .source-title {
  color: #ff6666 !important;
}

.google-fonts .source-title {
  color: #66ff66 !important;
}

.icon-fonts .source-title {
  color: #ffff66 !important;
}

.source-content {
  color: #aaaaaa !important;
  font-size: 0.7em !important;
  line-height: 1.3 !important;
}

.source-count {
  margin-top: 0.25rem !important;
  font-weight: 500 !important;
}

.connection-lines {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  pointer-events: none !important;
  z-index: 5 !important;
}

.loading-stats {
  position: absolute !important;
  top: 10px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  background: rgba(0, 0, 0, 0.8) !important;
  padding: 0.5rem 1rem !important;
  border-radius: 4px !important;
  color: #888888 !important;
  font-size: 0.7em !important;
  display: flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
}

.performance-icon {
  color: var(--accent-primary) !important;
}

.diagram-legend {
  display: flex !important;
  justify-content: center !important;
  gap: 2rem !important;
  margin-top: 1.5rem !important;
  font-size: 0.8em !important;
  flex-wrap: wrap !important;
}

.legend-item {
  display: flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
}

.legend-color {
  width: 12px !important;
  height: 12px !important;
  border-radius: 2px !important;
  display: inline-block !important;
}

.system-legend {
  color: #6666ff !important;
}

.system-legend .legend-color {
  background: #6666ff !important;
}

.web-legend {
  color: #ff6666 !important;
}

.web-legend .legend-color {
  background: #ff6666 !important;
}

.google-legend {
  color: #66ff66 !important;
}

.google-legend .legend-color {
  background: #66ff66 !important;
}

.icon-legend {
  color: #ffff66 !important;
}

.icon-legend .legend-color {
  background: #ffff66 !important;
}

/* Pulse Animations */
@keyframes pulse-blue {
  0%, 100% { box-shadow: 0 0 5px rgba(102, 102, 255, 0.5); }
  50% { box-shadow: 0 0 20px rgba(102, 102, 255, 0.8), 0 0 30px rgba(102, 102, 255, 0.6); }
}

@keyframes pulse-red {
  0%, 100% { box-shadow: 0 0 5px rgba(255, 102, 102, 0.5); }
  50% { box-shadow: 0 0 20px rgba(255, 102, 102, 0.8), 0 0 30px rgba(255, 102, 102, 0.6); }
}

@keyframes pulse-green {
  0%, 100% { box-shadow: 0 0 5px rgba(102, 255, 102, 0.5); }
  50% { box-shadow: 0 0 20px rgba(102, 255, 102, 0.8), 0 0 30px rgba(102, 255, 102, 0.6); }
}

@keyframes pulse-yellow {
  0%, 100% { box-shadow: 0 0 5px rgba(255, 255, 102, 0.5); }
  50% { box-shadow: 0 0 20px rgba(255, 255, 102, 0.8), 0 0 30px rgba(255, 255, 102, 0.6); }
}

/* Light Mode Overrides for Font Loading Diagram */
body.white-theme .font-loading-diagram {
  background: #f8f9fa !important;
  border: 1px solid #dee2e6 !important;
}

body.white-theme .diagram-title {
  color: #1e40af !important;
}

body.white-theme .diagram-container {
  background: #ffffff !important;
  border: 1px solid #e5e7eb !important;
}

body.white-theme .webpage-container {
  background: linear-gradient(145deg, #f1f5f9, #e2e8f0) !important;
  border: 2px solid #1e40af !important;
  box-shadow: 0 4px 20px rgba(30, 64, 175, 0.2) !important;
}

body.white-theme .webpage-icon {
  color: #1e40af !important;
}

body.white-theme .webpage-content {
  color: #4b5563 !important;
}

body.white-theme .webpage-count {
  color: #6b7280 !important;
}

body.white-theme .system-fonts {
  background: linear-gradient(145deg, #e0e7ff, #c7d2fe) !important;
  border: 1px solid #3730a3 !important;
}

body.white-theme .web-fonts {
  background: linear-gradient(145deg, #fef2f2, #fecaca) !important;
  border: 1px solid #dc2626 !important;
}

body.white-theme .google-fonts {
  background: linear-gradient(145deg, #f0fdf4, #bbf7d0) !important;
  border: 1px solid #16a34a !important;
}

body.white-theme .icon-fonts {
  background: linear-gradient(145deg, #fefce8, #fef08a) !important;
  border: 1px solid #ca8a04 !important;
}

body.white-theme .system-fonts .source-title {
  color: #3730a3 !important;
}

body.white-theme .web-fonts .source-title {
  color: #dc2626 !important;
}

body.white-theme .google-fonts .source-title {
  color: #16a34a !important;
}

body.white-theme .icon-fonts .source-title {
  color: #ca8a04 !important;
}

body.white-theme .source-content {
  color: #4b5563 !important;
}

body.white-theme .loading-stats {
  background: rgba(255, 255, 255, 0.9) !important;
  color: #4b5563 !important;
  border: 1px solid #e5e7eb !important;
}

body.white-theme .performance-icon {
  color: #16a34a !important;
}

body.white-theme .system-legend {
  color: #3730a3 !important;
}

body.white-theme .system-legend .legend-color {
  background: #3730a3 !important;
}

body.white-theme .web-legend {
  color: #dc2626 !important;
}

body.white-theme .web-legend .legend-color {
  background: #dc2626 !important;
}

body.white-theme .google-legend {
  color: #16a34a !important;
}

body.white-theme .google-legend .legend-color {
  background: #16a34a !important;
}

body.white-theme .icon-legend {
  color: #ca8a04 !important;
}

body.white-theme .icon-legend .legend-color {
  background: #ca8a04 !important;
}

/* Enhanced Font Loading Architecture Styles */
.font-loading-architecture {
  padding: 0 !important;
}

.architecture-intro {
  margin-bottom: 2rem !important;
}

.architecture-intro h3 {
  color: var(--accent-primary) !important;
  margin-bottom: 0.5rem !important;
  font-size: 1.5rem !important;
}

.architecture-intro p {
  color: #888888 !important;
  font-size: 0.95rem !important;
  line-height: 1.6 !important;
}

.enhanced-font-diagram {
  background: var(--bg-input) !important;
  border: 1px solid var(--border-primary) !important;
  border-radius: 12px !important;
  padding: 2rem !important;
  margin: 1.5rem 0 !important;
}

.diagram-header {
  margin-bottom: 2rem !important;
}

.diagram-metrics {
  display: flex !important;
  justify-content: center !important;
  gap: 3rem !important;
  flex-wrap: wrap !important;
}

.metric-item {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 0.25rem !important;
}

.metric-label {
  color: #888888 !important;
  font-size: 0.8rem !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
}

.metric-value {
  color: var(--accent-primary) !important;
  font-size: 1.25rem !important;
  font-weight: 600 !important;
}

.diagram-canvas {
  position: relative !important;
  height: 650px !important;
  background: var(--bg-secondary) !important;
  border-radius: 8px !important;
  margin: 2rem 0 !important;
  overflow: hidden !important;
}

.webpage-hub {
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  width: 220px !important;
  height: 260px !important;
  background: linear-gradient(145deg, #1a1a2e, #16213e) !important;
  border: 3px solid #00ff41 !important;
  border-radius: 16px !important;
  padding: 1rem !important;
  box-shadow: 
    0 20px 40px rgba(0, 255, 65, 0.5),
    0 0 0 1px var(--bg-hover),
    inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
  z-index: 20 !important;
  -webkit-backdrop-filter: blur(10px) !important;
  backdrop-filter: blur(10px) !important;
}

.hub-header {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.75rem !important;
  margin-bottom: 1.5rem !important;
  padding: 0.75rem !important;
  background: rgba(0, 255, 65, 0.5) !important;
  border-radius: 8px !important;
  border: 1px solid rgba(0, 255, 65, 0.5) !important;
}

.hub-icon {
  font-size: 1.5rem;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(var(--accent-primary-rgb, 0, 255, 65), 0.08);
  border: 1px solid rgba(var(--accent-primary-rgb, 0, 255, 65), 0.15);
  transition: all 0.3s ease;
}

.hub-title {
  color: var(--accent-primary) !important;
  font-weight: bold !important;
  font-size: 1.1rem !important;
  letter-spacing: 2px !important;
  text-shadow: 0 0 10px rgba(0, 255, 65, 0.5) !important;
}

.font-usage {
  margin-bottom: 1.5rem !important;
}

.usage-item {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  margin: 0.75rem 0 !important;
  padding: 0.6rem !important;
  background: linear-gradient(90deg, var(--bg-hover), rgba(255, 255, 255, 0.02)) !important;
  border-radius: 6px !important;
  border-left: 3px solid #00ff41 !important;
  transition: all 0.2s ease !important;
}

.usage-item:hover {
  background: linear-gradient(90deg, rgba(0, 255, 65, 0.5), rgba(0, 255, 65, 0.5)) !important;
  transform: translateX(2px) !important;
}

.usage-type {
  color: #888888 !important;
  font-size: 0.85rem !important;
  font-weight: 500 !important;
}

.usage-font {
  color: var(--accent-primary) !important;
  font-size: 0.85rem !important;
  font-weight: 600 !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5) !important;
}

.usage-font {
  color: var(--accent-primary) !important;
  font-size: 0.8rem !important;
  font-weight: 500 !important;
}

.hub-stats {
  display: flex !important;
  gap: 1rem !important;
  justify-content: center !important;
}

.stat-badge {
  background: rgba(0, 255, 65, 0.5) !important;
  color: var(--accent-primary) !important;
  padding: 0.25rem 0.75rem !important;
  border-radius: 12px !important;
  font-size: 0.75rem !important;
  font-weight: 500 !important;
  border: 1px solid rgba(0, 255, 65, 0.5) !important;
}

.load-time {
  background: rgba(245, 158, 11, 0.1) !important;
  color: #f59e0b !important;
  border-color: rgba(245, 158, 11, 0.3) !important;
}

.font-source {
  position: absolute !important;
  width: 145px !important;
  height: 115px !important;
  border-radius: 8px !important;
  padding: 0.75rem !important;
  transition: all 0.3s ease !important;
  -webkit-backdrop-filter: blur(10px) !important;
  backdrop-filter: blur(10px) !important;
}

.font-source:hover {
  transform: scale(1.05) !important;
  z-index: 25 !important;
}

.enhanced-system {
  top: 15px !important;
  left: 15px !important;
  width: 160px !important;
  height: 130px !important;
  background: linear-gradient(145deg, rgba(99, 102, 241, 0.2), rgba(79, 70, 229, 0.3)) !important;
  border: 2px solid #6366f1 !important;
  box-shadow: 0 8px 32px rgba(99, 102, 241, 0.2) !important;
  padding: 0.8rem !important;
  box-sizing: border-box !important;
}

.enhanced-web {
  top: 15px !important;
  right: 15px !important;
  width: 160px !important;
  height: 130px !important;
  background: linear-gradient(145deg, rgba(239, 68, 68, 0.2), rgba(220, 38, 38, 0.3)) !important;
  border: 2px solid #ef4444 !important;
  box-shadow: 0 8px 32px rgba(239, 68, 68, 0.2) !important;
  padding: 0.8rem !important;
  box-sizing: border-box !important;
}

.enhanced-google {
  bottom: 15px !important;
  left: 15px !important;
  width: 160px !important;
  height: 130px !important;
  background: linear-gradient(145deg, rgba(34, 197, 94, 0.2), rgba(22, 163, 74, 0.3)) !important;
  border: 2px solid #22c55e !important;
  box-shadow: 0 8px 32px rgba(34, 197, 94, 0.2) !important;
  padding: 0.8rem !important;
  box-sizing: border-box !important;
}

.enhanced-icon {
  bottom: 15px !important;
  right: 15px !important;
  width: 160px !important;
  height: 130px !important;
  background: linear-gradient(145deg, rgba(245, 158, 11, 0.2), rgba(217, 119, 6, 0.3)) !important;
  border: 2px solid #f59e0b !important;
  box-shadow: 0 8px 32px rgba(245, 158, 11, 0.2) !important;
  padding: 0.8rem !important;
  box-sizing: border-box !important;
}

.source-indicator {
  position: absolute !important;
  top: -8px !important;
  right: -8px !important;
  width: 16px !important;
  height: 16px !important;
  border-radius: 50% !important;
  animation: pulse-indicator 2s infinite !important;
}

.system-indicator {
  background: #6366f1 !important;
}

.web-indicator {
  background: #ef4444 !important;
}

.google-indicator {
  background: #22c55e !important;
}

.icon-indicator {
  background: #f59e0b !important;
}

.source-icon-container {
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
  margin-right: 0.75rem !important;
}

.source-status {
  position: absolute !important;
  top: -4px !important;
  right: -4px !important;
  width: 8px !important;
  height: 8px !important;
  border-radius: 50% !important;
}

.source-status.online {
  background: #22c55e !important;
}

.source-status.loading {
  background: #f59e0b !important;
  animation: blink 1.5s infinite !important;
}

.source-status.cached {
  background: #3b82f6 !important;
}

/* Fix content overflow and border overlapping issues */
.enhanced-system, .enhanced-web, .enhanced-google, .enhanced-icon {
  overflow: hidden !important;
  position: relative !important;
  z-index: 1 !important;
}

.source-header {
  position: relative !important;
  z-index: 2 !important;
  padding: 0 !important;
  margin: 0 0 0.5rem 0 !important;
}

.source-details {
  position: relative !important;
  z-index: 2 !important;
  padding: 0 !important;
  margin: 0 !important;
}

.font-list {
  margin: 0 0 0.5rem 0 !important;
  padding: 0 !important;
}

.font-item {
  font-size: 0.7rem !important;
  padding: 0.2rem 0.4rem !important;
  margin: 0.1rem 0 !important;
  border-radius: 3px !important;
  background: var(--bg-hover) !important;
  border-left: 2px solid currentColor !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  line-height: 1.2 !important;
}

.source-metrics {
  padding: 0.3rem !important;
  margin: 0 !important;
  border-radius: 3px !important;
  background: var(--bg-hover) !important;
}

.metric {
  font-size: 0.65rem !important;
  line-height: 1.1 !important;
  margin: 0.1rem 0 !important;
  padding: 0 !important;
}

.source-title {
  font-size: 0.75rem !important;
  line-height: 1.2 !important;
  margin: 0 !important;
  padding: 0 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.source-subtitle {
  font-size: 0.6rem !important;
  line-height: 1.1 !important;
  margin: 0 !important;
  padding: 0 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.font-weight, .font-format, .font-weights, .icon-count {
  font-size: 0.6rem !important;
  opacity: 0.8 !important;
  margin-left: 0.3rem !important;
}

.source-info {
  display: flex !important;
  flex-direction: column !important;
}

.source-title {
  font-weight: bold !important;
  font-size: 0.8rem !important;
  letter-spacing: 0.5px !important;
}

.source-subtitle {
  font-size: 0.65rem !important;
  opacity: 0.7 !important;
  margin-top: 0.2rem !important;
}

.enhanced-system .source-title {
  color: #6366f1 !important;
}

.enhanced-web .source-title {
  color: #ef4444 !important;
}

.enhanced-google .source-title {
  color: #22c55e !important;
}

.enhanced-icon .source-title {
  color: #f59e0b !important;
}

.source-details {
  margin-top: 1rem !important;
}

.font-list {
  margin-bottom: 0.75rem !important;
}

.font-item {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  margin: 0.3rem 0 !important;
  padding: 0.25rem 0.4rem !important;
  background: var(--bg-hover) !important;
  border-radius: 3px !important;
  font-size: 0.7rem !important;
  color: #cccccc !important;
}

.font-weight,
.font-format,
.font-weights,
.icon-count {
  font-size: 0.65rem !important;
  opacity: 0.8 !important;
  font-weight: 500 !important;
}

.source-metrics {
  display: flex !important;
  justify-content: space-between !important;
  margin-top: 0.4rem !important;
}

.metric {
  font-size: 0.6rem !important;
  color: #888888 !important;
  text-align: center !important;
}

.connection-network {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  pointer-events: none !important;
  z-index: 15 !important;
}

.connection-label {
  font-family: 'JetBrains Mono', monospace !important;
  font-weight: 500 !important;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8) !important;
}

.enhanced-legend {
  margin-top: 2rem !important;
  padding-top: 2rem !important;
  border-top: 1px solid #333333 !important;
}

.legend-performance {
  display: flex !important;
  justify-content: center !important;
  margin-bottom: 1.5rem !important;
}

.performance-indicator {
  display: flex !important;
  align-items: center !important;
  gap: 1rem !important;
  background: rgba(0, 255, 65, 0.5) !important;
  padding: 0.75rem 1.5rem !important;
  border-radius: 8px !important;
  border: 1px solid rgba(0, 255, 65, 0.5) !important;
}

.indicator-icon {
  font-size: 1.2rem !important;
  color: var(--accent-primary) !important;
}

.indicator-text {
  color: #cccccc !important;
  font-size: 0.9rem !important;
}

.indicator-rating {
  font-weight: 600 !important;
  font-size: 0.9rem !important;
}

.legend-sources {
  display: flex !important;
  justify-content: center !important;
  gap: 2rem !important;
  flex-wrap: wrap !important;
}

.legend-source {
  display: flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
  font-size: 0.8rem !important;
}

.source-dot {
  width: 10px !important;
  height: 10px !important;
  border-radius: 50% !important;
  display: inline-block !important;
}

.legend-source.system {
  color: #6366f1 !important;
}

.legend-source.system .source-dot {
  background: #6366f1 !important;
}

.legend-source.web {
  color: #ef4444 !important;
}

.legend-source.web .source-dot {
  background: #ef4444 !important;
}

.legend-source.google {
  color: #22c55e !important;
}

.legend-source.google .source-dot {
  background: #22c55e !important;
}

.legend-source.icon {
  color: #f59e0b !important;
}

.legend-source.icon .source-dot {
  background: #f59e0b !important;
}

/* Loading Insights Styles */
.loading-insights-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) !important;
  gap: 1.5rem !important;
  margin: 1.5rem 0 !important;
}

.insight-card {
  background: var(--bg-tertiary) !important;
  border: 1px solid var(--border-primary) !important;
  border-radius: 8px !important;
  padding: 1.5rem !important;
  transition: all 0.3s ease !important;
}

.insight-card:hover {
  transform: translateY(-4px) !important;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3) !important;
}

.insight-header {
  display: flex !important;
  align-items: center !important;
  gap: 0.75rem !important;
  margin-bottom: 1rem !important;
}

.insight-icon {
  font-size: 1.1rem !important;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: rgba(var(--accent-primary-rgb, 0, 255, 65), 0.08);
  border: 1px solid rgba(var(--accent-primary-rgb, 0, 255, 65), 0.15);
  color: var(--accent-primary) !important;
  transition: all 0.3s ease;
  margin: 0 auto 0.5rem;
}

/* Font source table icons */
.font-source-icon {
  font-size: 1.1rem;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: rgba(var(--accent-primary-rgb, 0, 255, 65), 0.08);
  border: 1px solid rgba(var(--accent-primary-rgb, 0, 255, 65), 0.15);
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.insight-title {
  color: var(--text-primary) !important;
  font-weight: 600 !important;
  font-size: 0.9rem !important;
}

.insight-content {
  text-align: center !important;
}

.insight-metric {
  margin-bottom: 0.75rem !important;
}

.insight-metric .metric-value {
  display: block !important;
  color: var(--accent-primary) !important;
  font-size: 1.5rem !important;
  font-weight: 700 !important;
  margin-bottom: 0.25rem !important;
}

.insight-metric .metric-label {
  color: #888888 !important;
  font-size: 0.75rem !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
}

.insight-status {
  font-size: 0.8rem !important;
  font-weight: 500 !important;
  padding: 0.25rem 0.75rem !important;
  border-radius: 12px !important;
}

.insight-status.good {
  background: rgba(34, 197, 94, 0.2) !important;
  color: #22c55e !important;
}

.insight-status.warning {
  background: rgba(245, 158, 11, 0.2) !important;
  color: #f59e0b !important;
}

.insight-status.poor {
  background: rgba(239, 68, 68, 0.2) !important;
  color: #ef4444 !important;
}

/* Architecture Recommendations Styles */
.architecture-recommendations {
  margin: 1.5rem 0 !important;
}

.recommendation-item {
  background: var(--bg-tertiary) !important;
  border: 1px solid var(--border-primary) !important;
  border-radius: 8px !important;
  margin: 1rem 0 !important;
  overflow: hidden !important;
  transition: all 0.3s ease !important;
}

.recommendation-item:hover {
  border-color: var(--accent-primary) !important;
  box-shadow: 0 4px 15px rgba(0, 255, 65, 0.5) !important;
}

.recommendation-header {
  display: flex !important;
  align-items: center !important;
  gap: 1rem !important;
  padding: 1rem 1.5rem !important;
  background: rgba(255, 255, 255, 0.02) !important;
}

.recommendation-priority {
  padding: 0.25rem 0.75rem !important;
  border-radius: 12px !important;
  font-size: 0.7rem !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
}

.recommendation-priority.high {
  background: rgba(239, 68, 68, 0.2) !important;
  color: #ef4444 !important;
}

.recommendation-priority.medium {
  background: rgba(245, 158, 11, 0.2) !important;
  color: #f59e0b !important;
}

.recommendation-priority.low {
  background: rgba(34, 197, 94, 0.2) !important;
  color: #22c55e !important;
}

.recommendation-title {
  color: var(--text-primary) !important;
  font-weight: 600 !important;
  font-size: 1rem !important;
}

.recommendation-content {
  padding: 1.5rem !important;
}

.recommendation-description {
  color: #cccccc !important;
  margin-bottom: 1rem !important;
  line-height: 1.5 !important;
}

.recommendation-action {
  color: #888888 !important;
  margin-bottom: 0.75rem !important;
  font-size: 0.9rem !important;
}

.recommendation-impact {
  color: #888888 !important;
  font-size: 0.9rem !important;
}

.recommendation-action strong,
.recommendation-impact strong {
  color: var(--accent-primary) !important;
}

/* Animations */
@keyframes pulse-indicator {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.2); }
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* Light Mode Overrides for Enhanced Architecture */
body.white-theme .architecture-intro h3 {
  color: #1e40af !important;
}

body.white-theme .architecture-intro p {
  color: #4b5563 !important;
}

body.white-theme .enhanced-font-diagram {
  background: #f8f9fa !important;
  border: 1px solid #dee2e6 !important;
}

body.white-theme .diagram-canvas {
  background: #ffffff !important;
  border: 1px solid #e5e7eb !important;
}

body.white-theme .webpage-hub {
  background: linear-gradient(145deg, #f1f5f9, #e2e8f0) !important;
  border: 3px solid #1e40af !important;
  box-shadow: 0 8px 32px rgba(30, 64, 175, 0.2) !important;
}

body.white-theme .hub-title {
  color: #1e40af !important;
}

body.white-theme .usage-type {
  color: #6b7280 !important;
}

body.white-theme .usage-font {
  color: #1e40af !important;
}

body.white-theme .stat-badge {
  background: rgba(30, 64, 175, 0.1) !important;
  color: #1e40af !important;
  border-color: rgba(30, 64, 175, 0.3) !important;
}

body.white-theme .insight-card {
  background: #ffffff !important;
  border: 1px solid #e5e7eb !important;
}

body.white-theme .insight-icon {
  background: rgba(16, 185, 129, 0.06);
  border-color: rgba(16, 185, 129, 0.12);
  color: #00994d !important;
}

body.white-theme .font-source-icon {
  background: rgba(16, 185, 129, 0.06);
  border-color: rgba(16, 185, 129, 0.12);
}

body.white-theme .insight-title {
  color: #111827 !important;
}

body.white-theme .insight-metric .metric-value {
  color: #1e40af !important;
}

body.white-theme .insight-metric .metric-label {
  color: #6b7280 !important;
}

body.white-theme .recommendation-item {
  background: #ffffff !important;
  border: 1px solid #e5e7eb !important;
}

body.white-theme .recommendation-item:hover {
  border-color: #1e40af !important;
  box-shadow: 0 4px 15px rgba(30, 64, 175, 0.1) !important;
}

body.white-theme .recommendation-title {
  color: #111827 !important;
}

body.white-theme .recommendation-description {
  color: #4b5563 !important;
}

body.white-theme .recommendation-action,
body.white-theme .recommendation-impact {
  color: #6b7280 !important;
}

body.white-theme .recommendation-action strong,
body.white-theme .recommendation-impact strong {
  color: #1e40af !important;
}

body.white-theme .performance-indicator {
  background: rgba(30, 64, 175, 0.1) !important;
  border-color: rgba(30, 64, 175, 0.3) !important;
}

body.white-theme .indicator-icon {
  color: #1e40af !important;
}

body.white-theme .indicator-text {
  color: #4b5563 !important;
}

/* 🚀 BEST-IN-CLASS TOGGLE STYLES */
.scan-options {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin: 1rem 0;
}

.toggle-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  transition: all 0.3s ease;
}

.toggle-container:hover {
  transform: translateY(-1px);
}

.toggle-container input[type="checkbox"] {
  display: none;
}

.toggle-slider {
  position: relative;
  width: 50px;
  height: 24px;
  background: var(--bg-tertiary);
  border: 1px solid #333;
  border-radius: 12px;
  transition: all 0.3s ease;
}

.toggle-slider::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  background: #666;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.toggle-container input[type="checkbox"]:checked + .toggle-slider {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-color: #667eea;
  box-shadow: 0 0 20px rgba(102, 126, 234, 0.4);
}

.toggle-container input[type="checkbox"]:checked + .toggle-slider::after {
  transform: translateX(26px);
  background: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-label {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.95rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.toggle-description {
  color: #888;
  font-size: 0.8rem;
  text-align: center;
  max-width: 400px;
  line-height: 1.3;
  margin-top: 0.25rem;
}

/* White theme overrides for toggle */
body.white-theme .toggle-slider {
  background: #f3f4f6;
  border-color: #d1d5db;
}

body.white-theme .toggle-slider::after {
  background: #9ca3af;
}

body.white-theme .toggle-container input[type="checkbox"]:checked + .toggle-slider {
  background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  border-color: #3b82f6;
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}

body.white-theme .toggle-label {
  color: #111827;
  background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

body.white-theme .toggle-description {
  color: #6b7280;
}

/* Best-in-Class Grade Display */
.best-in-class-grade {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.grade-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.grade-label {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.9rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.grade-value {
  color: #fff;
  font-size: 3rem;
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.grade-score {
  color: rgba(255, 255, 255, 0.95);
  font-size: 1.1rem;
  font-weight: 600;
}

/* White theme overrides for improvement priority section */
body.white-theme .improvement-priority-section {
  background: #f8f9fa !important;
  border: 2px solid #dee2e6 !important;
  color: #212529 !important;
}

body.white-theme .improvement-priority-section[style*="border: 2px solid #dc2626"] {
  background: #fef2f2 !important;
  border: 2px solid #dc2626 !important;
}

body.white-theme .improvement-priority-section[style*="border: 2px solid #f59e0b"] {
  background: #fffbeb !important;
  border: 2px solid #f59e0b !important;
}

body.white-theme .improvement-priority-section[style*="border: 2px solid #22c55e"] {
  background: #f0fdf4 !important;
  border: 2px solid #22c55e !important;
}

/* Override priority text colors for white theme */
body.white-theme .improvement-priority-section .priority-label {
  color: #111827 !important;
}

body.white-theme .improvement-priority-section .priority-value-high {
  color: #dc2626 !important;
}

body.white-theme .improvement-priority-section .priority-value-medium {
  color: #d97706 !important;
}

body.white-theme .improvement-priority-section .priority-value-low {
  color: #059669 !important;
}

body.white-theme .improvement-priority-section .priority-description {
  color: #374151 !important;
}

/* Font Sources Table Styles */
.font-sources-table {
  background: #111 !important;
}

.font-sources-header {
  background: var(--bg-tertiary) !important;
}

.font-sources-th {
  padding: 12px !important;
  text-align: left !important;
  border: 1px solid #333 !important;
  color: #fff !important;
  font-weight: bold !important;
}

.font-sources-th:nth-child(2),
.font-sources-th:nth-child(3),
.font-sources-th:nth-child(4) {
  text-align: center !important;
}

/* White theme overrides for font sources table */
body.white-theme .font-sources-table {
  background: #ffffff !important;
  border: 1px solid #dee2e6 !important;
}

body.white-theme .font-sources-header {
  background: #f8f9fa !important;
}

body.white-theme .font-sources-th {
  border: 1px solid #dee2e6 !important;
  color: #212529 !important;
  background: #f8f9fa !important;
}

body.white-theme .font-sources-table tbody tr {
  border-bottom: 1px solid #dee2e6 !important;
  background: #ffffff !important;
}

body.white-theme .font-sources-table tbody tr:hover {
  background: #f8f9fa !important;
}

body.white-theme .font-sources-table tbody td {
  border: 1px solid #dee2e6 !important;
  color: #212529 !important;
}

/* Fix text colors in cells for white theme */
body.white-theme .font-sources-table td div[style*="color: #6366f1"] {
  color: #4f46e5 !important;
}

body.white-theme .font-sources-table td div[style*="color: #ef4444"] {
  color: #dc2626 !important;
}

body.white-theme .font-sources-table td div[style*="color: #22c55e"] {
  color: #16a34a !important;
}

body.white-theme .font-sources-table td div[style*="color: #888"] {
  color: #6b7280 !important;
}

body.white-theme .font-sources-table td[style*="color: #aaa"] {
  color: #6b7280 !important;
}

body.white-theme .font-sources-table td[style*="color: #6366f1"] {
  color: #4f46e5 !important;
}

body.white-theme .font-sources-table td[style*="color: #22c55e"] {
  color: #16a34a !important;
}

body.white-theme .font-sources-table td[style*="color: #f59e0b"] {
  color: #d97706 !important;
}

/* Benchmark Status Banner Styles */
.benchmark-status {
  margin: 1rem 0 !important;
  padding: 1rem !important;
  background: linear-gradient(90deg, #1a1a2e, #16213e) !important;
  border-radius: 8px !important;
  border: 1px solid var(--border-accent) !important;
  transition: all 0.3s ease !important;
}

.benchmark-content {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
}

.benchmark-title {
  color: var(--accent-primary) !important;
  margin: 0 !important;
  font-size: 1rem !important;
}

.benchmark-subtitle {
  color: #cccccc !important;
  margin: 0.5rem 0 0 0 !important;
  font-size: 0.9rem !important;
}

.benchmark-score-container {
  text-align: right !important;
}

.benchmark-score {
  color: var(--accent-primary) !important;
  font-size: 1.5rem !important;
  font-weight: bold !important;
}

.benchmark-ranking {
  color: #888888 !important;
  font-size: 0.8rem !important;
}

/* White theme overrides for benchmark banner */
body.white-theme .benchmark-status {
  background: linear-gradient(90deg, #dbeafe, #bfdbfe) !important;
  border: 1px solid #3b82f6 !important;
}

body.white-theme .benchmark-title {
  color: #1e40af !important;
}

body.white-theme .benchmark-subtitle {
  color: #374151 !important;
}

body.white-theme .benchmark-score {
  color: #1e40af !important;
}

body.white-theme .benchmark-ranking {
  color: #6b7280 !important;
}
/* ========================================
   LIGHTHOUSE DASHBOARD STYLES
   ======================================== */

/* Lighthouse Analysis Container */
.lighthouse-analysis {
  padding: 1rem;
}

/* Lighthouse Dashboard Grid */
.lighthouse-dashboard {
  margin: 2rem 0;
  padding: 1.5rem;
  background: rgba(0, 255, 65, 0.5);
  border: 1px solid rgba(0, 255, 65, 0.5);
  border-radius: 8px;
}

/* Scores Grid Layout */
.lighthouse-scores-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

/* Score Gauge Component */
.lighthouse-score-gauge {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  transition: transform 0.2s;
}

.lighthouse-score-gauge:hover {
  transform: translateY(-4px);
  background: rgba(0, 0, 0, 0.4);
}

/* Circular Score Display */
.score-circle {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 8px solid;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
  position: relative;
}

.score-value {
  font-size: 2.5rem;
  font-weight: bold;
  line-height: 1;
}

.score-label {
  font-size: 0.75rem;
  color: #999;
  margin-top: 0.25rem;
  text-align: center;
}

.score-grade {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.score-device {
  font-size: 0.8rem;
  color: #666;
}

/* Core Web Vitals Section */
.core-web-vitals-section {
  margin: 2rem 0;
  padding: 1.5rem;
  background: rgba(255, 165, 0, 0.05);
  border: 1px solid rgba(255, 165, 0, 0.2);
  border-radius: 8px;
}

/* CWV Metrics Grid */
.cwv-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

/* Individual CWV Metric */
.cwv-metric {
  padding: 1.25rem;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 6px;
  border-left: 4px solid;
  border-left-color: inherit;
}

.cwv-metric-name {
  font-size: 0.85rem;
  color: #999;
  margin-bottom: 0.5rem;
}

.cwv-metric-value {
  font-size: 1.75rem;
  font-weight: bold;
  margin-bottom: 0.25rem;
}

.cwv-metric-status {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.cwv-metric-threshold {
  font-size: 0.75rem;
  color: #666;
}

/* Audit Categories Table */
.audit-categories-table {
  width: 100%;
  margin-top: 1rem;
  border-collapse: collapse;
  background: rgba(0, 0, 0, 0.2);
}

.audit-categories-table th {
  background: rgba(0, 255, 65, 0.5);
  padding: 0.75rem;
  text-align: left;
  border-bottom: 2px solid rgba(0, 255, 65, 0.5);
  font-weight: 600;
}

.audit-categories-table td {
  padding: 0.75rem;
  border-bottom: 1px solid var(--bg-hover);
}

.audit-categories-table tr:hover {
  background: rgba(0, 255, 65, 0.5);
}

/* Mobile Not Available Message */
.mobile-not-available {
  grid-column: 1 / -1;
  padding: 2rem;
  text-align: center;
  color: #999;
  font-style: italic;
}

/* White Theme Overrides */
body.white-theme .lighthouse-dashboard {
  background: rgba(59, 130, 246, 0.05);
  border-color: rgba(59, 130, 246, 0.2);
}

body.white-theme .lighthouse-score-gauge {
  background: rgba(255, 255, 255, 0.5);
}

body.white-theme .lighthouse-score-gauge:hover {
  background: rgba(255, 255, 255, 0.7);
}

body.white-theme .score-label {
  color: #666;
}

body.white-theme .score-device {
  color: #999;
}

body.white-theme .core-web-vitals-section {
  background: rgba(255, 165, 0, 0.08);
  border-color: rgba(255, 165, 0, 0.3);
}

body.white-theme .cwv-metric {
  background: rgba(255, 255, 255, 0.5);
}

body.white-theme .cwv-metric-name {
  color: #666;
}

body.white-theme .cwv-metric-threshold {
  color: #999;
}

body.white-theme .audit-categories-table {
  background: rgba(255, 255, 255, 0.3);
}

body.white-theme .audit-categories-table th {
  background: rgba(59, 130, 246, 0.1);
  border-bottom-color: rgba(59, 130, 246, 0.3);
}

body.white-theme .audit-categories-table td {
  border-bottom-color: rgba(0, 0, 0, 0.05);
}

body.white-theme .audit-categories-table tr:hover {
  background: rgba(59, 130, 246, 0.05);
}

/* Responsive Design */
@media (max-width: 768px) {
  .lighthouse-scores-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .cwv-metrics-grid {
    grid-template-columns: 1fr;
  }
  
  .score-circle {
    width: 100px;
    height: 100px;
    border-width: 6px;
  }
  
  .score-value {
    font-size: 2rem;
  }
}

@media (max-width: 480px) {
  .lighthouse-scores-grid {
    grid-template-columns: 1fr;
  }
}

/* Score Breakdown Visualization */
.score-breakdown {
  background: #001a00;
  border: 2px solid var(--border-accent);
  border-radius: 8px;
  padding: 2rem;
  margin: 2rem 0;
  box-shadow: 0 0 20px rgba(0, 255, 65, 0.5);
}

.score-breakdown h2 {
  color: var(--accent-primary);
  text-shadow: 0 0 10px rgba(0, 255, 65, 0.5);
  margin-bottom: 1.5rem;
}

.breakdown-header {
  background: #002200;
  border: 1px solid var(--border-accent);
  border-radius: 6px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.breakdown-summary {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  flex-wrap: wrap;
}

.breakdown-final-score {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  background: #000;
  border: 2px solid var(--border-accent);
  border-radius: 8px;
  box-shadow: 0 0 15px rgba(0, 255, 65, 0.5);
}

.breakdown-final-label {
  font-size: 0.9rem;
  color: #aaa;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.breakdown-final-value {
  font-size: 3rem;
  font-weight: 700;
  text-shadow: 0 0 10px currentColor;
}

.breakdown-final-grade {
  font-size: 1.2rem;
  color: var(--accent-primary);
  opacity: 0.8;
}

.breakdown-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  flex: 1;
}

.breakdown-stat {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.breakdown-stat .stat-label {
  font-size: 0.85rem;
  color: #888;
}

.breakdown-stat .stat-value {
  font-size: 1.1rem;
  color: var(--accent-primary);
  font-weight: 600;
}

.breakdown-components {
  margin-top: 2rem;
}

.breakdown-components h3 {
  color: var(--accent-primary);
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.breakdown-description {
  color: #aaa;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.breakdown-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  margin-bottom: 0.75rem;
  background: #002200;
  border: 1px solid #004400;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.breakdown-item:hover {
  background: #003300;
  border-color: var(--accent-primary);
  box-shadow: 0 0 10px rgba(0, 255, 65, 0.5);
}

.breakdown-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  min-width: 0;
}

.breakdown-icon {
  font-size: 1.25rem;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: rgba(var(--accent-primary-rgb, 0, 255, 65), 0.08);
  border: 1px solid rgba(var(--accent-primary-rgb, 0, 255, 65), 0.15);
  color: #00ff41;
  transition: all 0.3s ease;
}

.breakdown-icon svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
}

.breakdown-label {
  color: var(--text-secondary);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.breakdown-weight {
  color: #888;
  font-size: 0.85rem;
  white-space: nowrap;
}

.breakdown-score {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 180px;
}

.breakdown-bar {
  flex: 1;
  height: 20px;
  background: #001100;
  border: 1px solid #004400;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.breakdown-bar-fill {
  height: 100%;
  border-radius: 10px;
  transition: width 0.5s ease, background 0.3s ease;
  position: relative;
  box-shadow: 0 0 10px rgba(0, 255, 65, 0.5);
}

.breakdown-value {
  font-size: 1.1rem;
  font-weight: 700;
  min-width: 70px;
  text-align: right;
  text-shadow: 0 0 5px currentColor;
}

.breakdown-footer {
  margin-top: 2rem;
  padding: 1rem;
  background: #002200;
  border: 1px solid #004400;
  border-radius: 6px;
}

.breakdown-note {
  color: #aaa;
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 0;
}

.no-breakdown {
  color: #888;
  text-align: center;
  padding: 2rem;
  font-style: italic;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .breakdown-summary {
    flex-direction: column;
  }
  
  .breakdown-stats {
    grid-template-columns: 1fr;
  }
  
  .breakdown-item {
    flex-direction: column;
    align-items: stretch;
  }
  
  .breakdown-score {
    width: 100%;
  }
}

/* White theme adjustments */
body.white-theme .score-breakdown {
  background: #f0fdf4;
  border-color: #22c55e;
  box-shadow: 0 0 20px rgba(34, 197, 94, 0.2);
}

body.white-theme .score-breakdown h2 {
  color: #15803d;
  text-shadow: none;
}

body.white-theme .breakdown-header {
  background: #fff;
  border-color: #22c55e;
}

body.white-theme .breakdown-final-score {
  background: #f8f8f8;
  border-color: #22c55e;
  box-shadow: 0 0 15px rgba(34, 197, 94, 0.2);
}

body.white-theme .breakdown-final-value {
  color: #15803d;
  text-shadow: none;
}

body.white-theme .breakdown-final-grade {
  color: #15803d;
}

body.white-theme .breakdown-stat .stat-value {
  color: #15803d;
}

body.white-theme .breakdown-description {
  color: #495057;
}

body.white-theme .breakdown-description svg {
  stroke: #00994d;
}

body.white-theme .breakdown-item {
  background: #fff;
  border-color: #e5e7eb;
}

body.white-theme .breakdown-icon {
  background: rgba(16, 185, 129, 0.06);
  border-color: rgba(16, 185, 129, 0.12);
  color: #00994d;
}

body.white-theme .breakdown-icon svg {
  stroke: currentColor;
}

body.white-theme .breakdown-item:hover {
  background: #f0fdf4;
  border-color: #22c55e;
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.2);
}

body.white-theme .breakdown-label {
  color: #333;
}

body.white-theme .breakdown-bar {
  background: #e5e7eb;
  border-color: #d1d5db;
}

body.white-theme .breakdown-bar-fill {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
  opacity: 1 !important;
  filter: saturate(1.2) brightness(0.85);
}

body.white-theme .breakdown-value {
  text-shadow: none;
  filter: saturate(1.3) brightness(0.7);
}

body.white-theme .breakdown-footer {
  background: #fff;
  border-color: #e5e7eb;
}

body.white-theme .breakdown-note {
  color: #495057;
}

body.white-theme .breakdown-note svg {
  stroke: #0c7792;
}

/* ===================================================================
   UTILITY CLASSES - Use these instead of inline styles
   =================================================================== */

/* Text Color Utilities */
.text-primary { color: var(--text-primary) !important; }
.text-secondary { color: var(--text-secondary) !important; }
.text-tertiary { color: var(--text-tertiary) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-accent { color: var(--accent-primary) !important; }
.text-accent-secondary { color: var(--accent-secondary) !important; }
.text-success { color: var(--status-success) !important; }
.text-warning { color: var(--status-warning) !important; }
.text-error { color: var(--status-error) !important; }
.text-info { color: var(--status-info) !important; }

/* Background Color Utilities */
.bg-primary { background-color: var(--bg-primary) !important; }
.bg-secondary { background-color: var(--bg-secondary) !important; }
.bg-tertiary { background-color: var(--bg-tertiary) !important; }
.bg-hover { background-color: var(--bg-hover) !important; }
.bg-input { background-color: var(--bg-input) !important; }

/* Border Color Utilities */
.border-primary { border-color: var(--border-primary) !important; }
.border-secondary { border-color: var(--border-secondary) !important; }
.border-accent { border-color: var(--border-accent) !important; }

/* Score Color Utilities (for dynamic scoring) */
.score-excellent { color: var(--score-excellent) !important; }
.score-good { color: var(--score-good) !important; }
.score-fair { color: var(--score-fair) !important; }
.score-poor { color: var(--score-poor) !important; }

/* Helper function for JavaScript - returns appropriate score class */
/* Usage: element.className = getScoreClass(85) */

/* ===================================================================
   MODERN UI IMPROVEMENTS - Summary Ribbon & Quick Navigation
   =================================================================== */

/* Summary Ribbon - Top-level health snapshot */
.summary-ribbon {
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-2xl);
  padding: var(--spacing-lg);
  margin: var(--spacing-xl) 0;
  box-shadow: var(--shadow-2xl);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  animation: slideInFromTop 0.6s ease-out;
}

@keyframes slideInFromTop {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.summary-ribbon-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-lg);
  align-items: center;
}

.summary-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
}

.summary-icon {
  font-size: 1.75rem;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(var(--accent-primary-rgb, 0, 255, 65), 0.1);
  border: 1px solid rgba(var(--accent-primary-rgb, 0, 255, 65), 0.2);
  transition: all 0.3s ease;
}

.summary-details {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.summary-label {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.summary-value {
  font-size: 1.5rem;
  color: var(--text-primary);
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.summary-actions {
  display: flex;
  gap: var(--spacing-sm);
  flex-wrap: wrap;
}

.ribbon-btn {
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-lg);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 2px solid transparent;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.ribbon-btn-primary {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-primary-dark));
  color: var(--bg-primary);
  box-shadow: var(--shadow-md);
}

.ribbon-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  filter: brightness(1.1);
}

.ribbon-btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border-color: var(--border-secondary);
}

.ribbon-btn-secondary:hover {
  background: var(--bg-hover);
  border-color: var(--accent-secondary);
  transform: translateY(-2px);
}

/* Quick Navigation Panel */
.quick-nav {
  position: sticky;
  top: 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-xl);
  padding: var(--spacing-md);
  margin: var(--spacing-lg) 0;
  box-shadow: var(--shadow-lg);
  z-index: 100;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  animation: slideInFromRight 0.5s ease-out;
}

@keyframes slideInFromRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.quick-nav-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: var(--spacing-sm);
  border-bottom: 1px solid var(--border-primary);
  margin-bottom: var(--spacing-sm);
  font-weight: 700;
  color: var(--accent-primary);
}

.quick-nav-toggle {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.9rem;
  padding: 0.25rem;
  transition: transform 0.3s ease;
}

.quick-nav-toggle:hover {
  color: var(--accent-primary);
}

.quick-nav.collapsed .quick-nav-toggle {
  transform: rotate(-90deg);
}

.quick-nav-content {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 500px;
  overflow-y: auto;
  transition: max-height 0.3s ease, opacity 0.3s ease;
}

.quick-nav.collapsed .quick-nav-content {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
}

.quick-nav-link {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: 0.75rem 1rem;
  background: var(--bg-tertiary);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.quick-nav-link::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 3px;
  background: var(--accent-primary);
  transform: scaleY(0);
  transition: transform 0.3s ease;
}

.quick-nav-link:hover {
  background: var(--bg-hover);
  border-color: var(--accent-primary);
  color: var(--text-primary);
  transform: translateX(5px);
  box-shadow: var(--shadow-md);
}

.quick-nav-link:hover::before {
  transform: scaleY(1);
}

.nav-icon {
  font-size: 1rem;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(var(--accent-primary-rgb, 0, 255, 65), 0.05);
  border: 1px solid rgba(var(--accent-primary-rgb, 0, 255, 65), 0.1);
  filter: grayscale(70%) opacity(0.8);
  transition: all 0.3s ease;
}

.quick-nav-link:hover .nav-icon {
  filter: grayscale(0%) opacity(1);
  background: rgba(var(--accent-primary-rgb, 0, 255, 65), 0.12);
  border-color: rgba(var(--accent-primary-rgb, 0, 255, 65), 0.25);
  transform: translateY(-2px);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .summary-ribbon-content {
    grid-template-columns: 1fr;
  }
  
  .quick-nav {
    position: relative;
    top: 0;
  }
  
  .ribbon-btn {
    width: 100%;
    justify-content: center;
  }
}

/* Light theme adjustments */
body.white-theme .summary-ribbon {
  background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

body.white-theme .quick-nav {
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

body.white-theme .quick-nav-link {
  background: #f9fafb;
}

body.white-theme .quick-nav-link:hover {
  background: #f0fdf4;
}

body.white-theme .ribbon-btn-primary {
  color: #ffffff;
}

body.white-theme .ribbon-btn-secondary {
  background: #f9fafb;
  color: #111827;
}

/* Light mode specific overrides */
body.white-theme .summary-icon {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.15);
}

body.white-theme .hub-icon {
  background: rgba(16, 185, 129, 0.06);
  border-color: rgba(16, 185, 129, 0.12);
}

body.white-theme .nav-icon {
  background: rgba(16, 185, 129, 0.04);
  border-color: rgba(16, 185, 129, 0.08);
  filter: grayscale(60%) opacity(0.9);
}

body.white-theme .quick-nav-link:hover .nav-icon {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.2);
  filter: grayscale(0%) opacity(1);
  transform: translateY(-2px);
}
