.action-panel .card, .tool-panel .card, .upload-area-simple, .file-preview-section .card {
  background: #fafafa !important; /* light mode - softer off-white */
  border: 1px solid rgba(0,0,0,.1) !important;
  color: #4a4a4a !important; /* softer dark gray */
}

[data-theme="dark"] .action-panel .card, 
[data-theme="dark"] .tool-panel .card, 
[data-theme="dark"] .upload-area-simple, 
[data-theme="dark"] .file-preview-section .card {
  background: linear-gradient(135deg, rgba(15,23,42,0.75), rgba(30,41,59,0.55)) !important;
  border: 1px solid rgba(148,163,184,.2) !important;
  color: #e5e7eb !important;
}
.processing-content {
  background: transparent !important;
}
.processing-content .card, .processing-content .card-header, .processing-content .card-body {
  background: inherit !important;
  color: #4a4a4a !important; /* light mode - softer dark gray */
}
.processing-content .form-label, .processing-content .form-check-label { color: #4a4a4a !important; }
.processing-content .btn-outline-secondary { color: #4a4a4a !important; border-color: rgba(0,0,0,.2) !important; }
.processing-content .btn-outline-secondary:hover { background: rgba(0,0,0,0.05) !important; }

[data-theme="dark"] .processing-content .card, 
[data-theme="dark"] .processing-content .card-header, 
[data-theme="dark"] .processing-content .card-body {
  color: #e5e7eb !important; /* dark mode */
}
[data-theme="dark"] .processing-content .form-label, 
[data-theme="dark"] .processing-content .form-check-label { 
  color: #e5e7eb !important; 
}
[data-theme="dark"] .processing-content .btn-outline-secondary { 
  color: #e5e7eb !important; 
  border-color: rgba(148,163,184,.35) !important; 
}
[data-theme="dark"] .processing-content .btn-outline-secondary:hover { 
  background: rgba(255,255,255,0.1) !important; 
}
.upload-area-simple { border: 2px dashed rgba(0,0,0,.2) !important; }
.upload-area-simple:hover { background: rgba(0,0,0,0.02) !important; }

[data-theme="dark"] .upload-area-simple { border: 2px dashed rgba(148,163,184,.25) !important; }
[data-theme="dark"] .upload-area-simple:hover { background: rgba(255,255,255,0.06) !important; }
.action-panel .btn-primary { background: linear-gradient(135deg,#0ea5e9,#0284c7) !important; border: none !important; }
/* Global Styles */
* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: #fafafa; /* light mode default - softer off-white */
}

/* Light mode (default) */
body {
  margin: 0;
  padding: 0;
  line-height: 1.6;
  color: #4a4a4a; /* softer dark gray instead of #1a1a1a */
  min-height: 100vh;
  background: #fafafa; /* softer off-white instead of pure white */
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Dark mode */
[data-theme="dark"] html {
  background-color: #0b1120;
}

[data-theme="dark"] body {
  color: #e5e7eb;
  background: linear-gradient(135deg, #0b1120 0%, #0f172a 100%);
}

/* Main content wrapper */
main {
  background-color: transparent;
  min-height: calc(100vh - 200px);
}

/* Section backgrounds */
.hero-section {
  background: transparent;
  padding: 4rem 0;
}

.tools-section {
  background-color: transparent;
  padding: 3rem 0;
}

.work-section {
  background-color: transparent;
  padding: 3rem 0;
}

.premium-section {
  background: transparent;
  padding: 3rem 0;
}

/* Modern Navigation Styles */
.modern-navbar {
  padding: 0.75rem 0;
  border-bottom: none;
  box-shadow: none;
  background: #fafafa !important; /* light mode default - softer off-white */
  transition: all 0.3s ease;
}

[data-theme="dark"] .modern-navbar {
  background: #0f172a !important; /* dark mode */
}

.modern-navbar:hover {
  box-shadow: 0 12px 48px rgba(2,6,23,0.6);
}

.navbar-brand {
  font-size: 1.5rem;
  font-weight: 700;
  color: #4a4a4a !important; /* light mode - softer dark gray */
  text-decoration: none;
  transition: all 0.3s ease;
}

[data-theme="dark"] .navbar-brand {
  color: #e5e7eb !important; /* dark mode */
}

.navbar-brand:hover {
  color: #0ea5e9 !important;
  text-decoration: none;
  transform: translateY(-1px);
}

.brand-text {
  background: linear-gradient(135deg, #0ea5e9, #0f766e);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Modern Nav Links */
.modern-nav-link {
  font-weight: 500;
  color: #4a4a4a !important; /* light mode - softer dark gray */
  padding: 0.75rem 1rem !important;
  transition: all 0.3s ease;
  text-decoration: none;
  border-radius: 6px;
  position: relative;
}

[data-theme="dark"] .modern-nav-link {
  color: #e5e7eb !important; /* dark mode */
}

.modern-nav-link:hover {
  color: #0ea5e9 !important;
  text-decoration: none;
  background-color: rgba(14,165,233, 0.08);
  transform: translateY(-1px);
}

.modern-nav-link::before {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(135deg, #dc3545, #e74c3c);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.modern-nav-link:hover::before {
  width: 80%;
}

/* Mega Dropdown Menu */
.mega-dropdown {
  position: static !important;
}

.mega-menu {
  width: 100vw;
  max-width: 1200px;
  left: 50% !important;
  right: auto !important;
  transform: translateX(-50%) !important;
  border: none;
  box-shadow: 0 30px 100px rgba(0,0,0,0.15);
  border-radius: 16px;
  padding: 2rem;
  margin-top: 1rem;
  background: rgba(255,255,255,0.98); /* light mode */
  backdrop-filter: blur(22px) saturate(140%);
  animation: slideDown 0.3s ease;
}

[data-theme="dark"] .mega-menu {
  box-shadow: 0 30px 100px rgba(2,6,23,0.6);
  background: rgba(15,23,42,0.75); /* dark mode */
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.mega-menu .dropdown-header {
  font-size: 0.85rem;
  font-weight: 700;
  color: #0ea5e9;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.5rem 0 0.35rem;
  margin-bottom: 0.35rem;
  border-bottom: 1px solid rgba(148,163,184,.15);
}

[data-theme="dark"] .mega-menu .dropdown-header {
  color: #ffffff !important; /* white in dark mode */
  border-bottom: 1px solid rgba(148,163,184,.25);
}

.mega-menu .dropdown-header i {
  color: #0ea5e9;
}

[data-theme="dark"] .mega-menu .dropdown-header i {
  color: #ffffff !important; /* white in dark mode */
}

/* Modern Dropdown Items */
.modern-dropdown-item {
  padding: 0.65rem 0.9rem;
  font-size: 0.92rem;
  color: #4a4a4a !important; /* light mode - softer dark gray */
  transition: all 0.25s ease;
  border-radius: 8px;
  margin: 0.15rem 0;
  display: flex;
  align-items: center;
  text-decoration: none;
  background-color: transparent !important;
}

[data-theme="dark"] .modern-dropdown-item {
  color: #ffffff !important; /* dark mode - pure white */
}

.modern-dropdown-item:hover {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.12), rgba(15, 118, 110, 0.12));
  color: #0ea5e9;
  transform: translateX(5px);
  text-decoration: none;
}

.modern-dropdown-item i {
  width: 20px;
  text-align: center;
  opacity: 0.7;
  transition: all 0.3s ease;
  color: inherit; /* inherit text color */
}

[data-theme="dark"] .modern-dropdown-item i {
  color: #ffffff !important; /* dark mode - pure white */
  opacity: 0.9;
}

.modern-dropdown-item:hover i {
  opacity: 1;
  transform: scale(1.1);
}

/* Regular Dropdown Menus */
.modern-dropdown {
  border: 1px solid rgba(0,0,0,.1) !important; /* light mode - softer border */
  box-shadow: 0 4px 20px rgba(0,0,0,0.1) !important; /* light mode */
  border-radius: 10px;
  padding: 0.5rem 0;
  margin-top: 0.75rem;
  background: #fafafa !important; /* light mode - softer off-white */
  backdrop-filter: blur(20px);
  animation: fadeInUp 0.3s ease;
}

[data-theme="dark"] .modern-dropdown {
  box-shadow: 0 8px 32px rgba(2,6,23,0.3) !important;
  background: linear-gradient(135deg, rgba(15,23,42,0.9), rgba(30,41,59,0.7)) !important;
  border: 1px solid rgba(148,163,184,.2) !important;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* User Menu Specific Styles */
.user-menu {
  background: rgba(14,165,233,0.08) !important; /* light mode - subtle blue instead of red */
  border-radius: 25px;
  padding: 0.5rem 1rem !important;
  transition: all 0.3s ease;
}

[data-theme="dark"] .user-menu {
  background: rgba(14,165,233,0.12) !important; /* dark mode - slightly more visible */
  color: #ffffff !important; /* dark mode - pure white */
}

.user-menu:hover {
  background: rgba(14,165,233,0.12) !important;
}

[data-theme="dark"] .user-menu:hover {
  background: rgba(14,165,233,0.18) !important;
}

.user-name {
  font-weight: 600;
  margin-left: 0.5rem;
  color: inherit; /* inherit from parent */
}

[data-theme="dark"] .user-name {
  color: #ffffff !important; /* dark mode - pure white */
}

.user-dropdown {
  min-width: 220px;
  background: #fafafa !important; /* light mode - softer off-white */
  border: 1px solid rgba(0,0,0,.1) !important;
}

[data-theme="dark"] .user-dropdown {
  background: linear-gradient(135deg, rgba(15,23,42,0.9), rgba(30,41,59,0.7)) !important;
  border: 1px solid rgba(148,163,184,.2) !important;
}

.admin-item {
  background: linear-gradient(135deg, rgba(14,165,233,0.15), rgba(15,118,110,0.15));
  border-left: 3px solid #0ea5e9;
}

.admin-item:hover {
  background: linear-gradient(135deg, rgba(14,165,233,0.25), rgba(15,118,110,0.25));
}

.logout-btn {
  color: #dc3545 !important;
}

.logout-btn:hover {
  background: linear-gradient(135deg, rgba(239,68,68,0.15), rgba(220,38,38,0.15)) !important;
  color: #dc2626 !important;
}

/* Modern Button */
.modern-btn {
  border-radius: 25px;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  transition: all 0.3s ease;
  background: linear-gradient(135deg, #0ea5e9, #0f766e);
  border: none;
  box-shadow: 0 4px 15px rgba(14, 165, 233, 0.3);
}

/* Global theme-aware overrides for legacy components across inner pages */
.card {
  background: #fafafa !important; /* light mode - softer off-white */
  border: 1px solid rgba(0,0,0,.1) !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1) !important;
  color: #4a4a4a !important; /* softer dark gray */
}

[data-theme="dark"] .card {
  background: linear-gradient(135deg, rgba(15,23,42,0.7), rgba(30,41,59,0.5)) !important;
  border: 1px solid rgba(148,163,184,.18) !important;
  box-shadow: 0 8px 32px rgba(2,6,23,0.28) !important;
  color: #e5e7eb !important;
}

.card-header, .modal-header {
  background: #f8f9fa !important; /* light mode */
  border-bottom: 1px solid rgba(0,0,0,.1) !important;
  color: #4a4a4a !important; /* softer dark gray */
}

[data-theme="dark"] .card-header, 
[data-theme="dark"] .modal-header {
  background: linear-gradient(135deg, rgba(15,23,42,0.9), rgba(30,41,59,0.7)) !important;
  border-bottom: 1px solid rgba(148,163,184,.2) !important;
  color: #e5e7eb !important;
}

.card-body, .modal-body, .card-footer, .modal-footer { 
  color: #4a4a4a !important; /* light mode - softer dark gray */
}

[data-theme="dark"] .card-body, 
[data-theme="dark"] .modal-body, 
[data-theme="dark"] .card-footer, 
[data-theme="dark"] .modal-footer { 
  color: #e5e7eb !important; 
}

.form-control, .form-select {
  background: #fafafa !important; /* light mode - softer off-white */
  border: 1px solid rgba(0,0,0,.2) !important;
  color: #4a4a4a !important; /* softer dark gray */
}

[data-theme="dark"] .form-control, 
[data-theme="dark"] .form-select {
  background: rgba(255,255,255,0.06) !important;
  border: 1px solid rgba(148,163,184,.2) !important;
  color: #e5e7eb !important;
}

.form-control:focus, .form-select:focus {
  background: #ffffff !important; /* slightly brighter on focus for contrast */
  border-color: #0ea5e9 !important;
  box-shadow: 0 0 0 .2rem rgba(14,165,233,.25) !important;
  color: #4a4a4a !important; /* softer dark gray */
}

[data-theme="dark"] .form-control:focus, 
[data-theme="dark"] .form-select:focus {
  background: rgba(255,255,255,0.08) !important;
  color: #e5e7eb !important;
}

.form-control::placeholder { 
  color: #6c757d !important; /* light mode */
}

[data-theme="dark"] .form-control::placeholder { 
  color: rgba(229,231,235,.6) !important; 
}

/* 🎯 FORM SELECT DROPDOWN FIX - Theme-aware select dropdowns + Remove zigzag/spell-check underlines */
.form-select,
.form-select:focus,
.form-select:hover,
.form-select:active,
.form-select option {
  text-decoration: none !important;
  text-decoration-line: none !important;
  text-decoration-style: none !important;
  text-decoration-color: transparent !important;
  text-underline-offset: 0 !important;
  text-underline-position: unset !important;
  -webkit-text-decoration: none !important;
  -moz-text-decoration: none !important;
  -ms-text-decoration: none !important;
  text-rendering: optimizeLegibility !important;
  spellcheck: false !important;
  -webkit-spellcheck: false !important;
  -moz-spellcheck: false !important;
  -ms-spellcheck: false !important;
  autocomplete: off !important;
  -webkit-autocomplete: off !important;
  -moz-autocomplete: off !important;
  -ms-autocomplete: off !important;
}

.form-select {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%231a1a1a' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m1 6 7 7 7-7'/%3e%3c/svg%3e") !important; /* light mode arrow */
  background-repeat: no-repeat !important;
  background-position: right .9rem center !important;
  background-size: 16px 12px !important;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

[data-theme="dark"] .form-select {
  /* Custom arrow for dark theme */
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23e5e7eb' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m1 6 7 7 7-7'/%3e%3c/svg%3e") !important;
}

.form-select option {
  background: #fafafa !important; /* light mode - softer off-white */
  color: #4a4a4a !important; /* softer dark gray */
  text-decoration: none !important;
  -webkit-text-decoration: none !important;
  -moz-text-decoration: none !important;
  -ms-text-decoration: none !important;
  background-image: none !important;
  -webkit-background-image: none !important;
  -moz-background-image: none !important;
  border: none !important;
  outline: none !important;
}

[data-theme="dark"] .form-select option {
  background: rgba(15,23,42,0.95) !important;
  color: #e5e7eb !important;
  text-decoration: none !important;
  -webkit-text-decoration: none !important;
  -moz-text-decoration: none !important;
  -ms-text-decoration: none !important;
}

.table { color: #4a4a4a !important; /* light mode - softer dark gray */ }
.table thead th { border-color: rgba(0,0,0,.1) !important; }
.table tbody tr { border-color: rgba(0,0,0,.05) !important; }

[data-theme="dark"] .table { color: #e5e7eb !important; }
[data-theme="dark"] .table thead th { border-color: rgba(148,163,184,.25) !important; }
[data-theme="dark"] .table tbody tr { border-color: rgba(148,163,184,.15) !important; }

/* Improve hover contrast on tables */
.table-hover tbody tr:hover {
  background-color: rgba(14,165,233,0.05) !important; /* light mode */
  color: #4a4a4a !important; /* softer dark gray */
}

[data-theme="dark"] .table-hover tbody tr:hover {
  background-color: rgba(14,165,233,0.12) !important; /* dark mode */
  color: #e5e7eb !important;
}

.text-muted { color: #6c757d !important; /* light mode */ }

/* Global fix: All text-muted elements and gray text should be white in dark mode */
[data-theme="dark"] .text-muted,
[data-theme="dark"] small.text-muted,
[data-theme="dark"] .form-text,
[data-theme="dark"] .card-subtitle,
[data-theme="dark"] .breadcrumb:not(.breadcrumb-item.active),
[data-theme="dark"] .hero-subtitle,
[data-theme="dark"] .tool-description,
[data-theme="dark"] .footer-link,
[data-theme="dark"] .footer-text,
[data-theme="dark"] .dropdown-header {
    color: #ffffff !important; /* white in dark mode instead of gray */
}

.btn-outline-secondary { color: #4a4a4a !important; border-color: rgba(0,0,0,.2) !important; }
.btn-outline-secondary:hover, .btn-outline-secondary:focus {
  background: rgba(0,0,0,0.05) !important; /* light mode */
  color: #4a4a4a !important; /* softer dark gray */
  border-color: rgba(0,0,0,.3) !important;
}

[data-theme="dark"] .btn-outline-secondary { 
  color: #e5e7eb !important; 
  border-color: rgba(148,163,184,.35) !important; 
}
[data-theme="dark"] .btn-outline-secondary:hover, 
[data-theme="dark"] .btn-outline-secondary:focus {
  background: rgba(255,255,255,0.1) !important;
  color: #e5e7eb !important;
  border-color: rgba(148,163,184,.45) !important;
}

.text-primary { color: #0ea5e9 !important; }
.bg-light { background-color: #f8f9fa !important; /* light mode */ }

[data-theme="dark"] .bg-light { background-color: rgba(15,23,42,0.6) !important; }

.list-group-item {
  background: #fafafa !important; /* light mode - softer off-white */
  border-color: rgba(0,0,0,.1) !important;
  color: #4a4a4a !important; /* softer dark gray */
}

[data-theme="dark"] .list-group-item {
  background: rgba(255,255,255,0.04) !important;
  border-color: rgba(148,163,184,.18) !important;
  color: #e5e7eb !important;
}

.alert {
  background: #fafafa !important; /* light mode - softer off-white */
  color: #4a4a4a !important; /* softer dark gray */
  border-color: rgba(0,0,0,.1) !important;
}

[data-theme="dark"] .alert {
  background: rgba(255,255,255,0.05) !important;
  color: #e5e7eb !important;
  border-color: rgba(148,163,184,.2) !important;
}

/* STRONG OVERRIDES for legacy pages still using light theme utility classes */
.bg-white { background-color: #fafafa !important; /* light mode - softer off-white */ }
.text-dark { color: #4a4a4a !important; /* softer dark gray */ }
.border, .border-top, .border-bottom, .border-start, .border-end { border-color: rgba(0,0,0,.1) !important; }
.input-group-text { background: #f8f9fa !important; color: #4a4a4a !important; border: 1px solid rgba(0,0,0,.1) !important; }

[data-theme="dark"] .bg-white { background-color: rgba(15,23,42,0.6) !important; }
[data-theme="dark"] .text-dark { color: #e5e7eb !important; }
[data-theme="dark"] .border, 
[data-theme="dark"] .border-top, 
[data-theme="dark"] .border-bottom, 
[data-theme="dark"] .border-start, 
[data-theme="dark"] .border-end { 
  border-color: rgba(148,163,184,.2) !important; 
}
[data-theme="dark"] .input-group-text { 
  background: rgba(255,255,255,0.06) !important; 
  color: #e5e7eb !important; 
  border: 1px solid rgba(148,163,184,.2) !important; 
}

/* 🎯 COMPREHENSIVE DROPDOWN FIX - NO MORE WHITE BACKGROUNDS! 🎯 */

/* Generic dropdown menus not using modern class */
.dropdown-menu { 
  background: #fafafa !important; /* light mode - softer off-white */
  border: 1px solid rgba(0,0,0,.1) !important;
  color: #4a4a4a !important; /* softer dark gray */
  box-shadow: 0 4px 20px rgba(0,0,0,0.1) !important;
}

[data-theme="dark"] .dropdown-menu { 
  background: linear-gradient(135deg, rgba(15,23,42,0.95), rgba(30,41,59,0.85)) !important;
  border: 1px solid rgba(148,163,184,.2) !important;
  color: #e5e7eb !important;
  box-shadow: 0 8px 32px rgba(2,6,23,0.3) !important;
}

/* 🚀 AGGRESSIVE OVERRIDES - Theme-aware dropdown elements */
.dropdown-menu,
.dropdown-menu.show,
.dropdown-menu.dropdown-menu-dark,
.dropdown-menu.modern-dropdown,
.dropdown-menu.mega-menu {
  background: #fafafa !important; /* light mode - softer off-white */
  border: 1px solid rgba(0,0,0,.1) !important;
  color: #4a4a4a !important; /* softer dark gray */
  box-shadow: 0 4px 20px rgba(0,0,0,0.1) !important;
}

[data-theme="dark"] .dropdown-menu,
[data-theme="dark"] .dropdown-menu.show,
[data-theme="dark"] .dropdown-menu.dropdown-menu-dark,
[data-theme="dark"] .dropdown-menu.modern-dropdown,
[data-theme="dark"] .dropdown-menu.mega-menu {
  background: linear-gradient(135deg, rgba(15,23,42,0.95), rgba(30,41,59,0.85)) !important;
  border: 1px solid rgba(148,163,184,.2) !important;
  color: #ffffff !important; /* dark mode - pure white */
  box-shadow: 0 8px 32px rgba(2,6,23,0.3) !important;
}

/* 🎯 Theme-aware dropdown items */
.dropdown-item,
.dropdown-item-text,
.dropdown-header {
  color: #4a4a4a !important; /* light mode - softer dark gray */
  background-color: transparent !important;
}

[data-theme="dark"] .dropdown-item,
[data-theme="dark"] .dropdown-item-text,
[data-theme="dark"] .dropdown-header {
  color: #ffffff !important; /* dark mode - pure white */
}

.dropdown-item:hover, 
.dropdown-item:focus,
.dropdown-item:active,
.dropdown-item.active {
  background: rgba(14,165,233,0.15) !important;
  color: #0ea5e9 !important;
}

/* 🔥 NUCLEAR OPTION - Override Bootstrap's default white backgrounds */
.dropdown-menu * {
  background-color: transparent !important;
}

.dropdown-menu .dropdown-item {
  background-color: transparent !important;
}

.dropdown-menu .dropdown-item:hover {
  background-color: rgba(14,165,233,0.15) !important;
}

/* 🎨 Fix dropdown dividers */
.dropdown-divider {
  border-top: 1px solid rgba(148,163,184,.2) !important;
}

/* 🛡️ Bootstrap 5 specific overrides */
.dropdown-menu[data-bs-popper] {
  background: #fafafa !important; /* light mode - softer off-white */
  border: 1px solid rgba(0,0,0,.1) !important;
}

[data-theme="dark"] .dropdown-menu[data-bs-popper] {
  background: linear-gradient(135deg, rgba(15,23,42,0.95), rgba(30,41,59,0.85)) !important;
  border: 1px solid rgba(148,163,184,.2) !important;
}

/* 🎯 Language selector specific fix */
.dropdown-menu form {
  background: transparent !important;
}

.dropdown-menu form button {
  background: transparent !important;
  color: #4a4a4a !important; /* light mode - softer dark gray */
}

[data-theme="dark"] .dropdown-menu form button {
  color: #ffffff !important; /* dark mode - pure white */
}

.dropdown-menu form button:hover {
  background: rgba(14,165,233,0.15) !important;
  color: #0ea5e9 !important;
}

/* Buttons that may appear light */
.btn-light { 
  background: rgba(255,255,255,0.1) !important; 
  color: #e5e7eb !important; 
  border: 1px solid rgba(148,163,184,.35) !important; 
}
.btn-light:hover { background: rgba(255,255,255,0.14) !important; }

/* Tables with striped backgrounds */
.table-striped>tbody>tr:nth-of-type(odd) { background-color: rgba(255,255,255,0.03) !important; }

/* Pills/badges */
.badge { background: rgba(14,165,233,.2) !important; color: #e5e7eb !important; }

.modern-btn:hover {
  background: linear-gradient(135deg, #0284c7, #0d9488);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(14, 165, 233, 0.4);
}

/* Right Navigation */
.right-nav {
  gap: 0.5rem;
}

/* Language selector styling */
.modern-navbar .dropdown-toggle::after {
  margin-left: 0.5rem;
  transition: transform 0.3s ease;
}

.modern-navbar .dropdown-toggle[aria-expanded="true"]::after {
  transform: rotate(180deg);
}

/* 🎯 ADDITIONAL DROPDOWN FIXES - Handle edge cases */

/* Fix dropdown toggle buttons */
.dropdown-toggle {
  color: #4a4a4a !important; /* light mode - softer dark gray */
}

[data-theme="dark"] .dropdown-toggle {
  color: #ffffff !important; /* dark mode - pure white */
}

.dropdown-toggle:hover,
.dropdown-toggle:focus,
.dropdown-toggle:active {
  color: #0ea5e9 !important;
}

/* Fix any remaining white backgrounds in dropdown containers */
.dropdown-menu .container-fluid,
.dropdown-menu .row,
.dropdown-menu .col-md-3 {
  background: transparent !important;
}

/* Fix badges in dropdowns */
.dropdown-menu .badge {
  background: rgba(14,165,233,0.2) !important;
  color: #0ea5e9 !important; /* light mode */
}

[data-theme="dark"] .dropdown-menu .badge {
  color: #ffffff !important; /* dark mode - pure white */
}

/* Fix small text in dropdowns */
.dropdown-menu small.text-muted {
  color: #6c757d !important; /* light mode */
}

[data-theme="dark"] .dropdown-menu small.text-muted {
  color: #ffffff !important; /* white in dark mode instead of gray */
}

/* 🚀 FINAL NUCLEAR OVERRIDE - Catch any remaining white backgrounds */
.dropdown-menu *,
.dropdown-menu .dropdown-item *,
.dropdown-menu form,
.dropdown-menu form * {
  background-color: transparent !important;
  background: transparent !important;
}

/* Ensure dropdown menu itself has theme-aware background */
.dropdown-menu {
  background: #fafafa !important; /* light mode - softer off-white */
  border: 1px solid rgba(0,0,0,.1) !important;
}

[data-theme="dark"] .dropdown-menu {
  background: linear-gradient(135deg, rgba(15,23,42,0.95), rgba(30,41,59,0.85)) !important;
  border: 1px solid rgba(148,163,184,.2) !important;
}

/* Responsive Design */
@media (max-width: 992px) {
  .mega-menu {
    width: 100%;
    left: 0 !important;
    transform: none !important;
    position: static !important;
    margin-top: 0.5rem;
  }
  
  .modern-nav-link {
    padding: 0.75rem 1rem !important;
    border-radius: 0;
    border-bottom: 1px solid #f8f9fa;
  }
  
  .modern-nav-link:hover {
    background-color: rgba(220, 53, 69, 0.05);
    transform: none;
  }
  
  .user-menu {
    border-radius: 6px;
  }
  
  .right-nav {
    flex-direction: column;
    width: 100%;
    gap: 0;
  }
  
  .right-nav .dropdown,
  .right-nav .nav-link {
    margin: 0;
    width: 100%;
  }
  
  .modern-dropdown {
    position: static !important;
    transform: none !important;
    width: 100%;
    box-shadow: none;
    border-radius: 0;
    border-top: 1px solid #f8f9fa;
  }
}

@media (max-width: 768px) {
  .mega-menu .container-fluid .row {
    flex-direction: column;
  }
  
  .mega-menu .col-md-3 {
    margin-bottom: 1rem;
  }
  
  .modern-btn {
    width: 100%;
    margin-top: 1rem;
  }
}

/* Animation Classes */
.animate-in {
  animation: fadeInUp 0.3s ease forwards;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Enhanced Dropdown Animations */
.modern-dropdown-item {
  animation: fadeInUp 0.3s ease forwards;
  opacity: 0;
}

.modern-dropdown.show .modern-dropdown-item {
  opacity: 1;
}

/* Smooth transitions for all interactive elements */
.modern-nav-link,
.modern-dropdown-item,
.modern-btn {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Focus states for accessibility */
.modern-nav-link:focus,
.modern-dropdown-item:focus,
.modern-btn:focus {
  outline: 2px solid #dc3545;
  outline-offset: 2px;
}

/* Loading state for navigation */
.navbar-loading {
  position: relative;
  overflow: hidden;
}

.navbar-loading::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* Hero Section */
.hero-section {
  color: #e5e7eb;
  padding: 3rem 0 1.25rem;
  text-align: center;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.hero-subtitle {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  opacity: 0.9;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* Tool Categories */
.tool-categories {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.category-btn {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
}

.category-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  color: white;
  text-decoration: none;
}

.category-btn.active {
  background: rgba(255, 255, 255, 0.9);
  color: #333;
}

/* Tools Grid */
.tools-section {
  padding: 4rem 0;
  background-color: transparent;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.tool-card {
  background: linear-gradient(135deg, rgba(15,23,42,0.8), rgba(30,41,59,0.6));
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 8px 32px rgba(2,6,23,0.3);
  transition: all 0.3s ease;
  text-decoration: none;
  color: #e5e7eb;
  border: 1px solid rgba(14,165,233,0.2);
  backdrop-filter: blur(8px);
}

.tool-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(14,165,233,0.2);
  background: linear-gradient(135deg, rgba(15,23,42,0.9), rgba(30,41,59,0.7));
  border-color: rgba(14,165,233,0.4);
  text-decoration: none;
  color: inherit;
}

.tool-icon {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, rgba(14,165,233,0.2), rgba(15,118,110,0.15));
  border: 1px solid rgba(14,165,233,0.3);
}

.tool-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: #e5e7eb;
}

.tool-description {
  color: rgba(229,231,235,.8);
  font-size: 0.95rem;
  line-height: 1.5;
}

.new-badge {
  background: #28a745;
  color: white;
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-weight: 600;
  margin-left: 0.5rem;
}

/* Work Your Way Section */
.work-section {
  padding: 4rem 0;
  background: transparent;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.work-card {
  text-align: center;
  padding: 2rem;
}

.work-image {
  width: 100%;
  height: 200px;
  background: rgba(255,255,255,0.06);
  border-radius: 12px;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: rgba(229,231,235,.6);
}

/* Premium Section */
.premium-section {
  background: transparent;
  padding: 4rem 0;
  text-align: center;
}

.premium-features {
  list-style: none;
  padding: 0;
  margin: 2rem 0;
}

.premium-features li {
  padding: 0.5rem 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.premium-features i {
  color: #28a745;
  font-size: 1.2rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-subtitle {
    font-size: 1.1rem;
  }
  
  .tool-categories {
    gap: 0.5rem;
  }
  
  .category-btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }
  
  .tools-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* Button Styles */
.btn {
  border-radius: 8px;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  transition: all 0.3s ease;
}

.btn-danger {
  background-color: #dc3545;
  border-color: #dc3545;
}

.btn-danger:hover {
  background-color: #c82333;
  border-color: #bd2130;
  transform: translateY(-2px);
}

/* Enhanced File Upload Styles */
.file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  margin-bottom: 0.75rem;
  background: linear-gradient(135deg, rgba(15,23,42,0.8), rgba(30,41,59,0.6));
  border: 1px solid rgba(14,165,233,0.2);
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(2,6,23,0.3);
  transition: all 0.3s ease;
  backdrop-filter: blur(8px);
}

.file-item:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transform: translateY(-1px);
}

.file-info {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
}

.file-preview {
  margin-right: 1rem;
  flex-shrink: 0;
}

.file-thumbnail {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background: #f8f9fa;
  border: 2px solid #e9ecef;
  transition: all 0.3s ease;
}

.file-thumbnail:hover {
  border-color: #007bff;
  transform: scale(1.05);
}

.file-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.3s ease;
}

.file-thumbnail:not(.loaded) img {
  opacity: 0;
}

.thumbnail-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.7);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.file-thumbnail:hover .thumbnail-overlay {
  opacity: 1;
}

.file-thumbnail i {
  font-size: 1.5rem;
}

.file-details {
  flex: 1;
  min-width: 0;
}

.file-name {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.25rem 0;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-size {
  color: #6c757d;
  font-size: 0.875rem;
  margin: 0 0 0.5rem 0;
}

.file-status .badge {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
}

.file-actions {
  display: flex;
  gap: 0.25rem;
  flex-shrink: 0;
}

.file-actions .btn {
  padding: 0.375rem 0.5rem;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.file-actions .btn:hover {
  transform: translateY(-1px);
}

/* Enhanced Upload Area */
.upload-area {
  border: 2px dashed rgba(14,165,233,0.3);
  border-radius: 12px;
  padding: 3rem 2rem;
  text-align: center;
  background: linear-gradient(135deg, rgba(15,23,42,0.6), rgba(30,41,59,0.4));
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(8px);
}

.upload-area::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(0,123,255,0.1), transparent);
  transform: rotate(45deg);
  transition: all 0.6s ease;
  opacity: 0;
}

.upload-area:hover::before {
  opacity: 1;
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
  100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.upload-area:hover {
  border-color: #007bff;
  background: linear-gradient(135deg, #e3f2fd 0%, #f8f9fa 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0,123,255,0.15);
}

.upload-area.dragover {
  border-color: #28a745;
  background: linear-gradient(135deg, #e8f5e8 0%, #f8f9fa 100%);
  transform: scale(1.02);
  box-shadow: 0 12px 30px rgba(40,167,69,0.2);
}

.upload-area.dragover::before {
  background: linear-gradient(45deg, transparent, rgba(40,167,69,0.1), transparent);
}

/* Enhanced Progress Bar */
.progress {
  height: 12px;
  border-radius: 6px;
  background-color: #e9ecef;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

.progress-bar {
  background: linear-gradient(135deg, #007bff, #0056b3);
  transition: width 0.6s ease;
  position: relative;
  overflow: hidden;
}

.progress-bar::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: progress-shimmer 2s infinite;
}

@keyframes progress-shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

.progress-bar.progress-bar-striped {
  background-image: linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);
  background-size: 1rem 1rem;
}

/* Enhanced File List */
.file-list {
  background: linear-gradient(135deg, rgba(15,23,42,0.8), rgba(30,41,59,0.6));
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 8px 32px rgba(2,6,23,0.3);
  border: 1px solid rgba(14,165,233,0.2);
  backdrop-filter: blur(8px);
}

.file-list h5 {
  color: #333;
  font-weight: 600;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.file-list h5::before {
  content: '📁';
  font-size: 1.2rem;
}

/* Enhanced Modal Styles */
.modal-content {
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  border: none;
}

.modal-header {
  background: linear-gradient(135deg, rgba(15,23,42,0.9), rgba(30,41,59,0.7));
  border-bottom: 1px solid rgba(14,165,233,0.2);
  border-radius: 12px 12px 0 0;
}

.modal-body {
  padding: 2rem;
}

/* Responsive Design for File Items */
@media (max-width: 768px) {
  .file-item {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }
  
  .file-info {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  
  .file-preview {
    margin-right: 0;
    margin-bottom: 0.5rem;
  }
  
  .file-actions {
    justify-content: center;
  }
  
  .upload-area {
    padding: 2rem 1rem;
  }
  
  .file-thumbnail {
    width: 80px;
    height: 80px;
  }
}

/* Animation Classes */
.fade-in {
  animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.slide-in {
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from { transform: translateX(-100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Utility Classes */
.text-center {
  text-align: center;
}

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 3rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 3rem; }

.py-5 { padding-top: 3rem; padding-bottom: 3rem; }