/* ==========================================================================
   NexToolify Premium Modern UI System (2026 Clean SaaS Aesthetic)
   ========================================================================== */

:root {
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --primary-glow: rgba(99, 102, 241, 0.35);
  --accent: #38bdf8;
  --accent-glow: rgba(56, 189, 248, 0.3);
  --success: #10b981;
  --success-glow: rgba(16, 185, 129, 0.35);
  
  --bg: #090d16;
  --bg-surface: #0f172a;
  --bg-card: #151f32;
  --bg-card-hover: #1c2842;
  --bg-input: #1e293b;
  
  --border: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(99, 102, 241, 0.6);
  --border-light: rgba(255, 255, 255, 0.14);
  
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --radius-lg: 20px;
  --radius: 14px;
  --radius-sm: 10px;
  --radius-full: 9999px;
  
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 20px 35px -10px rgba(0, 0, 0, 0.6);
  
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--font);
}

html, body {
  overflow-x: hidden;
}

body {
  background-color: var(--bg);
  background-image: 
    radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.12) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(56, 189, 248, 0.08) 0px, transparent 50%);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --------------------------------------------------
   Navbar
-------------------------------------------------- */
header {
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 72px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.5px;
}

.logo-badge {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  box-shadow: 0 0 15px var(--primary-glow);
}

.nav-links {
  display: flex;
  gap: 6px;
  align-items: center;
}

.nav-links a.active {
  color: #fff;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.nav-links a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
}

.nav-links a.active {
  color: #fff;
  background: rgba(99, 102, 241, 0.15);
  font-weight: 600;
}

.btn-header {
  background: var(--primary) !important;
  color: #fff !important;
  padding: 8px 18px !important;
  border-radius: var(--radius-sm);
  font-weight: 600 !important;
  box-shadow: 0 0 15px var(--primary-glow);
}

.btn-header:hover {
  background: var(--primary-hover) !important;
  transform: translateY(-1px);
}

/* --------------------------------------------------
   Hero Section
-------------------------------------------------- */
.hero {
  padding: 50px 0 25px;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.25);
  color: #a5b4fc;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  margin-bottom: 20px;
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.15);
}

.hero h1 {
  font-size: 2.75rem;
  font-weight: 800;
  letter-spacing: -1.2px;
  line-height: 1.22;
  margin-bottom: 14px;
  background: linear-gradient(135deg, #ffffff 40%, #94a3b8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.65;
}

/* --------------------------------------------------
   Ad Slots
-------------------------------------------------- */
.ad-slot {
  background: rgba(21, 31, 50, 0.4);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin: 25px auto;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.8rem;
  letter-spacing: 0.8px;
  max-width: 728px;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --------------------------------------------------
   Tool Main Workspace Card
-------------------------------------------------- */
.tool-workspace {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 35px;
  box-shadow: var(--shadow-lg);
  margin: 25px auto;
  max-width: 840px;
  position: relative;
  overflow: hidden;
}

.tool-workspace::before {
  content: "";
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.5), transparent);
}

/* --------------------------------------------------
   Dropzone Area
-------------------------------------------------- */
.dropzone {
  border: 2px dashed rgba(99, 102, 241, 0.4);
  border-radius: var(--radius);
  padding: 45px 25px;
  text-align: center;
  cursor: pointer;
  background: rgba(9, 13, 22, 0.5);
  transition: all 0.25s ease;
  position: relative;
}

.dropzone:hover,
.dropzone.dragover {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.06);
  transform: scale(1.005);
}

.dropzone-icon {
  font-size: 3.2rem;
  margin-bottom: 12px;
  display: inline-block;
  filter: drop-shadow(0 0 12px rgba(99, 102, 241, 0.4));
}

.dropzone h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: #fff;
}

.dropzone p {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 20px;
}

.btn-upload {
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: #fff;
  border: none;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 15px var(--primary-glow);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-upload:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

/* --------------------------------------------------
   Controls & Quality Slider
-------------------------------------------------- */
.tool-controls {
  margin-top: 25px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}

.control-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-weight: 600;
  font-size: 0.95rem;
}

.slider-val {
  color: var(--accent);
  background: rgba(56, 189, 248, 0.1);
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 0.88rem;
  font-weight: 700;
}

input[type="range"] {
  width: 100%;
  height: 8px;
  background: var(--bg-input);
  border-radius: var(--radius-full);
  outline: none;
  accent-color: var(--primary);
  cursor: pointer;
}

.preset-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.btn-preset {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-preset:hover,
.btn-preset.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 0 10px var(--primary-glow);
}

/* --------------------------------------------------
   Result Panel (Sleek Redesigned Card)
-------------------------------------------------- */
.result-panel {
  margin-top: 28px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.result-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.stat-box {
  background: var(--bg-card);
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  text-align: center;
}

.stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-value {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
}

.stat-saving {
  color: #34d399 !important;
}

.preview-container {
  text-align: center;
  max-height: 400px;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: #000;
  border: 1px solid var(--border);
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.preview-container img {
  max-width: 100%;
  max-height: 380px;
  object-fit: contain;
  border-radius: 6px;
}

.btn-download {
  background: linear-gradient(135deg, var(--success), #059669);
  color: #fff;
  border: none;
  padding: 14px 24px;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  box-shadow: 0 4px 15px var(--success-glow);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-download:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(16, 185, 129, 0.5);
}

/* --------------------------------------------------
   Batch Queue (TinyPNG Style Cards)
-------------------------------------------------- */
.batch-queue {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.queue-item {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  transition: border-color 0.2s;
}

.queue-item:hover {
  border-color: var(--border-light);
}

.queue-info {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 0;
}

.queue-thumb {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  background: #000;
  border: 1px solid var(--border);
}

.queue-names {
  min-width: 0;
}

.queue-filename {
  font-size: 0.94rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 280px;
  color: #fff;
}

.queue-sizes {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 3px;
}

.queue-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.badge-saving {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: var(--radius-full);
}

.btn-single-download {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-light);
  color: #fff;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.btn-single-download:hover {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 0 10px var(--primary-glow);
}

.btn-batch-zip {
  background: linear-gradient(135deg, var(--success), #059669);
  color: #fff;
  border: none;
  padding: 16px 28px;
  border-radius: var(--radius-sm);
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 24px;
  box-shadow: 0 4px 18px var(--success-glow);
  transition: all 0.2s ease;
}

.btn-batch-zip:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.5);
}

/* --------------------------------------------------
   Tools Grid on Homepage
-------------------------------------------------- */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin: 35px 0 50px;
}

.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-decoration: none;
  color: var(--text);
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.tool-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  opacity: 0;
  transition: opacity 0.25s;
}

.tool-card:hover {
  transform: translateY(-4px);
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: var(--shadow-md);
  background: var(--bg-card-hover);
}

.tool-card:hover::before {
  opacity: 1;
}

.tool-icon {
  width: 52px;
  height: 52px;
  background: rgba(99, 102, 241, 0.12);
  color: #818cf8;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 16px;
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.tool-card h3 {
  font-size: 1.18rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: #fff;
}

.tool-card p {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.55;
  flex-grow: 1;
}

.tool-tag {
  align-self: flex-start;
  margin-top: 14px;
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

/* --------------------------------------------------
   SEO Content & FAQ
-------------------------------------------------- */
.seo-content {
  max-width: 840px;
  margin: 45px auto;
  line-height: 1.8;
}

.seo-content h2 {
  font-size: 1.75rem;
  margin: 35px 0 14px;
  color: #fff;
  letter-spacing: -0.5px;
}

.seo-content h3 {
  font-size: 1.25rem;
  margin: 24px 0 10px;
  color: #e2e8f0;
}

.seo-content p {
  color: #cbd5e1;
  margin-bottom: 16px;
}

.seo-content ul, .seo-content ol {
  margin: 14px 0 20px 24px;
  color: #cbd5e1;
}

.seo-content li {
  margin-bottom: 8px;
}

.faq-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  padding: 20px 24px;
}

.faq-q {
  font-weight: 700;
  font-size: 1.05rem;
  color: #fff;
  margin-bottom: 8px;
}

.faq-a {
  color: var(--text-muted);
  font-size: 0.94rem;
}

/* --------------------------------------------------
   Form Inputs & Buttons
-------------------------------------------------- */
.form-input {
  width: 100%;
  padding: 13px 18px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}

.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

/* --------------------------------------------------
   Footer
-------------------------------------------------- */
footer {
  margin-top: auto;
  background: rgba(9, 13, 22, 0.95);
  border-top: 1px solid var(--border);
  padding: 40px 0 25px;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 30px;
  margin-bottom: 30px;
}

.footer-col h4 {
  color: #fff;
  margin-bottom: 14px;
  font-size: 0.95rem;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 8px;
}

.footer-col a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-col a:hover {
  color: #fff;
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--text-dim);
}


/* --------------------------------------------------
   Desktop Navigation Dropdown
-------------------------------------------------- */
.nav-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.dropdown-trigger {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-size: 0.90rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  user-select: none;
  font-family: inherit;
  line-height: 1.4;
}

.dropdown-trigger:hover,
.nav-dropdown:hover .dropdown-trigger,
.nav-dropdown.dropdown-open .dropdown-trigger {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
}

.dropdown-trigger.active {
  color: #fff;
  background: rgba(99, 102, 241, 0.18);
  border-color: rgba(99, 102, 241, 0.35);
}

.dropdown-arrow {
  transition: transform 0.25s ease;
  display: inline-block;
}

.nav-dropdown:hover .dropdown-arrow,
.nav-dropdown.dropdown-open .dropdown-arrow {
  transform: rotate(180deg);
}

/* Floating Dropdown Card */
.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  background: rgba(13, 20, 36, 0.98);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.05);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  pointer-events: none;
}

/* Open on hover (desktop) or via class */
.nav-dropdown:hover .dropdown-menu,
.nav-dropdown.dropdown-open .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.dropdown-menu a {
  display: flex !important;
  align-items: center;
  gap: 10px;
  padding: 10px 14px !important;
  color: #cbd5e1 !important;
  text-decoration: none;
  font-size: 0.88rem !important;
  font-weight: 500;
  border-radius: var(--radius-sm);
  background: transparent !important;
  border: 1px solid transparent !important;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.dropdown-menu a:hover {
  background: rgba(99, 102, 241, 0.15) !important;
  color: #fff !important;
  border-color: rgba(99, 102, 241, 0.3) !important;
  transform: translateX(4px);
}

.dropdown-menu a.active {
  background: var(--primary) !important;
  color: #fff !important;
  border-color: var(--primary) !important;
  font-weight: 600;
}

.dropdown-icon {
  font-size: 1.1rem;
  line-height: 1;
}

/* --------------------------------------------------
   Mobile Menu Button (Hamburger)
-------------------------------------------------- */
.menu-toggle {
  display: none;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
  color: #fff;
  font-size: 1.4rem;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
}

.menu-toggle:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--primary);
}

@keyframes navSlideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --------------------------------------------------
   Comprehensive Laptop, Tablet & Mobile Responsiveness
-------------------------------------------------- */

/* Prevent horizontal scroll bug on all mobile devices */
html, body {
  overflow-x: hidden;
  width: 100%;
}

/* Tablet & Smaller Laptops (under 1024px) */
@media (max-width: 1024px) {
  .container {
    padding: 0 18px;
  }
  .hero h1 {
    font-size: 2.3rem;
  }
  .tools-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
  }
}

/* Mobile & Tablet Landscape (under 860px) */
@media (max-width: 992px) {
  header {
    padding: 10px 0 !important;
  }

  .nav-wrapper {
    height: auto !important;
    min-height: 52px !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    position: relative;
    padding: 0 !important;
  }

  .logo {
    padding: 2px 0;
    font-size: 1.25rem;
  }

  .logo-badge {
    width: 34px;
    height: 34px;
    font-size: 1.1rem;
  }

  .menu-toggle {
    display: flex !important;
  }

  /* Clean Full Mobile Dropdown Menu */
  .nav-links {
    display: none !important;
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    background: rgba(13, 20, 36, 0.98);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    flex-direction: column !important;
    padding: 14px 16px;
    gap: 8px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7);
    z-index: 1000;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
  }

  .nav-links.nav-open {
    display: flex !important;
    animation: navSlideDown 0.2s ease-out forwards;
  }

  .nav-links a {
    width: 100%;
    padding: 11px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.92rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    color: #e2e8f0;
  }

  .nav-links a.active {
    background: var(--primary) !important;
    color: #fff !important;
    border-color: var(--primary);
  }
}

/* Smartphone Screens (under 768px) */
@media (max-width: 768px) {
  /* Prevent iOS Safari input auto-zoom on focus */
  input[type="text"],
  input[type="number"],
  input[type="date"],
  select,
  textarea,
  .form-input {
    font-size: 16px !important;
  }

  .hero {
    padding: 30px 0 15px 0;
  }

  .hero h1 {
    font-size: 1.95rem;
    line-height: 1.25;
  }

  .hero p {
    font-size: 0.95rem;
  }

  .hero-badge {
    font-size: 0.78rem;
    padding: 4px 12px;
  }

  .tools-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .tool-workspace {
    padding: 20px 14px;
    border-radius: var(--radius-sm);
  }

  .dropzone {
    padding: 28px 14px;
  }

  .dropzone h3 {
    font-size: 1.15rem;
  }

  .dropzone-icon {
    font-size: 2.8rem;
  }

  .btn-upload,
  .btn-download {
    width: 100%;
    padding: 14px 20px;
    font-size: 0.98rem;
    min-height: 48px;
  }

  /* Single Column Results Stats */
  .result-stats {
    grid-template-columns: 1fr !important;
    gap: 10px;
  }

  .stat-box {
    padding: 14px;
  }

  .stat-value {
    font-size: 1.6rem !important;
  }

  /* Queue items on mobile */
  .queue-item {
    flex-direction: column;
    align-items: flex-start;
    padding: 12px;
    gap: 10px;
  }

  .queue-info {
    width: 100%;
  }

  .queue-filename {
    max-width: 200px;
  }

  .queue-actions {
    width: 100%;
    justify-content: flex-end;
  }

  /* Footer adjustments */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  /* Ad slots overflow protection */
  .ad-slot {
    padding: 10px 8px;
    margin: 15px auto;
  }
}

/* Extra Small Phones (under 420px) */
@media (max-width: 420px) {
  .hero h1 {
    font-size: 1.7rem;
  }
  .preset-btn {
    width: 100%;
    text-align: center;
  }
  .queue-filename {
    max-width: 140px;
  }
}
