/* ═══════════════════════════════════════════════════════════
   PDFem — Design System
   Clean, modern, professional with subtle glassmorphism
   Light theme only
   ═══════════════════════════════════════════════════════════ */

/* ── CSS Variables ── */
:root {
  /* Primary — Crimson Red */
  --primary: #DC2626;
  --primary-hover: #B91C1C;
  --primary-light: #FEF2F2;
  --primary-50: #FEF2F2;
  --primary-100: #FEE2E2;
  --primary-200: #FECACA;

  /* Backgrounds */
  --bg-body: #F8FAFC;
  --bg-white: #FFFFFF;
  --bg-card: rgba(255, 255, 255, 0.78);
  --bg-card-solid: #FFFFFF;
  --bg-muted: #F1F5F9;

  /* Glassmorphism */
  --glass-blur: blur(16px);
  --glass-border: 1px solid rgba(255, 255, 255, 0.65);
  --glass-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  --glass-shadow-hover: 0 8px 32px rgba(0, 0, 0, 0.1);

  /* Category Colors */
  --cat-pdf: #DC2626;
  --cat-pdf-light: #FEF2F2;
  --cat-to-pdf: #B91C1C;
  --cat-to-pdf-light: #FEF2F2;
  --cat-from-pdf: #F59E0B;
  --cat-from-pdf-light: #FFFBEB;
  --cat-image: #059669;
  --cat-image-light: #ECFDF5;

  /* Text */
  --text-primary: #1E293B;
  --text-secondary: #64748B;
  --text-muted: #556270;
  --text-white: #FFFFFF;

  /* Borders */
  --border: #E2E8F0;
  --border-light: #F1F5F9;

  /* Status */
  --success: #10B981;
  --success-light: #ECFDF5;
  --error: #EF4444;
  --error-light: #FEF2F2;
  --warning: #F59E0B;
  --warning-light: #FFFBEB;

  /* Typography */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', monospace;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* Transitions */
  --transition: 0.2s ease;
  --transition-slow: 0.3s ease;

  /* Sizes */
  --container-max: 1200px;
  --navbar-height: 64px;
}

/* ── Reset & Base ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-body);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--primary-hover);
}

a:visited {
  color: inherit;
}

.navbar-logo,
.navbar-logo:visited,
.navbar-logo:hover {
  color: var(--primary);
}

ul, ol {
  list-style: none;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-primary);
}

h1 { font-size: 2.25rem; letter-spacing: -0.025em; }
h2 { font-size: 1.75rem; letter-spacing: -0.02em; }
h3 { font-size: 1.375rem; }
h4 { font-size: 1.125rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.875rem; }

p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

small {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* ── Container ── */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* ── Navbar ── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  height: var(--navbar-height);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.navbar-logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  text-decoration: none;
  letter-spacing: -0.03em;
  display: flex;
  align-items: center;
  gap: 2px;
}

.navbar-logo span {
  color: var(--text-primary);
  font-weight: 700;
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

/* Direct popular tool links in navbar */
.nav-link-direct {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: all var(--transition);
  text-decoration: none;
  cursor: pointer;
  position: relative;
  letter-spacing: -0.01em;
}

.nav-link-direct:hover {
  color: var(--primary);
  background: var(--primary-50);
}

.nav-link-direct.active {
  color: var(--primary);
  background: var(--primary-50);
}

.navbar-nav .nav-link {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: all var(--transition);
  text-decoration: none;
  cursor: pointer;
  position: relative;
  border: none;
  background: none;
  letter-spacing: -0.01em;
}

.navbar-nav .nav-link:hover {
  color: var(--primary);
  background: var(--primary-50);
}

/* Dropdown Container */
.nav-dropdown {
  position: relative;
}

/* Invisible bridge to keep hover when moving from button to menu */
.nav-dropdown::after {
  content: '';
  position: absolute;
  top: 100%;
  left: -20px;
  right: -20px;
  height: 16px;
  display: none;
}

.nav-dropdown:hover::after {
  display: block;
}

/* Dropdown Menu */
.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: var(--bg-white);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--radius-xl);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.02);
  padding: var(--space-xl);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.nav-dropdown-menu--convert {
  min-width: 420px;
}

.nav-dropdown-menu--convert .nav-dropdown-category {
  padding: 0 var(--space-md);
}

.nav-dropdown-menu--convert .nav-dropdown-category + .nav-dropdown-category {
  border-left: 1px solid var(--border);
}

.nav-dropdown-menu--single {
  min-width: 220px;
  left: 50%;
  transform: translateX(-50%) translateY(4px);
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.active .nav-dropdown-menu {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-xl);
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.nav-dropdown:hover .nav-dropdown-menu--single,
.nav-dropdown.active .nav-dropdown-menu--single {
  display: block;
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.nav-dropdown-category h4 {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
  padding-left: var(--space-sm);
}

.nav-dropdown-category a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  color: var(--text-primary);
  font-size: 0.8125rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  text-decoration: none;
}

.nav-dropdown-category a:hover {
  background: var(--primary-50);
  color: var(--primary);
}

.nav-dropdown-category a svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: 0.7;
}

.nav-dropdown-category a:hover svg {
  opacity: 1;
}

/* Mobile Menu Button */
.mobile-menu-btn {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  color: var(--text-primary);
}

.mobile-menu-btn:hover {
  background: var(--bg-muted);
}

/* Hamburger icon */
.hamburger {
  width: 20px;
  height: 14px;
  position: relative;
}

.hamburger span {
  display: block;
  position: absolute;
  height: 2px;
  width: 100%;
  background: var(--text-primary);
  border-radius: 2px;
  left: 0;
  transition: var(--transition);
}

.hamburger span:nth-child(1) { top: 0; }
.hamburger span:nth-child(2) { top: 6px; }
.hamburger span:nth-child(3) { top: 12px; }

.mobile-menu-btn.active .hamburger span:nth-child(1) {
  top: 6px;
  transform: rotate(45deg);
}

.mobile-menu-btn.active .hamburger span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-btn.active .hamburger span:nth-child(3) {
  top: 6px;
  transform: rotate(-45deg);
}

/* ── Hero Section ── */
.hero {
  position: relative;
  padding: 80px 0 60px;
  text-align: center;
  overflow: hidden;
  background: linear-gradient(180deg, #F8FAFC 0%, #FEF2F2 50%, #F8FAFC 100%);
}

.hero::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(220, 38, 38, 0.07) 0%, transparent 70%);
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 0;
  animation: heroFloat 8s ease-in-out infinite;
}

@keyframes heroFloat {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-20px); }
}

.hero h1 {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: var(--space-md);
  letter-spacing: -0.035em;
  line-height: 1.15;
  position: relative;
  z-index: 1;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 540px;
  margin: 0 auto var(--space-xl);
  line-height: 1.7;
  position: relative;
  z-index: 1;
}

/* ── Section ── */
.section {
  padding: var(--space-3xl) 0;
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.section-header h2 {
  margin-bottom: var(--space-sm);
}

.section-header p {
  max-width: 560px;
  margin: 0 auto;
}

/* ── Category Headers ── */
.category-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-sm);
}

.category-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.category-header h2 {
  font-size: 1.125rem;
  font-weight: 600;
}

/* ── Tool Search ── */
.tool-search-wrap {
  margin-bottom: var(--space-xl);
}

.tool-search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 380px;
  margin: 0 auto;
  padding: 10px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  background: var(--bg-white);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  cursor: text;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.tool-search-box:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-100), 0 1px 3px rgba(0,0,0,0.04);
}

.tool-search-box svg {
  flex-shrink: 0;
  color: var(--text-muted);
}

.tool-search-box input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 0.875rem;
  font-family: inherit;
  color: var(--text-primary);
  min-width: 0;
}

.tool-search-box input::placeholder {
  color: var(--text-muted);
}

.tool-search-count {
  flex-shrink: 0;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.tool-card-wrap { transition: opacity 0.2s, transform 0.2s; }
.tool-card-wrap.hidden { display: none; }
.category-section.hidden { display: none; }

.tool-search-empty {
  text-align: center;
  padding: var(--space-3xl) 0;
  color: var(--text-muted);
}

.tool-search-empty p {
  margin-top: var(--space-md);
  font-size: 1rem;
}

/* ── Tool Cards Grid ── */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
  margin-bottom: var(--space-2xl);
}

.tool-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  position: relative;
  overflow: hidden;
}

.tool-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.tool-card:hover::before {
  transform: scaleX(1);
}

.tool-card[data-category="pdf-tools"]::before { background: var(--cat-pdf); }
.tool-card[data-category="to-pdf"]::before { background: var(--cat-to-pdf); }
.tool-card[data-category="from-pdf"]::before { background: var(--cat-from-pdf); }
.tool-card[data-category="image-tools"]::before { background: var(--cat-image); }

.tool-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
  border-color: transparent;
}

.tool-card-icon {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  transition: transform 0.3s ease;
}

.tool-card:hover .tool-card-icon {
  transform: scale(1.1);
}

.tool-card[data-category="pdf-tools"] .tool-card-icon { color: var(--cat-pdf); background: var(--cat-pdf-light); }
.tool-card[data-category="to-pdf"] .tool-card-icon { color: var(--cat-to-pdf); background: var(--cat-to-pdf-light); }
.tool-card[data-category="from-pdf"] .tool-card-icon { color: var(--cat-from-pdf); background: var(--cat-from-pdf-light); }
.tool-card[data-category="image-tools"] .tool-card-icon { color: var(--cat-image); background: var(--cat-image-light); }

.tool-card-icon svg {
  width: 20px;
  height: 20px;
}

.tool-card h3 {
  font-size: 0.9375rem;
  font-weight: 600;
}

.tool-card p {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.4;
}

/* ── Features Section ── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
}

.feature-card {
  text-align: center;
  padding: var(--space-xl) var(--space-lg);
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.06);
  border-color: var(--primary-200);
}

.feature-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto var(--space-md);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--primary-50) 0%, var(--primary-100) 100%);
  color: var(--primary);
  font-size: 1.5rem;
  transition: transform 0.3s ease;
}

.feature-card:hover .feature-icon {
  transform: scale(1.1);
}

.feature-card h3 {
  margin-bottom: var(--space-xs);
}

.feature-card p {
  font-size: 0.875rem;
  margin: 0;
}

/* ── How It Works ── */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
  counter-reset: step-counter;
}

.step {
  position: relative;
  padding: var(--space-xl) var(--space-lg);
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.step:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.06);
  border-color: var(--primary-200);
}

.step-number {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--primary) 0%, #6366F1 100%);
  color: var(--text-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.125rem;
  margin-bottom: var(--space-md);
}

.step h3 {
  margin-bottom: var(--space-xs);
  font-size: 1rem;
  font-weight: 600;
}

.step p {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.6;
}

.step-connector {
  display: none;
}

.step:last-child .step-connector {
  display: none;
}

/* ── Breadcrumb ── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) 0;
  font-size: 0.875rem;
}

.breadcrumb a {
  color: var(--text-secondary);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--primary);
  text-decoration: underline;
}

.breadcrumb .separator {
  color: var(--text-secondary);
  font-size: 0.75rem;
}

.breadcrumb .current {
  color: var(--text-primary);
  font-weight: 600;
}

/* ── Tool Page Header ── */
.tool-header {
  text-align: center;
  padding: var(--space-2xl) 0 var(--space-xl);
}

.tool-header-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-lg);
  margin: 0 auto var(--space-md);
}

.tool-header-icon svg {
  width: 28px;
  height: 28px;
}

.tool-header h1 {
  font-size: 2rem;
  margin-bottom: var(--space-sm);
}

.tool-header p {
  font-size: 1.0625rem;
  max-width: 500px;
  margin: 0 auto;
}

/* ── Step Layout ── */
.tool-step {
  max-width: 900px;
  margin: 0 auto;
}

.step-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-lg);
}

.step-header h2 {
  font-size: 1.5rem;
  margin: 0;
}

.btn-small {
  padding: 8px 16px;
  font-size: 0.8125rem;
}

/* ── Dropzone ── */
.dropzone-container {
  max-width: 900px;
  margin: 0 auto var(--space-xl);
}

.dropzone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-3xl) var(--space-2xl) var(--space-2xl);
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  background: var(--bg-white);
  position: relative;
  min-height: 340px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.dropzone:hover,
.dropzone.dragover {
  border-color: var(--primary);
  background: var(--primary-50);
}

.dropzone-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto var(--space-md);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
}

.dropzone-icon svg {
  width: 24px;
  height: 24px;
}

.dropzone h3 {
  font-size: 1.0625rem;
  margin-bottom: var(--space-xs);
}

.dropzone p {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0;
}

.dropzone .browse-link {
  color: var(--primary);
  font-weight: 500;
  text-decoration: underline;
}

.dropzone input[type="file"] {
  display: none;
}

.dropzone-formats {
  margin-top: var(--space-md);
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ── File List ── */
.file-list {
  max-width: 900px;
  margin: 0 auto var(--space-lg);
}

.file-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-sm);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.file-item:hover {
  border-color: var(--primary-200);
}

/* Drag handle for reorderable files */
.file-drag-handle {
  cursor: grab;
  color: var(--text-muted);
  padding: 4px;
  flex-shrink: 0;
  touch-action: none;
}

.file-drag-handle:active { cursor: grabbing; }

.file-item.dragging {
  opacity: 0.5;
  border-color: var(--primary);
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.file-item.drag-over {
  border-color: var(--primary);
  border-style: dashed;
}

/* Compress Result */
.compress-result {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-lg);
  padding: var(--space-lg);
  margin-bottom: var(--space-md);
  background: var(--success-light);
  border: 1px solid #A7F3D0;
  border-radius: var(--radius-md);
  flex-wrap: wrap;
}

.compress-result-item {
  text-align: center;
}

.compress-result-item .label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.compress-result-item .value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 2px;
}

.compress-result-item .value.saved {
  color: var(--success);
}

.compress-result-arrow {
  color: var(--success);
  font-size: 1.25rem;
}

.file-thumb {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--bg-muted);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  overflow: hidden;
}

.file-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.file-info {
  flex: 1;
  min-width: 0;
}

.file-name {
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-size {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.file-remove {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  transition: all var(--transition);
  flex-shrink: 0;
}

.file-remove:hover {
  background: var(--error-light);
  color: var(--error);
}

/* ── Options Panel ── */
.options-panel {
  max-width: 900px;
  margin: 0 auto var(--space-lg);
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
}

.options-panel h3 {
  font-size: 0.9375rem;
  margin-bottom: var(--space-md);
  color: var(--text-secondary);
}

.option-row {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.option-row:last-child {
  margin-bottom: 0;
}

.option-label {
  font-size: 0.875rem;
  font-weight: 500;
  min-width: 120px;
  color: var(--text-primary);
}

/* ── Form Elements ── */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="url"],
textarea,
select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-white);
  color: var(--text-primary);
  font-size: 0.9375rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-100);
}

input::placeholder,
textarea::placeholder {
  color: var(--text-muted);
}

textarea {
  resize: vertical;
  min-height: 100px;
}

select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%2394A3B8' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}

/* Radio and Checkbox buttons */
.radio-group,
.checkbox-group {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.radio-option,
.checkbox-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  cursor: pointer;
  transition: all var(--transition);
}

.radio-option:hover,
.checkbox-option:hover {
  border-color: var(--primary-200);
}

.radio-option.active,
.checkbox-option.active {
  border-color: var(--primary);
  background: var(--primary-50);
  color: var(--primary);
}

/* Range slider */
input[type="range"] {
  width: 100%;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--border);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  border: 3px solid var(--bg-white);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  border: 3px solid var(--bg-white);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

input[type="range"]::-moz-range-track {
  height: 6px;
  border-radius: 3px;
  background: var(--border);
}

input[type="range"]::-moz-range-progress {
  height: 6px;
  border-radius: 3px;
  background: var(--primary);
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 12px 24px;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-hover);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.btn-primary:active {
  transform: translateY(0);
}

a.btn-primary,
a.btn-primary:hover,
a.btn-primary:visited,
a.btn-primary:active {
  color: #fff;
  text-decoration: none;
}

.btn-secondary {
  background: var(--bg-muted);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: var(--border);
}

a.btn-secondary,
a.btn-secondary:visited {
  color: var(--text-primary);
  text-decoration: none;
}

.btn-success {
  background: var(--success);
  color: #fff;
}

.btn-success:hover {
  background: #059669;
  color: #fff;
  transform: translateY(-1px);
}

a.btn-success,
a.btn-success:hover,
a.btn-success:visited,
a.btn-success:active {
  color: #fff;
  text-decoration: none;
}

.btn-large {
  padding: 16px 40px;
  font-size: 1.0625rem;
  border-radius: var(--radius-lg);
}

.btn-block {
  width: 100%;
}

.btn:disabled,
.btn.loading {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

.btn.loading {
  position: relative;
  color: transparent;
}

.btn.loading::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

/* Convert button area */
.convert-area {
  max-width: 900px;
  margin: 0 auto var(--space-xl);
  text-align: center;
}

/* ── Progress Bar ── */
.progress-container {
  max-width: 900px;
  margin: 0 auto var(--space-lg);
  display: none;
}

.progress-container.active {
  display: block;
}

.progress-bar-wrapper {
  background: var(--bg-muted);
  border-radius: var(--radius-full);
  height: 8px;
  overflow: hidden;
  margin-bottom: var(--space-sm);
}

.progress-bar {
  height: 100%;
  background: var(--primary);
  border-radius: var(--radius-full);
  width: 0%;
  transition: width 0.3s ease;
}

.progress-text {
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-align: center;
}

/* ── Download Section ── */
.download-section {
  max-width: 900px;
  margin: 0 auto var(--space-2xl);
  text-align: center;
  display: none;
  padding: var(--space-xl);
  background: var(--success-light);
  border: 1px solid #A7F3D0;
  border-radius: var(--radius-xl);
}

.download-section.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

.download-section .check-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--success);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-md);
}

.download-section h3 {
  margin-bottom: var(--space-sm);
  color: #065F46;
}

.download-countdown {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: var(--space-md);
}

/* ── FAQ Accordion ── */
.faq-section {
  max-width: 720px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-lg) 0;
  text-align: left;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  background: none;
  border: none;
}

.faq-question:hover {
  color: var(--primary);
}

.faq-arrow {
  width: 20px;
  height: 20px;
  transition: transform var(--transition);
  flex-shrink: 0;
  color: var(--text-muted);
}

.faq-item.active .faq-arrow {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-slow);
}

.faq-item.active .faq-answer {
  max-height: 500px;
}

.faq-answer-inner {
  padding-bottom: var(--space-lg);
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ── Related Tools ── */
.related-tools {
  padding: var(--space-2xl) 0;
}

.related-tools h2 {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
}

/* ── SEO Content (tool page descriptions) ── */
.seo-content {
  max-width: 760px;
  margin: 0 auto;
  padding: var(--space-2xl) 0;
}

.seo-content h2 {
  font-size: 1.5rem;
  margin-bottom: var(--space-md);
}

.seo-content h3 {
  font-size: 1.125rem;
  margin: var(--space-xl) 0 var(--space-sm);
}

.seo-content p {
  font-size: 0.9375rem;
  line-height: 1.7;
  margin-bottom: var(--space-md);
}

.seo-content ul, .seo-content ol {
  margin-bottom: var(--space-md);
  padding-left: var(--space-lg);
}

.seo-content li {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: var(--space-xs);
  list-style: disc;
}

.seo-content ol li {
  list-style: decimal;
}

.seo-content strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* ── How To Steps (tool page) ── */
.how-to-section {
  max-width: 760px;
  margin: 0 auto;
  padding: var(--space-2xl) 0;
  border-top: 1px solid var(--border);
}

.how-to-section h2 {
  text-align: center;
  margin-bottom: var(--space-xl);
  font-size: 1.375rem;
}

/* ── Footer ── */
.footer {
  background: var(--bg-white);
  border-top: 1px solid var(--border);
  padding: var(--space-2xl) 0 var(--space-lg);
  margin-top: var(--space-2xl);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: var(--space-2xl);
  margin-bottom: var(--space-2xl);
}

.footer-brand .navbar-logo {
  display: inline-block;
  margin-bottom: var(--space-sm);
}

.footer-brand p {
  font-size: 0.875rem;
  max-width: 280px;
}

.footer-section h2 {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
}

.footer-section a {
  display: block;
  font-size: 0.875rem;
  color: var(--text-secondary);
  padding: 4px 0;
  transition: color var(--transition);
}

.footer-section a:hover {
  color: var(--primary);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: var(--space-lg);
  text-align: center;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* ── Cookie Banner ── */
.cookie-banner {
  position: fixed;
  bottom: var(--space-lg);
  right: var(--space-lg);
  left: auto;
  transform: none;
  width: 360px;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-lg);
  z-index: 1000;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.02);
  animation: cookieSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes cookieSlideIn {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.cookie-banner.hidden {
  display: none;
}

.cookie-banner-content {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.cookie-banner-text strong {
  display: block;
  font-size: 0.875rem;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.cookie-banner-text p {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0 0 2px;
}

.cookie-banner-text a {
  font-size: 0.8125rem;
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.cookie-banner-text a:hover {
  text-decoration: underline;
}

.cookie-banner-actions {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-xs);
}

.cookie-banner-actions .btn {
  flex: 1;
  padding: 8px 14px;
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-outline {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  background: var(--bg-muted);
  border-color: var(--text-muted);
  color: var(--text-primary);
}

/* ── Static Page Content ── */
.page-content {
  max-width: 760px;
  margin: 0 auto;
  padding: var(--space-2xl) 0 var(--space-3xl);
}

.page-content h1 {
  margin-bottom: var(--space-lg);
}

.page-content h2 {
  margin: var(--space-2xl) 0 var(--space-md);
  font-size: 1.375rem;
}

.page-content h3 {
  margin: var(--space-xl) 0 var(--space-sm);
  font-size: 1.125rem;
}

.page-content p {
  font-size: 0.9375rem;
  line-height: 1.8;
  margin-bottom: var(--space-md);
}

.page-content ul, .page-content ol {
  padding-left: var(--space-lg);
  margin-bottom: var(--space-md);
}

.page-content li {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: var(--space-xs);
  list-style: disc;
}

.page-content ol li {
  list-style: decimal;
}

.page-content .last-updated {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: var(--space-xl);
}

.page-content table,
.seo-content table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-lg) 0;
  font-size: 0.875rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.page-content th,
.seo-content th {
  background: var(--bg-muted);
  font-weight: 600;
  text-align: left;
  padding: 12px 16px;
  color: var(--text-primary);
  font-size: 0.8125rem;
  white-space: nowrap;
}

.page-content td,
.seo-content td {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  color: var(--text-secondary);
  line-height: 1.5;
  vertical-align: top;
}

.page-content tbody tr:hover,
.seo-content tbody tr:hover {
  background: var(--bg-muted);
}

/* ── Contact Form ── */
.contact-form {
  max-width: 560px;
  margin: var(--space-xl) auto;
}

.form-group {
  margin-bottom: var(--space-md);
}

/* ── Error Page ── */
.error-page {
  text-align: center;
  padding: 80px 0 60px;
  max-width: 520px;
  margin: 0 auto;
}

.error-visual {
  position: relative;
  margin-bottom: var(--space-xl);
}

.error-emoji {
  font-size: 4rem;
  display: block;
  margin-bottom: var(--space-sm);
  filter: grayscale(0.2);
}

.error-code {
  font-size: 5rem;
  font-weight: 800;
  line-height: 1;
  color: var(--primary);
  margin-bottom: var(--space-md);
}

.error-page h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: var(--space-md);
  color: var(--text-primary);
}

.error-page > p {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: var(--space-xl);
}

.error-actions {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
}

.error-tools {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.error-tools-title {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: var(--space-lg);
  font-weight: 500;
}

.error-tools-grid {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.error-tool-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-white);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
  text-decoration: none;
  transition: all var(--transition);
}

.error-tool-link:hover {
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transform: translateY(-1px);
  color: var(--primary);
}

.error-tool-icon {
  display: flex;
  align-items: center;
}

.error-tool-icon svg {
  width: 18px;
  height: 18px;
}

/* ── Alert Messages ── */
.alert {
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  margin-bottom: var(--space-md);
}

.alert-success {
  background: var(--success-light);
  color: #065F46;
  border: 1px solid #A7F3D0;
}

.alert-error {
  background: var(--error-light);
  color: #991B1B;
  border: 1px solid #FECACA;
}

.alert-warning {
  background: var(--warning-light);
  color: #92400E;
  border: 1px solid #FDE68A;
}

/* ── Animations ── */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  animation: fadeIn 0.4s ease forwards;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .tools-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .related-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xl);
  }

  .nav-dropdown-menu {
    min-width: 440px;
  }
}

@media (max-width: 768px) {
  :root {
    --navbar-height: 56px;
  }

  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.375rem; }

  .hero {
    padding: var(--space-2xl) 0;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .section {
    padding: var(--space-2xl) 0;
  }

  .tools-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
  }

  .features-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
  }

  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .steps {
    grid-template-columns: 1fr;
  }

  .step-connector {
    display: none;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  /* Mobile Navigation */
  .navbar-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: calc(100vh - var(--navbar-height));
    background: var(--bg-white);
    flex-direction: column;
    padding: var(--space-lg);
    overflow-y: auto;
    z-index: 1000;
    border-top: 1px solid var(--border);
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  }

  .navbar-nav.active {
    display: flex;
  }

  body.menu-open {
    overflow: hidden;
  }

  /* Hide direct links on mobile, show in dropdown */
  .nav-link-direct {
    display: none;
  }

  .navbar-nav .nav-link {
    padding: 12px var(--space-md);
    font-size: 1rem;
    width: 100%;
    justify-content: flex-start;
  }

  .mobile-menu-btn {
    display: flex;
  }

  .nav-dropdown-menu,
  .nav-dropdown-menu--single {
    position: static !important;
    transform: none !important;
    box-shadow: none;
    border: none;
    padding: 0 var(--space-md);
    min-width: 0 !important;
    width: 100% !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  .nav-dropdown:hover .nav-dropdown-menu,
  .nav-dropdown.active .nav-dropdown-menu,
  .nav-dropdown:hover .nav-dropdown-menu--single,
  .nav-dropdown.active .nav-dropdown-menu--single {
    display: block;
  }

  .cookie-banner {
    right: var(--space-sm);
    left: var(--space-sm);
    bottom: var(--space-sm);
    width: auto;
    padding: var(--space-md);
  }

  .cookie-banner-actions {
    flex-direction: column;
  }

  .dropzone {
    padding: var(--space-2xl) var(--space-md);
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 var(--space-md);
  }

  .hero h1 {
    font-size: 1.625rem;
  }

  .tools-grid {
    grid-template-columns: 1fr 1fr;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .related-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .tool-card {
    padding: var(--space-md);
  }

  .option-row {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-sm);
  }
}

/* ── Print ── */
@media print {
  .navbar, .footer, .cookie-banner, .dropzone-container,
  .convert-area, .progress-container, .download-section,
  .related-tools {
    display: none;
  }

  body {
    background: white;
  }
}
