/* Cyber-Minimalist Dark Mode: Retro-Futuristic, High-Contrast */
body.dark-mode {
    /* Absolute dark base */
    --bg-body: #050505;
    --bg-surface: #0a0a0a;
    
    /* Neon Accents */
    --primary: #00f2ff; /* Cyan Neon */
    --secondary: #ff007a; /* Magenta Neon */
    --accent: #7b2cbf; /* Deep Purple */
    
    /* Text: Legible Monospace-style palette */
    --text-main: #e0e0e0;
    --text-muted: #707070;
    
    /* Structural variables */
    --glass-border: 1px solid #333;
    --border-glass: rgba(255, 255, 255, 0.1);
    --surface-glass: rgba(10, 10, 10, 0.8);
    --primary-gradient: linear-gradient(135deg, #0055ff, #00f2ff);

    /* Layered Glow effect */
    --glow-effect: 0 0 5px var(--primary), 0 0 10px var(--primary), 0 0 20px rgba(0, 242, 255, 0.2);
}

/* Base body tweaks for Cyber look */
body.dark-mode {
    background-color: var(--bg-body);
    font-family: 'JetBrains Mono', 'Fira Code', monospace, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; /* Modern monospace + Emoji Support */
    font-weight: 300;
}

body.dark-mode input[type="checkbox"] {
    accent-color: var(--primary);
}

/* Image to PPTX Tool (/image_to_pptx) Overrides */
body.dark-mode .pptx-card,
body.dark-mode .content-card,
body.dark-mode .results-card {
    background: var(--bg-surface) !important;
    border: 1px solid #333 !important;
    box-shadow: none !important;
}

body.dark-mode .page-title {
    background: linear-gradient(135deg, #fff 0%, #aaa 100%) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
}

body.dark-mode .file-input-wrapper {
    background: #0a0a0a !important;
    border: 2px dashed #222 !important;
}

body.dark-mode .file-input-wrapper:hover {
    background: #111 !important;
    border-color: var(--primary) !important;
}

body.dark-mode .file-input-label .main-text {
    color: var(--text-main) !important;
}

body.dark-mode .preview-grid {
    background: #0a0a0a !important;
    border: 1px solid #222 !important;
}

body.dark-mode .sortable-item {
    background: #111 !important;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3) !important;
}

body.dark-mode .sortable-item:hover {
    border-color: var(--primary) !important;
}

body.dark-mode .icon-badge {
    background: #111 !important;
    color: var(--primary) !important;
    border: 1px solid #222 !important;
}

body.dark-mode .faq-item {
    background: #111 !important;
    border-color: #222 !important;
}

body.dark-mode .feature-title,
body.dark-mode .section-title {
    color: var(--text-main) !important;
}

body.dark-mode .tool-link-card {
    background: #111 !important;
    border-color: #222 !important;
}

body.dark-mode .tool-link-card:hover {
    border-color: var(--primary) !important;
    background: #1a1a1a !important;
}

body.dark-mode .tool-link-card span {
    color: var(--text-main) !important;
}

body.dark-mode .success-icon {
    background: #0a1a0a !important;
    color: #4ade80 !important;
}

body.dark-mode .results-card h2 {
    color: var(--text-main) !important;
}

/* Specific Privacy Card Gradient Override */
body.dark-mode section[style*="background: var(--primary-gradient)"],
body.dark-mode section.content-card[style*="background: var(--primary-gradient)"],
body.dark-mode div[style*="background: var(--primary-gradient)"] {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.8), rgba(10, 10, 10, 0.9)) !important;
    border: 1px solid var(--primary) !important;
    color: var(--text-main) !important;
}

body.dark-mode section.content-card[style*="background: var(--primary-gradient)"] h2,
body.dark-mode section.content-card[style*="background: var(--primary-gradient)"] p {
    color: var(--text-main) !important;
}

/* Object Remover Tool (/object_remover) Overrides */
body.dark-mode .remover-card,
body.dark-mode .toolbar-inner,
body.dark-mode .success-modal-content {
    background: var(--bg-surface) !important;
    border: 1px solid #333 !important;
    box-shadow: none !important;
}

body.dark-mode .instruction-banner {
    background: rgba(0, 150, 255, 0.1) !important;
    border: 1px solid var(--primary) !important;
    color: var(--text-main) !important;
}

body.dark-mode .drop-zone {
    background: #0a0a0a !important;
    border: 2px dashed #222 !important;
    color: var(--text-muted) !important;
}

body.dark-mode .drop-zone:hover {
    border-color: var(--primary) !important;
    background: #111 !important;
}

body.dark-mode .brush-label {
    color: var(--text-main) !important;
}

body.dark-mode .brush-slider {
    background: #222 !important;
}

body.dark-mode .brush-slider::-webkit-slider-runnable-track {
    background: #333 !important;
}

body.dark-mode .brush-slider::-webkit-slider-thumb {
    background: var(--primary) !important;
}

body.dark-mode .process-btn {
    background: #000 !important;
    color: var(--primary) !important;
    border: 1px solid var(--primary) !important;
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.3) !important;
}

body.dark-mode .process-btn:hover {
    background: var(--primary) !important;
    color: #000 !important;
    box-shadow: 0 0 25px rgba(0, 242, 255, 0.5) !important;
}

body.dark-mode .btn-secondary {
    background: #111 !important;
    border: 1px solid #333 !important;
    color: var(--text-main) !important;
}

body.dark-mode .btn-secondary:hover {
    border-color: var(--primary) !important;
    color: var(--primary) !important;
}

body.dark-mode .status-text {
    color: var(--text-muted) !important;
}

body.dark-mode .modal-title {
    color: var(--text-main) !important;
}

body.dark-mode .modal-body {
    color: var(--text-muted) !important;
}

body.dark-mode .brush-size-display {
    color: var(--primary) !important;
    font-weight: 700 !important;
}

/* PDF Tools (/bdf/*) Dark Mode Overrides */
body.dark-mode .upload-section {
    background: #0a0a0a !important;
    border: 2px dashed #444 !important;
    color: var(--text-muted) !important;
}

body.dark-mode .upload-section:hover, 
body.dark-mode .upload-section.dragover {
    border-color: var(--primary) !important;
    background: #111 !important;
}

body.dark-mode .file-grid,
body.dark-mode .thumbnails-grid,
body.dark-mode .preview-panel,
body.dark-mode .preview-card,
body.dark-mode .table-container {
    background: #0a0a0a !important;
    border: 1px solid #333 !important;
}

body.dark-mode .preview-grid {
    background: #0a0a0a !important;
    color: var(--text-main) !important;
}

body.dark-mode .preview-grid th {
    background: #1a1a1a !important;
    color: var(--primary) !important;
    border-color: #333 !important;
}

body.dark-mode .preview-grid td {
    border-color: #222 !important;
}

body.dark-mode .preview-grid td:hover {
    background: rgba(0, 242, 255, 0.1) !important;
}

body.dark-mode .preview-grid tr:hover td {
    background: #111 !important;
}

body.dark-mode .select-box,
body.dark-mode .converter-card,
body.dark-mode .direction-toggle,
body.dark-mode .file-input-label,
body.dark-mode .privacy-notice-card,
body.dark-mode .faq-item {
    background: #0a0a0a !important;
    border-color: #333 !important;
    color: var(--text-main) !important;
}

body.dark-mode .direction-toggle {
    background: #111 !important;
}

body.dark-mode .converter-card {
    background: #0a0a0a !important;
}

body.dark-mode .file-input-label {
    background: rgba(255, 255, 255, 0.05) !important;
}

body.dark-mode .format-label {
    color: var(--text-main) !important;
}

body.dark-mode .privacy-notice-card {
    background: linear-gradient(135deg, #111, #0a0a0a) !important;
}

body.dark-mode .privacy-icon i,
body.dark-mode .privacy-content h3 {
    color: var(--primary) !important;
}

body.dark-mode .faq-item {
    background: #0a0a0a !important;
}

body.dark-mode .faq-q {
    color: var(--primary) !important;
}

body.dark-mode .faq-a {
    color: var(--text-dim) !important;
}

body.dark-mode .ghost-cursor {
    color: var(--primary) !important;
}

/* Video to Audio Overrides */
body.dark-mode .converter-card,
body.dark-mode .tabs,
body.dark-mode .tab-btn.active,
body.dark-mode .file-drop-zone,
body.dark-mode .format-btn,
body.dark-mode #ytQualitySection {
    background: #0a0a0a !important;
    border-color: #333 !important;
    color: var(--text-main) !important;
}

body.dark-mode .tabs {
    background: #111 !important;
}

body.dark-mode .tab-btn.active {
    background: #1a1a1a !important;
    color: var(--primary) !important;
}

body.dark-mode .file-drop-zone {
    background: rgba(255, 255, 255, 0.02) !important;
}

body.dark-mode .format-btn {
    background: #111 !important;
}

body.dark-mode .format-btn:hover {
    border-color: var(--primary) !important;
    color: var(--primary) !important;
}

body.dark-mode .format-btn.selected {
    background: rgba(0, 242, 255, 0.1) !important;
    border-color: var(--primary) !important;
    color: var(--primary) !important;
}

body.dark-mode .success-box {
    background: #0a1a0a !important;
    border: 1px solid #166534 !important;
    color: #4ade80 !important;
}

body.dark-mode .error-box {
    background: #1a0a0a !important;
    border: 1px solid #7f1d1d !important;
    color: #fca5a5 !important;
}

body.dark-mode .info-badge {
    background: #0a1324 !important;
    border: 1px solid #1e3a8a !important;
    color: #93c5fd !important;
}

body.dark-mode .progress-bar-track {
    background: #111 !important;
}

body.dark-mode .progress-label span {
    color: var(--text-dim) !important;
}

body.dark-mode .status-msg {
    color: var(--text-muted) !important;
}

body.dark-mode .file-card,
body.dark-mode .page-item,
body.dark-mode .level-card {
    background: #111 !important;
    border: 1px solid #333 !important;
    box-shadow: none !important;
}

body.dark-mode .page-item:hover,
body.dark-mode .level-card:hover {
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.2) !important;
    background: #1a1a1a !important;
}

body.dark-mode .page-item.selected,
body.dark-mode .level-card.active {
    border-color: var(--primary) !important;
    background: rgba(0, 242, 255, 0.05) !important;
}

body.dark-mode .file-thumb,
body.dark-mode .page-canvas,
body.dark-mode .preview-thumb {
    background: #1a1a1a !important;
    border: 1px solid #333 !important;
}

body.dark-mode .file-name,
body.dark-mode .page-number,
body.dark-mode .level-title {
    color: var(--text-main) !important;
}

body.dark-mode .page-number {
    background: var(--primary) !important;
    color: #000 !important;
}

body.dark-mode .controls-panel {
    background: #111 !important;
    border: 1px solid #333 !important;
    box-shadow: none !important;
}

body.dark-mode .option-row,
body.dark-mode .split-mode-btn {
    border-color: #222 !important;
}

body.dark-mode .split-mode-btn {
    background: #0a0a0a !important;
    color: var(--text-muted) !important;
}

body.dark-mode .option-row:hover,
body.dark-mode .split-mode-btn:hover {
    background: #1a1a1a !important;
}

body.dark-mode .split-mode-btn.active {
    border-color: var(--primary) !important;
    color: var(--primary) !important;
    background: rgba(0, 242, 255, 0.05) !important;
}

body.dark-mode .option-text,
body.dark-mode .control-label {
    color: var(--text-main) !important;
}

body.dark-mode .merge-btn,
body.dark-mode .process-btn,
body.dark-mode .compress-btn {
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.2) !important;
}

body.dark-mode .merge-btn:hover,
body.dark-mode .process-btn:hover,
body.dark-mode .compress-btn:hover {
    box-shadow: 0 0 25px rgba(0, 242, 255, 0.4) !important;
}

body.dark-mode .edit-container, 
body.dark-mode .progress-card,
body.dark-mode .dialog-card {
    background: #111 !important;
    border: 1px solid #333 !important;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5) !important;
}

body.dark-mode .selection-stats {
    background: rgba(0, 0, 0, 0.9) !important;
    border: 1px solid var(--primary) !important;
    box-shadow: 0 0 20px rgba(0, 242, 255, 0.2) !important;
}

body.dark-mode .status-success,
body.dark-mode .status-alert.status-success {
    background: #0a1a0a !important;
    border: 1px solid #166534 !important;
    color: #4ade80 !important;
}

body.dark-mode .stat-original {
    background: #222 !important;
    color: var(--text-muted) !important;
}

body.dark-mode .upload-icon {
    background: none !important;
    -webkit-text-fill-color: var(--primary) !important;
    color: var(--primary) !important;
    text-shadow: 0 0 10px rgba(0, 242, 255, 0.4) !important;
}

body.dark-mode #editModal, 
body.dark-mode #passwordModal, 
body.dark-mode #progressOverlay,
body.dark-mode .dialog-overlay {
    background: rgba(0,0,0,0.85) !important;
}

body.dark-mode hr {
    border-top: 1px solid #333 !important;
}

/* Scanline Texture */
body.dark-mode::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,0,0,0.2) 3px);
    z-index: 9999;
    opacity: 0.15;
}

@keyframes gridMoveDown {
    0% { background-position: 0 0; }
    100% { background-position: 0 65px; }
}

/* Minimalist Grid Background */
body.dark-mode .bg-animation {
    background: #000;
    background-image: linear-gradient(rgba(255, 255, 255, 0.075) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(255, 255, 255, 0.075) 1px, transparent 1px);
    background-size: 65px 65px;
    animation: gridMoveDown 5s linear infinite;
}
body.dark-mode .blob { display: none !important; }

/* Header: Clean, grid-aligned */
body.dark-mode header {
    background-color: rgba(5, 5, 5, 0.9) !important;
    border-bottom: 2px solid var(--primary); /* Glowing border */
    backdrop-filter: none;
}

/* Tool Cards: Glowing Grid Panels */
body.dark-mode .tool-card {
    background-color: var(--bg-surface);
    border: 1px solid #333;
    border-radius: 0; /* Brutalist sharp edges */
    transition: 0.05s ease-out; /* Snappy */
    position: relative;
}

/* Corner Decor */
body.dark-mode .tool-card::before,
body.dark-mode .tool-card::after {
    content: "";
    position: absolute;
    width: 10px;
    height: 10px;
    border: 1px solid var(--primary);
    opacity: 0;
    transition: 0.05s ease-out;
}
body.dark-mode .tool-card:hover::before,
body.dark-mode .tool-card:hover::after { opacity: 1; }
body.dark-mode .tool-card::before { top: 5px; left: 5px; border-bottom: none; border-right: none; }
body.dark-mode .tool-card::after { bottom: 5px; right: 5px; border-top: none; border-left: none; }

body.dark-mode .tool-card:hover {
    border-color: var(--primary);
    box-shadow: var(--glow-effect);
}

body.dark-mode .card-icon {
    background: transparent;
    border: 1px solid var(--primary);
    border-radius: 0;
    color: var(--primary);
}

/* Typography Enhancements */
body.dark-mode .hero-title,
body.dark-mode .logo,
body.dark-mode h1, body.dark-mode h2, body.dark-mode h3 {
    text-transform: uppercase;
    letter-spacing: -0.02em; /* Tighter */
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    background: none !important;
    font-weight: 700;
}

body.dark-mode h4,
body.dark-mode h5,
body.dark-mode h6 {
    color: #e0e0e0 !important;
    -webkit-text-fill-color: #e0e0e0 !important;
    background: none !important;
}

/* Global Neon Cyan Elements Gradient (Icons) */
body.dark-mode .card-icon i,
body.dark-mode .feature-icon i,
body.dark-mode .tool-icon i {
    background: linear-gradient(135deg, #0055ff, #00f2ff) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    color: #00f2ff !important;
}

/* Global Gradient Backgrounds (Step circles, avatars, etc.) */
body.dark-mode .step-num,
body.dark-mode .step-number {
    background: linear-gradient(135deg, #0055ff, #00f2ff) !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    border: none !important;
    box-shadow: none !important;
}

body.dark-mode .logo span {
    color: var(--primary) !important;
    background: none !important;
    -webkit-text-fill-color: var(--primary) !important;
}

/* Global Tool Template Overrides */
body.dark-mode .upload-card,
body.dark-mode .denoiser-card,
body.dark-mode .content-card,
body.dark-mode .processor-card,
body.dark-mode .results-card,
body.dark-mode .faq-item {
    background: var(--bg-surface) !important;
    border: 1px solid #333 !important;
    box-shadow: none !important;
}

body.dark-mode .page-title,
body.dark-mode .section-title {
    background: none !important;
    -webkit-text-fill-color: #ffffff !important;
    color: #ffffff !important;
}

body.dark-mode .page-subtitle,
body.dark-mode .form-label,
body.dark-mode .step-text,
body.dark-mode .value-prop-content p,
body.dark-mode .faq-answer,
body.dark-mode .faq-question,
body.dark-mode .conversion-pill {
    color: var(--text-main) !important;
}

body.dark-mode .file-input-label {
    background: #1a1a1a !important;
    border: 2px dashed #444 !important;
    color: var(--text-muted) !important;
}

body.dark-mode .file-input-label:hover {
    border-color: var(--primary) !important;
    background: #252525 !important;
    color: var(--primary) !important;
}

/* Professional Button System - Cyber Minimalist */
body.dark-mode button,
body.dark-mode .process-btn,
body.dark-mode .cta-btn,
body.dark-mode .remove-preview-btn,
body.dark-mode .login-btn,
body.dark-mode .extract-btn,
body.dark-mode .download-btn,
body.dark-mode .convert-btn,
body.dark-mode .tab-btn,
body.dark-mode .tool-btn,
body.dark-mode .action-btn,
body.dark-mode .plan-btn,
body.dark-mode .run-btn,
body.dark-mode .upscale-btn,
body.dark-mode .compress-btn,
body.dark-mode .audio-toggle-btn {
    border-radius: 0 !important;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-weight: 700 !important;
    transition: all 0.1s ease-out !important;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--primary) !important;
    background: #000 !important;
    color: var(--primary) !important;
    cursor: pointer;
}

body.dark-mode button:hover,
body.dark-mode .process-btn:hover,
body.dark-mode .cta-btn:hover,
body.dark-mode .remove-preview-btn:hover,
body.dark-mode .login-btn:hover,
body.dark-mode .extract-btn:hover,
body.dark-mode .download-btn:hover,
body.dark-mode .convert-btn:hover,
body.dark-mode .tab-btn:hover,
body.dark-mode .tool-btn:hover,
body.dark-mode .action-btn:hover,
body.dark-mode .plan-btn:hover,
body.dark-mode .run-btn:hover,
body.dark-mode .upscale-btn:hover,
body.dark-mode .compress-btn:hover,
body.dark-mode .audio-toggle-btn:hover {
    background: var(--primary) !important;
    color: #000 !important;
    box-shadow: var(--glow-effect) !important;
    transform: translateY(-2px);
}

body.dark-mode button:active,
body.dark-mode .process-btn:active,
body.dark-mode .cta-btn:active,
body.dark-mode .remove-preview-btn:active,
body.dark-mode .login-btn:active,
body.dark-mode .extract-btn:active,
body.dark-mode .download-btn:active,
body.dark-mode .convert-btn:active,
body.dark-mode .tab-btn:active,
body.dark-mode .tool-btn:active,
body.dark-mode .action-btn:active,
body.dark-mode .plan-btn:active,
body.dark-mode .run-btn:active,
body.dark-mode .upscale-btn:active,
body.dark-mode .compress-btn:active,
body.dark-mode .audio-toggle-btn:active {
    transform: translateY(1px);
}

body.dark-mode button:disabled {
    border-color: #444 !important;
    background: #222 !important;
    color: #555 !important;
    cursor: not-allowed;
    box-shadow: none !important;
    transform: none !important;
}

/* Specific Active State for Tabs/Toggles */
body.dark-mode .tab-btn.active,
body.dark-mode .tool-btn.active,
body.dark-mode .audio-toggle-btn.active {
    background: var(--primary) !important;
    color: #000 !important;
}



body.dark-mode .alert-info {
    background: #1a1a1a !important;
    border: 1px solid var(--primary) !important;
    color: var(--text-main) !important;
}

body.dark-mode .value-prop-card {
    background: #1a1a1a !important;
    border-left: 6px solid var(--primary) !important;
}

body.dark-mode .step-number {
    background: var(--primary) !important;
    color: #ffffff !important;
    box-shadow: none !important;
}

body.dark-mode .conversion-pill {
    background: #1a1a1a !important;
    border: 1px solid #333 !important;
}

body.dark-mode .conversion-pill:hover {
    border-color: var(--primary) !important;
    color: var(--primary) !important;
}


/* Global Select/Input Overrides */
body.dark-mode select,
body.dark-mode .format-selector,
body.dark-mode .form-select,
body.dark-mode .format-select,
body.dark-mode .input-field,
body.dark-mode .url-input {
    background-color: #1a1a1a !important;
    border: 1px solid #444 !important;
    color: var(--text-main) !important;
    border-radius: 6px !important;
}

body.dark-mode select:focus,
body.dark-mode .format-selector:focus,
body.dark-mode .form-select:focus,
body.dark-mode .format-select:focus,
body.dark-mode .input-field:focus,
body.dark-mode .url-input:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 5px var(--primary) !important;
}

/* Usage Counter Badge */
body.dark-mode .usage-counter-badge {
    background: #1a1a1a !important;
    border: 1px solid #333 !important;
    box-shadow: none !important;
    color: var(--text-muted) !important;
}

body.dark-mode .usage-counter-badge .count {
    color: var(--primary) !important;
}

body.dark-mode .usage-counter-badge .upgrade-link {
    background: rgba(255, 0, 122, 0.1) !important;
    color: var(--secondary) !important;
}

body.dark-mode .usage-counter-badge .upgrade-link:hover {
    background: rgba(255, 0, 122, 0.2) !important;
}

body.dark-mode .share-btn {
    background: var(--bg-surface);
    border: 1px solid #333;
    color: var(--text-muted);
}

body.dark-mode .share-btn:hover {
    background: var(--primary);
    color: white;
}

body.dark-mode .article-body {
    color: var(--text-main);
}

body.dark-mode .article-body h2,
body.dark-mode .article-body h3,
body.dark-mode .article-body strong {
    color: #ffffff !important;
}

body.dark-mode .article-title {
    background: none;
    -webkit-text-fill-color: #ffffff;
    color: #ffffff;
}

body.dark-mode .toc-card {
    background: var(--bg-surface);
    border: 1px solid #333;
    box-shadow: none;
}

body.dark-mode .toc-card h4 {
    color: #ffffff;
}

body.dark-mode .toc-item a {
    color: var(--text-muted);
}

body.dark-mode .related-card {
    background: var(--bg-surface);
    border: 1px solid #333;
}

body.dark-mode .related-card h4 {
    color: #ffffff;
}

body.dark-mode .section-heading {
    color: #ffffff;
}

body.dark-mode .cta-banner {
    background: #1a1a1a;
    border: 1px solid var(--primary);
}

body.dark-mode .cta-banner h3 {
    color: #ffffff;
}

body.dark-mode .cta-btn {
    background: var(--primary);
    color: #ffffff;
}

/* Upscaler SEO Path Fixes */
body.dark-mode .seo-path-container {
    background: #1a1a1a !important;
    border-color: #333 !important;
}

body.dark-mode .format-card {
    background: #000 !important;
    border: 1px solid #333 !important;
}

body.dark-mode .format-name {
    color: #ffffff !important;
}

body.dark-mode .format-icon {
    background: #1a1a1a !important;
    color: var(--primary) !important;
}

body.dark-mode .path-arrow {
    background: none !important;
    -webkit-text-fill-color: var(--primary) !important;
    color: var(--primary) !important;
}


/* --- Comprehensive SEO Section Fixes --- */
body.dark-mode .seo-container,
body.dark-mode .seo-container section,
body.dark-mode .seo-container div,
body.dark-mode .seo-container p,
body.dark-mode .seo-container span {
    background-color: transparent !important;
    color: var(--text-main) !important;
}

body.dark-mode .seo-container [style*="background: white"],
body.dark-mode .seo-container [style*="background: #fff"],
body.dark-mode .seo-container [style*="background: rgba(255, 255, 255, 0.9)"],
body.dark-mode .seo-container [style*="background: #f8fafc"],
body.dark-mode .seo-container [style*="background: linear-gradient"] {
    background: #111 !important;
    border: 1px solid #333 !important;
    color: var(--text-main) !important;
    box-shadow: none !important;
}


body.dark-mode .seo-container h2,
body.dark-mode .seo-container h3,
body.dark-mode .seo-container strong {
    color: #ffffff !important;
}


body.dark-mode .feature-icon {
    background: var(--primary) !important;
    -webkit-text-fill-color: #000 !important;
}

/* --- Video Downloader & Converter Overrides --- */
body.dark-mode .input-card,
body.dark-mode .results-card,
body.dark-mode .feature-card,
body.dark-mode .related-card,
body.dark-mode .downloads-table thead th,
body.dark-mode .downloads-table tbody tr,
body.dark-mode .downloads-table tbody td,
body.dark-mode #dl-progress-overlay {
    background: #111 !important;
    border: 1px solid #333 !important;
    color: var(--text-main) !important;
    box-shadow: none !important;
}

body.dark-mode .video-title {
    color: #ffffff !important;
    border-bottom: 2px solid #333 !important;
}

body.dark-mode .section-title {
    color: var(--text-muted) !important;
}

body.dark-mode .format-badge,
body.dark-mode .resolution-badge {
    background: #1a1a1a !important;
    color: var(--primary) !important;
    border: 1px solid var(--primary) !important;
}

body.dark-mode #dl-progress-overlay .dl-title,
body.dark-mode #dl-progress-overlay .dl-status {
    color: var(--text-main) !important;
}

body.dark-mode #dl-progress-overlay .dl-bar-track {
    background: #222 !important;
}

/* Dropdown Menus */

body.dark-mode .video-title {
    color: #ffffff !important;
    border-bottom: 2px solid #333 !important;
}

body.dark-mode .section-title {
    color: var(--text-muted) !important;
}

body.dark-mode .format-badge,
body.dark-mode .resolution-badge {
    background: #1a1a1a !important;
    color: var(--primary) !important;
    border: 1px solid var(--primary) !important;
}

body.dark-mode #dl-progress-overlay .dl-title,
body.dark-mode #dl-progress-overlay .dl-status {
    color: var(--text-main) !important;
}

body.dark-mode #dl-progress-overlay .dl-bar-track {
    background: #222 !important;
}

/* --- OCR Tool Fixes --- */
body.dark-mode .ocr-container,
body.dark-mode .ocr-main-grid {
    background: transparent !important;
}

body.dark-mode .code-block {
    background: #111 !important;
    border: 1px solid #333 !important;
    color: var(--text-main) !important;
}

body.dark-mode .image-preview-container {
    background: #111 !important;
    border-color: #333 !important;
}

body.dark-mode #overlay_wrapper {
    border-color: #333 !important;
}

body.dark-mode .tab-btn {
    color: var(--text-muted) !important;
}

body.dark-mode .tab-btn.active {
    color: var(--primary) !important;
    border-bottom-color: var(--primary) !important;
}

/* --- Aggressive Inline Style Overrides --- */
/* Target any element with hardcoded light backgrounds within major sections */
body.dark-mode .seo-container [style*="background: white"],
body.dark-mode .seo-container [style*="background: #fff"],
body.dark-mode .seo-container [style*="background: rgba(255, 255, 255"],
body.dark-mode .seo-container [style*="background: #f8fafc"],
body.dark-mode .seo-container [style*="background: #f9fafb"],
body.dark-mode .seo-container [style*="background: linear-gradient"],
body.dark-mode .processor-card[style*="background"],
body.dark-mode .converter-card[style*="background"],
body.dark-mode .control-card[style*="background"] {
    background: #111 !important;
    border: 1px solid #333 !important;
    color: var(--text-main) !important;
    box-shadow: none !important;
}

/* Fix for OCR result cards specifically */
body.dark-mode .result-card {
    background: var(--bg-surface) !important;
    border: 1px solid #333 !important;
    color: var(--text-main) !important;
}


/* --- Dropdown Menus --- */
body.dark-mode .dropdown-content {
    background: var(--bg-surface);
    border: 1px solid #333;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
}

body.dark-mode .dropdown-content a {
    color: var(--text-main);
}

body.dark-mode .dropdown-content a:hover {
    background-color: #1a1a1a;
    color: var(--primary);
    padding-left: 20px;
}

/* --- denoiser tool fixes --- */
body.dark-mode main,
body.dark-mode .denoiser-container,
body.dark-mode .downloader-container,
body.dark-mode .ocr-container,
body.dark-mode .pptx-container {
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
}

body.dark-mode .denoiser-card {
    background: var(--bg-surface) !important;
    border: 1px solid #333 !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
}

body.dark-mode .upload-zone {
    background: #0a0a0a !important;
    border: 2px dashed #333 !important;
}

body.dark-mode .upload-zone:hover {
    border-color: var(--primary) !important;
    background: #111 !important;
}

body.dark-mode .upload-zone h3 {
    color: var(--text-main) !important;
}

body.dark-mode .controls-grid {
    background: #0a0a0a !important;
    border: 1px solid #222 !important;
}

body.dark-mode .control-label span {
    color: var(--text-main) !important;
}

body.dark-mode .custom-range {
    background: #222 !important;
}

body.dark-mode .custom-range::-webkit-slider-thumb {
    background: var(--primary) !important;
    box-shadow: 0 0 10px rgba(0, 242, 255, 0.3) !important;
}

body.dark-mode .results-audio-container {
    background: #0a0a0a !important;
    border: 1px solid #222 !important;
    box-shadow: none !important;
}

body.dark-mode .audio-toggle-wrapper {
    background: #111 !important;
    box-shadow: none !important;
}

body.dark-mode .audio-toggle-btn {
    color: var(--text-muted) !important;
}

body.dark-mode .audio-toggle-btn.active {
    background: var(--primary) !important;
    color: #000 !important;
    box-shadow: var(--glow-effect) !important;
}

body.dark-mode .audio-player-wrapper {
    background: #000 !important;
    border: 1px solid #333 !important;
}

body.dark-mode audio {
    filter: invert(100%) hue-rotate(180deg) brightness(1.5);
}

body.dark-mode .success-title {
    background: none !important;
    -webkit-text-fill-color: #4ade80 !important;
    color: #4ade80 !important;
}

body.dark-mode .success-title i {
    color: #4ade80 !important;
    -webkit-text-fill-color: #4ade80 !important;
}

body.dark-mode #statusMsg,
body.dark-mode #fileName {
    color: var(--text-muted) !important;
}

/* Fix for denoiser step circles that use inline gradients */
body.dark-mode .denoiser-container section div[style*="background: var(--primary-gradient)"] {
    background: var(--primary) !important;
    color: #000 !important;
}

body.dark-mode .denoiser-container section h2,
body.dark-mode .denoiser-container section h3 {
    color: #fff !important;
}

body.dark-mode .denoiser-container section div[style*="color: #475569"],
body.dark-mode .denoiser-container section div[style*="color: #1e293b"] {
    color: var(--text-main) !important;
}

body.dark-mode .denoiser-container .upload-icon i {
    background: none !important;
    -webkit-text-fill-color: var(--primary) !important;
    color: var(--primary) !important;
}

body.dark-mode .custom-range::-webkit-slider-thumb {
    box-shadow: 0 0 0 4px rgba(0, 242, 255, 0.2) !important;
}

/* --- BDF / PDF Hub Page Fixes --- */
body.dark-mode .bdf-title {
    background: none !important;
    -webkit-text-fill-color: #ffffff !important;
    color: #ffffff !important;
}

body.dark-mode .bdf-subtitle {
    color: var(--text-muted) !important;
}

body.dark-mode .bdf-grid .tool-card {
    background: var(--bg-surface) !important;
    border: 1px solid #333 !important;
    box-shadow: none !important;
}

body.dark-mode .bdf-grid .tool-card:hover {
    border-color: var(--primary) !important;
    box-shadow: var(--glow-effect) !important;
}

body.dark-mode .bdf-grid .card-title {
    color: #ffffff !important;
}

body.dark-mode .bdf-grid .card-desc {
    color: var(--text-muted) !important;
}

body.dark-mode .bdf-grid .card-icon {
    background: #1a1a1a !important;
    border: 1px solid #333 !important;
}

/* Force icons inside the cards to use the blue -> cyan neon gradient */
body.dark-mode .bdf-grid .card-icon i {
    background: linear-gradient(135deg, #0055ff, #00f2ff) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    color: #00f2ff !important;
}

body.dark-mode .badge-soon {
    background: #111 !important;
    color: var(--text-muted) !important;
    border: 1px solid #333 !important;
}

body.dark-mode .seo-section {
    background: #111 !important;
    border: 1px solid #333 !important;
}

body.dark-mode .seo-section h2,
body.dark-mode .seo-block h2 {
    color: #ffffff !important;
}

body.dark-mode .seo-block p,
body.dark-mode .step-item div[style*="color"] {
    color: var(--text-main) !important;
}

/* The Smart PDF Solutions Card */
body.dark-mode .seo-block div[style*="padding: 30px"] {
    background: linear-gradient(135deg, rgba(0, 85, 255, 0.1), rgba(0, 242, 255, 0.1)) !important;
    border: 1px solid var(--primary) !important;
    color: var(--text-main) !important;
}

body.dark-mode .seo-block div[style*="padding: 30px"] h3 {
    color: #ffffff !important;
}

body.dark-mode .faq-card {
    background: var(--bg-surface) !important;
    border: 1px solid #333 !important;
}

body.dark-mode .faq-q {
    color: #ffffff !important;
}

body.dark-mode .faq-a,
body.dark-mode section[style*="margin-top: 80px"] p[style*="color"] {
    color: var(--text-muted) !important;
}

/* ========================================= */
/* --- Blog Index & Article Pages Fixes --- */
/* ========================================= */

/* Blog Index (/blog) */
body.dark-mode .container .bg-white.rounded-3xl {
    background: var(--bg-surface) !important;
    border: 1px solid #333 !important;
    box-shadow: none !important;
}

body.dark-mode .container .bg-white.rounded-3xl h2.text-gray-800 {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

body.dark-mode .container .bg-white.rounded-3xl h2 a {
    color: #ffffff !important;
}

body.dark-mode .container .bg-white.rounded-3xl h2 a:hover {
    color: var(--primary) !important;
}

body.dark-mode .container .bg-white.rounded-3xl p.text-gray-500,
body.dark-mode .container .bg-white.rounded-3xl .text-gray-400 {
    color: var(--text-muted) !important;
}

body.dark-mode .container .bg-gray-50 {
    background: var(--bg-surface) !important;
    border: 1px dashed #333 !important;
}

body.dark-mode .container .bg-gray-50 h3,
body.dark-mode .container .bg-gray-50 p,
body.dark-mode .container .bg-gray-50 i {
    color: var(--text-muted) !important;
}

body.dark-mode .container .text-gray-500 {
    color: var(--text-muted) !important;
}

body.dark-mode .container .text-indigo-600 {
    color: var(--primary) !important;
}

body.dark-mode .container .bg-indigo-600 {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    color: #000 !important;
}

body.dark-mode .container .bg-gradient-to-br {
    background: #1a1a1a !important;
}

/* Blog Article (/blog/<slug>) */
body.dark-mode .article-page {
    background: transparent !important;
}

body.dark-mode .article-title {
    background: none !important;
    -webkit-text-fill-color: #ffffff !important;
    color: #ffffff !important;
}

body.dark-mode .article-meta,
body.dark-mode .article-meta-item,
body.dark-mode .info-bar-stat span {
    color: var(--text-muted) !important;
}

body.dark-mode .article-info-bar {
    background: var(--bg-surface) !important;
    border: 1px solid #333 !important;
    box-shadow: none !important;
}

body.dark-mode .info-bar-stat {
    color: var(--text-main) !important;
}

body.dark-mode .share-btn {
    background: #111 !important;
    border: 1px solid #333 !important;
    color: var(--text-main) !important;
}

body.dark-mode .share-btn:hover {
    background: var(--primary) !important;
    color: #000 !important;
    border-color: var(--primary) !important;
}

body.dark-mode .article-body {
    color: var(--text-main) !important;
}

body.dark-mode .article-body h2,
body.dark-mode .article-body h3 {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

body.dark-mode .article-body h2::before,
body.dark-mode .article-body ul li::before,
body.dark-mode .article-body ol li::before {
    background: linear-gradient(135deg, #0055ff, #00f2ff) !important;
}

body.dark-mode .article-body strong {
    color: #ffffff !important;
}

body.dark-mode .article-body ul li,
body.dark-mode .article-body ol li {
    color: var(--text-main) !important;
}

body.dark-mode .article-body a {
    color: var(--primary) !important;
}

body.dark-mode .toc-card {
    background: var(--bg-surface) !important;
    border: 1px solid #333 !important;
    box-shadow: none !important;
}

body.dark-mode .toc-card h4 {
    color: #ffffff !important;
}

body.dark-mode .toc-item a {
    color: var(--text-muted) !important;
}

body.dark-mode .toc-item a:hover,
body.dark-mode .toc-item a.active {
    background: rgba(0, 242, 255, 0.1) !important;
    color: var(--primary) !important;
    border-left-color: var(--primary) !important;
}

body.dark-mode .related-card {
    background: var(--bg-surface) !important;
    border: 1px solid #333 !important;
}

body.dark-mode .related-card:hover {
    border-color: var(--primary) !important;
}

body.dark-mode .related-card h4 {
    color: #ffffff !important;
}

body.dark-mode .related-card p {
    color: var(--text-muted) !important;
}

body.dark-mode .section-heading {
    color: #ffffff !important;
}

body.dark-mode .cta-banner {
    background: linear-gradient(135deg, rgba(0, 85, 255, 0.1), rgba(0, 242, 255, 0.1)) !important;
    border: 1px solid var(--primary) !important;
    box-shadow: none !important;
}

body.dark-mode .cta-banner h3,
body.dark-mode .cta-banner p {
    color: #ffffff !important;
}

body.dark-mode .cta-btn {
    background: var(--primary) !important;
    color: #000 !important;
    border: none !important;
}

body.dark-mode .cta-btn:hover {
    background: #ffffff !important;
}

/* Remove Silence (/remove_silence) & Inline Style Cards */
body.dark-mode .stats-box {
    background: #111 !important;
    border-color: #333 !important;
}

body.dark-mode .stats-title {
    color: #e0e0e0 !important;
}

body.dark-mode .slider-value {
    background: #111 !important;
    color: var(--primary) !important;
    border: 1px solid #333 !important;
}

body.dark-mode .alert[style*="background: #fff7ed"] {
    background: rgba(234, 88, 12, 0.1) !important;
    border-color: #ea580c !important;
    color: #fdba74 !important;
}

body.dark-mode .alert[style*="background: #ecfdf5"] {
    background: rgba(16, 185, 129, 0.1) !important;
    border-color: #10b981 !important;
    color: #6ee7b7 !important;
}

body.dark-mode section[style*="rgba(255, 255, 255, 0.9)"] {
    background: var(--bg-surface) !important;
    border-color: #333 !important;
    color: var(--text-main) !important;
    box-shadow: none !important;
}

body.dark-mode section[style*="linear-gradient"] {
    background: linear-gradient(135deg, #111, #1a1a1a) !important;
    border-left-color: var(--primary) !important;
}

body.dark-mode section div[style*="background: white"] {
    background: #111 !important;
    border-color: #333 !important;
}

body.dark-mode section a[style*="background: white"] {
    background: #111 !important;
    border-color: #333 !important;
    color: #e0e0e0 !important;
}

body.dark-mode section a[style*="background: white"]:hover {
    border-color: var(--primary) !important;
    color: var(--primary) !important;
}

body.dark-mode section h2[style],
body.dark-mode section h3[style] {
    color: #ffffff !important;
}

/* Footer & Cookie Banner */
body.dark-mode footer {
    background-color: transparent !important;
    border-top: 1px solid #333 !important;
}

body.dark-mode footer p,
body.dark-mode footer div {
    color: var(--text-muted) !important;
}

body.dark-mode footer a {
    color: var(--text-muted) !important;
}

body.dark-mode footer a:hover {
    color: var(--primary) !important;
}

body.dark-mode footer p a[href*="eissay"] {
    color: var(--secondary) !important;
}

body.dark-mode footer p a[href*="eissay"]:hover {
    color: var(--primary) !important;
    text-shadow: var(--glow-effect);
}

body.dark-mode #cookie-banner {
    background: #111 !important;
    border-top: 1px solid #333 !important;
    box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.5) !important;
    color: var(--text-main) !important;
}

/* OCR Tool (/ocr) */
body.dark-mode .control-card,
body.dark-mode .result-card {
    background: var(--bg-surface) !important;
    border: 1px solid #333 !important;
    box-shadow: none !important;
}

body.dark-mode .form-select {
    background-color: #111 !important;
    border-color: #333 !important;
    color: var(--text-main) !important;
}

body.dark-mode .image-preview-container {
    background: #111 !important;
    border-color: #333 !important;
}

body.dark-mode .card-header {
    color: #e0e0e0 !important;
}

body.dark-mode .tab-btn {
    color: var(--text-muted) !important;
}

body.dark-mode .tab-btn.active,
body.dark-mode .tab-btn:hover {
    color: var(--primary) !important;
    border-bottom-color: var(--primary) !important;
}

body.dark-mode #smart_view_tab div[style*="background:#f3f4f6"] {
    background: #1a1a1a !important;
    color: var(--text-muted) !important;
}

body.dark-mode .tool-link-card {
    background: var(--bg-surface) !important;
    border: 1px solid #333 !important;
    color: var(--text-main) !important;
}

body.dark-mode .tool-link-card:hover {
    border-color: var(--primary) !important;
    color: var(--primary) !important;
}

/* Denoiser Tool (/denoise) */
body.dark-mode .denoiser-container {
    background: linear-gradient(135deg, rgba(0, 85, 255, 0.1), rgba(0, 242, 255, 0.1)) !important;
}

body.dark-mode .denoiser-card,
body.dark-mode .results-card {
    background: var(--bg-surface) !important;
    border: 1px solid #333 !important;
    box-shadow: none !important;
}

body.dark-mode .upload-zone {
    background: #111 !important;
    border-color: #333 !important;
}

body.dark-mode .upload-zone:hover {
    border-color: var(--primary) !important;
}

body.dark-mode .upload-zone h3 {
    color: #e0e0e0 !important;
}

body.dark-mode .controls-grid {
    background: #111 !important;
    border-color: #333 !important;
}

body.dark-mode .control-label {
    color: var(--text-main) !important;
}

body.dark-mode .results-audio-container {
    background: #111 !important;
    border-color: #333 !important;
}

body.dark-mode .audio-toggle-wrapper {
    background: #1a1a1a !important;
}

body.dark-mode .audio-toggle-btn {
    color: var(--text-muted) !important;
}

body.dark-mode .audio-toggle-btn:hover:not(.active) {
    background: #333 !important;
    color: var(--text-main) !important;
}

body.dark-mode .audio-toggle-btn.active {
    background: #333 !important;
    color: var(--primary) !important;
}

body.dark-mode .audio-player-wrapper {
    background: #000 !important;
    border-color: #333 !important;
}

/* Broad SEO Section & "How-to" Overrides (Global) */
body.dark-mode .seo-container section,
body.dark-mode .seo-container section[style*="background: white"],
body.dark-mode .seo-container section[style*="background: rgba"],
body.dark-mode .seo-container section[style*="background: linear-gradient(135deg, #f8fafc, #f1f5f9)"] {
    background: var(--bg-surface) !important;
    border: 1px solid #333 !important;
    box-shadow: none !important;
    color: var(--text-main) !important;
}

body.dark-mode .seo-container section div[style*="background: white"],
body.dark-mode .seo-container section div[style*="background: #ffffff"],
body.dark-mode .seo-container section div[style*="background: #f9fafb"],
body.dark-mode .seo-container section div[style*="background: #f3f4f6"] {
    background: #111 !important;
    border: 1px solid #333 !important;
    color: var(--text-main) !important;
}

/* Global Step Number Circles Override (Transparent Neon Border) */
body.dark-mode div[style*="border-radius: 50%"][style*="background:linear-gradient"],
body.dark-mode div[style*="border-radius:50%"][style*="background:linear-gradient"],
body.dark-mode div[style*="border-radius: 50%"][style*="background: linear-gradient"],
body.dark-mode div[style*="border-radius:50%"][style*="background: linear-gradient"],
body.dark-mode .seo-container div[style*="border-radius: 50%"],
body.dark-mode .seo-container div[style*="border-radius:50%"],
body.dark-mode .step-num,
body.dark-mode .step-number,
body.dark-mode .steps-grid div[style*="border-radius: 50%"],
body.dark-mode .steps-grid div[style*="border-radius:50%"] {
    background: rgba(0, 242, 255, 0.05) !important;
    border: 1px solid var(--primary) !important;
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.3) !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Broad Inline Style Overrides for SEO/Tools/FAQ (Resilient to Whitespace) */
body.dark-mode section[style*="background:rgba"],
body.dark-mode section[style*="background: rgba"],
body.dark-mode section[style*="background:white"],
body.dark-mode section[style*="background: white"],
body.dark-mode section[style*="background:#ffffff"],
body.dark-mode section[style*="background: #ffffff"],
body.dark-mode div[style*="background:white"],
body.dark-mode div[style*="background: white"],
body.dark-mode div[style*="background:#ffffff"],
body.dark-mode div[style*="background: #ffffff"],
body.dark-mode a[style*="background:white"],
body.dark-mode a[style*="background: white"],
body.dark-mode a[style*="background:#ffffff"],
body.dark-mode a[style*="background: #ffffff"] {
    background: var(--bg-surface) !important;
    border-color: #333 !important;
    color: var(--text-main) !important;
    box-shadow: none !important;
}

body.dark-mode section div[style*="background:white"],
body.dark-mode section div[style*="background: white"],
body.dark-mode section div[style*="background:#f9fafb"],
body.dark-mode section div[style*="background: #f9fafb"],
body.dark-mode section div[style*="background:#f3f4f6"],
body.dark-mode section div[style*="background: #f3f4f6"] {
    background: #111 !important;
    border: 1px solid #333 !important;
    color: var(--text-main) !important;
}

/* Force Cyber Style on Action Buttons */
body.dark-mode .process-btn,
body.dark-mode .upload-btn,
body.dark-mode .action-btn,
body.dark-mode .convert-btn,
body.dark-mode .download-btn {
    background: #000 !important;
    color: var(--primary) !important;
    border: 1px solid var(--primary) !important;
    transition: all 0.3s ease !important;
    box-shadow: none !important;
}

body.dark-mode .process-btn:hover:not(:disabled),
body.dark-mode .upload-btn:hover:not(:disabled),
body.dark-mode .action-btn:hover:not(:disabled),
body.dark-mode .convert-btn:hover:not(:disabled),
body.dark-mode .download-btn:hover:not(:disabled) {
    background: var(--primary) !important;
    color: #000 !important;
    box-shadow: var(--glow-effect) !important;
}

body.dark-mode .seo-container section div[style*="background: var(--primary-gradient)"] {
    background: linear-gradient(135deg, rgba(0, 85, 255, 0.1), rgba(0, 242, 255, 0.1)) !important;
    border: 1px solid var(--primary) !important;
    color: var(--text-main) !important;
}

/* Broad Icon Color Global Overrides in Dark Mode */
body.dark-mode i[style*="color: #6366f1"],
body.dark-mode i[style*="color:#6366f1"],
body.dark-mode .faq-question i,
body.dark-mode .faq-q i,
body.dark-mode .value-prop-icon i,
body.dark-mode .alert i,
body.dark-mode .file-input-label i,
body.dark-mode .form-label i,
body.dark-mode .process-btn i,
body.dark-mode .conversion-pill i,
body.dark-mode .raw-hint i,
body.dark-mode .step-item i,
body.dark-mode .icon-badge i,
body.dark-mode .tool-link-card i,
body.dark-mode .tool-card i {
    color: var(--primary) !important;
    background: none !important;
    -webkit-text-fill-color: initial !important;
    -webkit-background-clip: initial !important;
    background-clip: initial !important;
}

/* Subtitle Extractor Tool (/subtitle_extractor) Overrides */
body.dark-mode .extractor-card,
body.dark-mode .video-info-card,
body.dark-mode .subtitles-panel {
    background: var(--bg-surface) !important;
    border: 1px solid #333 !important;
    box-shadow: none !important;
}

body.dark-mode .url-input,
body.dark-mode .filter-input {
    background: #111 !important;
    border-color: #333 !important;
    color: var(--text-main) !important;
}

body.dark-mode .subs-table td {
    border-bottom: 1px solid #222 !important;
}

body.dark-mode .subs-table th {
    border-bottom: 1px solid #333 !important;
    color: var(--text-muted) !important;
}

body.dark-mode .lang-name,
body.dark-mode .video-title {
    color: var(--text-main) !important;
}

body.dark-mode .type-manual {
    background: #064e3b !important;
    color: #4ade80 !important;
}

body.dark-mode .type-auto {
    background: #451a03 !important;
    color: #fbbf24 !important;
}

body.dark-mode .dl-srt,
body.dark-mode .dl-txt {
    background: #111 !important;
    border-color: #333 !important;
    color: var(--text-main) !important;
}

body.dark-mode .dl-srt:hover,
body.dark-mode .dl-txt:hover {
    border-color: var(--primary) !important;
    color: var(--primary) !important;
    background: #1a1a1a !important;
}

body.dark-mode .stats-badge {
    background: #075985 !important;
    color: #bae6fd !important;
}

body.dark-mode .tool-card {
    background: #111 !important;
    border-color: #222 !important;
}

body.dark-mode .tool-card:hover {
    border-color: var(--primary) !important;
    background: #1a1a1a !important;
}

body.dark-mode .tool-card span {
    color: var(--text-main) !important;
}

/* Global Accent Color Consistency (Text & Borders) */
body.dark-mode .raw-hint,
body.dark-mode .file-name,
body.dark-mode .conversion-pill,
body.dark-mode .dng-highlight,
body.dark-mode .brush-label,
body.dark-mode .control-label {
    color: var(--text-main) !important;
}

body.dark-mode .conversion-pill:hover,
body.dark-mode .file-input-label:hover,
body.dark-mode .dng-highlight {
    border-color: var(--primary) !important;
    color: var(--primary) !important;
    box-shadow: var(--glow-effect) !important;
}

body.dark-mode .seo-container section div[style*="color: #475569"],
body.dark-mode .seo-container section p[style*="color: #64748b"],
body.dark-mode .seo-container section span[style*="color: #9ca3af"],
body.dark-mode .file-input-hint {
    color: var(--text-muted) !important;
}

body.dark-mode .seo-path-container {
    background: rgba(0, 242, 255, 0.03) !important;
    border: 1px solid rgba(0, 242, 255, 0.1) !important;
}

/* Global Range Slider Overrides (Cyan Neon Theme) */
body.dark-mode input[type="range"].slider-input,
body.dark-mode input[type="range"].brush-slider,
body.dark-mode input[type="range"].custom-range {
    -webkit-appearance: none !important;
    appearance: none !important;
    background: #1a1a1a !important;
    height: 8px !important;
    border-radius: 0 !important;
    border: 1px solid #333 !important;
}

body.dark-mode input[type="range"].slider-input::-webkit-slider-thumb,
body.dark-mode input[type="range"].brush-slider::-webkit-slider-thumb,
body.dark-mode input[type="range"].custom-range::-webkit-slider-thumb {
    -webkit-appearance: none !important;
    width: 20px !important;
    height: 20px !important;
    background: var(--primary) !important;
    border: 2px solid #000 !important;
    border-radius: 0 !important; /* Cyber sharp edges */
    cursor: pointer !important;
    box-shadow: 0 0 10px var(--primary) !important;
}

body.dark-mode .slider-value {
    background: #111 !important;
    color: var(--primary) !important;
    border: 1px solid #333 !important;
    border-radius: 0 !important;
}

/* --- BDF/PDF Tools Aggressive Overrides --- */
body.dark-mode .tool-container [style*="background: white"],
body.dark-mode .tool-container [style*="background: #ffffff"],
body.dark-mode .tool-container [style*="background: #fff"],
body.dark-mode .tool-container [style*="background: #f8fafc"],
body.dark-mode .tool-container [style*="background: #f9fafb"],
body.dark-mode .tool-container [style*="background: #f3f4f6"],
body.dark-mode .tool-container [style*="background: #f1f5f9"],
body.dark-mode .bdf-container [style*="background: white"],
body.dark-mode .bdf-container [style*="background: #ffffff"],
body.dark-mode .bdf-container [style*="background: #fff"],
body.dark-mode .bdf-container [style*="background: #f8fafc"],
body.dark-mode .bdf-container [style*="background: #f9fafb"],
body.dark-mode .bdf-container [style*="background: #f3f4f6"],
body.dark-mode .bdf-container [style*="background: #f1f5f9"] {
    background: var(--bg-surface) !important;
    border-color: #333 !important;
    color: var(--text-main) !important;
}

body.dark-mode .tool-container [style*="color: #1e293b"],
body.dark-mode .tool-container [style*="color: #475569"],
body.dark-mode .tool-container [style*="color: #64748b"],
body.dark-mode .bdf-container [style*="color: #1e293b"],
body.dark-mode .bdf-container [style*="color: #475569"],
body.dark-mode .bdf-container [style*="color: #64748b"] {
    color: var(--text-main) !important;
}

