/* QuickConvert - Modern SaaS/Vercel Aesthetic Stylesheet */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --accent: #0284c7;
  --card-border: rgba(226, 232, 240, 0.8);
  --card-hover-border: rgba(99, 102, 241, 0.4);
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.011em;
}

code, pre, .font-mono {
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: -0.02em;
}

/* Subtle, refined dot-grid background for modern tech/SaaS feel */
.bg-grid-pattern {
  background-size: 28px 28px;
  background-image: radial-gradient(circle, rgba(148, 163, 184, 0.15) 1px, transparent 1px);
}

/* Glassmorphism panels & cards */
.glass-panel {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(226, 232, 240, 0.85);
}

/* Card hover elevations */
.tool-card-hover {
  transition: all 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

.tool-card-hover:hover {
  border-color: rgba(99, 102, 241, 0.45);
  box-shadow: 0 12px 28px -6px rgba(15, 23, 42, 0.08), 0 0 0 1px rgba(99, 102, 241, 0.15);
  transform: translateY(-4px);
}

/* Drag-over active states */
.dropzone.drag-active {
  border-color: #4f46e5 !important;
  background-color: rgba(79, 70, 229, 0.04) !important;
  transform: scale(1.008);
}

/* Smooth Accordion Content transitions */
.faq-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
  opacity: 0;
}

.faq-content.open {
  opacity: 1;
}

/* Custom styled range slider (SaaS minimal style) */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  height: 5px;
  border-radius: 9999px;
  background: #e2e8f0;
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #4f46e5;
  cursor: pointer;
  border: 2.5px solid #ffffff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.25), 0 0 0 1px rgba(79, 70, 229, 0.2);
  transition: transform 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  background: #4338ca;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.4), 0 0 0 3px rgba(99, 102, 241, 0.2);
}

input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #4f46e5;
  cursor: pointer;
  border: 2.5px solid #ffffff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.25);
  transition: transform 0.15s ease;
}

/* Modern Minimal Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Toast Animation */
@keyframes slideUpFade {
  from {
    transform: translateY(100%) scale(0.96);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.animate-toast {
  animation: slideUpFade 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Clean Ad Container (Prevents Layout Shift without visible placeholder text) */
.qc-ad-container {
  min-height: 90px;
  width: 100%;
}

/* Button & Interactive micro-interactions */
button:active:not(:disabled), a.active-press:active {
  transform: scale(0.98);
}

/* ==========================================
   Interactive Navigation Mega-Menu Dropdown
   ========================================== */
.mega-menu-panel {
  will-change: opacity, transform;
}

#nav-tools-dropdown-container.is-active #nav-tools-mega-menu {
  pointer-events: auto !important;
  visibility: visible !important;
  opacity: 1 !important;
  transform: translateY(0) !important;
}

#nav-tools-dropdown-container.is-active #nav-tools-arrow {
  transform: rotate(180deg) !important;
  color: #4f46e5 !important;
}

#nav-tools-dropdown-container.is-active #nav-tools-dropdown-btn {
  color: #4f46e5 !important;
}

/* Tool item hover within mega menu */
.mega-tool-item {
  transition: all 0.16s ease;
}

.mega-tool-item:hover {
  background-color: rgba(241, 245, 249, 0.85);
  transform: translateX(2px);
}

/* ==========================================
   CSS CUSTOM PROPERTIES / THEME VARIABLES
   ========================================== */
:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #f1f5f9;
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --border-subtle: #e2e8f0;
  --border-medium: #cbd5e1;
  --header-bg: rgba(255, 255, 255, 0.95);
  --footer-bg: #f8fafc;
  --input-bg: #ffffff;
  --input-border: #cbd5e1;
  --input-text: #0f172a;
}

html.dark,
.dark {
  --bg-primary: #0b0f19;
  --bg-secondary: #0f172a;
  --bg-tertiary: #131b2e;
  --bg-card: #131b2e;
  --bg-card-hover: #1e293b;
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --border-subtle: #1e293b;
  --border-medium: #334155;
  --header-bg: rgba(15, 23, 42, 0.95);
  --footer-bg: #0f172a;
  --input-bg: #0f172a;
  --input-border: #334155;
  --input-text: #f8fafc;
}

/* ==========================================
   BRAND LOGO - 100% CRISP OPACITY
   ========================================== */
.brand-logo-icon {
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 50%, #0284c7 100%) !important;
  opacity: 1 !important;
}

.brand-logo-title {
  background: linear-gradient(90deg, #4f46e5 0%, #0284c7 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
  opacity: 1 !important;
}

.brand-logo-subtitle {
  opacity: 1 !important;
  color: #334155 !important;
  font-weight: 800 !important;
}

html.dark .brand-logo-subtitle,
body.dark .brand-logo-subtitle,
.dark .brand-logo-subtitle {
  opacity: 1 !important;
  color: #f1f5f9 !important;
  font-weight: 800 !important;
}

/* Smooth Transition across theme toggle */
body, header, footer, .mega-menu-panel > div, .tool-card-hover, input, select, textarea, .theme-toggle-btn {
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

/* ==========================================
   GLOBAL DARK MODE STYLING & RULES
   ========================================== */
html.dark,
.dark {
  color-scheme: dark;
}

html.dark body,
.dark body {
  background-color: #0b0f19 !important;
  color: #f1f5f9 !important;
}

/* Headers & Sticky Bars */
html.dark header,
.dark header {
  background-color: rgba(15, 23, 42, 0.95) !important;
  border-bottom-color: #1e293b !important;
}

/* Footers */
html.dark footer,
.dark footer {
  background-color: #0f172a !important;
  border-top-color: #1e293b !important;
  color: #94a3b8 !important;
}

/* Cards, Panels & Sections */
html.dark .card,
body.dark .card,
.dark .card,
html.dark .bg-white,
body.dark .bg-white,
.dark .bg-white,
html.dark .bg-white\/95,
body.dark .bg-white\/95,
.dark .bg-white\/95 {
  background-color: #131b2e !important;
  border-color: #1e293b !important;
  color: #f8fafc !important;
}

html.dark .bg-slate-50,
.dark .bg-slate-50,
html.dark .bg-slate-50\/40,
html.dark .bg-slate-50\/50,
html.dark .bg-slate-50\/60,
html.dark .bg-slate-50\/70,
html.dark .bg-slate-50\/80,
.dark .bg-slate-50\/40,
.dark .bg-slate-50\/50,
.dark .bg-slate-50\/60,
.dark .bg-slate-50\/70,
.dark .bg-slate-50\/80 {
  background-color: #0f172a !important;
}

html.dark .bg-slate-100,
.dark .bg-slate-100 {
  background-color: #1e293b !important;
}

html.dark .bg-slate-200,
.dark .bg-slate-200 {
  background-color: #334155 !important;
}

/* Tinted cards & badges */
html.dark .bg-indigo-50,
html.dark .bg-indigo-50\/50,
html.dark .bg-indigo-50\/70,
.dark .bg-indigo-50,
.dark .bg-indigo-50\/50,
.dark .bg-indigo-50\/70 {
  background-color: rgba(99, 102, 241, 0.12) !important;
}

html.dark .bg-brand-50,
html.dark .bg-brand-50\/30,
html.dark .bg-brand-50\/50,
html.dark .bg-brand-50\/60,
.dark .bg-brand-50,
.dark .bg-brand-50\/30,
.dark .bg-brand-50\/50,
.dark .bg-brand-50\/60 {
  background-color: rgba(99, 102, 241, 0.12) !important;
}

html.dark .bg-amber-50,
html.dark .bg-amber-50\/90,
.dark .bg-amber-50,
.dark .bg-amber-50\/90 {
  background-color: rgba(245, 158, 11, 0.12) !important;
}

html.dark .bg-emerald-50,
html.dark .bg-emerald-50\/60,
html.dark .bg-emerald-50\/80,
.dark .bg-emerald-50,
.dark .bg-emerald-50\/60,
.dark .bg-emerald-50\/80 {
  background-color: rgba(16, 185, 129, 0.12) !important;
}

html.dark .bg-rose-50,
.dark .bg-rose-50 {
  background-color: rgba(244, 63, 94, 0.12) !important;
}

html.dark .bg-blue-50,
html.dark .bg-blue-50\/50,
.dark .bg-blue-50,
.dark .bg-blue-50\/50 {
  background-color: rgba(59, 130, 246, 0.12) !important;
}

html.dark .bg-purple-50,
html.dark .bg-violet-50,
.dark .bg-purple-50,
.dark .bg-violet-50 {
  background-color: rgba(168, 85, 247, 0.12) !important;
}

html.dark .bg-teal-50,
html.dark .bg-sky-50,
.dark .bg-teal-50,
.dark .bg-sky-50 {
  background-color: rgba(20, 184, 166, 0.12) !important;
}

/* Borders in Dark Mode */
html.dark .border-slate-50,
html.dark .border-slate-100,
html.dark .border-slate-200,
html.dark .border-slate-200\/60,
html.dark .border-slate-200\/70,
html.dark .border-slate-200\/80,
html.dark .border-slate-200\/90,
html.dark .border-slate-300,
.dark .border-slate-50,
.dark .border-slate-100,
.dark .border-slate-200,
.dark .border-slate-200\/60,
.dark .border-slate-200\/70,
.dark .border-slate-200\/80,
.dark .border-slate-200\/90,
.dark .border-slate-300 {
  border-color: #1e293b !important;
}

html.dark .border-indigo-100,
html.dark .border-indigo-100\/60,
html.dark .border-indigo-100\/80,
html.dark .border-indigo-200\/70,
html.dark .border-brand-100,
html.dark .border-amber-200\/80,
html.dark .border-emerald-200\/80,
.dark .border-indigo-100,
.dark .border-indigo-100\/60,
.dark .border-indigo-100\/80,
.dark .border-indigo-200\/70,
.dark .border-brand-100,
.dark .border-amber-200\/80,
.dark .border-emerald-200\/80 {
  border-color: #1e293b !important;
}

/* Section Background Gradients in Dark Mode */
html.dark section#security-advantage,
body.dark section#security-advantage,
.dark section#security-advantage,
html.dark #security-advantage,
body.dark #security-advantage,
.dark #security-advantage,
html.dark .bg-gradient-to-b:not([class*="bg-clip-text"]),
body.dark .bg-gradient-to-b:not([class*="bg-clip-text"]),
.dark .bg-gradient-to-b:not([class*="bg-clip-text"]),
html.dark .bg-gradient-to-br:not([class*="bg-clip-text"]),
body.dark .bg-gradient-to-br:not([class*="bg-clip-text"]),
.dark .bg-gradient-to-br:not([class*="bg-clip-text"]) {
  background-image: none !important;
  background-color: #0b0f19 !important;
  border-color: #1e293b !important;
}

/* Mega-Menu Panel Gradient Reset */
html.dark .mega-menu-panel .bg-gradient-to-b,
body.dark .mega-menu-panel .bg-gradient-to-b,
.dark .mega-menu-panel .bg-gradient-to-b {
  background-image: none !important;
  background-color: #0f172a !important;
}

/* Typography in Dark Mode */
html.dark h1, html.dark h2, html.dark h3, html.dark h4, html.dark h5, html.dark h6,
body.dark h1, body.dark h2, body.dark h3, body.dark h4, body.dark h5, body.dark h6,
.dark h1, .dark h2, .dark h3, .dark h4, .dark h5, .dark h6,
html.dark strong, body.dark strong, .dark strong,
html.dark b, body.dark b, .dark b,
html.dark .text-slate-950,
html.dark .text-slate-900,
html.dark .text-slate-800,
body.dark .text-slate-950,
body.dark .text-slate-900,
body.dark .text-slate-800,
.dark .text-slate-950,
.dark .text-slate-900,
.dark .text-slate-800 {
  color: #f8fafc !important;
}

/* Body Paragraphs, Subheadings & Descriptive Text */
html.dark p, html.dark li, html.dark dd, html.dark dt,
body.dark p, body.dark li, body.dark dd, body.dark dt,
.dark p, .dark li, .dark dd, .dark dt,
html.dark .text-slate-700,
html.dark .text-slate-600,
body.dark .text-slate-700,
body.dark .text-slate-600,
.dark .text-slate-700,
.dark .text-slate-600,
html.dark .space-y-4.text-slate-600 p,
body.dark .space-y-4.text-slate-600 p,
.dark .space-y-4.text-slate-600 p {
  color: #cbd5e1 !important;
}

/* Muted Descriptions, Subtitles & Metadata */
html.dark .text-slate-500,
html.dark .text-slate-400,
body.dark .text-slate-500,
body.dark .text-slate-400,
.dark .text-slate-500,
.dark .text-slate-400,
html.dark .text-xs.text-slate-500,
body.dark .text-xs.text-slate-500,
.dark .text-xs.text-slate-500 {
  color: #94a3b8 !important;
}

html.dark .text-amber-700,
body.dark .text-amber-700,
.dark .text-amber-700 {
  color: #fbbf24 !important;
}

html.dark .text-emerald-700,
html.dark .text-emerald-600,
body.dark .text-emerald-700,
body.dark .text-emerald-600,
.dark .text-emerald-700,
.dark .text-emerald-600 {
  color: #34d399 !important;
}

html.dark .text-indigo-600,
body.dark .text-indigo-600,
.dark .text-indigo-600 {
  color: #818cf8 !important;
}

/* Form Inputs, Selects & Textareas in Dark Mode */
html.dark input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):not([type="range"]):not([type="hidden"]),
html.dark select,
html.dark textarea,
.dark input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):not([type="range"]):not([type="hidden"]),
.dark select,
.dark textarea {
  background-color: #0f172a !important;
  color: #f8fafc !important;
  border-color: #334155 !important;
}

html.dark select option,
.dark select option {
  background-color: #0f172a !important;
  color: #f8fafc !important;
}

html.dark input:focus,
html.dark select:focus,
html.dark textarea:focus,
.dark input:focus,
.dark select:focus,
.dark textarea:focus {
  border-color: #6366f1 !important;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25) !important;
}

html.dark input::placeholder,
html.dark textarea::placeholder,
.dark input::placeholder,
.dark textarea::placeholder {
  color: #64748b !important;
}

/* Tool Dropzones & Upload Areas */
html.dark .dropzone-container,
html.dark .border-dashed,
.dark .dropzone-container,
.dark .border-dashed {
  background-color: #0f172a !important;
  border-color: #334155 !important;
}

html.dark .dropzone-container:hover,
.dark .dropzone-container:hover {
  border-color: #6366f1 !important;
  background-color: #131b2e !important;
}

/* Tool Cards */
html.dark .tool-card-hover,
.dark .tool-card-hover {
  background-color: #131b2e !important;
  border-color: #1e293b !important;
}

html.dark .tool-card-hover:hover,
.dark .tool-card-hover:hover {
  border-color: #6366f1 !important;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.6) !important;
}

/* Mega-Menu Panel in Dark Mode */
html.dark .mega-menu-panel > div,
.dark .mega-menu-panel > div {
  background-color: #0f172a !important;
  border-color: #1e293b !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8) !important;
}

html.dark .mega-menu-panel .border-b,
html.dark .mega-menu-panel .border-t,
.dark .mega-menu-panel .border-b,
.dark .mega-menu-panel .border-t {
  border-color: #1e293b !important;
}

html.dark .mega-menu-panel a span.text-slate-800,
.dark .mega-menu-panel a span.text-slate-800 {
  color: #e2e8f0 !important;
}

html.dark .mega-menu-panel a:hover,
.dark .mega-menu-panel a:hover {
  background-color: #1e293b !important;
}

/* Mobile Navigation Drawer in Dark Mode */
html.dark #mobile-menu,
.dark #mobile-menu {
  background-color: #0f172a !important;
  border-bottom-color: #1e293b !important;
}

html.dark #mobile-menu a,
.dark #mobile-menu a {
  color: #cbd5e1 !important;
}

html.dark #mobile-menu a:hover,
.dark #mobile-menu a:hover {
  background-color: #1e293b !important;
  color: #818cf8 !important;
}

/* Category Filter Pills in Dark Mode */
html.dark .cat-pill:not(.active),
.dark .cat-pill:not(.active) {
  background-color: #1e293b !important;
  color: #cbd5e1 !important;
  border-color: #334155 !important;
}

html.dark .cat-pill:not(.active):hover,
.dark .cat-pill:not(.active):hover {
  background-color: #334155 !important;
  color: #ffffff !important;
}

html.dark .cat-pill.active,
.dark .cat-pill.active {
  background-color: #4f46e5 !important;
  color: #ffffff !important;
  border-color: #4f46e5 !important;
}

/* FAQs and Accordions */
html.dark .faq-item,
.dark .faq-item {
  background-color: #131b2e !important;
  border-color: #1e293b !important;
}

html.dark .faq-trigger,
.dark .faq-trigger {
  color: #f8fafc !important;
}

html.dark .faq-content,
.dark .faq-content {
  border-top-color: #1e293b !important;
  color: #cbd5e1 !important;
}

/* Code and Pre blocks */
html.dark pre,
html.dark code,
.dark pre,
.dark code {
  background-color: #0f172a !important;
  color: #e2e8f0 !important;
  border-color: #1e293b !important;
}

/* Theme Toggle Button */
.theme-toggle-btn {
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.theme-toggle-btn:hover {
  transform: scale(1.06);
}

.theme-toggle-btn:active {
  transform: scale(0.94);
}

html.dark .theme-toggle-btn,
.dark .theme-toggle-btn {
  background-color: #1e293b !important;
  color: #fbbf24 !important;
  border-color: #334155 !important;
}

html.dark .theme-toggle-btn:hover,
.dark .theme-toggle-btn:hover {
  background-color: #334155 !important;
  color: #fde047 !important;
}

/* Cookie banner in Dark Mode */
html.dark #cookie-consent-banner,
.dark #cookie-consent-banner {
  background-color: rgba(15, 23, 42, 0.98) !important;
  border-color: #334155 !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8) !important;
}

html.dark #cookie-consent-banner p,
.dark #cookie-consent-banner p {
  color: #cbd5e1 !important;
}

html.dark #cookie-consent-banner p.font-bold,
.dark #cookie-consent-banner p.font-bold {
  color: #f8fafc !important;
}

html.dark #btn-decline-cookies,
.dark #btn-decline-cookies {
  background-color: #1e293b !important;
  color: #cbd5e1 !important;
  border: 1px solid #334155 !important;
}

html.dark #btn-decline-cookies:hover,
.dark #btn-decline-cookies:hover {
  background-color: #334155 !important;
  color: #ffffff !important;
}

/* Print Cleanliness */
@media print {
  header, footer, .no-print, .adsense-box {
    display: none !important;
  }
}


/* ==========================================================================
   Accessibility & Mobile-First Polish (Phase 5)
   ========================================================================== */

/* Guaranteed no horizontal overflow on mobile viewports */
html, body {
  overflow-x: hidden;
  max-width: 100vw;
}

/* High-Contrast Accessible Keyboard Focus States */
:focus-visible {
  outline: 2px solid #4f46e5 !important;
  outline-offset: 2px !important;
}

html.dark :focus-visible,
.dark :focus-visible {
  outline: 2px solid #818cf8 !important;
  outline-offset: 2px !important;
}

/* Touch Target Minimum Sizing (44px x 44px WCAG 2.5.5) */
button,
a.btn,
.theme-toggle-btn,
input[type="button"],
input[type="submit"],
input[type="reset"] {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* File and Select inputs accessible hit targets */
input[type="file"],
select {
  min-height: 42px;
}

/* Reserved Ad Container Space to Eliminate Layout Shift (CLS) */
.qc-ad-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 100px;
  background-color: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 0.75rem;
  padding: 0.75rem;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.dark .qc-ad-container {
  background-color: #0f172a;
  border-color: #334155;
}

.qc-ad-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: #94a3b8;
  margin-bottom: 4px;
  user-select: none;
}

.dark .qc-ad-label {
  color: #64748b;
}

.qc-ad-content {
  width: 100%;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Accessible Interactive Range Slider focus rings */
input[type="range"]:focus-visible {
  outline: 2px solid #4f46e5;
  outline-offset: 4px;
}

/* Skip to Main Content Link for Screen Readers & Keyboard Nav */
.skip-link {
  position: absolute;
  top: -40px;
  left: 1rem;
  background: #4f46e5;
  color: #ffffff;
  padding: 8px 16px;
  font-weight: 600;
  border-radius: 0 0 8px 8px;
  z-index: 100;
  transition: top 0.2s ease;
}
.skip-link:focus {
  top: 0;
}
