:root {
  --bg: #f7fafc;
  --card: #ffffff;
  --muted: #6b7280;
}

/* Smooth theme transitions */
html,
body {
  transition: background-color 0.3s ease, color 0.3s ease;
}

body {
  padding-top: 5rem;
  /* 80px for header h-20 on all devices */
}

/* Center search box placeholder */
#search-input::placeholder {
  text-align: center;
}

/* Standardized typography for tool pages */
.prose {
  max-width: none;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.prose p,
.prose li,
.text-gray-700,
.text-gray-600 {
  color: #374151 !important;
  font-size: 0.875rem;
  /* 14px - smaller for better readability */
  line-height: 1.6;
}

.prose p {
  margin-bottom: 1rem;
  /* 16px spacing between paragraphs */
}

.prose h2,
h2 {
  color: #0b1220 !important;
  font-size: 1.5rem;
  /* 24px */
  font-weight: 700;
  line-height: 1.3;
  margin-top: 2rem;
  /* 32px top spacing */
  margin-bottom: 1rem;
  /* 16px bottom spacing */
}

.prose h3,
h3 {
  color: #0b1220 !important;
  font-size: 1.125rem;
  /* 18px */
  font-weight: 600;
  line-height: 1.4;
  margin-top: 1.5rem;
  /* 24px top spacing */
  margin-bottom: 0.75rem;
  /* 12px bottom spacing */
}

.prose h4,
h4 {
  color: #0b1220 !important;
  font-size: 1rem;
  /* 16px */
  font-weight: 600;
  line-height: 1.5;
  margin-top: 1.25rem;
  /* 20px top spacing */
  margin-bottom: 0.5rem;
  /* 8px bottom spacing */
}

.prose ul,
.prose ol {
  color: #374151 !important;
  font-size: 0.875rem;
  /* 14px */
  margin-bottom: 1rem;
  /* 16px spacing after lists */
  padding-left: 1.5rem;
  /* 24px indent for list items */
}

.prose ul li,
.prose ol li {
  font-size: 0.875rem;
  /* 14px */
  line-height: 1.6;
  margin-bottom: 0.5rem;
  /* 8px spacing between list items */
}

.prose strong {
  color: #0b1220 !important;
  font-weight: 600;
}

/* Additional spacing for sections */
.prose>*:first-child {
  margin-top: 0;
  /* Remove top margin from first element */
}

.prose>*:last-child {
  margin-bottom: 0;
  /* Remove bottom margin from last element */
}

[data-theme="dark"] {
  --bg: #0b1220;
  --card: #0b1220;
  --muted: #d1d5db;
  color-scheme: dark;
}

[data-theme="dark"] html,
[data-theme="dark"] body {
  background: #0b1220 !important;
  color: #f3f4f6 !important;
}

/* Dark mode - ALL backgrounds to #0b1220 */
[data-theme="dark"] .bg-white,
[data-theme="dark"] .bg-gray-50,
[data-theme="dark"] .bg-gray-100,
[data-theme="dark"] div[class*="bg-white"],
[data-theme="dark"] section[class*="bg-white"],
[data-theme="dark"] header[class*="bg-white"],
[data-theme="dark"] footer[class*="bg-white"] {
  background-color: #0b1220 !important;
}

/* Dark mode - Borders - VERY SUBTLE */
[data-theme="dark"] .border-gray-200,
[data-theme="dark"] .border-gray-100,
[data-theme="dark"] .border,
[data-theme="dark"] [class*="border-"] {
  border-color: rgba(255, 255, 255, 0.05) !important;
}

/* Dark mode - Text colors for visibility */
[data-theme="dark"] .text-gray-600,
[data-theme="dark"] .text-gray-700,
[data-theme="dark"] .text-gray-800,
[data-theme="dark"] .text-gray-900 {
  color: #e5e7eb !important;
}

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

[data-theme="dark"] .text-gray-400 {
  color: #9ca3af !important;
}

[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] h5,
[data-theme="dark"] h6 {
  color: #ffffff !important;
}

[data-theme="dark"] p {
  color: #e5e7eb !important;
}

/* Dark mode - All text elements */
[data-theme="dark"] span,
[data-theme="dark"] div,
[data-theme="dark"] label,
[data-theme="dark"] li {
  color: #e5e7eb;
}

[data-theme="dark"] a {
  color: #e5e7eb;
}

[data-theme="dark"] .text-xs,
[data-theme="dark"] .text-sm,
[data-theme="dark"] .text-base {
  color: #e5e7eb !important;
}

[data-theme="dark"] .font-semibold,
[data-theme="dark"] .font-bold {
  color: #ffffff !important;
}

/* Dark mode - Specific elements */
[data-theme="dark"] .prose {
  color: #e5e7eb !important;
}

[data-theme="dark"] .prose p,
[data-theme="dark"] .prose li,
[data-theme="dark"] .prose ol,
[data-theme="dark"] .prose ul {
  color: #e5e7eb !important;
}

/* Dark mode - Cards and containers */
[data-theme="dark"] .tool-card,
[data-theme="dark"] .featured-tool-card,
[data-theme="dark"] .benefit-card,
[data-theme="dark"] .category-preview-card,
[data-theme="dark"] .stat-card,
[data-theme="dark"] .input-card,
[data-theme="dark"] .result-card {
  background-color: #0b1220 !important;
  border-color: rgba(255, 255, 255, 0.05) !important;
}

[data-theme="dark"] .tool-card .text-xs,
[data-theme="dark"] .tool-card .text-sm {
  color: #d1d5db !important;
}

[data-theme="dark"] .tool-card .font-semibold {
  color: #ffffff !important;
}

/* Dark mode - Mobile search trigger */
[data-theme="dark"] .mobile-search-trigger,
[data-theme="dark"] #mobile-search-trigger {
  background-color: rgba(99, 102, 241, 0.1) !important;
  color: #e5e7eb !important;
  border: 1px solid rgba(99, 102, 241, 0.3) !important;
  backdrop-filter: blur(10px);
}

[data-theme="dark"] .mobile-search-trigger:hover,
[data-theme="dark"] #mobile-search-trigger:hover {
  background-color: rgba(99, 102, 241, 0.2) !important;
  border-color: rgba(99, 102, 241, 0.5) !important;
}

[data-theme="dark"] .mobile-search-text {
  color: #9ca3af !important;
}

[data-theme="dark"] .mobile-search-icon {
  color: #818cf8 !important;
}

/* Dark mode - Mobile menu button */
[data-theme="dark"] #mobile-toggle {
  background-color: rgba(99, 102, 241, 0.1) !important;
  color: #e5e7eb !important;
  border: 1px solid rgba(99, 102, 241, 0.3) !important;
  backdrop-filter: blur(10px);
}

[data-theme="dark"] #mobile-toggle:hover {
  background-color: rgba(99, 102, 241, 0.2) !important;
  border-color: rgba(99, 102, 241, 0.5) !important;
}

[data-theme="dark"] #mobile-toggle svg {
  color: #818cf8 !important;
  stroke: #818cf8 !important;
}

[data-theme="dark"] #mobile-toggle .hamburger-line {
  background-color: #818cf8 !important;
}

/* Logo Toggling */
.logo-light {
  display: block;
}

.logo-dark {
  display: none;
}

[data-theme="dark"] .logo-light {
  display: none !important;
}

[data-theme="dark"] .logo-dark {
  display: block !important;
}

[data-theme="dark"] #search-overlay .bg-white {
  background-color: #0b1220 !important;
}

[data-theme="dark"] #overlay-search-input {
  background-color: #1f2937 !important;
  color: #e5e7eb !important;
}

[data-theme="dark"] #close-search {
  color: #e5e7eb !important;
}

[data-theme="dark"] #close-search:hover {
  background-color: #1f2937 !important;
}

/* Dark mode - Footer links hover fix */
[data-theme="dark"] footer a:hover {
  color: #ffffff !important;
}

body {
  font-family: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.tool-card {
  transition: transform .14s ease, box-shadow .14s ease;
}

.tool-card:focus-within,
.tool-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.08);
}

.category-title {
  border-left: 4px solid rgba(99, 102, 241, 0.14);
  padding-left: .75rem;
}

.search-icon {
  margin-left: -2.5rem;
  pointer-events: none;
  opacity: .6;
}

@media (max-width: 767px) {
  .hero-illustration {
    height: 220px;
    border-radius: 16px;
  }

  /* Increase brand name size on mobile */
  header .text-lg {
    font-size: 1.1rem !important;
    font-weight: 600 !important;
  }

  /* Increase logo icon size on mobile */
  header .w-10 {
    width: 2.5rem !important;
    height: 2.5rem !important;
    font-size: 0.875rem !important;
  }

  .mobile-search-trigger {
    justify-content: center;
    padding-right: 0;
  }

  .mobile-search-text {
    flex: 1 1 auto;
    text-align: center;
  }

  .mobile-search-icon {
    margin-left: auto;
  }
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.site-logo-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.375rem;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1;
}

.site-logo-text {
  font-size: 1.125rem;
  font-weight: 600;
  color: #1f2937;
}

/* Tool page specific styles */
.tool-container {
  max-width: 900px;
  margin: 0 auto;
}

.tool-input,
.tool-textarea,
.tool-select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  transition: border-color 0.2s;
}

.tool-input:focus,
.tool-textarea:focus,
.tool-select:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.tool-textarea {
  min-height: 150px;
  font-family: 'Courier New', monospace;
  resize: vertical;
}

.tool-button {
  padding: 0.75rem 1.5rem;
  background: #6366f1;
  color: white;
  border: none;
  border-radius: 0.5rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.tool-button:hover {
  background: #4f46e5;
}

.tool-button:disabled {
  background: #9ca3af;
  cursor: not-allowed;
}

.tool-button-secondary {
  background: #f3f4f6;
  color: #374151;
}

.tool-button-secondary:hover {
  background: #e5e7eb;
}

.result-box {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  padding: 1rem;
  margin-top: 1rem;
}

[data-theme="dark"] .tool-input,
[data-theme="dark"] .tool-textarea,
[data-theme="dark"] .tool-select {
  background: #071022;
  border-color: #374151;
  color: #f3f4f6;
}

[data-theme="dark"] .result-box {
  background: #0b1220;
  border-color: rgba(255, 255, 255, 0.05);
}

.faq-item {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 1rem;
  margin-bottom: 0.75rem;
  transition: all 0.3s ease;
}

.faq-item:last-child {
  margin-bottom: 0;
}

.faq-item:hover {
  background: #f3f4f6;
  border-color: #d1d5db;
}

[data-theme="dark"] .faq-item {
  background: #1a2332;
  border-color: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .faq-item:hover {
  background: #1f2937;
  border-color: rgba(255, 255, 255, 0.08);
}

.faq-question {
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #1f2937;
  user-select: none;
}

[data-theme="dark"] .faq-question {
  color: #f3f4f6 !important;
}

.faq-answer {
  margin-top: 0.75rem;
  color: #9ca3af;
  display: none;
  padding-top: 0.75rem;
  border-top: 1px solid #e5e7eb;
}

[data-theme="dark"] .faq-answer {
  color: #d1d5db !important;
  border-top-color: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .faq-answer p {
  color: #d1d5db !important;
}

.faq-answer.active {
  display: block;
}

.similar-tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

/* Dark mode - Similar Tools sidebar */
.ato-card-bg {
  background-color: #ffffff !important;
}

[data-theme="dark"] .ato-card-bg {
  background-color: #0b1220 !important;
}

.ato-tool-card-bg {
  background-color: #ffffff !important;
}

[data-theme="dark"] .ato-tool-card-bg {
  background-color: #1a2332 !important;
  border-color: rgba(255, 255, 255, 0.05) !important;
}

[data-theme="dark"] .ato-tool-card-bg:hover {
  background-color: #1f2937 !important;
}

/* --- Similar Tools mobile/tablet behavior --- */
@media (max-width: 1024px) {

  /* turn off sticky on small screens */
  main .lg\:col-span-1 .sticky {
    position: static !important;
    top: auto !important;
  }

  /* small spacing when we insert the card under the tool */
  .ato-similar-moved {
    margin-top: 1.5rem;
  }
}

/* ===== SEO Tools - Thin, Clean Borders ===== */
/* Global border styles for all SEO tool pages */
/* Input and result cards */
.input-card,
.result-card {
  border-width: 0.5px !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
}

/* Textareas and input fields in SEO tools */
.tool-textarea,
.tool-input {
  border-width: 0.5px !important;
  border-color: rgba(0, 0, 0, 0.1) !important;
}

/* Status boxes, directive items, URL items, keyword items */
.status-box,
.directive-item,
.url-item,
.keyword-item,
.title-option,
.meta-item,
.meta-output,
.slug-output,
.comparison-box,
.preview-box {
  border-width: 0.5px !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
}

/* Border-left for stat boxes and similar - reduce from 3-4px to 1px */
.status-box,
.stat-box,
.directive-item,
.url-item,
.keyword-item,
.title-option,
.meta-item {
  border-left-width: 1px !important;
}

/* Stat boxes with color indicators - keep colors but make thinner */
.stat-box.good,
.stat-box.warning,
.stat-box.bad,
.status-box.allowed,
.status-box.blocked {
  border-left-width: 1px !important;
}

/* FAQ items - removed conflicting rules, using main FAQ styles from common.css */

.border-gray-200,
.border-gray-100 {
  border-width: 0.5px !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
}

@media (min-resolution: 2dppx) {

  .input-card,
  .result-card,
  .tool-textarea,
  .tool-input,
  .status-box,
  .directive-item,
  .url-item,
  .keyword-item,
  .title-option,
  .meta-item,
  .meta-output,
  .slug-output,
  .comparison-box,
  .preview-box {
    border-width: 0.5px !important;
  }
}

body.seo-tool-ui {
  --seo-accent: #1f2937;
  --seo-accent-strong: #0f172a;
  --seo-accent-soft: rgba(15, 23, 42, 0.12);
  --seo-surface: #ffffff;
  --seo-surface-muted: #f8fafc;
  --seo-text-muted: #475569;
}

/* ==========================================
   THEME TOGGLE BUTTON STYLES
   ========================================== */

/* Desktop theme toggle */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.theme-toggle:hover {
  background: #e5e7eb;
  transform: scale(1.05);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
  color: #6b7280;
  transition: all 0.3s ease;
}

.theme-toggle:hover svg {
  color: #4b5563;
}

/* Dark mode toggle styles */
[data-theme="dark"] .theme-toggle {
  background: #374151;
  border-color: #4b5563;
}

[data-theme="dark"] .theme-toggle:hover {
  background: #4b5563;
}

[data-theme="dark"] .theme-toggle svg {
  color: #d1d5db;
}

[data-theme="dark"] .theme-toggle:hover svg {
  color: #f3f4f6;
}

/* Mobile theme toggle */
.mobile-theme-toggle {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.5rem;
  color: #374151;
  border-radius: 0.375rem;
  transition: all 0.2s ease;
  cursor: pointer;
  border-top: 1px solid #e5e7eb;
  margin-top: 0.5rem;
  padding-top: 1rem;
}

.mobile-theme-toggle:hover {
  background: #f9fafb;
  color: #4f46e5;
}

.mobile-theme-toggle svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

[data-theme="dark"] .mobile-theme-toggle {
  color: #d1d5db;
  border-top-color: #374151;
}

[data-theme="dark"] .mobile-theme-toggle:hover {
  background: #374151;
  color: #818cf8;
}

/* Icon rotation animation */
.theme-toggle.rotating svg,
.mobile-theme-toggle.rotating svg {
  animation: rotate-icon 0.5s ease;
}

@keyframes rotate-icon {
  0% {
    transform: rotate(0deg) scale(1);
  }

  50% {
    transform: rotate(180deg) scale(0.8);
  }

  100% {
    transform: rotate(360deg) scale(1);
  }
}

/* ==========================================
   DARK MODE - BUTTON & INTERACTIVE ELEMENT FIXES
   ========================================== */

/* Unit toggle buttons (BMR Calculator, etc.) */
[data-theme="dark"] .unit-toggle {
  background: #1f2937 !important;
  border-color: #374151 !important;
  color: #d1d5db !important;
}

[data-theme="dark"] .unit-toggle.active {
  background: #6366f1 !important;
  color: white !important;
  border-color: #6366f1 !important;
}

[data-theme="dark"] .unit-toggle:hover:not(.active) {
  background: #374151 !important;
  border-color: #4b5563 !important;
}

/* Quality selection buttons (PDF tools, etc.) */
[data-theme="dark"] .quality-option,
[data-theme="dark"] .option-button,
[data-theme="dark"] .selection-button {
  background: #1f2937 !important;
  border-color: #374151 !important;
  color: #d1d5db !important;
}

[data-theme="dark"] .quality-option.active,
[data-theme="dark"] .option-button.active,
[data-theme="dark"] .selection-button.active {
  background: #6366f1 !important;
  color: white !important;
  border-color: #6366f1 !important;
}

/* Override inline styles - Mobile search trigger and menu buttons */
[data-theme="dark"] button[style*="background-color: #ffffff"],
[data-theme="dark"] button[style*="background-color:#ffffff"],
[data-theme="dark"] .mobile-search-trigger[style*="background"],
[data-theme="dark"] #mobile-toggle[style*="background"],
[data-theme="dark"] #mobile-search-trigger[style*="background"] {
  background-color: rgba(99, 102, 241, 0.1) !important;
  color: #e5e7eb !important;
  border-color: rgba(99, 102, 241, 0.3) !important;
}

[data-theme="dark"] button[style*="background-color: #ffffff"]:hover,
[data-theme="dark"] button[style*="background-color:#ffffff"]:hover,
[data-theme="dark"] .mobile-search-trigger[style*="background"]:hover,
[data-theme="dark"] #mobile-toggle[style*="background"]:hover,
[data-theme="dark"] #mobile-search-trigger[style*="background"]:hover {
  background-color: rgba(99, 102, 241, 0.2) !important;
  border-color: rgba(99, 102, 241, 0.5) !important;
}

/* Generic button backgrounds */
[data-theme="dark"] button.bg-white,
[data-theme="dark"] .button-white,
[data-theme="dark"] [class*="btn-white"] {
  background-color: #1f2937 !important;
  color: #e5e7eb !important;
  border-color: #374151 !important;
}

/* Action buttons (Encode, Decode, Clear, etc.) */
[data-theme="dark"] .action-button,
[data-theme="dark"] .control-button,
[data-theme="dark"] .tool-action {
  background: #1f2937 !important;
  border-color: #374151 !important;
  color: #e5e7eb !important;
}

[data-theme="dark"] .action-button:hover,
[data-theme="dark"] .control-button:hover,
[data-theme="dark"] .tool-action:hover {
  background: #374151 !important;
  border-color: #4b5563 !important;
}

/* Preview and output boxes */
[data-theme="dark"] .preview-output,
[data-theme="dark"] .output-box,
[data-theme="dark"] .preview-area {
  background: #0b1220 !important;
  border-color: rgba(255, 255, 255, 0.05) !important;
  color: #e5e7eb !important;
}

/* Rename method dropdowns and selects */
[data-theme="dark"] .rename-method,
[data-theme="dark"] .method-select {
  background: #1f2937 !important;
  border-color: #374151 !important;
  color: #e5e7eb !important;
}

/* Image quality cards and options */
[data-theme="dark"] .quality-card,
[data-theme="dark"] .image-quality-option {
  background: #1f2937 !important;
  border-color: #374151 !important;
  color: #e5e7eb !important;
}

[data-theme="dark"] .quality-card.selected,
[data-theme="dark"] .image-quality-option.selected {
  background: #6366f1 !important;
  color: white !important;
  border-color: #6366f1 !important;
}

/* Ensure all white backgrounds in tool interfaces are dark */
[data-theme="dark"] .tool-interface [style*="background: white"],
[data-theme="dark"] .tool-interface [style*="background:white"],
[data-theme="dark"] .tool-interface [style*="background-color: white"],
[data-theme="dark"] .tool-interface [style*="background-color:white"] {
  background: #1f2937 !important;
  background-color: #1f2937 !important;
}

/* Fix for any remaining white text on white backgrounds */
[data-theme="dark"] button,
[data-theme="dark"] .btn,
[data-theme="dark"] [class*="button"] {
  color: inherit;
}

[data-theme="dark"] button:not(.tool-button):not(.bg-indigo-600):not([class*="indigo"]):not([class*="primary"]),
[data-theme="dark"] .btn:not(.tool-button):not(.bg-indigo-600):not([class*="indigo"]):not([class*="primary"]) {
  background-color: #1f2937;
  color: #e5e7eb;
  border-color: #374151;
}

/* Specific fix for toggle switches */
[data-theme="dark"] .toggle-switch,
[data-theme="dark"] .switch-bg {
  background-color: #374151 !important;
}

[data-theme="dark"] .toggle-switch.active,
[data-theme="dark"] .switch-bg.active {
  background-color: #6366f1 !important;
}

/* Tool button secondary - fix for Decode, Copy, Clear buttons */
[data-theme="dark"] .tool-button-secondary {
  background: #1f2937 !important;
  color: #e5e7eb !important;
  border-color: #374151 !important;
}

[data-theme="dark"] .tool-button-secondary:hover {
  background: #374151 !important;
  border-color: #4b5563 !important;
}

[data-theme="dark"] .tool-button-secondary:disabled {
  background: #374151 !important;
  color: #6b7280 !important;
  cursor: not-allowed;
}

/* Utility tools - clipboard manager and similar */
[data-theme="dark"] .clipboard-content {
  background: rgba(15, 23, 42, 0.98) !important;
  backdrop-filter: blur(20px) saturate(180%);
}

[data-theme="dark"] .clipboard-item {
  background: #1e293b !important;
  border-color: #334155 !important;
}

[data-theme="dark"] .clipboard-item:hover {
  background: #334155 !important;
}

[data-theme="dark"] .clipboard-text {
  color: #e2e8f0 !important;
}

[data-theme="dark"] .tool-textarea,
[data-theme="dark"] .tool-input,
[data-theme="dark"] .tool-select {
  background: #1e293b !important;
  color: #e2e8f0 !important;
  border-color: #334155 !important;
}

[data-theme="dark"] .tool-textarea::placeholder,
[data-theme="dark"] .tool-input::placeholder {
  color: #64748b !important;
}

/* Password Manager */
[data-theme="dark"] .password-item {
  background: #1e293b !important;
  border-color: #334155 !important;
}

[data-theme="dark"] .password-item:hover {
  background: #334155 !important;
}

/* Timer and Pomodoro Timer */
[data-theme="dark"] .timer-display {
  background: #1e293b !important;
  color: #e2e8f0 !important;
  border-color: #334155 !important;
}

[data-theme="dark"] .timer-controls {
  background: #1e293b !important;
}

/* Markdown Editor and Notepad */
[data-theme="dark"] .editor-pane,
[data-theme="dark"] .preview-pane,
[data-theme="dark"] .note-editor {
  background: #1e293b !important;
  color: #e2e8f0 !important;
  border-color: #334155 !important;
}

[data-theme="dark"] .markdown-preview {
  background: #0f172a !important;
  color: #e2e8f0 !important;
}

/* Calendar */
[data-theme="dark"] .calendar-cell,
[data-theme="dark"] .day-cell {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #e2e8f0 !important;
}

[data-theme="dark"] .calendar-cell:hover,
[data-theme="dark"] .day-cell:hover {
  background: #334155 !important;
}

[data-theme="dark"] .calendar-header {
  background: #0f172a !important;
  color: #e2e8f0 !important;
}

/* Random Name Picker */
[data-theme="dark"] .name-item,
[data-theme="dark"] .picker-item {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #e2e8f0 !important;
}

/* Journal and Notes */
[data-theme="dark"] .journal-entry,
[data-theme="dark"] .note-card {
  background: #1e293b !important;
  border-color: #334155 !important;
}

/* Expense Tracker */
[data-theme="dark"] .expense-item,
[data-theme="dark"] .transaction-item {
  background: #1e293b !important;
  border-color: #334155 !important;
}

/* To-Do List */
[data-theme="dark"] .todo-item,
[data-theme="dark"] .task-item {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #e2e8f0 !important;
}

[data-theme="dark"] .todo-item:hover,
[data-theme="dark"] .task-item:hover {
  background: #334155 !important;
}

/* Birthday Reminder */
[data-theme="dark"] .birthday-item,
[data-theme="dark"] .reminder-item {
  background: #1e293b !important;
  border-color: #334155 !important;
}

/* Generic utility tool containers */
[data-theme="dark"] .utility-container,
[data-theme="dark"] .tool-container {
  background: #0f172a !important;
}

[data-theme="dark"] .utility-card,
[data-theme="dark"] .tool-card-content {
  background: #1e293b !important;
  border-color: #334155 !important;
}

/* Birthday Reminder specific */
[data-theme="dark"] .form-card,
[data-theme="dark"] .upcoming-birthdays {
  background: rgba(15, 23, 42, 0.95) !important;
  backdrop-filter: blur(20px) saturate(180%);
}

[data-theme="dark"] .birthday-item {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%) !important;
  border-left-color: #ec4899 !important;
  color: #e2e8f0 !important;
}

[data-theme="dark"] .birthday-item.upcoming {
  background: linear-gradient(135deg, #064e3b 0%, #022c22 100%) !important;
  border-left-color: #10b981 !important;
}

[data-theme="dark"] .birthday-item.today {
  background: linear-gradient(135deg, #78350f 0%, #451a03 100%) !important;
  border-left-color: #f59e0b !important;
}

/* Timer, Stopwatch, Pomodoro specific */
[data-theme="dark"] .timer-container,
[data-theme="dark"] .stopwatch-container,
[data-theme="dark"] .pomodoro-container {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 50%, #020617 100%) !important;
}

/* Journal and Note specific */
[data-theme="dark"] .journal-container,
[data-theme="dark"] .note-container {
  background: rgba(15, 23, 42, 0.95) !important;
}

[data-theme="dark"] .journal-entry,
[data-theme="dark"] .note-card {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #e2e8f0 !important;
}

/* Random Name Picker specific */
[data-theme="dark"] .picker-display,
[data-theme="dark"] .name-display {
  background: rgba(15, 23, 42, 0.95) !important;
  border-color: #334155 !important;
  color: #e2e8f0 !important;
}

[data-theme="dark"] .result-display {
  background: rgba(15, 23, 42, 0.95) !important;
  color: #e2e8f0 !important;
}

/* Screen Color Picker specific */
[data-theme="dark"] .color-display,
[data-theme="dark"] .picker-container {
  background: rgba(15, 23, 42, 0.98) !important;
}

/* To-Do List specific */
[data-theme="dark"] .todo-container {
  background: rgba(15, 23, 42, 0.9) !important;
}

/* Fix all text colors in utility tools */
[data-theme="dark"] .form-card h3,
[data-theme="dark"] .upcoming-birthdays h3,
[data-theme="dark"] .tool-label,
[data-theme="dark"] label {
  color: #e2e8f0 !important;
}

[data-theme="dark"] .text-gray-700,
[data-theme="dark"] .text-gray-800,
[data-theme="dark"] .text-gray-900 {
  color: #e2e8f0 !important;
}

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

/* Fix scrollbar for dark mode */
[data-theme="dark"] .birthday-list::-webkit-scrollbar-track,
[data-theme="dark"] *::-webkit-scrollbar-track {
  background: #1e293b !important;
}

[data-theme="dark"] .birthday-list::-webkit-scrollbar-thumb,
[data-theme="dark"] *::-webkit-scrollbar-thumb {
  background: #64748b !important;
}

/* Critical text visibility fixes for utility tools */
[data-theme="dark"] .birthday-container h2,
[data-theme="dark"] .timer-container h2,
[data-theme="dark"] .stopwatch-container h2,
[data-theme="dark"] .pomodoro-container h2,
[data-theme="dark"] .journal-container h2,
[data-theme="dark"] .note-container h2 {
  color: #ffffff !important;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5) !important;
}

/* Ensure all headings in utility tools are visible */
[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] h5,
[data-theme="dark"] h6 {
  color: #e2e8f0 !important;
}

/* Force light text on all utility tool elements */
[data-theme="dark"] .utility-tool-ui,
[data-theme="dark"] .utility-tool-ui * {
  color: #e2e8f0 !important;
}

/* Override specific gray text classes */
[data-theme="dark"] .utility-tool-ui .text-gray-700,
[data-theme="dark"] .utility-tool-ui .text-gray-800,
[data-theme="dark"] .utility-tool-ui .text-gray-900 {
  color: #e2e8f0 !important;
}

[data-theme="dark"] .utility-tool-ui .text-gray-500,
[data-theme="dark"] .utility-tool-ui .text-gray-600 {
  color: #94a3b8 !important;
}

/* Ensure form labels and inputs have visible text */
[data-theme="dark"] .utility-tool-ui label,
[data-theme="dark"] .utility-tool-ui input,
[data-theme="dark"] .utility-tool-ui textarea,
[data-theme="dark"] .utility-tool-ui select {
  color: #e2e8f0 !important;
}

/* Fix placeholder text */
[data-theme="dark"] .utility-tool-ui input::placeholder,
[data-theme="dark"] .utility-tool-ui textarea::placeholder {
  color: #64748b !important;
}

/* Ensure paragraph text is visible */
[data-theme="dark"] .utility-tool-ui p {
  color: #e2e8f0 !important;
}

/* Fix center text visibility */
[data-theme="dark"] .text-center {
  color: #94a3b8 !important;
}

/* ULTRA HIGH SPECIFICITY - Force all text to be visible in utility tools */
/* Targeted Text Visibility Fixes */
[data-theme="dark"] body.utility-tool-ui,
[data-theme="dark"] body.utility-tool-ui p,
[data-theme="dark"] body.utility-tool-ui li,
[data-theme="dark"] body.utility-tool-ui span,
[data-theme="dark"] body.utility-tool-ui label,
[data-theme="dark"] body.utility-tool-ui h1,
[data-theme="dark"] body.utility-tool-ui h2,
[data-theme="dark"] body.utility-tool-ui h3,
[data-theme="dark"] body.utility-tool-ui h4,
[data-theme="dark"] body.utility-tool-ui h5,
[data-theme="dark"] body.utility-tool-ui h6 {
  color: #e2e8f0 !important;
}

/* Allow transparency and specific colors for certain elements */
[data-theme="dark"] body.utility-tool-ui .text-transparent {
  color: transparent !important;
}

/* Force white text on gradient container headings */
[data-theme="dark"] .birthday-container h2[style*="text-shadow"],
[data-theme="dark"] .timer-container h2[style*="text-shadow"],
[data-theme="dark"] .stopwatch-container h2[style*="text-shadow"],
[data-theme="dark"] .pomodoro-container h2[style*="text-shadow"],
[data-theme="dark"] .journal-container h2[style*="text-shadow"],
[data-theme="dark"] .clipboard-container h2[style*="text-shadow"],
[data-theme="dark"] [class*="-container"] h2[style],
[data-theme="dark"] [class*="-container"] h3[style] {
  color: #ffffff !important;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5) !important;
}

/* Override any inline text color styles */
[data-theme="dark"] body.utility-tool-ui [style*="color"] {
  color: #e2e8f0 !important;
}

/* Specific fix for white text that should stay white */
[data-theme="dark"] body.utility-tool-ui .text-white,
[data-theme="dark"] body.utility-tool-ui [class*="btn-"],
[data-theme="dark"] body.utility-tool-ui button {
  color: #ffffff !important;
}

/* Ensure muted text is still visible */
[data-theme="dark"] body.utility-tool-ui .text-gray-400,
[data-theme="dark"] body.utility-tool-ui .text-gray-500,
[data-theme="dark"] body.utility-tool-ui .text-gray-600 {
  color: #94a3b8 !important;
}

/* Smart Dark Mode Overrides for Utility Tools & Components */

/* 1. Generic Utility Wrapper Overrides - carefully scoped */
[data-theme="dark"] body.utility-tool-ui .bg-white,
[data-theme="dark"] body.utility-tool-ui .bg-gray-50,
[data-theme="dark"] body.utility-tool-ui .bg-gray-100,
[data-theme="dark"] body.utility-tool-ui .bg-gray-200 {
  background-color: #0f172a !important;
  color: #e2e8f0 !important;
}

/* 2. Targeted Component Overrides */
/* Simple Journal, Password Manager, Color Picker, File Counter, To-Do, Calendar, etc. */
[data-theme="dark"] .journal-container .journal-textarea,
[data-theme="dark"] .journal-container .date-selector,
[data-theme="dark"] .journal-container .entry-list,
[data-theme="dark"] .color-picker-content,
[data-theme="dark"] .file-container .upload-area,
[data-theme="dark"] .file-container .stats-card,
[data-theme="dark"] .password-content,
[data-theme="dark"] .password-item,
[data-theme="dark"] .utility-shell,
[data-theme="dark"] .utility-panel,
/* To-Do List */
[data-theme="dark"] .todo-container,
[data-theme="dark"] .filter-btn,
/* Calendar */
[data-theme="dark"] .calendar-container,
[data-theme="dark"] .calendar-header,
[data-theme="dark"] .calendar-body,
[data-theme="dark"] .date-info-card,
[data-theme="dark"] .dropdown-menu,
[data-theme="dark"] .year-month-cell,
[data-theme="dark"] .year-cell,
/* Misc */
[data-theme="dark"] .clipboard-content,
[data-theme="dark"] .clipboard-item {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #e2e8f0 !important;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5) !important;
}

/* Additional Targeted Component Overrides (To-Do, Calendar) */
[data-theme="dark"] .todo-container,
[data-theme="dark"] .filter-btn,
[data-theme="dark"] .calendar-container,
[data-theme="dark"] .calendar-header,
[data-theme="dark"] .calendar-body,
[data-theme="dark"] .date-info-card,
[data-theme="dark"] .dropdown-menu,
[data-theme="dark"] .year-month-cell,
[data-theme="dark"] .year-cell,
[data-theme="dark"] .clipboard-content,
[data-theme="dark"] .clipboard-item {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #e2e8f0 !important;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5) !important;
}

/* 3. Gradient Item Overrides */
[data-theme="dark"] .entry-item,
[data-theme="dark"] .file-item,
[data-theme="dark"] .task-item,
[data-theme="dark"] .calendar-day,
[data-theme="dark"] .calendar-day.other-month {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%) !important;
  border-color: #334155 !important;
  color: #e2e8f0 !important;
}

[data-theme="dark"] .entry-item:hover,
[data-theme="dark"] .file-item:hover,
[data-theme="dark"] .task-item:hover,
[data-theme="dark"] .calendar-day:hover {
  background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%) !important;
  border-color: #4a5568 !important;
}

/* Specific Calendar Day overrides */
[data-theme="dark"] .calendar-day.today {
  background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%) !important;
  color: #ffffff !important;
}

[data-theme="dark"] .calendar-day.selected {
  background: linear-gradient(135deg, #db2777 0%, #be185d 100%) !important;
  color: #ffffff !important;
}

/* 4. Text Visibility Fixes */
/* Ensure headings in white-text containers (like colored gradients) stay white */
[data-theme="dark"] .journal-container h2,
[data-theme="dark"] .file-container h2,
[data-theme="dark"] .color-picker-container h2,
[data-theme="dark"] .todo-container h2,
[data-theme="dark"] .calendar-container h2 {
  color: #ffffff !important;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5) !important;
}

/* Force gray text to be light in dark mode */
[data-theme="dark"] body.utility-tool-ui .text-gray-500,
[data-theme="dark"] body.utility-tool-ui .text-gray-600,
[data-theme="dark"] body.utility-tool-ui .text-gray-700,
[data-theme="dark"] body.utility-tool-ui .text-gray-800,
[data-theme="dark"] body.utility-tool-ui .text-gray-900 {
  color: #cbd5e1 !important;
}

/* 5. Utility Shell & Panel Specific Dark Mode */
/* These override the detailed styles at the bottom of the file */
[data-theme="dark"] body.utility-tool-ui main .utility-shell {
  background: linear-gradient(140deg, #0f172a, #1e293b) !important;
  border-color: #334155 !important;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5) !important;
}

[data-theme="dark"] body.utility-tool-ui .utility-panel {
  background: #1e293b !important;
  border-color: #334155 !important;
}

/* 6. Form Elements */
[data-theme="dark"] body.utility-tool-ui select,
[data-theme="dark"] body.utility-tool-ui input[type="date"] {
  color-scheme: dark;
}


@keyframes seo-surface-fade {

  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes seo-accent-glow {
  0% {
    opacity: 0.35;
  }

  50% {
    opacity: 0.7;
  }

  100% {
    opacity: 0.35;
  }
}

body.seo-tool-ui .density-container,
body.seo-tool-ui .meta-container,
body.seo-tool-ui .extractor-container,
body.seo-tool-ui .robots-container,
body.seo-tool-ui .counter-container,
body.seo-tool-ui .simplifier-container,
body.seo-tool-ui .readability-container,
body.seo-tool-ui .sitemap-container,
body.seo-tool-ui .slug-container,
body.seo-tool-ui .meta-generator-container,
body.seo-tool-ui .title-container,
body.seo-tool-ui .title-generator-container,
body.seo-tool-ui .outline-container {
  background: linear-gradient(150deg, rgba(248, 250, 252, 0.98), rgba(255, 255, 255, 0.92)) !important;
  background-size: 100% 100% !important;
  border: 1px solid rgba(15, 23, 42, 0.08) !important;
  border-radius: 28px !important;
  padding: clamp(1.5rem, 2vw + 1rem, 2.5rem) !important;
  position: relative !important;
  overflow: hidden !important;
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.08) !important;
  animation: seo-surface-fade 0.6s ease-out !important;
}

body.seo-tool-ui .density-container::before,
body.seo-tool-ui .meta-container::before,
body.seo-tool-ui .extractor-container::before,
body.seo-tool-ui .robots-container::before,
body.seo-tool-ui .counter-container::before,
body.seo-tool-ui .simplifier-container::before,
body.seo-tool-ui .readability-container::before,
body.seo-tool-ui .sitemap-container::before,
body.seo-tool-ui .slug-container::before,
body.seo-tool-ui .meta-generator-container::before,
body.seo-tool-ui .title-container::before,
body.seo-tool-ui .title-generator-container::before,
body.seo-tool-ui .outline-container::before {
  content: "" !important;
  position: absolute !important;
  top: 0.85rem !important;
  left: 10% !important;
  right: 10% !important;
  height: 3px !important;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.18), rgba(15, 23, 42, 0.05)) !important;
  border-radius: 999px !important;
  animation: seo-accent-glow 7s ease-in-out infinite !important;
  pointer-events: none !important;
}

body.seo-tool-ui .input-card,
body.seo-tool-ui .result-card,
body.seo-tool-ui .outline-result,
body.seo-tool-ui .preview-box,
body.seo-tool-ui .comparison-box,
body.seo-tool-ui .score-display {
  background: var(--seo-surface) !important;
  border: 1px solid rgba(15, 23, 42, 0.09) !important;
  border-radius: 22px !important;
  padding: clamp(1.1rem, 2vw + 0.75rem, 1.9rem) !important;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06) !important;
  backdrop-filter: none !important;
  animation: seo-surface-fade 0.5s ease-out !important;
}

body.seo-tool-ui .score-display {
  text-align: center !important;
  color: var(--seo-accent) !important;
}

body.seo-tool-ui .score-value {
  font-size: clamp(2.5rem, 4vw, 3.75rem) !important;
  font-weight: 700 !important;
  margin-bottom: 0.35rem !important;
  color: var(--seo-accent-strong) !important;
}

body.seo-tool-ui .score-label {
  font-size: 1.15rem !important;
  color: var(--seo-text-muted) !important;
}

body.seo-tool-ui .score-description {
  margin-top: 0.75rem !important;
  font-size: 0.95rem !important;
  color: var(--seo-text-muted) !important;
  opacity: 0.9 !important;
}

body.seo-tool-ui .result-card {
  display: none !important;
}

body.seo-tool-ui .result-card.show,
body.seo-tool-ui .outline-result.show {
  display: block !important;
}

body.seo-tool-ui .tool-textarea,
body.seo-tool-ui .tool-input,
body.seo-tool-ui .tool-select {
  background: var(--seo-surface) !important;
  border: 1px solid rgba(15, 23, 42, 0.12) !important;
  border-radius: 14px !important;
  padding: 1rem 1.25rem !important;
  font-size: 1rem !important;
  line-height: 1.6 !important;
  color: var(--seo-accent-strong) !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}

body.seo-tool-ui .tool-textarea:focus,
body.seo-tool-ui .tool-input:focus,
body.seo-tool-ui .tool-select:focus {
  border-color: var(--seo-accent) !important;
  box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.12) !important;
}

body.seo-tool-ui .btn-primary {
  background: var(--seo-accent) !important;
  color: #ffffff !important;
  border: 1px solid transparent !important;
  border-radius: 14px !important;
  padding: 0.85rem 1.75rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.01em !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.5rem !important;
  box-shadow: 0 14px 26px rgba(15, 23, 42, 0.22) !important;
  transition: transform 0.25s ease, box-shadow 0.25s ease !important;
}

body.seo-tool-ui .btn-primary:hover,
body.seo-tool-ui .btn-primary:focus-visible {
  transform: translateY(-2px) !important;
  box-shadow: 0 18px 32px rgba(15, 23, 42, 0.26) !important;
}

body.seo-tool-ui .btn-secondary {
  background: transparent !important;
  color: var(--seo-accent) !important;
  border: 1px solid rgba(15, 23, 42, 0.16) !important;
  border-radius: 12px !important;
  padding: 0.75rem 1.5rem !important;
  font-weight: 500 !important;
  box-shadow: none !important;
  transition: background 0.2s ease, transform 0.2s ease !important;
}

body.seo-tool-ui .btn-secondary:hover,
body.seo-tool-ui .btn-secondary:focus-visible {
  background: rgba(15, 23, 42, 0.05) !important;
  transform: translateY(-1px) !important;
}

body.seo-tool-ui .keyword-item,
body.seo-tool-ui .url-item,
body.seo-tool-ui .link-item,
body.seo-tool-ui .directive-item,
body.seo-tool-ui .title-option,
body.seo-tool-ui .meta-item,
body.seo-tool-ui .meta-output,
body.seo-tool-ui .slug-output,
body.seo-tool-ui .text-preview,
body.seo-tool-ui .comparison-box,
body.seo-tool-ui .outline-item,
body.seo-tool-ui .status-box,
body.seo-tool-ui .stat-box,
body.seo-tool-ui .stat-card {
  background: var(--seo-surface-muted) !important;
  border: 1px solid rgba(15, 23, 42, 0.08) !important;
  border-left: 3px solid rgba(15, 23, 42, 0.16) !important;
  border-radius: 15px !important;
  padding: clamp(0.9rem, 2vw + 0.5rem, 1.35rem) !important;
  box-shadow: none !important;
  transition: transform 0.25s ease, background 0.25s ease !important;
}

body.seo-tool-ui .keyword-item:hover,
body.seo-tool-ui .url-item:hover,
body.seo-tool-ui .link-item:hover,
body.seo-tool-ui .directive-item:hover,
body.seo-tool-ui .title-option:hover,
body.seo-tool-ui .outline-item:hover {
  background: rgba(15, 23, 42, 0.06) !important;
  transform: translateX(4px) !important;
}

body.seo-tool-ui .meta-output,
body.seo-tool-ui .slug-output,
body.seo-tool-ui .text-preview {
  font-family: "Inter", "Courier New", monospace !important;
  font-size: 0.95rem !important;
  line-height: 1.65 !important;
  word-break: break-word !important;
}

body.seo-tool-ui .stat-value {
  font-size: clamp(1.5rem, 3vw, 2.25rem) !important;
  font-weight: 700 !important;
  color: var(--seo-accent-strong) !important;
}

body.seo-tool-ui .stat-label,
body.seo-tool-ui .comparison-label,
body.seo-tool-ui .meta-label,
body.seo-tool-ui .title-stats,
body.seo-tool-ui .keyword-count,
body.seo-tool-ui .keyword-stats span,
body.seo-tool-ui .stat-card .stat-label,
body.seo-tool-ui .stat-box .stat-label {
  color: var(--seo-text-muted) !important;
}

body.seo-tool-ui .keyword-name,
body.seo-tool-ui .title-text,
body.seo-tool-ui .comparison-text,
body.seo-tool-ui .meta-value,
body.seo-tool-ui .outline-h1,
body.seo-tool-ui .outline-h2,
body.seo-tool-ui .outline-h3 {
  color: var(--seo-accent-strong) !important;
}

body.seo-tool-ui .outline-h2 {
  margin-left: 0.75rem !important;
  font-weight: 600 !important;
}

body.seo-tool-ui .outline-h3 {
  margin-left: 1.5rem !important;
  font-weight: 500 !important;
}

body.seo-tool-ui .keyword-density {
  font-weight: 600 !important;
  color: var(--seo-accent) !important;
}

body.seo-tool-ui .density-bar,
body.seo-tool-ui .progress-bar {
  width: 100% !important;
  background: rgba(15, 23, 42, 0.08) !important;
  border-radius: 999px !important;
  overflow: hidden !important;
}

body.seo-tool-ui .density-fill,
body.seo-tool-ui .progress-fill {
  height: 100% !important;
  background: linear-gradient(90deg, var(--seo-accent), rgba(15, 23, 42, 0.75)) !important;
  border-radius: 999px !important;
  transition: width 0.3s ease !important;
}

body.seo-tool-ui .progress-fill.good {
  background: linear-gradient(90deg, #047857, #0f766e) !important;
}

body.seo-tool-ui .progress-fill.warning {
  background: linear-gradient(90deg, #92400e, #f59e0b) !important;
}

body.seo-tool-ui .progress-fill.bad {
  background: linear-gradient(90deg, #b91c1c, #ef4444) !important;
}

body.seo-tool-ui .stat-box.good,
body.seo-tool-ui .stat-card.internal,
body.seo-tool-ui .status-box.allowed {
  background: #ecfdf5 !important;
  border-left-color: #0f766e !important;
}

body.seo-tool-ui .stat-box.warning,
body.seo-tool-ui .stat-card.external {
  background: #fefce8 !important;
  border-left-color: #d97706 !important;
}

body.seo-tool-ui .stat-box.bad,
body.seo-tool-ui .stat-card.relative,
body.seo-tool-ui .status-box.blocked {
  background: #fef2f2 !important;
  border-left-color: #b91c1c !important;
}

body.seo-tool-ui .stat-box.good .stat-value,
body.seo-tool-ui .stat-card.internal .stat-value {
  color: #0f766e !important;
}

body.seo-tool-ui .stat-box.warning .stat-value,
body.seo-tool-ui .stat-card.external .stat-value {
  color: #b45309 !important;
}

body.seo-tool-ui .stat-box.bad .stat-value,
body.seo-tool-ui .stat-card.relative .stat-value,
body.seo-tool-ui .status-box.blocked strong {
  color: #b91c1c !important;
}

body.seo-tool-ui .link-url {
  font-family: "Inter", "Courier New", monospace !important;
  font-size: 0.92rem !important;
  color: var(--seo-accent-strong) !important;
  word-break: break-all !important;
}

body.seo-tool-ui .link-badge {
  display: inline-flex !important;
  align-items: center !important;
  border-radius: 999px !important;
  padding: 0.25rem 0.75rem !important;
  font-size: 0.75rem !important;
  font-weight: 600 !important;
  border: 1px solid transparent !important;
}

body.seo-tool-ui .badge-internal {
  background: #ecfdf5 !important;
  color: #0f766e !important;
  border-color: rgba(15, 118, 110, 0.1) !important;
}

body.seo-tool-ui .badge-external {
  background: #fefce8 !important;
  color: #b45309 !important;
  border-color: rgba(180, 83, 9, 0.1) !important;
}

body.seo-tool-ui .badge-relative {
  background: #ede9fe !important;
  color: #5b21b6 !important;
  border-color: rgba(91, 33, 182, 0.12) !important;
}

body.seo-tool-ui .link-item.internal {
  border-left-color: #0f766e !important;
}

body.seo-tool-ui .link-item.external {
  border-left-color: #b45309 !important;
}

body.seo-tool-ui .link-item.relative {
  border-left-color: #5b21b6 !important;
}

body.seo-tool-ui .comparison-text,
body.seo-tool-ui .meta-value {
  font-size: 1rem !important;
  line-height: 1.65 !important;
}

body.seo-tool-ui .stats-grid,
body.seo-tool-ui .stats-summary,
body.seo-tool-ui .stats-row {
  gap: 1rem !important;
}

body.seo-tool-ui .meta-label {
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
  font-size: 0.75rem !important;
}

body.seo-tool-ui .preview-title {
  color: var(--seo-accent-strong) !important;
}

body.seo-tool-ui .preview-url {
  color: #2563eb !important;
}

body.seo-tool-ui .preview-description {
  color: var(--seo-text-muted) !important;
}

body.seo-tool-ui .keyword-stats {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 0.75rem !important;
  align-items: center !important;
}

@supports not (border-width: 0.5px) {

  .input-card,
  .result-card,
  .tool-textarea,
  .tool-input,
  .status-box,
  .directive-item,
  .url-item,
  .keyword-item,
  .title-option,
  .meta-item,
  .meta-output,
  .slug-output,
  .comparison-box,
  .preview-box {
    border-width: 1px !important;
    border-color: rgba(0, 0, 0, 0.06) !important;
  }
}

body.utility-tool-ui {
  --utility-accent: #2563eb;
  --utility-accent-strong: #1d4ed8;
  --utility-accent-soft: rgba(37, 99, 235, 0.14);
  --utility-surface: #ffffff;
  --utility-surface-muted: #f1f5f9;
  --utility-muted: #64748b;
  --utility-border: rgba(15, 23, 42, 0.08);
  --utility-shadow: rgba(15, 23, 42, 0.08);
}

@keyframes utility-panel-fade {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes utility-soft-glow {
  0% {
    opacity: 0.3;
  }

  50% {
    opacity: 0.65;
  }

  100% {
    opacity: 0.3;
  }
}

@keyframes utility-pulse-ring {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.18);
  }

  100% {
    box-shadow: 0 0 0 18px rgba(37, 99, 235, 0);
  }
}

body.utility-tool-ui main .utility-shell {
  position: relative;
  border-radius: 28px;
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.9));
  border: 1px solid var(--utility-border);
  padding: clamp(1.5rem, 2vw + 1rem, 2.5rem);
  box-shadow: 0 24px 48px var(--utility-shadow);
  overflow: hidden;
  animation: utility-panel-fade 0.6s ease both;
}

body.utility-tool-ui main .utility-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% -15%, rgba(37, 99, 235, 0.16), transparent 55%), radial-gradient(circle at 85% -10%, rgba(99, 102, 241, 0.12), transparent 45%);
  opacity: 0.7;
  pointer-events: none;
}

body.utility-tool-ui main .utility-shell::after {
  content: "";
  position: absolute;
  inset: 12% 12% auto 12%;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.22), rgba(37, 99, 235, 0));
  animation: utility-soft-glow 9s ease-in-out infinite;
  pointer-events: none;
}

body.utility-tool-ui .utility-panel {
  position: relative;
  background: var(--utility-surface);
  border: 1px solid var(--utility-border);
  border-radius: 22px;
  padding: clamp(1.25rem, 2vw + 1rem, 2.1rem);
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.05);
  animation: utility-panel-fade 0.45s ease both;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

body.utility-tool-ui .utility-panel:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 44px rgba(15, 23, 42, 0.08);
  border-color: rgba(37, 99, 235, 0.14);
}

body.utility-tool-ui .utility-panel.break-mode {
  background: linear-gradient(160deg, rgba(16, 185, 129, 0.12), var(--utility-surface));
  border-color: rgba(16, 185, 129, 0.26);
  box-shadow: 0 22px 44px rgba(16, 185, 129, 0.18);
}

body.utility-tool-ui .utility-display {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  background: linear-gradient(150deg, rgba(37, 99, 235, 0.08), rgba(37, 99, 235, 0.02));
  color: var(--utility-accent-strong);
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 24px;
  padding: clamp(1.5rem, 3vw, 2.75rem);
  box-shadow: 0 22px 48px rgba(37, 99, 235, 0.14);
  text-align: center;
  animation: utility-panel-fade 0.6s ease both, utility-pulse-ring 9s ease-out infinite;
}

body.utility-tool-ui .utility-display small {
  display: block;
  margin-top: 0.75rem;
  color: var(--utility-muted);
  font-weight: 500;
}

body.utility-tool-ui .utility-card {
  background: var(--utility-surface);
  border: 1px solid var(--utility-border);
  border-radius: 20px;
  padding: clamp(1.1rem, 2vw + 0.85rem, 1.9rem);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

body.utility-tool-ui .utility-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 46px rgba(15, 23, 42, 0.09);
  border-color: rgba(37, 99, 235, 0.16);
}

body.utility-tool-ui .utility-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--utility-surface-muted);
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 14px;
  padding: 0.85rem 1.15rem;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

body.utility-tool-ui .utility-list-item:hover {
  border-color: rgba(37, 99, 235, 0.2);
  transform: translateY(-2px);
}

body.utility-tool-ui .utility-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.12);
  color: var(--utility-accent-strong);
  font-weight: 600;
  font-size: 0.85rem;
}

body.utility-tool-ui input[type="text"]:not(header input):not(#search-overlay input),
body.utility-tool-ui input[type="number"]:not(header input):not(#search-overlay input),
body.utility-tool-ui input[type="email"]:not(header input):not(#search-overlay input),
body.utility-tool-ui input[type="url"]:not(header input):not(#search-overlay input),
body.utility-tool-ui input[type="password"]:not(header input):not(#search-overlay input),
body.utility-tool-ui input[type="search"]:not(header input):not(#search-overlay input),
body.utility-tool-ui input[type="tel"]:not(header input):not(#search-overlay input),
body.utility-tool-ui input[type="date"]:not(header input):not(#search-overlay input),
body.utility-tool-ui input[type="time"]:not(header input):not(#search-overlay input),
body.utility-tool-ui input[type="color"]:not(header input):not(#search-overlay input),
body.utility-tool-ui select:not(header select):not(#search-overlay select),
body.utility-tool-ui textarea:not(header textarea):not(#search-overlay textarea) {
  background: var(--utility-surface) !important;
  border: 1px solid var(--utility-border) !important;
  border-radius: 14px !important;
  padding: 0.85rem 1rem !important;
  font-size: 1rem !important;
  font-weight: 500 !important;
  color: #0f172a !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease !important;
  box-shadow: none !important;
}

/* Fix Input Text Visibility in Dark Mode */
[data-theme="dark"] body.utility-tool-ui input[type="text"]:not(header input):not(#search-overlay input),
[data-theme="dark"] body.utility-tool-ui input[type="number"]:not(header input):not(#search-overlay input),
[data-theme="dark"] body.utility-tool-ui input[type="email"]:not(header input):not(#search-overlay input),
[data-theme="dark"] body.utility-tool-ui input[type="url"]:not(header input):not(#search-overlay input),
[data-theme="dark"] body.utility-tool-ui input[type="password"]:not(header input):not(#search-overlay input),
[data-theme="dark"] body.utility-tool-ui input[type="search"]:not(header input):not(#search-overlay input),
[data-theme="dark"] body.utility-tool-ui input[type="tel"]:not(header input):not(#search-overlay input),
[data-theme="dark"] body.utility-tool-ui input[type="date"]:not(header input):not(#search-overlay input),
[data-theme="dark"] body.utility-tool-ui input[type="time"]:not(header input):not(#search-overlay input),
[data-theme="dark"] body.utility-tool-ui input[type="color"]:not(header input):not(#search-overlay input),
[data-theme="dark"] body.utility-tool-ui select:not(header select):not(#search-overlay select),
[data-theme="dark"] body.utility-tool-ui textarea:not(header textarea):not(#search-overlay textarea) {
  background-color: #1e293b !important;
  color: #e2e8f0 !important;
  border-color: #334155 !important;
}

body.utility-tool-ui input[type="text"]:focus,
body.utility-tool-ui input[type="number"]:focus,
body.utility-tool-ui input[type="email"]:focus,
body.utility-tool-ui input[type="url"]:focus,
body.utility-tool-ui input[type="password"]:focus,
body.utility-tool-ui input[type="search"]:focus,
body.utility-tool-ui input[type="tel"]:focus,
body.utility-tool-ui input[type="date"]:focus,
body.utility-tool-ui input[type="time"]:focus,
body.utility-tool-ui input[type="color"]:focus,
body.utility-tool-ui select:focus,
body.utility-tool-ui textarea:focus {
  outline: none !important;
  border-color: var(--utility-accent) !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14) !important;
  transform: translateY(-1px) !important;
}

/* Screen Color Picker Specific Fixes */
/* Fix Copy Button Layout */
.color-picker-content .grid .flex {
  align-items: center !important;
  flex-wrap: nowrap !important;
}

.color-picker-content input.color-input {
  min-width: 0 !important;
  flex: 1 1 auto !important;
}

.color-picker-content button.btn-secondary {
  flex-shrink: 0 !important;
  white-space: nowrap !important;
  min-width: max-content !important;
}

/* Fix "Red" Background on Container */
[data-theme="dark"] .color-picker-container {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%) !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5) !important;
}

[data-theme="dark"] .color-picker-container::before,
[data-theme="dark"] .color-picker-container::after {
  opacity: 0.05 !important;
}

/* Fix Notepad Status Bar & Tabs in Dark Mode */
[data-theme="dark"] .status-bar,
[data-theme="dark"] .tab-bar,
[data-theme="dark"] .find-replace-panel,
[data-theme="dark"] .toolbar {
  background-color: #1e293b !important;
  border-color: #334155 !important;
  color: #e2e8f0 !important;
}

[data-theme="dark"] .tab {
  background-color: #0f172a !important;
  border-color: #334155 !important;
  color: #94a3b8 !important;
}

[data-theme="dark"] .tab.active {
  background-color: #1e293b !important;
  border-bottom-color: #1e293b !important;
  color: #e2e8f0 !important;
}

[data-theme="dark"] .tab:hover {
  background-color: #1e293b !important;
}

[data-theme="dark"] .toolbar-btn {
  background-color: #0f172a !important;
  border-color: #334155 !important;
  color: #e2e8f0 !important;
}

[data-theme="dark"] .toolbar-btn:hover {
  background-color: #1e293b !important;
  border-color: #3b82f6 !important;
}

/* Remove "Red" (Pink) Borders in Dark Mode */
[data-theme="dark"] .color-picker-content .color-input,
[data-theme="dark"] .color-picker-content .color-preview,
[data-theme="dark"] .color-picker-content .manual-color-picker {
  border-color: #334155 !important;
  box-shadow: none !important;
}

[data-theme="dark"] .color-picker-content .color-input:focus {
  border-color: #3b82f6 !important;
  /* Standard Blue Focus */
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2) !important;
}

body.utility-tool-ui input::placeholder,
body.utility-tool-ui textarea::placeholder {
  color: var(--utility-muted) !important;
  opacity: 0.75 !important;
}

body.utility-tool-ui input[type="checkbox"],
body.utility-tool-ui input[type="radio"] {
  width: 1.1rem !important;
  height: 1.1rem !important;
  accent-color: var(--utility-accent) !important;
  border-radius: 0.375rem !important;
  transition: transform 0.2s ease !important;
}

body.utility-tool-ui input[type="checkbox"]:hover,
body.utility-tool-ui input[type="radio"]:hover {
  transform: scale(1.05) !important;
}

body.utility-tool-ui button:not(header button):not(#search-overlay button) {
  border-radius: 14px !important;
  border: 1px solid transparent !important;
  background: linear-gradient(135deg, var(--utility-accent-strong), var(--utility-accent)) !important;
  color: #ffffff !important;
  font-weight: 600 !important;
  letter-spacing: 0.01em !important;
  padding: 0.9rem 1.6rem !important;
  transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease !important;
  box-shadow: 0 18px 34px rgba(37, 99, 235, 0.18) !important;
}

body.utility-tool-ui button:hover,
body.utility-tool-ui button:focus-visible {
  transform: translateY(-2px) !important;
  box-shadow: 0 22px 40px rgba(37, 99, 235, 0.22) !important;
}

body.utility-tool-ui button:disabled {
  background: rgba(148, 163, 184, 0.4) !important;
  color: rgba(15, 23, 42, 0.5) !important;
  cursor: not-allowed !important;
  box-shadow: none !important;
}

body.utility-tool-ui .utility-secondary {
  background: rgba(37, 99, 235, 0.08) !important;
  color: var(--utility-accent-strong) !important;
  border-color: rgba(37, 99, 235, 0.22) !important;
  box-shadow: none !important;
}

body.utility-tool-ui .utility-secondary:hover,
body.utility-tool-ui .utility-secondary:focus-visible {
  background: rgba(37, 99, 235, 0.12) !important;
}

body.utility-tool-ui .utility-ghost {
  background: transparent !important;
  color: var(--utility-accent) !important;
  border-color: rgba(37, 99, 235, 0.18) !important;
  box-shadow: none !important;
}

body.utility-tool-ui .utility-ghost:hover,
body.utility-tool-ui .utility-ghost:focus-visible {
  background: rgba(37, 99, 235, 0.08) !important;
}

body.utility-tool-ui .utility-accent-text {
  color: var(--utility-accent-strong);
  font-weight: 600;
}

body.utility-tool-ui .utility-muted-text {
  color: var(--utility-muted);
}

body.utility-tool-ui .utility-divider {
  height: 1px;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0), rgba(15, 23, 42, 0.12), rgba(15, 23, 42, 0));
  margin: 1.75rem 0;
}

body.utility-tool-ui .utility-grid {
  display: grid;
  gap: 1rem;
}

body.utility-tool-ui .utility-floating {
  position: relative;
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(37, 99, 235, 0.08), rgba(37, 99, 235, 0.02));
  border: 1px solid rgba(37, 99, 235, 0.14);
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

body.utility-tool-ui .utility-floating::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35) inset;
  pointer-events: none;
}

body.utility-tool-ui .utility-floating strong {
  color: var(--utility-accent-strong);
}

body.utility-tool-ui .tool-interface-container,
body.utility-tool-ui .todo-container,
body.utility-tool-ui .timer-container,
body.utility-tool-ui .stopwatch-container,
body.utility-tool-ui .journal-container,
body.utility-tool-ui .quote-container,
body.utility-tool-ui .qr-container,
body.utility-tool-ui .video-container,
body.utility-tool-ui .password-container,
body.utility-tool-ui .notepad-container,
body.utility-tool-ui .click-container,
body.utility-tool-ui .markdown-container,
body.utility-tool-ui .editor-container,
body.utility-tool-ui .file-container,
body.utility-tool-ui .expense-container,
body.utility-tool-ui .dice-container,
body.utility-tool-ui .countdown-container,
body.utility-tool-ui .coin-container,
body.utility-tool-ui .flip-container,
body.utility-tool-ui .clipboard-container,
body.utility-tool-ui .calendar-container,
body.utility-tool-ui .birthday-container,
body.utility-tool-ui .barcode-container,
body.utility-tool-ui .clock-container {
  background: var(--utility-surface) !important;
  border: 1px solid var(--utility-border) !important;
  border-radius: 24px !important;
  padding: clamp(1.35rem, 2vw + 1rem, 2.4rem) !important;
  box-shadow: 0 22px 48px rgba(15, 23, 42, 0.08) !important;
  animation: utility-panel-fade 0.55s ease both !important;
  position: relative !important;
  overflow: hidden !important;
}

body.utility-tool-ui .tool-interface-container::before,
body.utility-tool-ui .tool-interface-container::after,
body.utility-tool-ui .todo-container::before,
body.utility-tool-ui .todo-container::after,
body.utility-tool-ui .timer-container::before,
body.utility-tool-ui .timer-container::after,
body.utility-tool-ui .stopwatch-container::before,
body.utility-tool-ui .stopwatch-container::after,
body.utility-tool-ui .journal-container::before,
body.utility-tool-ui .journal-container::after,
body.utility-tool-ui .quote-container::before,
body.utility-tool-ui .quote-container::after,
body.utility-tool-ui .qr-container::before,
body.utility-tool-ui .qr-container::after,
body.utility-tool-ui .video-container::before,
body.utility-tool-ui .video-container::after,
body.utility-tool-ui .password-container::before,
body.utility-tool-ui .password-container::after,
body.utility-tool-ui .notepad-container::before,
body.utility-tool-ui .notepad-container::after,
body.utility-tool-ui .click-container::before,
body.utility-tool-ui .click-container::after,
body.utility-tool-ui .markdown-container::before,
body.utility-tool-ui .markdown-container::after,
body.utility-tool-ui .editor-container::before,
body.utility-tool-ui .editor-container::after,
body.utility-tool-ui .file-container::before,
body.utility-tool-ui .file-container::after,
body.utility-tool-ui .expense-container::before,
body.utility-tool-ui .expense-container::after,
body.utility-tool-ui .dice-container::before,
body.utility-tool-ui .dice-container::after,
body.utility-tool-ui .countdown-container::before,
body.utility-tool-ui .countdown-container::after,
body.utility-tool-ui .coin-container::before,
body.utility-tool-ui .coin-container::after,
body.utility-tool-ui .flip-container::before,
body.utility-tool-ui .flip-container::after,
body.utility-tool-ui .clipboard-container::before,
body.utility-tool-ui .clipboard-container::after,
body.utility-tool-ui .calendar-container::before,
body.utility-tool-ui .calendar-container::after,
body.utility-tool-ui .birthday-container::before,
body.utility-tool-ui .birthday-container::after,
body.utility-tool-ui .barcode-container::before,
body.utility-tool-ui .barcode-container::after,
body.utility-tool-ui .clock-container::before,
body.utility-tool-ui .clock-container::after {
  display: none !important;
}

body.utility-tool-ui .timer-container.break-mode {
  background: linear-gradient(155deg, rgba(16, 185, 129, 0.12), var(--utility-surface)) !important;
  border-color: rgba(16, 185, 129, 0.3) !important;
  box-shadow: 0 24px 48px rgba(16, 185, 129, 0.2) !important;
}

body.utility-tool-ui .countdown-container.warning,
body.utility-tool-ui .timer-container.warning {
  background: linear-gradient(150deg, rgba(234, 179, 8, 0.14), var(--utility-surface)) !important;
  border-color: rgba(234, 179, 8, 0.32) !important;
  box-shadow: 0 24px 48px rgba(234, 179, 8, 0.22) !important;
}

body.utility-tool-ui .countdown-container.critical {
  background: linear-gradient(150deg, rgba(239, 68, 68, 0.16), var(--utility-surface)) !important;
  border-color: rgba(239, 68, 68, 0.34) !important;
  box-shadow: 0 24px 50px rgba(239, 68, 68, 0.24) !important;
}

body.utility-tool-ui .timer-display,
body.utility-tool-ui .stopwatch-display,
body.utility-tool-ui .countdown-display,
body.utility-tool-ui .click-display,
body.utility-tool-ui .clock-display {
  font-variant-numeric: tabular-nums !important;
  letter-spacing: 0.04em !important;
  background: linear-gradient(150deg, rgba(37, 99, 235, 0.08), rgba(37, 99, 235, 0.02)) !important;
  color: var(--utility-accent-strong) !important;
  border: 1px solid rgba(37, 99, 235, 0.2) !important;
  border-radius: 24px !important;
  padding: clamp(1.25rem, 3vw, 2.75rem) !important;
  box-shadow: 0 22px 48px rgba(37, 99, 235, 0.14) !important;
  text-shadow: none !important;
  animation: utility-panel-fade 0.6s ease both, utility-pulse-ring 9s ease-in-out infinite !important;
}

body.utility-tool-ui .timer-display.warning,
body.utility-tool-ui .countdown-display.warning {
  background: linear-gradient(145deg, rgba(234, 179, 8, 0.16), rgba(234, 179, 8, 0.06)) !important;
  border-color: rgba(234, 179, 8, 0.34) !important;
  color: #b45309 !important;
  box-shadow: 0 22px 48px rgba(234, 179, 8, 0.26) !important;
}

body.utility-tool-ui .timer-display.break,
body.utility-tool-ui .countdown-display.critical {
  background: linear-gradient(150deg, rgba(239, 68, 68, 0.16), rgba(239, 68, 68, 0.06)) !important;
  border-color: rgba(239, 68, 68, 0.34) !important;
  color: #b91c1c !important;
  box-shadow: 0 22px 50px rgba(239, 68, 68, 0.26) !important;
}

body.utility-tool-ui label,
body.utility-tool-ui span,
body.utility-tool-ui p,
body.utility-tool-ui h1,
body.utility-tool-ui h2,
body.utility-tool-ui h3,
body.utility-tool-ui h4,
body.utility-tool-ui h5,
body.utility-tool-ui h6 {
  color: #0f172a !important;
  text-shadow: none !important;
}

body.utility-tool-ui .text-white {
  color: #0f172a !important;
}

body.utility-tool-ui .text-indigo-600,
body.utility-tool-ui .text-indigo-700 {
  color: var(--utility-accent-strong) !important;
}

body.utility-tool-ui .text-gray-600,
body.utility-tool-ui .text-gray-700,
body.utility-tool-ui .text-gray-500 {
  color: var(--utility-muted) !important;
}

body.utility-tool-ui .bg-indigo-600,
body.utility-tool-ui .bg-indigo-700,
body.utility-tool-ui .bg-blue-600,
body.utility-tool-ui .bg-purple-600 {
  background: linear-gradient(135deg, var(--utility-accent-strong), var(--utility-accent)) !important;
  color: #ffffff !important;
  box-shadow: 0 18px 36px rgba(37, 99, 235, 0.2) !important;
  border: 1px solid transparent !important;
}

body.utility-tool-ui .bg-red-500,
body.utility-tool-ui .bg-red-600 {
  background: rgba(239, 68, 68, 0.12) !important;
  color: #b91c1c !important;
  border: 1px solid rgba(239, 68, 68, 0.28) !important;
  box-shadow: none !important;
}

body.utility-tool-ui div[class*="-item"],
body.utility-tool-ui div[class*="card"],
body.utility-tool-ui div[class*="-panel"],
body.utility-tool-ui div[class*="-box"],
body.utility-tool-ui section[class*="card"],
body.utility-tool-ui section[class*="-panel"],
body.utility-tool-ui article[class*="card"] {
  background: var(--utility-surface) !important;
  border: 1px solid rgba(15, 23, 42, 0.08) !important;
  border-radius: 16px !important;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.06) !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease !important;
}

body.utility-tool-ui div[class*="-item"]:hover,
body.utility-tool-ui div[class*="card"]:hover,
body.utility-tool-ui div[class*="-panel"]:hover,
body.utility-tool-ui div[class*="-box"]:hover,
body.utility-tool-ui section[class*="card"]:hover,
body.utility-tool-ui section[class*="-panel"]:hover,
body.utility-tool-ui article[class*="card"]:hover {
  transform: translateY(-4px) !important;
  border-color: rgba(37, 99, 235, 0.18) !important;
  box-shadow: 0 22px 44px rgba(15, 23, 42, 0.08) !important;
}


/* --- Website Protection Styles --- */
/* Protection styles removed */

/* Exception: Allow user interaction with form elements */
/* Styles removed */

/* ==========================================
   FIX FOR INVISIBLE TEXT IN DARK MODE (PROSE)
   ========================================== */

/* Force all prose headings to be white in dark mode */
[data-theme="dark"] .prose h1,
[data-theme="dark"] .prose h2,
[data-theme="dark"] .prose h3,
[data-theme="dark"] .prose h4,
[data-theme="dark"] .prose h5,
[data-theme="dark"] .prose h6 {
  color: #ffffff !important;
}

/* Force prose body text, lists, and paragraphs to be light gray */
[data-theme="dark"] .prose,
[data-theme="dark"] .prose p,
[data-theme="dark"] .prose ul,
[data-theme="dark"] .prose ol,
[data-theme="dark"] .prose li {
  color: #e5e7eb !important;
}

/* Force bold text to be white */
[data-theme="dark"] .prose strong,
[data-theme="dark"] .prose b,
[data-theme="dark"] strong,
[data-theme="dark"] b {
  color: #ffffff !important;
}

/* Force links in prose to be light */
[data-theme="dark"] .prose a {
  color: #e5e7eb !important;
  text-decoration-color: #9ca3af;
}

[data-theme="dark"] .prose a:hover {
  color: #6366f1 !important;
  /* Indigo-500 */
}

/* Fix for specific list markers if needed */
[data-theme="dark"] .prose li::marker {
  color: #9ca3af !important;
}

/* ==========================================
   FIX FOR WHITE BOXES IN DARK MODE
   ========================================== */

/* Main card backgrounds */
[data-theme="dark"] .bg-white {
  background-color: #0b1220 !important;
  /* gray-900 */
  border-color: rgba(255, 255, 255, 0.05) !important;
  /* Very subtle border */
}

/* Secondary backgrounds (inputs, pre blocks, etc) */
[data-theme="dark"] .bg-gray-50,
[data-theme="dark"] .bg-gray-100 {
  background-color: #1f2937 !important;
  /* gray-800 */
  border-color: rgba(255, 255, 255, 0.05) !important;
  /* Very subtle border */
}

/* Info boxes (like blue-50) */
[data-theme="dark"] .bg-blue-50 {
  background-color: #1e293b !important;
  /* slate-800 */
  border-color: rgba(255, 255, 255, 0.03) !important;
  /* Nearly invisible border */
}

/* ==========================================
   SCOPED VARIABLE OVERRIDES (Utility & SEO)
   ========================================== */

/* Utility Tools Dark Theme Variables */
[data-theme="dark"] body.utility-tool-ui {
  --utility-surface: #0b1220;
  --utility-surface-muted: #1f2937;
  --utility-muted: #9ca3af;
  --utility-border: rgba(255, 255, 255, 0.05);
  --utility-shadow: transparent;
  --utility-accent-soft: rgba(37, 99, 235, 0.2);
  --utility-accent-strong: #60a5fa;
  /* Lighter blue for dark mode */
}

/* SEO Tools Dark Theme Variables */
[data-theme="dark"] body.seo-tool-ui {
  --seo-surface: #0b1220;
  --seo-surface-muted: #1f2937;
  --seo-text-muted: #9ca3af;
  --seo-accent: #60a5fa;
  --seo-accent-strong: #93c5fd;
  --seo-accent-soft: rgba(96, 165, 250, 0.15);
}

/* ==========================================
   SPECIFIC COMPONENT OVERRIDES
   ========================================== */

/* Tabs (Timer, etc) */
[data-theme="dark"] .input-mode-tab.active {
  background-color: #1f2937 !important;
  color: #fbbf24 !important;
  /* amber-400 */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

[data-theme="dark"] .input-mode-tab {
  color: #9ca3af !important;
}

[data-theme="dark"] .input-mode-tab:hover {
  color: #e5e7eb !important;
}

/* FAQ Overrides (Generic & Custom) */
/* FAQ section wrapper - Ensure consistent styling across all tools */
.mt-8>.bg-white.rounded-2xl,
.mt-8>.bg-white.rounded-2xl.border,
.mt-8>.bg-white.rounded-2xl.border-gray-200,
main .mt-8>div[class*="rounded-2xl"][class*="border"][class*="bg-white"],
main .mt-8>div[class*="rounded-2xl"][class*="border"][class*="p-6"] {
  background-color: #ffffff !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 1rem !important;
  padding: 1.5rem !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
}

/* Dark mode - FAQ section wrapper */
[data-theme="dark"] .mt-8>.bg-white.rounded-2xl,
[data-theme="dark"] .mt-8>.bg-white.rounded-2xl.border,
[data-theme="dark"] .mt-8>.bg-white.rounded-2xl.border-gray-200,
[data-theme="dark"] main .mt-8>div[class*="rounded-2xl"][class*="border"][class*="bg-white"],
[data-theme="dark"] main .mt-8>div[class*="rounded-2xl"][class*="border"][class*="p-6"] {
  background-color: #111827 !important;
  border-color: rgba(255, 255, 255, 0.05) !important;
}

[data-theme="dark"] .faq-item {
  background-color: #1a2332 !important;
  /* Slightly lighter than bg */
  border-color: rgba(255, 255, 255, 0.05) !important;
}

[data-theme="dark"] .faq-question {
  color: #ffffff !important;
}

[data-theme="dark"] .faq-question span {
  color: #ffffff !important;
}

[data-theme="dark"] .faq-answer {
  color: #e5e7eb !important;
}

[data-theme="dark"] .faq-answer p {
  color: #e5e7eb !important;
}

[data-theme="dark"] .faq-question:hover {
  background-color: #1f2937 !important;
}

/* ==========================================
   FORM ELEMENTS - DARK MODE
   ========================================== */

/* Tab Buttons */
[data-theme="dark"] .mode-tab {
  background-color: #1f2937 !important;
  color: #9ca3af !important;
  border-color: rgba(255, 255, 255, 0.05) !important;
}

[data-theme="dark"] .mode-tab.active {
  background-color: #4f46e5 !important;
  color: #ffffff !important;
  border-color: #4f46e5 !important;
}

[data-theme="dark"] .mode-tab:hover {
  background-color: #374151 !important;
  color: #e5e7eb !important;
}

/* Input Fields */
[data-theme="dark"] .tool-input,
[data-theme="dark"] input[type="text"],
[data-theme="dark"] input[type="email"],
[data-theme="dark"] input[type="password"],
[data-theme="dark"] input[type="number"],
[data-theme="dark"] input[type="date"],
[data-theme="dark"] input[type="time"],
[data-theme="dark"] input[type="datetime-local"],
[data-theme="dark"] input[type="search"],
[data-theme="dark"] input[type="url"],
[data-theme="dark"] input[type="tel"] {
  background-color: #1f2937 !important;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

[data-theme="dark"] .tool-input::placeholder,
[data-theme="dark"] input::placeholder {
  color: #9ca3af !important;
}

[data-theme="dark"] .tool-input:focus,
[data-theme="dark"] input:focus {
  border-color: #4f46e5 !important;
}

/* Select Dropdowns */
[data-theme="dark"] select,
[data-theme="dark"] .tool-input select {
  background-color: #1f2937 !important;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

[data-theme="dark"] select option {
  background-color: #1f2937 !important;
  color: #ffffff !important;
}

/* Textareas */
[data-theme="dark"] textarea,
[data-theme="dark"] .tool-textarea {
  background-color: #1f2937 !important;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

[data-theme="dark"] textarea::placeholder,
[data-theme="dark"] .tool-textarea::placeholder {
  color: #9ca3af !important;
}

/* Buttons */
[data-theme="dark"] .tool-button,
[data-theme="dark"] button[type="submit"],
[data-theme="dark"] button[type="button"] {
  color: #ffffff !important;
}

/* Checkboxes and Radio Buttons */
[data-theme="dark"] input[type="checkbox"],
[data-theme="dark"] input[type="radio"] {
  background-color: #1f2937 !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
}

[data-theme="dark"] input[type="checkbox"]:checked,
[data-theme="dark"] input[type="radio"]:checked {
  background-color: #4f46e5 !important;
  border-color: #4f46e5 !important;
}

/* File Inputs */
[data-theme="dark"] input[type="file"] {
  color: #e5e7eb !important;
}

[data-theme="dark"] input[type="file"]::file-selector-button {
  background-color: #1f2937 !important;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

/* Mobile Menu */
[data-theme="dark"] #mobile-nav {
  background-color: #0b1220 !important;
  border-color: rgba(255, 255, 255, 0.05) !important;
}

[data-theme="dark"] #mobile-nav a,
[data-theme="dark"] #mobile-nav button {
  color: #e5e7eb !important;
}

[data-theme="dark"] #mobile-nav a:hover,
[data-theme="dark"] #mobile-nav button:hover,
[data-theme="dark"] #mobile-nav a:active,
[data-theme="dark"] #mobile-nav button:active,
[data-theme="dark"] #mobile-nav a:focus,
[data-theme="dark"] #mobile-nav button:focus {
  background-color: #1f2937 !important;
  color: #ffffff !important;
}



/* PDF Tools & Generic White Boxes (Extra Specificity) */
[data-theme="dark"] .drop-zone {
  background-color: #1f2937 !important;
  border-color: rgba(255, 255, 255, 0.05) !important;
}

/* Catch-all for hardcoded bg-colors in tool sections */
[data-theme="dark"] .bg-white,
[data-theme="dark"] .bg-gray-50,
[data-theme="dark"] .bg-blue-50,
[data-theme="dark"] .bg-green-50,
[data-theme="dark"] .bg-red-50,
[data-theme="dark"] .bg-yellow-50,
[data-theme="dark"] .bg-purple-50,
[data-theme="dark"] .bg-indigo-50 {
  background-color: #1e293b !important;
  /* Slate-800 generic dark */
  border-color: rgba(255, 255, 255, 0.05) !important;
  color: #e5e7eb !important;
}

/* Ensure text inside these boxes is readable */
[data-theme="dark"] .bg-white *,
[data-theme="dark"] .bg-gray-50 *,
[data-theme="dark"] .bg-blue-50 * {
  color: inherit;
}

/* Input fields in generic tools */
[data-theme="dark"] input[type="text"],
[data-theme="dark"] input[type="number"],
[data-theme="dark"] textarea,
[data-theme="dark"] select {
  background-color: #0b1220 !important;
  border-color: #374151 !important;
  color: #e5e7eb !important;
}


/* ==========================================
   CALENDAR TOOL DARK MODE OVERRIDES
   ========================================== */

/* Calendar header and body */
[data-theme="dark"] .calendar-header {
  background: rgba(31, 41, 55, 0.95) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

[data-theme="dark"] .calendar-body {
  background: rgba(31, 41, 55, 0.98) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

/* Date info card */
[data-theme="dark"] .date-info-card {
  background: linear-gradient(135deg, rgba(31, 41, 55, 0.95) 0%, rgba(31, 41, 55, 0.85) 100%) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

/* Calendar day cells */
[data-theme="dark"] .calendar-day {
  background: linear-gradient(135deg, #1f2937 0%, #111827 100%) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: #e5e7eb !important;
}

[data-theme="dark"] .calendar-day.other-month {
  background: linear-gradient(135deg, #111827 0%, #0b1220 100%) !important;
  color: #6b7280 !important;
}

[data-theme="dark"] .calendar-day.weekend {
  background: linear-gradient(135deg, #1e293b 0%, #1f2937 100%) !important;
}

/* Keep today and selected styles visible */
[data-theme="dark"] .calendar-day.today {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%) !important;
  color: white !important;
}

[data-theme="dark"] .calendar-day.selected {
  background: linear-gradient(135deg, #ec4899 0%, #f472b6 100%) !important;
  color: white !important;
}

/* Dropdown menus */
[data-theme="dark"] .dropdown-menu {
  background: #1f2937 !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

[data-theme="dark"] .dropdown-item {
  color: #e5e7eb !important;
}

[data-theme="dark"] .dropdown-item:hover {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%) !important;
  color: white !important;
}

/* Navigation buttons */
[data-theme="dark"] .nav-button {
  background: linear-gradient(135deg, rgba(31, 41, 55, 0.9) 0%, rgba(31, 41, 55, 0.7) 100%) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: #818cf8 !important;
}

[data-theme="dark"] .select-button {
  background: linear-gradient(135deg, rgba(31, 41, 55, 0.95) 0%, rgba(31, 41, 55, 0.85) 100%) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: #e5e7eb !important;
}

[data-theme="dark"] .quick-action-btn {
  background: linear-gradient(135deg, rgba(31, 41, 55, 0.9) 0%, rgba(31, 41, 55, 0.7) 100%) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: #818cf8 !important;
}

/* Weekday headers */
[data-theme="dark"] .weekday-header {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(124, 58, 237, 0.2) 100%) !important;
  border-color: rgba(99, 102, 241, 0.3) !important;
  color: #818cf8 !important;
}

[data-theme="dark"] .weekday-header.weekend {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.2) 0%, rgba(245, 158, 11, 0.2) 100%) !important;
  border-color: rgba(251, 191, 36, 0.3) !important;
  color: #fbbf24 !important;
}

/* Year view cells */
[data-theme="dark"] .year-month-cell {
  background: linear-gradient(135deg, #1f2937 0%, #111827 100%) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: #e5e7eb !important;
}

[data-theme="dark"] .year-month-cell:hover {
  background: linear-gradient(135deg, #374151 0%, #1f2937 100%) !important;
}

[data-theme="dark"] .year-cell {
  background: linear-gradient(135deg, #1f2937 0%, #111827 100%) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: #e5e7eb !important;
}

[data-theme="dark"] .year-cell:hover {
  background: linear-gradient(135deg, #374151 0%, #1f2937 100%) !important;
}

/* Info items */
[data-theme="dark"] .info-item {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(124, 58, 237, 0.1) 100%) !important;
  border-left-color: #818cf8 !important;
}

[data-theme="dark"] .info-item:hover {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(124, 58, 237, 0.15) 100%) !important;
}

/* ==========================================
   FUN TOOLS SPECIFIC OVERRIDES
   ========================================== */


/* Remove light page background gradients */
[data-theme="dark"] .bg-gradient-to-br.from-amber-100,
[data-theme="dark"] .bg-gradient-to-br.from-amber-50,
[data-theme="dark"] .bg-gradient-to-br.from-rose-100,
[data-theme="dark"] .bg-gradient-to-br.from-blue-100,
[data-theme="dark"] .bg-gradient-to-br.from-fuchsia-100,
[data-theme="dark"] .bg-gradient-to-br.from-sky-100,
[data-theme="dark"] .bg-gradient-to-br.from-emerald-100,
[data-theme="dark"] .bg-gradient-to-br.from-indigo-100,
[data-theme="dark"] .bg-gradient-to-br.from-pink-100,
[data-theme="dark"] .bg-gradient-to-br.from-teal-100 {
  background: #0b1220 !important;
  background-image: none !important;
}

/* Glassmorphism Card Overrides (Fun Tools) */
[data-theme="dark"] .bg-white\/80,
[data-theme="dark"] .bg-white\/90,
[data-theme="dark"] .bg-white\/15,
[data-theme="dark"] .bg-white\/50,
[data-theme="dark"] .bg-white\/85,
[data-theme="dark"] .bg-white\/70,
[data-theme="dark"] .bg-white\/60,
[data-theme="dark"] .bg-white\/20 {
  background-color: #1f2937 !important;
  /* Dark card bg */
  border-color: #374151 !important;
  color: #e5e7eb !important;
  backdrop-filter: none !important;
  /* Optional: remove blur if it looks bad on dark */
}

/* Fun Tools - Inner gradient overlays (white gradients) */
[data-theme="dark"] .bg-gradient-to-br.from-white\/60,
[data-theme="dark"] .bg-gradient-to-br.from-white\/70,
[data-theme="dark"] .bg-gradient-to-br.from-white\/20,
[data-theme="dark"] .bg-gradient-to-br.from-white\/10 {
  background: linear-gradient(to bottom right, rgba(31, 41, 55, 0.6), rgba(31, 41, 55, 0.1), transparent) !important;
}

/* Border overrides for glassmorphism */
[data-theme="dark"] .border-white\/80,
[data-theme="dark"] .border-white\/70,
[data-theme="dark"] .border-white\/50 {
  border-color: #374151 !important;
}

/* Fun Options (Option A/B cards) */
[data-theme="dark"] .group.bg-white\/90:hover {
  background-color: #374151 !important;
  /* Lighter on hover */
}

/* Fun Tools - Colored result boxes (bg-*-50 variants) */
[data-theme="dark"] .bg-indigo-50,
[data-theme="dark"] .bg-orange-50,
[data-theme="dark"] .bg-emerald-50,
[data-theme="dark"] .bg-slate-50,
[data-theme="dark"] .bg-pink-50,
[data-theme="dark"] .bg-purple-50,
[data-theme="dark"] .bg-amber-50,
[data-theme="dark"] .bg-rose-50,
[data-theme="dark"] .bg-blue-50,
[data-theme="dark"] .bg-fuchsia-50,
[data-theme="dark"] .bg-sky-50,
[data-theme="dark"] .bg-teal-50,
[data-theme="dark"] .bg-cyan-50,
[data-theme="dark"] .bg-lime-50,
[data-theme="dark"] .bg-green-50,
[data-theme="dark"] .bg-yellow-50,
[data-theme="dark"] .bg-red-50 {
  background-color: #1e293b !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

/* Fun Tools - Colored result boxes with opacity (bg-*-50/80, bg-*-50/90, etc.) */
[data-theme="dark"] .bg-rose-50\/80,
[data-theme="dark"] .bg-rose-50\/90,
[data-theme="dark"] .bg-pink-50\/80,
[data-theme="dark"] .bg-pink-50\/90,
[data-theme="dark"] .bg-amber-50\/80,
[data-theme="dark"] .bg-amber-50\/90,
[data-theme="dark"] .bg-indigo-50\/80,
[data-theme="dark"] .bg-indigo-50\/90,
[data-theme="dark"] .bg-orange-50\/80,
[data-theme="dark"] .bg-orange-50\/90,
[data-theme="dark"] .bg-emerald-50\/80,
[data-theme="dark"] .bg-emerald-50\/90,
[data-theme="dark"] .bg-slate-50\/80,
[data-theme="dark"] .bg-slate-50\/90,
[data-theme="dark"] .bg-purple-50\/80,
[data-theme="dark"] .bg-purple-50\/90,
[data-theme="dark"] .bg-blue-50\/80,
[data-theme="dark"] .bg-blue-50\/90,
[data-theme="dark"] .bg-fuchsia-50\/80,
[data-theme="dark"] .bg-fuchsia-50\/90,
[data-theme="dark"] .bg-sky-50\/80,
[data-theme="dark"] .bg-sky-50\/90,
[data-theme="dark"] .bg-teal-50\/80,
[data-theme="dark"] .bg-teal-50\/90,
[data-theme="dark"] .bg-cyan-50\/80,
[data-theme="dark"] .bg-cyan-50\/90,
[data-theme="dark"] .bg-lime-50\/80,
[data-theme="dark"] .bg-lime-50\/90,
[data-theme="dark"] .bg-green-50\/80,
[data-theme="dark"] .bg-green-50\/90,
[data-theme="dark"] .bg-yellow-50\/80,
[data-theme="dark"] .bg-yellow-50\/90,
[data-theme="dark"] .bg-red-50\/80,
[data-theme="dark"] .bg-red-50\/90 {
  background-color: #1e293b !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

/* Fun Tools - Text colors in colored boxes (text-*-700, text-*-900) */
[data-theme="dark"] .text-rose-900,
[data-theme="dark"] .text-pink-700,
[data-theme="dark"] .text-amber-600,
[data-theme="dark"] .text-slate-600 {
  color: #e5e7eb !important;
}


/* Fun Tools - Colored result boxes (bg-*-100 variants) */
[data-theme="dark"] .bg-indigo-100,
[data-theme="dark"] .bg-orange-100,
[data-theme="dark"] .bg-emerald-100,
[data-theme="dark"] .bg-slate-100,
[data-theme="dark"] .bg-pink-100,
[data-theme="dark"] .bg-purple-100,
[data-theme="dark"] .bg-amber-100,
[data-theme="dark"] .bg-rose-100,
[data-theme="dark"] .bg-blue-100,
[data-theme="dark"] .bg-fuchsia-100,
[data-theme="dark"] .bg-sky-100,
[data-theme="dark"] .bg-teal-100,
[data-theme="dark"] .bg-cyan-100,
[data-theme="dark"] .bg-lime-100,
[data-theme="dark"] .bg-green-100,
[data-theme="dark"] .bg-yellow-100,
[data-theme="dark"] .bg-red-100 {
  background-color: #1e293b !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

/* Fun Tools - Colored result boxes (border-*-100 variants) */
[data-theme="dark"] .border-indigo-100,
[data-theme="dark"] .border-orange-100,
[data-theme="dark"] .border-emerald-100,
[data-theme="dark"] .border-slate-100,
[data-theme="dark"] .border-slate-200,
[data-theme="dark"] .border-pink-100,
[data-theme="dark"] .border-purple-100,
[data-theme="dark"] .border-amber-100,
[data-theme="dark"] .border-rose-100,
[data-theme="dark"] .border-blue-100,
[data-theme="dark"] .border-fuchsia-100,
[data-theme="dark"] .border-sky-100,
[data-theme="dark"] .border-teal-100,
[data-theme="dark"] .border-cyan-100,
[data-theme="dark"] .border-lime-100,
[data-theme="dark"] .border-green-100,
[data-theme="dark"] .border-yellow-100,
[data-theme="dark"] .border-red-100 {
  border-color: rgba(255, 255, 255, 0.1) !important;
}

/* Fun Tools - Text colors in result boxes (text-*-600 variants) */
[data-theme="dark"] .text-indigo-600,
[data-theme="dark"] .text-orange-600,
[data-theme="dark"] .text-emerald-600,
[data-theme="dark"] .text-slate-600,
[data-theme="dark"] .text-pink-600,
[data-theme="dark"] .text-purple-600,
[data-theme="dark"] .text-amber-600,
[data-theme="dark"] .text-rose-600,
[data-theme="dark"] .text-blue-600,
[data-theme="dark"] .text-fuchsia-600,
[data-theme="dark"] .text-sky-600,
[data-theme="dark"] .text-teal-600,
[data-theme="dark"] .text-cyan-600,
[data-theme="dark"] .text-lime-600,
[data-theme="dark"] .text-green-600,
[data-theme="dark"] .text-yellow-600,
[data-theme="dark"] .text-red-600 {
  color: #e5e7eb !important;
}

/* Fun Tools - Additional border variants */
[data-theme="dark"] .border-white\/60 {
  border-color: rgba(255, 255, 255, 0.1) !important;
}


/* ==========================================
   SEO TOOLS SPECIFIC OVERRIDES
   ========================================== */

/* ==========================================
   SEO TOOLS SPECIFIC OVERRIDES
   ========================================== */

/* Nuclear override for the main container in SEO tools */
[data-theme="dark"] .seo-tool-ui .bg-white {
  background-color: #0b1220 !important;
  /* Force black/gray-900 */
  border-color: rgba(255, 255, 255, 0.05) !important;
}

/* Overrides for internal CSS classes in SEO tools */
[data-theme="dark"] .input-card,
[data-theme="dark"] .result-card,
[data-theme="dark"] .preview-box {
  background: #1f2937 !important;
  /* gray-800 */
  border-color: rgba(255, 255, 255, 0.05) !important;
  color: #e5e7eb !important;
}

[data-theme="dark"] .tool-textarea {
  background: #0b1220 !important;
  /* gray-900 */
  border-color: rgba(255, 255, 255, 0.05) !important;
  color: #e5e7eb !important;
}

[data-theme="dark"] .stat-box {
  background: #0b1220 !important;
  border-color: rgba(255, 255, 255, 0.05) !important;
}

/* SEO Tool Header Gradient (Title Container) */
/* Using high specificity and targeting pseudo-elements */
html[data-theme="dark"] .seo-tool-ui .title-container,
[data-theme="dark"] .title-container {
  background: #0b1220 !important;
  /* Force black/gray-900 */
  background-image: none !important;
  box-shadow: none !important;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .title-container::before {
  display: none !important;
}

[data-theme="dark"] .title-container h2 {
  color: #f3f4f6 !important;
}

/* Fix for black text on dark background in SEO tools */
[data-theme="dark"] .seo-tool-ui .text-gray-900 {
  color: #f3f4f6 !important;
}

/* Stat box variants */
[data-theme="dark"] .stat-box.good {
  background: rgba(16, 185, 129, 0.1) !important;
  color: #e5e7eb !important;
}

[data-theme="dark"] .stat-box.warning {
  background: rgba(245, 158, 11, 0.1) !important;
  color: #e5e7eb !important;
}

[data-theme="dark"] .stat-box.bad {
  background: rgba(239, 68, 68, 0.1) !important;
  color: #e5e7eb !important;
}

/* Preview Text */
[data-theme="dark"] .preview-title {
  color: #8ab4f8 !important;
}

[data-theme="dark"] .preview-url {
  color: #81c995 !important;
}

[data-theme="dark"] .preview-description {
  color: #9ca3af !important;
}

/* =========================================
   SEO TOOLS DEEP DIVE DARK MODE OVERRIDES
   ========================================= */

/* 1. Main Containers - Remove Gradients & Darken */
[data-theme="dark"] .sitemap-container,
[data-theme="dark"] .robots-container,
[data-theme="dark"] .readability-container,
[data-theme="dark"] .outline-container,
[data-theme="dark"] .counter-container,
[data-theme="dark"] .density-container,
[data-theme="dark"] .extractor-container,
[data-theme="dark"] .meta-container,
[data-theme="dark"] .meta-generator-container,
[data-theme="dark"] .simplifier-container,
[data-theme="dark"] .slug-container,
[data-theme="dark"] .title-container,
/* Reinforcing */
[data-theme="dark"] .title-generator-container {
  background: #0b1220 !important;
  /* gray-900 */
  background-image: none !important;
  box-shadow: none !important;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* 2. Hide Decorative Blobs/Gradients (::before) */
[data-theme="dark"] .sitemap-container::before,
[data-theme="dark"] .robots-container::before,
[data-theme="dark"] .readability-container::before,
[data-theme="dark"] .outline-container::before,
[data-theme="dark"] .counter-container::before,
[data-theme="dark"] .density-container::before,
[data-theme="dark"] .extractor-container::before,
[data-theme="dark"] .meta-container::before,
[data-theme="dark"] .meta-generator-container::before,
[data-theme="dark"] .simplifier-container::before,
[data-theme="dark"] .slug-container::before,
[data-theme="dark"] .title-container::before,
[data-theme="dark"] .title-generator-container::before {
  display: none !important;
}

/* 3. content Cards & Input Areas */
[data-theme="dark"] .input-card,
[data-theme="dark"] .result-card,
[data-theme="dark"] .preview-box,
[data-theme="dark"] .comparison-box,
[data-theme="dark"] .score-display,
[data-theme="dark"] .stat-box,
[data-theme="dark"] .stat-card,
[data-theme="dark"] .tool-textarea {
  background-color: #1f2937 !important;
  /* gray-800 */
  border-color: rgba(255, 255, 255, 0.05) !important;
  color: #f3f4f6 !important;
  backdrop-filter: none !important;
}

/* 4. List Items & Results */
[data-theme="dark"] .url-item,
[data-theme="dark"] .directive-item,
[data-theme="dark"] .keyword-item,
[data-theme="dark"] .link-item,
[data-theme="dark"] .meta-item,
[data-theme="dark"] .outline-item,
[data-theme="dark"] .title-option,
[data-theme="dark"] .text-preview,
[data-theme="dark"] .meta-output,
[data-theme="dark"] .slug-output,
[data-theme="dark"] .outline-result {
  background-color: #0b1220 !important;
  /* Darker than card */
  border-color: rgba(255, 255, 255, 0.05) !important;
  color: #e5e7eb !important;
}

/* 5. Specific Tweaks */
[data-theme="dark"] .score-display {
  background: #374151 !important;
  background-image: none !important;
}

/* 6. Buttons (Secondary) */
[data-theme="dark"] .btn-secondary {
  background: #374151 !important;
  color: #fff !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

/* ==========================================
   SEARCH RESULT HOVER FIX (Dark Mode)
   ========================================== */
[data-theme="dark"] .search-result-item:hover {
    background-color: #1f2937 !important;
    border-color: rgba(99, 102, 241, 0.3) !important;
}

/* Ensure text remains visible on hover */
[data-theme="dark"] .search-result-item:hover span,
[data-theme="dark"] .search-result-item:hover div {
    color: #f3f4f6 !important;
}

[data-theme="dark"] .search-result-item:hover .text-gray-400,
[data-theme="dark"] .search-result-item:hover .text-gray-500 {
    color: #d1d5db !important;
}
