.tool-card-header {
  display: grid;
  gap: 1rem;
  justify-items: center;
}

:root {
  color-scheme: light;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  --bg: #f7f8fb;
  --bg-alt: #ffffff;
  --text: #1a1f36;
  --text-muted: #4b587c;
  --accent: #dc2626;
  --accent-dark: #b91c1c;
  --accent-light: #fee2e2;
  --border: #e1e6f4;
  --shadow: 0 20px 45px -25px rgba(15, 23, 42, 0.4);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;
  background-color: var(--bg);
  color: var(--text);
}

/* Custom Tooltip System */
.custom-tooltip {
  position: absolute;
  z-index: 10000;
  padding: 0.5rem 0.75rem;
  background: var(--text);
  color: var(--bg-alt);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.4;
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 2px 4px rgba(0, 0, 0, 0.1);
  pointer-events: none;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  white-space: nowrap;
  max-width: 250px;
  word-wrap: break-word;
  white-space: normal;
}

.custom-tooltip.show {
  opacity: 1;
  transform: translateY(0);
}

.custom-tooltip::before {
  content: '';
  position: absolute;
  width: 0;
  height: 0;
  border: 6px solid transparent;
}

/* Tooltip arrow positions */
.custom-tooltip[data-position="top"]::before {
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%);
  border-top-color: var(--text);
}

.custom-tooltip[data-position="bottom"]::before {
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  border-bottom-color: var(--text);
}

.custom-tooltip[data-position="left"]::before {
  right: -12px;
  top: 50%;
  transform: translateY(-50%);
  border-left-color: var(--text);
}

.custom-tooltip[data-position="right"]::before {
  left: -12px;
  top: 50%;
  transform: translateY(-50%);
  border-right-color: var(--text);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  background-color: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: inherit;
  text-decoration: none;
}

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

ul {
  padding: 0;
  margin: 0;
  list-style: none;
}

.container {
  width: min(1600px, 92vw);
  margin: 0 auto;
}

.tool-merge .container {
  width: min(1400px, 96vw);
}

.tool-merge.is-dragging {
  background-color: rgba(220, 38, 38, 0.05);
  transition: background-color 200ms ease;
}


/* Hide all drag & drop overlays - simple fix to prevent flickering */
.merge-drop-overlay,
[data-merge="drop-overlay"],
[data-split="drop-overlay"],
[data-compress="drop-overlay"],
[data-jpg-to-pdf="drop-overlay"],
[data-pdf-to-jpg="drop-overlay"],
[data-scan-to-pdf="drop-overlay"],
[data-organize-pdf="drop-overlay"],
[data-extract-pages="drop-overlay"],
[data-remove-pages="drop-overlay"],
[data-rotate-pdf="drop-overlay"],
[data-add-watermark="drop-overlay"],
[data-add-page-numbers="drop-overlay"] {
  display: none !important;
}

.global-header {
  background-color: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(20px);
}

.global-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1rem 0.5rem;
}

.brand {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

.brand .logo-svg {
  height: 32px;
  width: auto;
  display: block;
  max-width: 100%;
}

.brand .logo-svg.small {
  height: 26px;
}

.simple-footer-brand .logo-svg {
  height: 26px;
  width: auto;
  display: inline-block;
  vertical-align: middle;
}

.brand.small {
  font-size: 1.25rem;
}

.logo-accent {
  color: var(--accent);
}

.primary-nav {
  display: flex;
  gap: 1.5rem;
  font-weight: 500;
}

.primary-nav .nav-item {
  position: relative;
  display: flex;
  align-items: center;
}

.primary-nav a,
.primary-nav .nav-trigger {
  color: var(--text);
  transition: color 160ms ease;
  font-weight: 600;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.primary-nav a:hover,
.primary-nav .nav-trigger:hover,
.primary-nav .nav-item.open > a,
.primary-nav .nav-item.open > .nav-trigger {
  color: var(--accent);
}

.nav-trigger {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font: inherit;
}

.nav-actions {
  display: flex;
  gap: 0.75rem;
}

.chevron {
  font-size: 0.7rem;
  transition: transform 160ms ease;
}

.nav-item.open .chevron {
  transform: rotate(180deg);
}

.dropdown-panel {
  position: absolute;
  top: calc(100% + 1rem);
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 24px 48px -32px rgba(15, 23, 42, 0.35);
  border: 1px solid var(--border);
  padding: 1.75rem;
  display: none;
  gap: 2rem;
  z-index: 999;
  min-width: 420px;
}

.nav-item.open .dropdown-panel {
  display: grid;
}

.dropdown-convert {
  grid-template-columns: repeat(2, minmax(160px, 1fr));
}

.dropdown-mega {
  grid-template-columns: repeat(6, minmax(164px, 1fr));
  min-width: 980px;
}

.dropdown-column {
  display: grid;
  gap: 0.65rem;
}

.dropdown-title {
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin: 0 0 0.25rem;
  font-weight: 600;
}

.dropdown-panel a {
  color: var(--text);
  font-weight: 500;
  font-size: 0.92rem;
}

.dropdown-panel a:hover {
  color: var(--accent);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  padding: 0.65rem 1.4rem;
  font-weight: 600;
  border: 1px solid transparent;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
  cursor: pointer;
}

.button.primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 18px 30px -22px rgba(220, 38, 38, 0.8);
}

.button.primary:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
}

.button.ghost {
  background: transparent;
  border-color: rgba(220, 38, 38, 0.2);
  color: var(--accent);
}

.button.ghost:hover {
  background: rgba(220, 38, 38, 0.08);
}

/* Application Menu */
.app-menu-wrapper {
  position: relative;
  margin-left: 0.5rem;
}

.app-menu-trigger {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(220, 38, 38, 0.15);
  background: transparent;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--text-dark);
}

.app-menu-trigger:hover {
  background: rgba(220, 38, 38, 0.06);
  border-color: rgba(220, 38, 38, 0.25);
  transform: translateY(-1px);
}

.app-menu-trigger svg {
  transition: transform 0.3s ease;
}

.app-menu-trigger:hover svg {
  transform: rotate(90deg);
}

.app-menu-dropdown {
  position: absolute;
  top: calc(100% + 0.75rem);
  right: 0;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08);
  padding: 0.75rem;
  min-width: 260px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 10000;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

/* Desktop hover - only on screens wider than 900px */
@media (min-width: 901px) {
  .app-menu-wrapper:hover .app-menu-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
}

/* Mobile: show dropdown when .open class is present */
@media (max-width: 900px) {
  /* Hide drag and drop hint on mobile */
  .drop-hint {
    display: none;
  }
  
  /* Disable hover on mobile */
  .app-menu-wrapper:hover .app-menu-dropdown {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
  }
  
  .app-menu-wrapper.open .app-menu-dropdown {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
  }
  
  .app-menu-dropdown {
    position: fixed;
    top: calc(100% + 0.75rem);
    right: 1rem;
    left: auto;
    max-width: calc(100vw - 2rem);
    min-width: 280px;
    width: auto;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2), 0 8px 16px rgba(0, 0, 0, 0.15);
    z-index: 10000;
  }
}

.app-menu-section {
  padding: 0.5rem;
}

.app-menu-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-light);
  margin: 0 0 0.5rem 0.75rem;
}

.app-menu-item {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.75rem 0.875rem;
  border-radius: 8px;
  color: var(--text-dark);
  text-decoration: none;
  transition: all 0.2s ease;
  font-size: 0.95rem;
  font-weight: 500;
}

.app-menu-item:hover {
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.08) 0%, rgba(220, 38, 38, 0.04) 100%);
  color: var(--primary);
  transform: translateX(2px);
}

.app-menu-item svg {
  flex-shrink: 0;
  opacity: 0.7;
  transition: all 0.2s ease;
}

.app-menu-item:hover svg {
  opacity: 1;
  stroke: var(--primary);
}

.app-menu-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.08) 50%, transparent 100%);
  margin: 0.5rem 0;
}

.app-menu-language-section {
  position: relative;
}

.app-menu-language-section::before {
  content: '';
  position: absolute;
  right: calc(100% + 0.5rem);
  top: 0;
  bottom: 0;
  width: 0.75rem;
  z-index: 1000;
}

.app-menu-language-trigger {
  cursor: pointer;
  user-select: none;
}

.app-menu-language-trigger .chevron-right {
  margin-left: auto;
  opacity: 0.6;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.app-menu-language-section:hover .chevron-right {
  transform: translateX(2px);
}

.app-menu-language-dropdown {
  position: absolute;
  right: calc(100% + 0.75rem);
  top: 0;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08);
  padding: 0;
  min-width: 200px;
  display: none;
  transform: translateX(10px);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1001;
  border: 1px solid rgba(0, 0, 0, 0.06);
  max-height: 0;
  overflow: hidden;
}

/* User Menu */
.user-menu-wrapper {
  position: relative;
  margin-left: 0.5rem;
}

.user-menu-trigger {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(220, 38, 38, 0.15);
  background: transparent;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--text-dark);
}

.user-menu-trigger:hover {
  background: rgba(220, 38, 38, 0.06);
  border-color: rgba(220, 38, 38, 0.25);
  transform: translateY(-1px);
}

.user-menu-dropdown {
  position: absolute;
  top: calc(100% + 0.75rem);
  right: 0;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08);
  padding: 0.75rem;
  min-width: 280px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 10000;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

/* Desktop hover - only on screens wider than 900px */
@media (min-width: 901px) {
  .user-menu-wrapper:hover .user-menu-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
}

/* Mobile: show dropdown when .open class is present */
@media (max-width: 900px) {
  .user-menu-wrapper:hover .user-menu-dropdown {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
  }
  
  .user-menu-wrapper.open .user-menu-dropdown {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
  }
  
  .user-menu-dropdown {
    position: fixed;
    top: calc(100% + 0.75rem);
    right: 1rem;
    left: auto;
    max-width: calc(100vw - 2rem);
    min-width: 280px;
    width: auto;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2), 0 8px 16px rgba(0, 0, 0, 0.15);
    z-index: 10000;
  }
}

.user-menu-header {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.875rem;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text-dark);
  transition: background 0.2s ease;
  margin-bottom: 0.5rem;
}

.user-menu-header:hover {
  background: rgba(220, 38, 38, 0.05);
}

.user-menu-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

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

.user-menu-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-dark);
  margin-bottom: 0.25rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-menu-email {
  font-size: 0.875rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-menu-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.08) 50%, transparent 100%);
  margin: 0.5rem 0;
}

.user-menu-section {
  padding: 0.25rem 0;
}

.user-menu-item {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.75rem 0.875rem;
  border-radius: 8px;
  color: var(--text-dark);
  text-decoration: none;
  transition: all 0.2s ease;
  font-size: 0.95rem;
  font-weight: 500;
}

.user-menu-item:hover {
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.08) 0%, rgba(220, 38, 38, 0.04) 100%);
  color: var(--primary);
  transform: translateX(2px);
}

.user-menu-item svg {
  flex-shrink: 0;
  opacity: 0.7;
  transition: all 0.2s ease;
}

.user-menu-item:hover svg {
  opacity: 1;
  stroke: var(--primary);
}

.app-menu-language-section:hover .app-menu-language-dropdown {
  display: block;
  padding: 0.75rem;
  max-height: 500px;
  transform: translateX(0);
}

.app-menu-language-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.875rem;
  padding: 0.75rem 0.875rem;
  border-radius: 8px;
  color: var(--text-dark);
  text-decoration: none;
  transition: all 0.2s ease;
  font-size: 0.95rem;
  font-weight: 500;
}

.app-menu-language-item:hover {
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.08) 0%, rgba(220, 38, 38, 0.04) 100%);
  color: var(--primary);
  transform: translateX(2px);
}

.app-menu-language-item.active {
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.1) 0%, rgba(220, 38, 38, 0.05) 100%);
  color: var(--primary);
  font-weight: 600;
}

.app-menu-language-item .check-icon {
  opacity: 1;
  stroke: var(--primary);
  flex-shrink: 0;
}

.button.contrasting {
  background: #111827;
  color: #fff;
  box-shadow: 0 18px 30px -20px rgba(17, 24, 39, 0.5);
}

.hero {
  padding: 6rem 0 4rem;
}

.hero-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  align-items: center;
  gap: 3rem;
}

.hero-content h1 {
  margin: 0.75rem 0;
  font-size: clamp(2.75rem, 5vw, 3.5rem);
  line-height: 1.1;
}

.hero-content .lead {
  color: var(--text-muted);
  max-width: 520px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 600;
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  margin: 2rem 0;
}

.hero-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.metric {
  display: block;
  font-size: 1.75rem;
  font-weight: 700;
}

.label {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.hero-visual {
  display: flex;
  justify-content: center;
}

.dashboard-card {
  background: linear-gradient(145deg, #ffffff, #fee2e2);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  width: min(380px, 90vw);
}

.card-header {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
}

.dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #d1d5db;
}

.dot.red {
  background: #ef4444;
}

.dot.yellow {
  background: #f59e0b;
}

.dot.green {
  background: #10b981;
}

.task-preview {
  display: grid;
  gap: 1rem;
}

.task-step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
  background: rgba(220, 38, 38, 0.08);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
}

.task-step.active {
  background: rgba(220, 38, 38, 0.15);
  border: 1px solid rgba(220, 38, 38, 0.35);
}

.step-index {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #fff;
  text-align: center;
  line-height: 32px;
  font-weight: 600;
  color: var(--accent);
}

.step-title {
  margin: 0;
  font-weight: 600;
}

.step-subtitle {
  margin: 0.1rem 0 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.task-stats {
  margin-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.stat-value {
  display: block;
  font-weight: 600;
  color: var(--text);
}

.section-heading {
  text-align: center;
  margin: 0 auto 3rem;
}

.section-heading h1,
.section-heading h2 {
  font-size: clamp(2rem, 5vw, 2.75rem);
  margin-bottom: 0.75rem;
}

.section-heading p {
  color: var(--text-muted);
}

.tools {
  padding: 5rem 0;
  background: var(--bg-alt);
}

.tools .container {
  width: min(1600px, 96vw);
}

.tool-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin: 2rem 0 3rem;
}

.tool-filter {
  padding: 0.65rem 1.25rem;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 24px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
  cursor: pointer;
  transition: all 180ms ease;
}

.tool-filter:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

.tool-filter.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.tool-filter.active:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-1px);
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1.5rem;
}

.tool-card[hidden] {
  display: none;
}

.tool-card {
  background: #fff;
  border: 1px solid var(--border);
  padding: 1.1rem;
  border-radius: var(--radius-md);
  display: grid;
  gap: 0.5rem;
  transition: transform 180ms ease, box-shadow 180ms ease;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.tool-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 36px -28px rgba(15, 22, 35, 0.5);
  text-decoration: none;
  color: inherit;
}

.tool-icon {
  font-size: 2rem;
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: rgba(220, 38, 38, 0.12);
  display: grid;
  place-items: center;
  color: var(--accent);
  font-weight: 600;
}

  .tool-card p {
    color: var(--text-muted);
  }

  /* Mobile: Tool card layout - icon and title side by side, description below */
  @media (max-width: 900px) {
    .tool-card {
      grid-template-columns: auto 1fr;
      grid-template-rows: auto auto;
      gap: 0.75rem 1rem;
      padding: 1rem;
    }

    .tool-card .tool-icon {
      grid-column: 1;
      grid-row: 1;
      width: 48px;
      height: 48px;
      font-size: 1.75rem;
      flex-shrink: 0;
    }

    .tool-card h3 {
      grid-column: 2;
      grid-row: 1;
      margin: 0;
      align-self: center;
      font-size: 1rem;
      line-height: 1.3;
    }

    .tool-card p {
      grid-column: 1 / -1;
      grid-row: 2;
      margin: 0;
      font-size: 0.875rem;
      line-height: 1.4;
    }
  }

.tool-link {
  color: var(--accent);
  font-weight: 600;
}

.feature-list {
  margin: 2rem 0 2.5rem;
  display: grid;
  gap: 0.85rem;
  color: var(--text-muted);
}

.feature-list li::before {
  content: "✔";
  color: var(--accent);
  margin-right: 0.6rem;
}

.automation-card {
  background: #0f172a;
  color: #e2e8f0;
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow);
  display: grid;
  gap: 1.5rem;
}

.automation-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  font-size: 0.75rem;
  font-weight: 600;
}

.status.online {
  color: #34d399;
  font-weight: 600;
}

.automation-body {
  display: grid;
  gap: 1rem;
}

.automation-step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: center;
}

.automation-step.connector {
  display: flex;
  justify-content: center;
  color: rgba(255, 255, 255, 0.35);
  font-size: 1.5rem;
}

.step-icon {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 1.35rem;
  font-weight: 600;
}

.step-icon.upload {
  background: rgba(14, 165, 233, 0.2);
  color: #38bdf8;
}

.step-icon.process {
  background: rgba(249, 115, 22, 0.2);
  color: #fb923c;
}

.step-icon.secure {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}

.automation-footer {
  display: flex;
  justify-content: space-between;
  color: rgba(226, 232, 240, 0.8);
  font-size: 0.95rem;
}

.integrations {
  padding: 5rem 0;
  background: var(--bg-alt);
}

.integrations-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 3rem;
  align-items: start;
}

.integration-tags {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.integration-tags span {
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  background: rgba(220, 38, 38, 0.12);
  color: var(--accent);
  font-weight: 600;
  font-size: 0.85rem;
}

.integration-card {
  background: #111827;
  color: #e5e7eb;
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow);
  display: grid;
  gap: 1.25rem;
}

.integration-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.language-label {
  font-size: 0.8rem;
  color: rgba(229, 231, 235, 0.7);
}

.code-block {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.6;
  white-space: pre-wrap;
  background: rgba(15, 23, 42, 0.6);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(148, 163, 184, 0.1);
}

.pricing {
  padding: 5rem 0;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
}

.pricing-card {
  background: #fff;
  border-radius: var(--radius-md);
  padding: 2.5rem 2rem;
  border: 1px solid var(--border);
  display: grid;
  gap: 1.5rem;
  position: relative;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.pricing-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 40px -28px rgba(15, 23, 42, 0.6);
}

.pricing-card.highlighted {
  border: 2px solid var(--accent);
  box-shadow: 0 24px 40px -22px rgba(220, 38, 38, 0.4);
}

.pricing-card .pill {
  position: absolute;
  top: -0.8rem;
  right: 1.5rem;
  padding: 0.35rem 0.9rem;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
}

.pricing-price {
  font-size: 2rem;
  font-weight: 700;
  margin: 0;
}

.pricing-price span {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-left: 0.3rem;
}

.pricing-description {
  color: var(--text-muted);
  margin: 0;
}

.pricing-card ul {
  display: grid;
  gap: 0.75rem;
  color: var(--text-muted);
}

.pricing-card ul li::before {
  content: "•";
  color: var(--accent);
  font-weight: 700;
  margin-right: 0.5rem;
}

.resources {
  padding: 5rem 0;
  background: var(--bg-alt);
}

.resources-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 3rem;
  align-items: start;
}

.resource-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.resource-list {
  display: grid;
  gap: 1.5rem;
}

.resource-list article {
  background: #fff;
  border-radius: var(--radius-md);
  padding: 1.75rem;
  border: 1px solid var(--border);
  box-shadow: 0 20px 32px -30px rgba(15, 23, 42, 0.4);
}

.resource-list article p {
  color: var(--text-muted);
}

.benefits {
  padding: 5rem 0;
  background: var(--bg);
}

.benefit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.benefit-grid article {
  background: #fff;
  border-radius: var(--radius-md);
  padding: 1.75rem;
  border: 1px solid var(--border);
  box-shadow: 0 20px 36px -32px rgba(15, 23, 42, 0.45);
  display: grid;
  gap: 0.75rem;
}

.benefit-grid article h3 {
  margin: 0;
  font-size: 1.2rem;
}

.benefit-grid article p {
  color: var(--text-muted);
  margin: 0;
}

.cta {
  padding: 4rem 0;
}

.cta-layout {
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.12), rgba(220, 38, 38, 0.3));
  border-radius: var(--radius-lg);
  padding: 3.5rem 3rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  align-items: center;
  box-shadow: 0 28px 44px -32px rgba(220, 38, 38, 0.45);
}

.cta-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.cta.lite .cta-layout {
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.08), rgba(220, 38, 38, 0.16));
}

.tools-landing {
  padding-bottom: 4rem;
}

.tools-landing-hero {
  padding: 5rem 0 3rem;
  text-align: center;
}

.tools-landing-hero .lead {
  max-width: 640px;
  margin: 0.75rem auto 0;
  color: var(--text-muted);
}

.auth-page {
  padding: 6rem 0;
}

.auth-container {
  display: flex;
  justify-content: center;
}

.auth-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: clamp(2rem, 3vw, 3rem);
  width: min(520px, 92vw);
  border: 1px solid var(--border);
  display: grid;
  gap: 1.5rem;
}

.auth-card h1 {
  margin: 0;
}

.auth-subtitle {
  margin: 0;
  color: var(--text-muted);
}

.auth-form {
  display: grid;
  gap: 1.25rem;
}

.form-group {
  display: grid;
  gap: 0.4rem;
}

.form-group label {
  font-weight: 600;
  color: var(--text);
}

.form-group input {
  border-radius: 12px;
  border: 1px solid var(--border);
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.form-group input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.2);
  outline: none;
}

.form-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.checkbox {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
}

.checkbox input {
  width: 16px;
  height: 16px;
  border-radius: 4px;
}

.link-muted {
  color: var(--text-muted);
  text-decoration: underline;
}

.form-actions {
  display: grid;
  gap: 0.6rem;
}

.form-actions .button[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

.form-note {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.auth-footer {
  margin: 0;
  font-size: 0.95rem;
}

.auth-footer a {
  color: var(--accent);
  font-weight: 600;
}

main,
.tool-page {
  flex: 1;
}

.tool-page {
  padding-bottom: 1rem;
}

.tool-simple {
  padding: 2rem 0;
}

.tool-card-simple {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: clamp(2rem, 3vw, 3rem);
  display: grid;
  gap: 0.5rem;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  text-align: center;
}

.tool-card-header h1 {
  margin: 1rem 0 0.75rem;
  font-size: clamp(2rem, 5vw, 2.6rem);
  line-height: 1.1;
}


.tool-summary {
  margin: 0 auto;
  color: var(--text-muted);
  max-width: 900px;
}

.tool-status {
  display: inline-flex;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  background: rgba(220, 38, 38, 0.12);
  color: var(--accent);
  font-weight: 600;
  margin: 1rem auto 0;
}

.upload-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin: 1.5rem 0 0;
  padding: 4rem 2rem;
  min-height: 200px;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  cursor: pointer;
  transition: all 220ms ease;
  position: relative;
}

.upload-cta.is-dragover {
  border-color: var(--accent);
  background: rgba(220, 38, 38, 0.05);
  border-style: solid;
  transform: scale(1.01);
  box-shadow: 0 12px 32px rgba(220, 38, 38, 0.15);
}

.upload-cta::before {
  content: '📄';
  font-size: 2.5rem;
  margin-bottom: 0.25rem;
  opacity: 0.5;
  transition: all 220ms ease;
}

.upload-cta.is-dragover::before {
  opacity: 1;
  transform: scale(1.05);
}

.upload-button-wrapper {
  display: inline-flex;
  align-items: center;
  position: relative;
  z-index: 2;
}

.upload-dropzone {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 2rem;
  border-radius: 10px 0 0 10px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.25);
  transition: all 180ms ease;
  position: relative;
  border: none;
  border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.upload-dropzone:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(220, 38, 38, 0.35);
}

.upload-dropzone input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.upload-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 0.75rem;
  border-radius: 0 10px 10px 0;
  background: var(--accent);
  color: #fff;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.25);
  transition: all 180ms ease;
  position: relative;
  z-index: 3;
}

.upload-dropdown-toggle:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(220, 38, 38, 0.35);
}

.upload-dropdown-toggle svg {
  transition: transform 180ms ease;
}

.upload-dropdown-toggle[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.upload-dropdown-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  min-width: 220px;
  z-index: 1000;
  overflow: hidden;
  animation: dropdownFadeIn 180ms ease;
}

@keyframes dropdownFadeIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.upload-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.875rem 1rem;
  background: transparent;
  border: none;
  text-align: left;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 150ms ease;
}

.upload-dropdown-item:hover {
  background: var(--bg-alt);
  color: var(--accent);
}

.upload-dropdown-item:first-child {
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
}

.upload-dropdown-item:last-child {
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
}

.upload-dropdown-item svg {
  flex-shrink: 0;
  opacity: 0.7;
}

.upload-dropdown-item:hover svg {
  opacity: 1;
}

/* Google Drive File Picker Modal */
.gdrive-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fadeIn 200ms ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.gdrive-modal {
  background: var(--bg-alt);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 48px -12px rgba(0, 0, 0, 0.4);
  width: min(800px, 95vw);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  animation: slideUp 300ms cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid var(--border);
  overflow: hidden;
}

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

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

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

.gdrive-modal-header {
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-alt);
  position: sticky;
  top: 0;
  z-index: 10;
}

.gdrive-modal-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
}

.gdrive-modal-title svg {
  width: 24px;
  height: 24px;
  color: #4285F4;
}

.gdrive-modal-close {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all 150ms ease;
}

.gdrive-modal-close:hover {
  background: var(--bg);
  color: var(--text);
}

.gdrive-modal-close svg {
  width: 20px;
  height: 20px;
}

.gdrive-modal-search {
  padding: 1rem 2rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.gdrive-modal-search-input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.75rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.95rem;
  font-family: inherit;
  transition: all 150ms ease;
  background: var(--bg-alt);
  color: var(--text);
}

.gdrive-modal-search-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.gdrive-modal-search-wrapper {
  position: relative;
}

.gdrive-modal-search-icon {
  position: absolute;
  left: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  pointer-events: none;
}

.gdrive-modal-content {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  min-height: 300px;
  max-height: calc(90vh - 200px);
}

.gdrive-modal-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
  gap: 1rem;
  color: var(--text-muted);
}

.gdrive-modal-loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}

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

.gdrive-modal-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
  gap: 1rem;
  color: var(--text-muted);
  text-align: center;
}

.gdrive-modal-empty svg {
  width: 64px;
  height: 64px;
  opacity: 0.3;
}

.gdrive-file-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1.25rem;
  padding: 0.5rem 0;
}

.gdrive-file-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 1.25rem 1rem;
  border: 2px solid var(--border);
  border-radius: 16px;
  background: var(--bg-alt);
  cursor: pointer;
  transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.gdrive-file-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.05) 0%, rgba(220, 38, 38, 0.02) 100%);
  opacity: 0;
  transition: opacity 200ms ease;
}

.gdrive-file-item:hover {
  border-color: var(--accent);
  background: var(--bg-alt);
  transform: translateY(-4px);
  box-shadow: 0 12px 24px -8px rgba(220, 38, 38, 0.3);
}

.gdrive-file-item:hover::before {
  opacity: 1;
}

.gdrive-file-item:active {
  transform: translateY(-2px);
}

.gdrive-file-thumbnail {
  width: 100%;
  aspect-ratio: 3/4;
  background: linear-gradient(135deg, #DC2626 0%, #B91C1C 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.25);
  transition: all 200ms ease;
}

.gdrive-file-item:hover .gdrive-file-thumbnail {
  box-shadow: 0 8px 20px rgba(220, 38, 38, 0.4);
  transform: scale(1.02);
}

.gdrive-thumbnail-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  background: #f8f9fa;
}

.gdrive-thumbnail-fallback {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #DC2626 0%, #B91C1C 100%);
}

.gdrive-file-thumbnail svg {
  width: 48px;
  height: 48px;
  color: white;
  opacity: 0.95;
}

.gdrive-file-thumbnail::after {
  content: 'PDF';
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  letter-spacing: 0.5px;
  z-index: 2;
  pointer-events: none;
}

.gdrive-file-info {
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.gdrive-file-name {
  font-weight: 600;
  color: var(--text);
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
  min-height: 2.8em;
}

.gdrive-file-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.gdrive-file-size,
.gdrive-file-date {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  white-space: nowrap;
}

.gdrive-file-select {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 150ms ease;
  margin-top: 0.25rem;
}

.gdrive-file-select:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.gdrive-file-select:active {
  transform: translateY(0);
}

.gdrive-file-select:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.gdrive-modal-footer {
  padding: 1rem 2rem;
  border-top: 1px solid var(--border);
  background: var(--bg);
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
}

.gdrive-modal-cancel {
  padding: 0.75rem 1.5rem;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 150ms ease;
}

.gdrive-modal-cancel:hover {
  background: var(--bg-alt);
  color: var(--text);
  border-color: var(--text-muted);
}

@media (max-width: 768px) {
  .gdrive-file-list {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
  }
}

@media (max-width: 640px) {
  .gdrive-modal {
    width: 100%;
    max-height: 100vh;
    border-radius: 0;
    margin: 0;
  }
  
  .gdrive-modal-header,
  .gdrive-modal-search,
  .gdrive-modal-footer {
    padding: 1rem 1.5rem;
  }
  
  .gdrive-file-list {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.75rem;
  }
  
  .gdrive-file-item {
    padding: 1rem 0.75rem;
  }
  
  .gdrive-file-thumbnail {
    border-radius: 10px;
  }
  
  .gdrive-file-name {
    font-size: 0.85rem;
  }
  
  .gdrive-file-meta {
    font-size: 0.7rem;
    gap: 0.5rem;
  }
}

.drop-hint {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
  z-index: 1;
}

.upload-cta.is-dragover .drop-hint {
  color: var(--accent);
}

.tool-note {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.85rem;
  z-index: 1;
  font-size: 0.9rem;
}

.tool-page.tool-edit .container {
  width: min(1600px, 98vw);
  margin: 0 auto;
  padding-left: 0;
  padding-right: 0;
}

/* Wider container for all tools except edit and converters */
.tool-page.tool-processor:not(.tool-edit):not(.tool-pdf-to-jpg):not(.tool-pdf-to-word):not(.tool-pdf-to-powerpoint):not(.tool-pdf-to-excel):not(.tool-pdf-to-pdfa):not(.tool-word-to-pdf):not(.tool-powerpoint-to-pdf):not(.tool-excel-to-pdf):not(.tool-html-to-pdf) .container {
  width: min(1400px, 96vw);
  margin: 0 auto;
}

.tool-processor .processor-layout {
  display: grid;
  gap: 2rem;
}

.tool-processor .processor-upload-card {
  position: relative;
}

.processor-alert {
  width: 100%;
  margin: 0.5rem 0 0;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  background: rgba(220, 38, 38, 0.08);
  border: 1px solid rgba(220, 38, 38, 0.25);
  color: var(--accent);
  font-weight: 600;
  text-align: center;
}

.processor-alert.is-info {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.4);
  color: #047857;
}

.processor-alert.is-warning {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.4);
  color: #92400e;
}

.processor-coming-soon {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  margin-top: 1.5rem;
}

.coming-soon-content {
  display: grid;
  gap: 1rem;
  justify-items: center;
  text-align: center;
}

.coming-soon-icon {
  font-size: 4rem;
  opacity: 0.6;
}

.coming-soon-content h2 {
  margin: 0;
  font-size: 2rem;
  color: var(--text);
}

.coming-soon-content p {
  margin: 0;
  font-size: 1.1rem;
  color: var(--text-muted);
}

.processor-progress {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  margin-top: 1.5rem;
  padding: 0.65rem 1.25rem;
  border-radius: 999px;
  background: rgba(220, 38, 38, 0.08);
  color: var(--accent);
  font-weight: 600;
}

.processor-progress-indicator {
  width: 16px;
  height: 16px;
  border: 3px solid rgba(220, 38, 38, 0.2);
  border-top-color: rgba(220, 38, 38, 0.85);
  border-radius: 50%;
  display: inline-block;
  animation: processor-spin 0.9s linear infinite;
}

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

.processor-result-card {
  display: grid;
  gap: 1.5rem;
}

.processor-result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.processor-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.25rem;
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-alt);
}

.processor-metric-label {
  margin: 0 0 0.25rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 600;
}

.processor-metric-value {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
}

.processor-metric-note {
  margin: 0.15rem 0 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.processor-result-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.processor-result-title {
  margin: 0;
  font-weight: 600;
  font-size: 1.25rem;
}

.processor-result-subtitle {
  margin: 0.3rem 0 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.processor-preview {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  min-height: 360px;
  box-shadow: 0 16px 32px -26px rgba(15, 23, 42, 0.35);
}

.processor-preview iframe {
  width: 100%;
  height: 480px;
  border: none;
}

.processor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: flex-start;
}

.processor-actions .button[aria-disabled="true"] {
  pointer-events: none;
  opacity: 0.6;
}

.processor-file-summary {
  display: grid;
  gap: 0.75rem;
}

.processor-file-summary h2 {
  margin: 0;
  font-size: 1.1rem;
}

.processor-file-list {
  display: grid;
  gap: 0.5rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.processor-file-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-alt);
  font-weight: 500;
}

.processor-file-list li span {
  color: var(--text-muted);
  font-weight: 400;
  font-size: 0.9rem;
}

.merge-stage {
  margin-top: 2rem;
}

.merge-stage-grid {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr) 360px;
  gap: 3rem;
  align-items: stretch;
  max-width: 100%;
}

/* Wider merge-stage-grid for all tools except edit and converters */
.tool-processor:not(.tool-edit):not(.tool-pdf-to-jpg):not(.tool-pdf-to-word):not(.tool-pdf-to-powerpoint):not(.tool-pdf-to-excel):not(.tool-pdf-to-pdfa):not(.tool-word-to-pdf):not(.tool-powerpoint-to-pdf):not(.tool-excel-to-pdf):not(.tool-html-to-pdf) .merge-stage-grid {
  max-width: 1600px;
  margin: 0 auto;
}

.merge-actions-bar {
  display: grid;
  gap: 0.75rem;
  justify-items: center;
  align-content: flex-start;
  position: sticky;
  top: 104px;
  align-self: flex-start;
  z-index: 100;
}

.merge-action-button {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: 700;
  font-size: 1.1rem;
  cursor: pointer;
  color: var(--text);
  box-shadow: 0 16px 32px -28px rgba(15, 23, 42, 0.35);
  transition: transform 160ms ease, box-shadow 160ms ease,
    border-color 160ms ease;
}

.merge-action-button:hover {
  transform: translateY(-2px);
  border-color: rgba(220, 38, 38, 0.35);
  box-shadow: 0 20px 40px -32px rgba(220, 38, 38, 0.45);
  color: var(--accent);
}

.merge-action-button:active {
  transform: translateY(0);
  box-shadow: 0 12px 22px -20px rgba(15, 23, 42, 0.45);
}

.merge-action-icon {
  pointer-events: none;
}

.merge-action-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: rgba(220, 38, 38, 0.95);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.4);
  border: 2px solid #fff;
  pointer-events: none;
  z-index: 1;
}

.merge-action-meta {
  position: absolute;
  right: 100%;
  top: 50%;
  transform: translate(-8px, -50%);
  background: rgba(15, 23, 42, 0.92);
  color: #fff;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  pointer-events: none;
  opacity: 0;
  white-space: nowrap;
  transition: opacity 200ms ease-out, transform 200ms ease-out;
  will-change: opacity, transform;
  z-index: 10;
  margin-right: 0.5rem;
}

.merge-canvas {
  gap: 1rem;
}


.merge-files-grid {
  display: grid;
  grid-template-columns: repeat(4, 198px);
  gap: 1.25rem;
  justify-content: center;
  transition: all 160ms ease;
}

/* Smooth animation for cards when reordering */
.merge-files-grid > .merge-file-card:not(.dragging) {
  transition: transform 350ms cubic-bezier(0.4, 0, 0.2, 1),
    opacity 200ms ease-out;
  will-change: transform;
}

.merge-file-card {
  margin: 0;
  width: 198px;
  height: 244px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  position: relative;
  border: 1px solid rgba(0, 0, 0, 0);
  background: #fdfdfd;
  border-radius: 8px;
  box-shadow: 0 0 8px 0 rgba(0, 0, 0, 0.08);
  padding: 0.75rem 0.5rem;
  gap: 0.75rem;
  cursor: grab;
  cursor: -webkit-grab;
  transition: transform 300ms cubic-bezier(0.4, 0, 0.2, 1), 
    box-shadow 160ms ease,
    border-color 160ms ease, 
    margin 120ms ease,
    opacity 200ms ease-out;
  position: relative;
  will-change: transform;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

.merge-file-card:active {
  cursor: grabbing;
  cursor: -webkit-grabbing;
}

/* Disable grab cursor for scan-to-pdf since drag & drop is disabled */
.tool-scan-to-pdf .merge-file-card {
  cursor: default;
}

.tool-scan-to-pdf .merge-file-card:active {
  cursor: default;
}

/* Disable grab cursor for jpg-to-pdf since drag & drop is disabled */
.tool-jpg-to-pdf .merge-file-card {
  cursor: default;
}

.tool-jpg-to-pdf .merge-file-card:active {
  cursor: default;
}

.merge-file-card.dragging {
  opacity: 0.85;
  box-shadow: 0 18px 36px -28px rgba(15, 23, 42, 0.55);
  transform: scale(1.04);
  pointer-events: none;
  /* Ensure dragging card doesn't affect layout */
  position: fixed !important;
  z-index: 1000 !important;
}

.merge-file-card.drop-target {
  border-color: rgba(220, 38, 38, 0.6);
  box-shadow: 0 14px 32px -24px rgba(220, 38, 38, 0.5);
}

.merge-file-card.is-selected {
  border-color: rgba(59, 130, 246, 0.8);
  border-width: 2px;
  box-shadow: 0 8px 24px -12px rgba(59, 130, 246, 0.4),
              0 0 0 2px rgba(59, 130, 246, 0.1);
  background: rgba(239, 246, 255, 0.5);
  transform: scale(1.02);
}

.merge-placeholder {
  border: 2px dashed rgba(220, 38, 38, 0.5) !important;
  background: rgba(220, 38, 38, 0.05) !important;
  opacity: 0.4 !important;
  pointer-events: none;
  transition: opacity 200ms ease-out, transform 300ms cubic-bezier(0.4, 0, 0.2, 1);
  animation: placeholderPulse 1.5s ease-in-out infinite;
}

@media (max-width: 900px) {
  .merge-placeholder {
    border: 2px dashed rgba(220, 38, 38, 0.6) !important;
    background: rgba(220, 38, 38, 0.1) !important;
    opacity: 0.5 !important;
    box-sizing: border-box !important;
    flex-shrink: 0 !important;
  }
}

.merge-placeholder[style*="opacity: 0.4"] {
  animation: placeholderPulse 1.5s ease-in-out infinite;
}

@keyframes placeholderPulse {
  0%, 100% {
    opacity: 0.4;
    border-color: rgba(220, 38, 38, 0.5);
  }
  50% {
    opacity: 0.6;
    border-color: rgba(220, 38, 38, 0.7);
  }
}

.merge-thumb {
  width: 180px;
  height: 180px;
  min-height: 180px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.merge-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.merge-file-meta {
  position: absolute;
  top: -32px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.92);
  color: #fff;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  pointer-events: none;
  opacity: 0;
  transition: opacity 200ms ease-out, transform 200ms ease-out, left 200ms ease-out;
  white-space: nowrap;
  will-change: opacity, transform, left;
}

/* Meta visibility is now controlled by JavaScript for better positioning */

.merge-file-card:hover {
  border-color: rgba(0, 0, 0, 0.65);
  box-shadow: 0 12px 28px -20px rgba(15, 23, 42, 0.45);
  position: relative;
  will-change: transform;
}

/* Disable hover effects on cards when dragging over them */
/* Use a more specific selector to override hover, but keep pointer-events enabled */
body.dragging-file .merge-file-card:not(.dragging):hover,
.merge-file-card.no-hover-during-drag:hover {
  border-color: rgba(0, 0, 0, 0.4) !important;
  box-shadow: 0 4px 12px -8px rgba(15, 23, 42, 0.25) !important;
  background: transparent !important;
  position: relative !important;
  will-change: auto !important;
  transform: none !important;
}

.merge-file-name {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
  color: var(--text);
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.merge-order-badge {
  position: absolute;
  top: 0.6rem;
  left: 0.6rem;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.9);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 600;
  z-index: 2;
  pointer-events: none;
  box-shadow: 0 6px 14px -10px rgba(15, 23, 42, 0.45);
}

.merge-card-actions {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  display: flex;
  gap: 0.4rem;
  z-index: 3;
  opacity: 0;
  transition: opacity 160ms ease;
}

.merge-file-card:hover .merge-card-actions {
  opacity: 1;
}

/* Disable action buttons hover when dragging over cards */
body.dragging-file .merge-file-card:not(.dragging):hover .merge-card-actions,
.merge-file-card.no-hover-during-drag:hover .merge-card-actions {
  opacity: 0 !important;
  pointer-events: none !important;
}

.merge-card-action {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: rgba(15, 23, 42, 0.9);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 160ms ease, transform 160ms ease;
  padding: 0;
  line-height: 1;
  pointer-events: auto;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

.merge-card-action:hover {
  background: rgba(15, 23, 42, 1);
  transform: scale(1.1);
}

.merge-card-action:active {
  transform: scale(0.95);
}

.merge-card-rotate {
  font-size: 1.2rem;
}

.merge-card-delete {
  font-size: 1.4rem;
  background: rgba(220, 38, 38, 0.9);
}

.merge-card-delete:hover {
  background: rgba(220, 38, 38, 1);
}

.merge-file-card.is-duplicate {
  border-color: rgba(220, 38, 38, 0.6);
  background: rgba(254, 242, 242, 0.5);
}

.merge-file-card.is-duplicate:hover {
  border-color: rgba(220, 38, 38, 0.9);
  background: rgba(254, 242, 242, 0.8);
  box-shadow: 0 12px 28px -20px rgba(220, 38, 38, 0.4);
}

/* Disable duplicate hover when dragging over cards */
body.dragging-file .merge-file-card.is-duplicate:not(.dragging):hover,
.merge-file-card.is-duplicate.no-hover-during-drag:hover {
  border-color: rgba(220, 38, 38, 0.5) !important;
  background: rgba(254, 242, 242, 0.05) !important;
  box-shadow: 0 4px 12px -8px rgba(220, 38, 38, 0.25) !important;
}

.merge-duplicate-badge {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  background: rgba(220, 38, 38, 0.95);
  color: #fff;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  pointer-events: none;
  z-index: 2;
  white-space: nowrap;
}

.merge-file-card.is-duplicate .merge-order-badge {
  top: 2.5rem; /* Move order badge down when duplicate badge is present */
}

/* Rotate PDF rotation badge */
.merge-rotation-badge {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 0.5rem;
  background: var(--accent);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  z-index: 2;
  pointer-events: none;
  white-space: nowrap;
}

.merge-thumb-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.merge-delete-button {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: rgba(220, 38, 38, 0.95);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 600;
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s ease;
  line-height: 1;
}

.merge-delete-button:hover {
  background: rgba(220, 38, 38, 1);
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4);
}

.merge-delete-button:active {
  transform: scale(0.95);
}

.merge-rotate-button {
  position: absolute;
  top: 0.5rem;
  right: 2.5rem;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.95);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 600;
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.merge-rotate-button:hover {
  background: var(--accent);
  color: white;
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4);
}

.merge-rotate-button:active {
  transform: scale(0.95);
}

.merge-file-card .merge-order-badge {
  z-index: 11;
}

.merge-page-range-selector {
  margin: 1.5rem 0;
  padding: 1.25rem;
  background: rgba(59, 130, 246, 0.05);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 12px;
}

.merge-page-range-header {
  margin-bottom: 1rem;
}

.merge-page-range-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 0.25rem 0;
}

.merge-page-range-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
  word-break: break-word;
}

.merge-page-range-input-group {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.merge-page-range-input {
  flex: 1;
  padding: 0.625rem 0.875rem;
  font-size: 0.9rem;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.merge-page-range-input:focus {
  outline: none;
  border-color: rgba(59, 130, 246, 0.5);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.merge-page-range-clear {
  padding: 0.625rem 0.875rem;
  font-size: 1.25rem;
  line-height: 1;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 8px;
  background: #fff;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 150ms ease;
  min-width: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.merge-page-range-clear:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
  color: rgba(239, 68, 68, 0.9);
}

.merge-page-range-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

.merge-page-range-hint code {
  background: rgba(148, 163, 184, 0.15);
  padding: 0.125rem 0.375rem;
  border-radius: 4px;
  font-size: 0.85em;
  font-family: 'Courier New', monospace;
  color: var(--text);
}

.merge-panel {
  background: #fff;
  border-radius: 28px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: 0 28px 50px -38px rgba(15, 23, 42, 0.55);
  padding: 1.75rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  position: sticky;
  top: 104px;
  align-self: flex-start;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  justify-content: flex-start;
}

.merge-panel-header {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}


.merge-panel-header > div {
  flex: 1;
  min-width: 0;
}

.merge-panel-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
}

.merge-panel-subtitle {
  margin: 0.35rem 0 0;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.merge-panel-notify {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border-radius: 12px;
  font-size: 0.9rem;
  line-height: 1.5;
  transition: opacity 300ms ease, transform 300ms ease;
}

.merge-panel-notify svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 0.125rem;
}

.merge-panel-notify[data-merge="notify"] span[data-merge="notify-text"] {
  flex: 1;
  margin: 0;
}

/* Warning style for single file */
.merge-panel-notify-warning {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #92400e;
}

.merge-panel-notify-warning svg {
  color: #d97706;
}

/* Info style for 2+ files (reordering hint) */
.merge-panel-notify-info {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #1e40af;
}

.merge-panel-notify-info svg {
  color: #3b82f6;
}

.merge-panel-subtitle[data-word-to-pdf="status-text"],
.merge-panel-subtitle[data-excel-to-pdf="status-text"],
.merge-panel-subtitle[data-powerpoint-to-pdf="status-text"],
.merge-panel-subtitle[data-pdf-to-word="status-text"],
.merge-panel-subtitle[data-pdf-to-powerpoint="status-text"],
.merge-panel-subtitle[data-pdf-to-excel="status-text"],
.merge-panel-subtitle[data-pdf-to-pdfa="status-text"],
.merge-panel-subtitle[data-html-to-pdf="status-text"] {
  display: flex;
  align-items: baseline;
  gap: 0;
  flex-wrap: nowrap;
}

.merge-progress-indicator {
  margin: 1.5rem 0;
  padding: 1.25rem;
  background: rgba(59, 130, 246, 0.05);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 12px;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 300ms ease, transform 300ms ease;
  pointer-events: none;
}

.merge-progress-indicator.is-active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.merge-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.merge-progress-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

.merge-progress-count {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

.merge-progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(148, 163, 184, 0.2);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.merge-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.8), rgba(59, 130, 246, 1));
  border-radius: 4px;
  width: 0%;
  transition: width 350ms cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.merge-progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  animation: progress-shimmer 1.5s infinite;
}

@keyframes progress-shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

.merge-progress-file-name {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.merge-panel-download {
  position: relative;
  width: 100%;
  justify-content: center;
  font-size: 1.05rem;
  margin-top: auto;
  overflow: hidden;
}

/* Mobile download button - hidden by default */
.merge-panel-download-mobile {
  display: none;
}

.merge-panel-download.is-disabled,
.merge-panel-download[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
  background: rgba(148, 163, 184, 0.3);
  color: rgba(71, 85, 105, 0.7);
  pointer-events: none;
}

.merge-panel-download.is-disabled:hover,
.merge-panel-download[aria-disabled="true"]:hover {
  background: rgba(148, 163, 184, 0.3);
  color: rgba(71, 85, 105, 0.7);
  transform: none;
}

/* Split PDF specific styles */
.split-stage {
  width: 100%;
}

.split-preview-container {
  width: 100%;
  margin-bottom: 1.5rem;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: #f8f9fa;
  min-height: 400px;
}

.split-preview-frame {
  width: 100%;
  height: 600px;
  border: none;
  display: block;
}

/* Split stage has different grid layout (no actions bar) */
.split-stage .merge-stage-grid {
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 3rem;
}

/* Organize PDF has no actions bar */
.tool-organize-pdf .merge-stage-grid {
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 3rem;
}

.split-ranges-grid {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 0;
  align-items: stretch;
  min-height: 0;
  height: 100%;
  overflow-y: auto;
}

/* Ensure merge-canvas doesn't restrict height for split */
.split-stage .merge-canvas {
  min-height: 0;
  height: auto;
}

.split-range-card {
  width: 100%;
  flex: 1 1 0;
  min-height: 0;
  max-height: 50%;
  background: #fdfdfd;
  border: 1px solid rgba(0, 0, 0, 0);
  border-radius: 12px;
  box-shadow: 0 0 8px 0 rgba(0, 0, 0, 0.08);
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  transition: transform 300ms cubic-bezier(0.4, 0, 0.2, 1), 
    box-shadow 160ms ease,
    border-color 160ms ease;
  cursor: pointer;
  position: relative;
  box-sizing: border-box;
  overflow: hidden;
}

.split-range-card:hover {
  border-color: rgba(59, 130, 246, 0.3);
  box-shadow: 0 8px 24px -12px rgba(59, 130, 246, 0.3);
  transform: translateY(-2px);
}

.split-range-card.is-selected {
  border-color: rgba(59, 130, 246, 0.6);
  background: rgba(239, 246, 255, 0.4);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15),
              0 4px 16px -8px rgba(59, 130, 246, 0.3);
}

.split-range-pages-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.split-range-pages {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem;
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
  padding: 0.5rem 0;
}

.split-range-pages::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

.split-range-page {
  width: 100px;
  aspect-ratio: 3/4;
  background: #f8f9fa;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(148, 163, 184, 0.15);
  box-shadow: 0 2px 8px -4px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}

.split-range-page img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.split-range-page-number {
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text);
  background: rgba(255, 255, 255, 0.9);
  padding: 0.125rem 0.375rem;
  border-radius: 4px;
}

.split-range-nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.3);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
  display: flex !important;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.5rem;
  font-weight: 600;
  color: rgba(59, 130, 246, 0.9);
  z-index: 100;
  transition: all 200ms ease;
  user-select: none;
  backdrop-filter: blur(8px);
  opacity: 1;
  visibility: visible;
}

.split-range-nav-arrow[style*="display: none"] {
  display: none !important;
  opacity: 0;
  visibility: hidden;
}

.split-range-nav-arrow:hover {
  background: rgba(255, 255, 255, 1);
  border-color: rgba(59, 130, 246, 0.5);
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.25);
  color: rgba(59, 130, 246, 1);
  transform: translateY(-50%) scale(1.1);
}

.split-range-nav-arrow:active {
  transform: translateY(-50%) scale(0.95);
}

.split-range-nav-left {
  left: 8px;
}

.split-range-nav-right {
  right: 8px;
}

.split-range-pages-wrapper::before,
.split-range-pages-wrapper::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 60px;
  z-index: 5;
  pointer-events: none;
  transition: opacity 200ms ease;
}

.split-range-pages-wrapper::before {
  left: 0;
  background: linear-gradient(to right, rgba(255, 255, 255, 0.8), transparent);
  opacity: 0;
}

.split-range-pages-wrapper::after {
  right: 0;
  background: linear-gradient(to left, rgba(255, 255, 255, 0.8), transparent);
  opacity: 1;
}

.split-range-pages-wrapper.has-left-fade::before {
  opacity: 1;
}

.split-range-pages-wrapper.has-right-fade::after {
  opacity: 1;
}

.split-range-icon {
  font-size: 1.75rem;
  color: rgba(59, 130, 246, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  filter: drop-shadow(0 2px 4px rgba(59, 130, 246, 0.2));
}

.split-range-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  width: 100%;
}

.split-range-label {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

.split-range-pages-text {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
}

.split-range-description {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.5;
  text-align: center;
  opacity: 0.8;
  max-width: 90%;
}

.split-range-delete {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: rgba(220, 38, 38, 0.95);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 150ms ease;
  z-index: 10;
  opacity: 0.9;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.split-range-card:hover .split-range-delete {
  opacity: 1;
}

.split-range-delete:hover {
  background: rgba(220, 38, 38, 1);
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4);
}

.split-pages-list {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  padding: 0;
}

.split-page-item {
  background: #fff;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 8px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  transition: all 200ms ease;
  cursor: pointer;
}

.split-page-item:hover {
  border-color: rgba(59, 130, 246, 0.5);
  box-shadow: 0 4px 12px -4px rgba(59, 130, 246, 0.2);
  transform: translateY(-2px);
}

.split-page-item.is-selected {
  border-color: rgba(59, 130, 246, 0.8);
  background: rgba(239, 246, 255, 0.5);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.split-page-thumb {
  width: 100%;
  aspect-ratio: 3/4;
  background: #f0f0f0;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.split-page-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.split-page-number {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}

.split-page-actions {
  display: flex;
  gap: 0.5rem;
  width: 100%;
  justify-content: center;
}

.split-page-action {
  padding: 0.375rem 0.75rem;
  font-size: 0.8rem;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  transition: all 150ms ease;
}

.split-page-action:hover {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.5);
  color: rgba(59, 130, 246, 0.9);
}

/* Split ranges selector */
.split-ranges-selector {
  margin: 1.5rem 0;
}

.split-ranges-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1rem;
}

.split-range-input-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  background: rgba(59, 130, 246, 0.05);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 8px;
}

.split-range-label-text {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  min-width: 60px;
}

.split-range-inputs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
}

.split-range-input {
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  width: 80px;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.split-range-input:focus {
  outline: none;
  border-color: rgba(59, 130, 246, 0.5);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.split-range-separator {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
}

.split-range-remove {
  padding: 0.5rem;
  border: 1px solid rgba(220, 38, 38, 0.3);
  border-radius: 6px;
  background: #fff;
  color: rgba(220, 38, 38, 0.9);
  cursor: pointer;
  transition: all 150ms ease;
  font-size: 1rem;
  line-height: 1;
  min-width: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.split-range-remove:hover {
  background: rgba(220, 38, 38, 0.1);
  border-color: rgba(220, 38, 38, 0.5);
}

.split-add-range {
  width: 100%;
  justify-content: center;
  padding: 0.75rem;
  font-size: 0.9rem;
}

.split-combine-checkbox {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  margin: 1rem 0;
  background: rgba(239, 246, 255, 0.3);
  border-radius: 8px;
  border: 1px solid rgba(59, 130, 246, 0.2);
  cursor: pointer;
  transition: all 200ms ease;
  user-select: none;
}

.split-combine-checkbox:hover {
  background: rgba(239, 246, 255, 0.4);
  border-color: rgba(59, 130, 246, 0.3);
}

.split-combine-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--primary);
  flex-shrink: 0;
}

.split-combine-checkbox span {
  font-size: 0.875rem;
  color: var(--text);
  line-height: 1.4;
}

.merge-panel-download.is-disabled[aria-disabled="true"] {
  pointer-events: auto;
}

/* Loading state with spinner - smooth animations */
.merge-panel-download {
  transition: opacity 300ms cubic-bezier(0.4, 0, 0.2, 1),
              transform 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

.merge-panel-download.is-loading {
  pointer-events: none;
  cursor: wait;
  opacity: 0.85;
  transform: scale(0.98);
}

.merge-panel-download.is-loading::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.25),
    transparent
  );
  animation: loading-shimmer 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  will-change: left;
}

.merge-panel-download.is-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.25);
  border-top-color: #fff;
  border-radius: 50%;
  margin-left: 8px;
  will-change: transform, opacity;
  opacity: 0;
  animation: spinner-fade-in 200ms cubic-bezier(0.4, 0, 0.2, 1) forwards,
             spinner-rotate 0.9s cubic-bezier(0.4, 0, 0.2, 1) 200ms infinite;
}

.merge-panel-download.is-loading > * {
  opacity: 0.75;
  transition: opacity 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes loading-shimmer {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

@keyframes spinner-fade-in {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes spinner-rotate {
  0% {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

.merge-download-meta {
  position: absolute;
  top: -32px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.92);
  color: #fff;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  pointer-events: none;
  opacity: 0;
  white-space: nowrap;
  transition: opacity 200ms ease-out, transform 200ms ease-out;
  will-change: opacity, transform;
  z-index: 10;
}

.merge-panel-reset {
  width: 100%;
  justify-content: center;
}

.merge-panel-note {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Compress PDF - centered panel layout */
.compress-result-grid {
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

/* Word to PDF - centered panel layout */
.word-to-pdf-result-grid {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  grid-template-columns: none;
}

.compress-panel-centered {
  max-width: 640px;
  width: 100%;
}

.word-to-pdf-panel-centered {
  max-width: 900px;
  width: 100%;
}

/* Word to PDF Comparison Layout */
.word-to-pdf-comparison {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  margin: 1.25rem 0;
  padding: 0.75rem 0;
  min-height: 240px;
}

.word-to-pdf-document {
  flex: 1;
  max-width: 220px;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.word-to-pdf-doc-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.word-to-pdf-doc-content {
  background: var(--bg-secondary);
  border: none;
  border-radius: var(--radius-md);
  padding: 0.5rem;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.word-to-pdf-doc-content img {
  max-width: 100%;
  max-height: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  object-fit: contain;
}

.word-to-pdf-doc-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  width: 100%;
  height: 100%;
  padding: 0.5rem;
}

.word-to-pdf-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.word-to-pdf-logo svg {
  width: 48px;
  height: 48px;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.15));
}

.word-to-pdf-doc-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.1));
}

.word-to-pdf-doc-icon svg {
  width: 90px;
  height: 120px;
}

.word-to-pdf-file-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-align: center;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.word-to-pdf-source .word-to-pdf-doc-content {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.05) 0%, rgba(37, 99, 235, 0.02) 100%);
}

.word-to-pdf-target .word-to-pdf-doc-content {
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.05) 0%, rgba(220, 38, 38, 0.02) 100%);
}


/* Convert Animation */
.word-to-pdf-convert-animation {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  position: relative;
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.word-to-pdf-convert-animation.active {
  opacity: 1;
  transform: scale(1);
}

.word-to-pdf-arrow {
  width: 50px;
  height: 50px;
  color: var(--primary);
  position: relative;
}

.word-to-pdf-arrow svg {
  width: 100%;
  height: 100%;
}

.word-to-pdf-arrow .arrow-path {
  transform-origin: center;
  animation: arrowSlide 1.2s ease-in-out infinite;
}

.word-to-pdf-arrow .arrow-circle {
  animation: circleRotate 2s linear infinite;
  transform-origin: center;
}

@keyframes arrowSlide {
  0% {
    transform: translateX(0);
    opacity: 0.8;
  }
  50% {
    transform: translateX(6px);
    opacity: 1;
  }
  100% {
    transform: translateX(0);
    opacity: 0.8;
  }
}

@keyframes circleRotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.word-to-pdf-comparison.converting .word-to-pdf-source .word-to-pdf-doc-content {
  animation: pulse 1.5s ease-in-out infinite;
}

.word-to-pdf-comparison.completed .word-to-pdf-target .word-to-pdf-doc-content {
  animation: successGlow 0.6s ease-out;
}

@keyframes pulse {
  0%, 100% {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08), 0 0 0 0 rgba(37, 99, 235, 0.4);
  }
  50% {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08), 0 0 0 8px rgba(37, 99, 235, 0);
  }
}

@keyframes successGlow {
  0% {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  }
  50% {
    box-shadow: 0 4px 20px rgba(34, 197, 94, 0.4), 0 0 0 4px rgba(34, 197, 94, 0.2);
  }
  100% {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .word-to-pdf-comparison {
    flex-direction: row;
    gap: 0.5rem;
    margin: 0.75rem 0;
    padding: 0.5rem 0;
    min-height: 140px;
  }
  
  .word-to-pdf-convert-animation {
    transform: none;
    width: 40px;
    height: 40px;
  }
  
  .word-to-pdf-convert-animation svg {
    width: 40px;
    height: 40px;
  }
  
  .word-to-pdf-document {
    max-width: 120px;
    flex: 1;
    gap: 0.35rem;
  }
  
  .word-to-pdf-doc-label {
    font-size: 0.7rem;
  }
  
  .word-to-pdf-doc-content {
    min-height: 120px;
    padding: 0.35rem;
  }
  
  .word-to-pdf-logo svg {
    width: 32px;
    height: 32px;
  }
  
  .word-to-pdf-doc-icon svg {
    width: 60px;
    height: 80px;
  }
  
  .word-to-pdf-file-name {
    font-size: 0.7rem;
    max-width: 120px;
  }
  
  .word-to-pdf-doc-visual {
    gap: 0.5rem;
    padding: 0.35rem;
  }
}

/* Download button animation */
.word-to-pdf-panel-centered .merge-panel-download[aria-disabled="true"] {
  opacity: 0.5;
  pointer-events: none;
  cursor: not-allowed;
}

.word-to-pdf-panel-centered .merge-panel-download[aria-disabled="false"] {
  pointer-events: auto;
  cursor: pointer;
}

/* PowerPoint to PDF - centered panel layout */
.powerpoint-to-pdf-result-grid {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  grid-template-columns: none;
}

.powerpoint-to-pdf-panel-centered {
  max-width: 640px;
  width: 100%;
}

.powerpoint-to-pdf-panel-centered .processor-preview-container {
  margin: 1.5rem 0;
}

.powerpoint-to-pdf-panel-centered .processor-preview-container iframe {
  width: 100%;
  height: 600px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #f8f9fa;
}

/* Excel to PDF - centered panel layout */
.excel-to-pdf-result-grid {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  grid-template-columns: none;
}

.excel-to-pdf-panel-centered {
  max-width: 640px;
  width: 100%;
}

.excel-to-pdf-panel-centered .processor-preview-container {
  margin: 1.5rem 0;
}

.excel-to-pdf-panel-centered .processor-preview-container iframe {
  width: 100%;
  height: 600px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #f8f9fa;
}

/* HTML to PDF - centered panel layout */
.html-to-pdf-result-grid {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  grid-template-columns: none;
}

.html-to-pdf-panel-centered {
  max-width: 640px;
  width: 100%;
}

.html-to-pdf-panel-centered .processor-preview-container {
  margin: 1.5rem 0;
}

.html-to-pdf-panel-centered .processor-preview-container iframe {
  width: 100%;
  height: 600px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #f8f9fa;
}

/* HTML input tabs */
.html-input-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.html-tab {
  padding: 0.75rem 1.25rem;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: -1px;
}

.html-tab:hover {
  color: var(--text);
}

.html-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* HTML code input */
.html-input-code {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.html-code-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

.html-code-input {
  width: 100%;
  min-height: 200px;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'Courier New', monospace;
  font-size: 0.875rem;
  line-height: 1.6;
  resize: vertical;
  background: #fff;
  color: var(--text);
}

.html-code-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.html-input-file {
  display: block;
}

.html-input-code[hidden],
.html-input-file[hidden] {
  display: none;
}

/* PDF to JPG - grid layout without actions bar */
.tool-pdf-to-jpg .merge-stage-grid {
  grid-template-columns: minmax(0, 1fr) 360px;
}

/* PDF to JPG - wider container for 5 images */
.tool-page.tool-pdf-to-jpg .container {
  width: min(1600px, 96vw);
  margin: 0 auto;
}

.pdf-to-jpg-images-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.5rem;
  padding: 1rem;
  max-width: 100%;
}

.pdf-to-jpg-image-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pdf-to-jpg-image-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.pdf-to-jpg-image-card img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  background: #f8f9fa;
  object-fit: contain;
  max-height: 200px;
}

.pdf-to-jpg-image-info {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  text-align: center;
}

.pdf-to-jpg-download-btn {
  width: 100%;
  text-align: center;
  background: var(--accent);
  color: #fff;
  box-shadow: 0 18px 30px -22px rgba(220, 38, 38, 0.8);
}

.pdf-to-jpg-download-btn:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
}

.pdf-to-jpg-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}

/* PDF to Word - centered panel layout */
.pdf-to-word-result-grid {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  grid-template-columns: none;
}

.pdf-to-word-panel-centered {
  max-width: 640px;
  width: 100%;
}

.pdf-to-word-panel-centered .processor-preview-container {
  margin: 1.5rem 0;
}

/* PDF to PowerPoint - centered panel layout */
.pdf-to-powerpoint-result-grid {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  grid-template-columns: none;
}

.pdf-to-powerpoint-panel-centered {
  max-width: 640px;
  width: 100%;
}

.pdf-to-powerpoint-panel-centered .processor-preview-container {
  margin: 1.5rem 0;
}

/* PDF to Excel - centered panel layout */
.pdf-to-excel-result-grid {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  grid-template-columns: none;
}

.pdf-to-excel-panel-centered {
  max-width: 640px;
  width: 100%;
}

.pdf-to-excel-panel-centered .processor-preview-container {
  margin: 1.5rem 0;
}

/* PDF to PDF/A - centered panel layout */
.pdf-to-pdfa-result-grid {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  grid-template-columns: none;
}

.pdf-to-pdfa-panel-centered {
  max-width: 640px;
  width: 100%;
}

.pdf-to-pdfa-panel-centered .processor-preview-container {
  margin: 1.5rem 0;
}

.pdf-to-pdfa-panel-centered .processor-preview-container iframe {
  width: 100%;
  height: 600px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #f8f9fa;
}

/* Add Page Numbers - centered panel layout */
.add-page-numbers-result-grid {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  grid-template-columns: none;
}

.add-page-numbers-panel-centered {
  max-width: 640px;
  width: 100%;
}

.add-page-numbers-panel-centered .processor-preview-container {
  margin: 1.5rem 0;
}

.add-page-numbers-panel-centered .processor-preview-container iframe {
  width: 100%;
  height: 600px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #f8f9fa;
}

.page-numbers-options {
  margin: 1.5rem 0;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.page-numbers-option-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.page-numbers-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.page-numbers-select,
.page-numbers-input {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--background);
  color: var(--text);
  font-size: 0.875rem;
  font-family: inherit;
}

.page-numbers-select:focus,
.page-numbers-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.page-numbers-input {
  width: 100%;
  max-width: 120px;
}

/* Crop PDF - centered panel layout */
.crop-pdf-result-grid {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  grid-template-columns: none;
}

.crop-pdf-panel-centered {
  max-width: 640px;
  width: 100%;
}

.crop-pdf-panel-centered .processor-preview-container {
  margin: 1.5rem 0;
}

.crop-pdf-panel-centered .processor-preview-container iframe {
  width: 100%;
  height: 600px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #f8f9fa;
}

.crop-pdf-options {
  margin: 1.5rem 0;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.crop-pdf-option-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.crop-pdf-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.crop-pdf-inputs-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.crop-pdf-input-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.crop-pdf-input-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.crop-pdf-input {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--background);
  color: var(--text);
  font-size: 0.875rem;
  font-family: inherit;
  width: 100%;
}

.crop-pdf-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.crop-pdf-unit {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

/* Add Watermark - grid layout with panel on right */
.tool-add-watermark .merge-stage-grid {
  grid-template-columns: minmax(0, 1fr) 360px;
}

.processor-preview-container {
  width: 100%;
  padding: 1rem;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  position: relative;
}

.processor-preview-container canvas,
.processor-preview-container img {
  max-width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #f8f9fa;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.watermark-preview-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: var(--text);
  transition: all 0.2s;
  z-index: 10;
}

.watermark-preview-nav:hover {
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transform: translateY(-50%) scale(1.1);
}

.watermark-preview-nav:active {
  transform: translateY(-50%) scale(0.95);
}

.watermark-preview-prev {
  left: 1rem;
}

.watermark-preview-next {
  right: 1rem;
}

.processor-preview-container iframe {
  width: 100%;
  height: 600px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #f8f9fa;
}

.watermark-options {
  margin: 1.5rem 0;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.watermark-option-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.watermark-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.watermark-select,
.watermark-input {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--background);
  color: var(--text);
  font-size: 0.875rem;
  font-family: inherit;
  width: 100%;
}

.watermark-select:focus,
.watermark-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.watermark-option-group[data-add-watermark="opacity-group"] {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.watermark-option-group[data-add-watermark="opacity-group"] .watermark-label {
  margin-bottom: 0.25rem;
}

.watermark-opacity-wrapper {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.watermark-range {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: var(--border);
  outline: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.watermark-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #3b82f6;
  cursor: pointer;
  transition: background 0.2s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  border: 2px solid #fff;
}

.watermark-range::-webkit-slider-thumb:hover {
  background: #2563eb;
}

.watermark-range::-webkit-slider-thumb:active {
  background: #2563eb;
}

.watermark-range::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #3b82f6;
  cursor: pointer;
  border: 2px solid #fff;
  transition: background 0.2s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.watermark-range::-moz-range-thumb:hover {
  background: #2563eb;
}

.watermark-opacity-value {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  min-width: 45px;
  text-align: right;
}

.watermark-input[type="file"] {
  padding: 0.5rem;
  cursor: pointer;
}

.watermark-input[type="file"]::-webkit-file-upload-button {
  padding: 0.5rem 1rem;
  margin-right: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-size: 0.875rem;
  cursor: pointer;
  transition: background 0.2s;
}

.watermark-input[type="file"]::-webkit-file-upload-button:hover {
  background: var(--border);
}

/* Unlock PDF - centered panel layout */
.unlock-pdf-result-grid {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  grid-template-columns: none;
}

.unlock-pdf-panel-centered {
  max-width: 640px;
  width: 100%;
}

.unlock-pdf-panel-centered .processor-preview-container {
  margin: 1.5rem 0;
}

.unlock-pdf-panel-centered .processor-preview-container iframe {
  width: 100%;
  height: 600px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #f8f9fa;
}

/* Protect PDF - centered panel layout */
.protect-pdf-result-grid {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  grid-template-columns: none;
}

.protect-pdf-panel-centered {
  max-width: 640px;
  width: 100%;
}

.protect-pdf-panel-centered .processor-preview-container {
  margin: 1.5rem 0;
}

.protect-pdf-panel-centered .processor-preview-container iframe {
  width: 100%;
  height: 600px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #f8f9fa;
}

.protect-pdf-options {
  margin: 1.5rem 0;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.protect-pdf-option-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.protect-pdf-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.protect-pdf-input {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--background);
  color: var(--text);
  font-size: 0.875rem;
  font-family: inherit;
  width: 100%;
}

.protect-pdf-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.protect-pdf-hint {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

.protect-pdf-checkboxes {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.protect-pdf-checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--text);
}

.protect-pdf-checkbox {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--primary);
}

/* Sign PDF - centered panel layout */
.sign-pdf-result-grid {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  grid-template-columns: none;
}

.sign-pdf-panel-centered {
  max-width: 640px;
  width: 100%;
}

.sign-pdf-panel-centered .processor-preview-container {
  margin: 1.5rem 0;
}

.sign-pdf-panel-centered .processor-preview-container iframe {
  width: 100%;
  height: 600px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #f8f9fa;
}

.sign-pdf-options {
  margin: 1.5rem 0;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.sign-pdf-option-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.sign-pdf-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.sign-pdf-select,
.sign-pdf-input {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--background);
  color: var(--text);
  font-size: 0.875rem;
  font-family: inherit;
  width: 100%;
}

.sign-pdf-select:focus,
.sign-pdf-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.sign-pdf-canvas {
  width: 100%;
  max-width: 400px;
  height: 200px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: #ffffff;
  cursor: crosshair;
  touch-action: none;
}

.sign-pdf-canvas-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.sign-pdf-input[type="file"] {
  padding: 0.5rem;
  cursor: pointer;
}

.sign-pdf-input[type="file"]::-webkit-file-upload-button {
  padding: 0.5rem 1rem;
  margin-right: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-size: 0.875rem;
  cursor: pointer;
  transition: background 0.2s;
}

.sign-pdf-input[type="file"]::-webkit-file-upload-button:hover {
  background: var(--border);
}

/* Redact PDF - centered panel layout */
.redact-pdf-result-grid {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  grid-template-columns: none;
}

.redact-pdf-panel-centered {
  max-width: 640px;
  width: 100%;
}

.redact-pdf-panel-centered .processor-preview-container {
  margin: 1.5rem 0;
}

.redact-pdf-panel-centered .processor-preview-container iframe {
  width: 100%;
  height: 600px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #f8f9fa;
}

.redact-pdf-options {
  margin: 1.5rem 0;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.redact-pdf-option-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.redact-pdf-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.redact-pdf-select,
.redact-pdf-input {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--background);
  color: var(--text);
  font-size: 0.875rem;
  font-family: inherit;
  width: 100%;
}

.redact-pdf-select:focus,
.redact-pdf-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.redact-pdf-hint {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

.redact-pdf-area-inputs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.redact-pdf-area-input-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.redact-pdf-area-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* Compare PDF - centered panel layout */
.compare-pdf-result-grid {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  grid-template-columns: none;
}

.compare-pdf-panel-centered {
  max-width: 1000px;
  width: 100%;
}

.compare-pdf-panel-centered .processor-preview-container {
  margin: 1.5rem 0;
}

.compare-pdf-uploads {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.compare-pdf-dropzone {
  min-height: 60px;
  padding: 0.875rem 1rem;
  border-radius: var(--radius-md);
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 0.875rem;
  transition: all 0.2s ease;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.25);
  border: none;
}

.compare-pdf-dropzone:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(220, 38, 38, 0.35);
}

.compare-pdf-dropzone:active {
  transform: translateY(0) scale(0.98);
}

.compare-pdf-dropzone .dropzone-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
  display: block;
  pointer-events: none;
}

.compare-pdf-dropzone input[type="file"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  overflow: hidden;
}

.compare-pdf-side-by-side {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  width: 100%;
}

.compare-pdf-iframe-container {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.compare-pdf-iframe-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-align: center;
}

.compare-pdf-iframe {
  width: 100%;
  height: 500px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #f8f9fa;
}

.compare-pdf-differences-list {
  grid-column: 1 / -1;
  margin-top: 1rem;
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.compare-pdf-differences-list h4 {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 0.75rem 0;
}

.compare-pdf-differences-list ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.compare-pdf-differences-list li {
  font-size: 0.875rem;
  color: var(--text-secondary);
  padding: 0.5rem;
  background: var(--background);
  border-radius: var(--radius-sm);
}

.compare-pdf-results {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 1.5rem 0;
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.compare-pdf-result-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
}

.compare-pdf-result-label {
  color: var(--text-secondary);
}

.compare-pdf-result-value {
  font-weight: 600;
  color: var(--text);
}

/* OCR PDF - centered panel layout */
.ocr-pdf-result-grid {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  grid-template-columns: none;
}

.ocr-pdf-panel-centered {
  max-width: 800px;
  width: 100%;
}

.ocr-pdf-panel-centered .processor-preview-container {
  margin: 1.5rem 0;
}

.ocr-pdf-panel-centered .processor-preview-container iframe {
  width: 100%;
  height: 600px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #f8f9fa;
}

.ocr-pdf-options {
  margin: 1.5rem 0;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.ocr-pdf-option-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.ocr-pdf-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.ocr-pdf-select {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--background);
  color: var(--text);
  font-size: 0.875rem;
  font-family: inherit;
  width: 100%;
}

.ocr-pdf-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.ocr-pdf-text-output {
  margin: 1.5rem 0;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.ocr-pdf-text-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.ocr-pdf-text-header h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}

.ocr-pdf-text-content {
  max-height: 400px;
  overflow-y: auto;
  padding: 1rem;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--text);
  white-space: pre-wrap;
  word-wrap: break-word;
  font-family: 'Courier New', monospace;
}

/* Repair PDF - centered panel layout */
.repair-pdf-result-grid {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  grid-template-columns: none;
}

.repair-pdf-panel-centered {
  max-width: 640px;
  width: 100%;
}

.repair-pdf-panel-centered .processor-preview-container {
  margin: 1.5rem 0;
}

.repair-pdf-panel-centered .processor-preview-container iframe {
  width: 100%;
  height: 600px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #f8f9fa;
}

.repair-pdf-results {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 1.5rem 0;
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.repair-pdf-result-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
}

.repair-pdf-result-label {
  color: var(--text-secondary);
}

.repair-pdf-result-value {
  font-weight: 600;
  color: var(--text);
}

.compress-panel-centered .processor-metrics {
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  padding: 1rem;
}

.metric-group {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.metric-arrow {
  margin-top: 0.5rem;
  color: #10b981;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.metric-arrow svg {
  width: 28px;
  height: 28px;
  filter: drop-shadow(0 2px 4px rgba(16, 185, 129, 0.3));
}

.metric-arrow.animate {
  opacity: 1;
  transform: translateY(0);
  animation: arrowBounce 1s ease-out;
}

@keyframes arrowBounce {
  0% {
    transform: translateY(-10px);
    opacity: 0;
  }
  20% {
    transform: translateY(2px);
    opacity: 1;
  }
  40% {
    transform: translateY(-2px);
  }
  60% {
    transform: translateY(1px);
  }
  80% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

.metric-group .processor-metric-value {
  position: relative;
  transition: color 0.3s ease;
}

.metric-group:has(.metric-arrow.animate) .processor-metric-value {
  animation: numberCountdown 1s ease-out;
}

/* Animate compressed size value */
.compress-panel-centered .processor-metrics > div:nth-child(2) .processor-metric-value {
  transition: color 0.3s ease, transform 0.3s ease;
}

.compress-panel-centered .processor-metrics:has(.metric-arrow.animate) > div:nth-child(2) .processor-metric-value {
  animation: compressedHighlight 1s ease-out;
}

@keyframes numberCountdown {
  0% {
    color: inherit;
  }
  50% {
    color: #10b981;
    transform: scale(1.05);
  }
  100% {
    color: inherit;
    transform: scale(1);
  }
}

@keyframes compressedHighlight {
  0% {
    color: inherit;
    transform: scale(1);
  }
  30% {
    color: #10b981;
    transform: scale(1.08);
  }
  60% {
    color: #10b981;
    transform: scale(1.05);
  }
  100% {
    color: inherit;
    transform: scale(1);
  }
}

.compress-thumbnail {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 1.25rem 0;
  padding: 0.875rem;
  background: #f8f9fa;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.15);
}

.compress-thumbnail img {
  max-width: 100%;
  max-height: 250px;
  width: auto;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  object-fit: contain;
}

/* Remove Pages Styles */
.remove-pages-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.remove-pages-header h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}

.remove-pages-actions {
  display: flex;
  gap: 0.75rem;
}

.remove-pages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem;
  padding: 0;
}

.remove-page-card {
  background: #fdfdfd;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  cursor: pointer;
  transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 8px 0 rgba(0, 0, 0, 0.08);
  will-change: transform, box-shadow, border-color;
}

.remove-page-card:hover {
  border-color: rgba(59, 130, 246, 0.5);
  box-shadow: 0 8px 24px -12px rgba(59, 130, 246, 0.35), 
              0 0 0 1px rgba(59, 130, 246, 0.1);
  transform: translateY(-3px);
}

.remove-page-card.selected {
  border-color: #dc2626;
  border-width: 2px;
  background: rgba(254, 242, 242, 0.6);
  box-shadow: 0 8px 24px -12px rgba(220, 38, 38, 0.4),
              0 0 0 2px rgba(220, 38, 38, 0.15);
  transform: translateY(-2px);
}

.remove-page-card.selected:hover {
  border-color: #b91c1c;
  box-shadow: 0 12px 32px -16px rgba(220, 38, 38, 0.5),
              0 0 0 2px rgba(220, 38, 38, 0.2);
  transform: translateY(-3px);
}

.remove-page-thumbnail {
  position: relative;
  width: 100%;
  aspect-ratio: 3/4;
  background: #f8f9fa;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(148, 163, 184, 0.15);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: border-color 200ms ease, box-shadow 200ms ease;
}

.remove-page-card:hover .remove-page-thumbnail {
  border-color: rgba(59, 130, 246, 0.3);
  box-shadow: inset 0 1px 3px rgba(59, 130, 246, 0.1);
}

.remove-page-card.selected .remove-page-thumbnail {
  border-color: rgba(220, 38, 38, 0.3);
  box-shadow: inset 0 1px 3px rgba(220, 38, 38, 0.1);
}

.remove-page-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 10px;
}

/* Organize PDF thumbnail content wrapper for rotation */
.organize-thumbnail-content {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

.organize-thumbnail-content img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 10px;
}

.remove-page-checkbox {
  position: absolute;
  top: 0.625rem;
  right: 0.625rem;
  width: 28px;
  height: 28px;
  background: rgba(255, 255, 255, 0.98);
  border: 2px solid rgba(148, 163, 184, 0.4);
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15),
              0 0 0 0 rgba(220, 38, 38, 0);
  z-index: 2;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.remove-page-card:hover .remove-page-checkbox {
  border-color: rgba(59, 130, 246, 0.6);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2),
              0 0 0 2px rgba(59, 130, 246, 0.1);
}

.remove-page-card.selected .remove-page-checkbox {
  background: #dc2626;
  border-color: #dc2626;
  box-shadow: 0 3px 10px rgba(220, 38, 38, 0.4),
              0 0 0 3px rgba(220, 38, 38, 0.15);
  transform: scale(1.05);
}

.remove-page-card.selected:hover .remove-page-checkbox {
  background: #b91c1c;
  border-color: #b91c1c;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.5),
              0 0 0 3px rgba(220, 38, 38, 0.2);
}

.remove-page-checkbox input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
  z-index: 3;
}

.remove-page-checkbox input[type="checkbox"]:checked + label::after {
  content: "✕";
  position: absolute;
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* Extract pages checkbox - blue with checkmark */
.extract-page-checkbox input[type="checkbox"]:checked + label::after {
  content: "✓";
  color: #fff;
}

.remove-page-card.selected .extract-page-checkbox {
  background: rgba(59, 130, 246, 0.9);
  border-color: rgba(59, 130, 246, 0.9);
  box-shadow: 0 3px 10px rgba(59, 130, 246, 0.4),
              0 0 0 3px rgba(59, 130, 246, 0.15);
  transform: scale(1.05);
}

.remove-page-card.selected:hover .extract-page-checkbox {
  background: rgba(37, 99, 235, 1);
  border-color: rgba(37, 99, 235, 1);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.5),
              0 0 0 3px rgba(59, 130, 246, 0.2);
}

.remove-page-card.selected.extract-page-card {
  border-color: rgba(59, 130, 246, 0.8);
  background: rgba(239, 246, 255, 0.6);
  box-shadow: 0 8px 24px -12px rgba(59, 130, 246, 0.4),
              0 0 0 2px rgba(59, 130, 246, 0.15);
}

.remove-page-card.selected.extract-page-card:hover {
  border-color: rgba(37, 99, 235, 0.9);
  box-shadow: 0 12px 32px -16px rgba(59, 130, 246, 0.5),
              0 0 0 2px rgba(59, 130, 246, 0.2);
}

.remove-page-checkbox label {
  position: absolute;
  width: 100%;
  height: 100%;
  cursor: pointer;
  margin: 0;
}

.remove-page-info {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0.375rem 0 0;
}

.remove-page-number {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  text-align: center;
  letter-spacing: 0.01em;
  transition: color 200ms ease;
}

.remove-page-card.selected .remove-page-number {
  color: #dc2626;
}

/* Remove page overlay animation */
.remove-page-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(220, 38, 38, 0.85);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 300ms cubic-bezier(0.4, 0, 0.2, 1),
              transform 300ms cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  z-index: 1;
}

.remove-page-card.selected .remove-page-overlay {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.remove-page-cross {
  width: 80px;
  height: 80px;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: crossPulse 600ms cubic-bezier(0.4, 0, 0.2, 1);
}

.remove-page-card.selected .remove-page-cross {
  animation: crossPulse 600ms cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes crossPulse {
  0% {
    transform: scale(0) rotate(-45deg);
    opacity: 0;
  }
  50% {
    transform: scale(1.2) rotate(0deg);
  }
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

.remove-page-label {
  color: white;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 400ms cubic-bezier(0.4, 0, 0.2, 1) 200ms,
              transform 400ms cubic-bezier(0.4, 0, 0.2, 1) 200ms;
}

.remove-page-card.selected .remove-page-label {
  opacity: 1;
  transform: translateY(0);
}

.remove-pages-info {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 12px;
  margin: 1.25rem 0;
}

.remove-pages-info p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.remove-pages-info strong {
  font-weight: 600;
  color: var(--text);
  font-size: 1rem;
}

/* Organize PDF Styles */
.organize-pages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem;
  padding: 0;
}

.organize-page-card {
  cursor: grab;
  cursor: -webkit-grab;
}

.organize-page-card:active {
  cursor: grabbing;
  cursor: -webkit-grabbing;
}

/* Prevent hover effects on organize-page-card (only allow during drag) */
.organize-page-card:hover {
  transform: none !important;
}

.organize-page-card:not(.dragging):hover {
  transform: none !important;
}

.organize-page-card.dragging {
  opacity: 0.8;
  z-index: 1000;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

.organize-page-card.dragging .organize-thumbnail-content {
  /* Keep rotation transform but prevent any scale/translate */
  transform-origin: center center;
}

.organize-placeholder {
  pointer-events: none;
  animation: placeholderPulse 1.5s ease-in-out infinite;
}

@keyframes placeholderPulse {
  0%, 100% {
    opacity: 0.4;
    border-color: rgba(59, 130, 246, 0.5);
  }
  50% {
    opacity: 0.6;
    border-color: rgba(59, 130, 246, 0.7);
  }
}

.organize-page-order-badge {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.9);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 700;
  z-index: 2;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.organize-page-rotate-button {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.95);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 200ms ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  z-index: 2;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.organize-page-rotate-button:hover {
  background: var(--accent);
  color: white;
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4);
}

.organize-page-rotate-button:active {
  transform: scale(0.95);
}

.organize-rotation-indicator {
  position: absolute;
  bottom: 0.5rem;
  right: 0.5rem;
  background: rgba(59, 130, 246, 0.95);
  color: #fff;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  z-index: 2;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

@media (max-width: 900px) {
  .remove-pages-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.75rem;
  }

  .organize-pages-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.75rem;
  }
  
  /* Ruimte voor vaste downloadknop op mobiel */
  .tool-organize-pdf .merge-stage {
    padding-bottom: 2rem;
  }
  
  /* Make organize-pages-grid more visible on mobile */
  .tool-organize-pdf .organize-pages-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
    padding: 0.5rem 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  
  .tool-organize-pdf .merge-canvas {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .remove-pages-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .remove-pages-actions {
    width: 100%;
    justify-content: stretch;
  }

  .remove-pages-actions .button {
    flex: 1;
  }
}

@media (max-width: 900px) {
  /* Prevent horizontal overflow on body and html */
  html, body {
    overflow-x: hidden;
    max-width: 100vw;
  }
  
  .merge-stage-grid {
    grid-template-columns: auto 1fr;
    gap: 1rem;
    padding: 0;
    max-width: 100%;
    width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
    align-items: start;
  }

  .merge-actions-bar {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    align-content: flex-start;
    gap: 0.75rem;
    width: auto;
    padding: 0;
    box-sizing: border-box;
    position: sticky;
    top: 80px;
    z-index: 100;
    align-self: flex-start;
  }
  
  .merge-canvas {
    min-width: 0;
    width: 100%;
  }

  .merge-panel {
    display: none;
    max-height: none !important;
    overflow-y: visible !important;
  }
  
  /* Split stage mobile grid layout */
  .split-stage .merge-stage-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .split-stage .merge-canvas {
    min-width: 0;
    width: 100%;
    overflow-x: hidden;
  }
  
  /* Organize PDF mobile grid layout - single column */
  .tool-organize-pdf .merge-stage-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  /* Hide merge-panel on mobile for organize-pdf */
  .tool-organize-pdf .merge-panel {
    display: none;
  }
  
  .tool-organize-pdf .merge-canvas {
    min-width: 0;
    width: 100%;
    overflow-x: hidden;
  }
  
  .split-ranges-grid {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }
  
  /* Mobile sticky download button */
  .merge-panel-download-mobile {
    display: flex !important;
    position: fixed;
    bottom: 2rem;
    right: 1.5rem;
    left: auto;
    width: auto;
    min-width: 200px;
    max-width: calc(100vw - 3rem);
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2), 0 4px 8px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    margin-top: 0;
    justify-content: center;
    align-items: center;
    white-space: nowrap;
    transform: translateX(0);
    transition: bottom 0.3s ease, left 0.3s ease, right 0.3s ease, transform 0.3s ease;
  }
  
  /* When footer is visible, center button above footer */
  .merge-panel-download-mobile.footer-visible {
    position: fixed;
    right: auto;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    min-width: 200px;
    max-width: calc(100vw - 2rem);
    margin-bottom: 0;
  }
  
  .merge-panel-download-desktop {
    display: none;
  }
  
  /* Ruimte voor vaste downloadknop op mobiel */
  .tool-merge .merge-stage,
  .tool-organize-pdf .merge-stage {
    padding-bottom: 2rem;
  }
  
  /* Ensure split-stage has padding bottom for mobile button */
  .split-stage {
    padding-bottom: 5rem;
  }
  
  /* Mobile responsive split-range-card - much larger and professional */
  .split-ranges-grid {
    gap: 1.5rem;
    padding: 0;
  }
  
  .split-range-card {
    padding: 1.75rem 1.25rem;
    gap: 1.5rem;
    min-height: auto;
    max-height: none;
    width: 100%;
    flex: 1 1 auto;
    border: 1px solid rgba(148, 163, 184, 0.15);
  }
  
  .split-range-pages-wrapper {
    width: 100%;
    margin: 0;
    padding: 0;
  }
  
  .split-range-page {
    width: 100px;
    min-width: 100px;
  }
  
  .split-range-pages {
    padding: 0.875rem 0;
    gap: 1rem;
  }
  
  .split-range-info {
    gap: 0.625rem;
  }
  
  .split-range-label {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.01em;
  }
  
  .split-range-pages-text {
    font-size: 1rem;
    font-weight: 500;
  }
  
  .split-range-delete {
    width: 40px;
    height: 40px;
    font-size: 1.6rem;
    top: 1rem;
    right: 1rem;
    opacity: 1;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.35);
  }
  
  .split-range-delete:active {
    transform: scale(0.9);
  }
  
  .split-range-nav-arrow {
    width: 40px;
    height: 40px;
    font-size: 1.4rem;
  }
  
  /* Show panel on mobile but make it accessible */
  .split-stage .merge-panel {
    display: block;
    position: static;
    width: 100%;
    max-width: 100%;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
  }
  
  .split-ranges-selector {
    margin-bottom: 1.5rem;
  }
  
  .split-add-range {
    width: 100%;
    justify-content: center;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 600;
  }
  
  .split-combine-checkbox {
    width: 100%;
    padding: 1rem;
    background: rgba(148, 163, 184, 0.05);
    border-radius: 8px;
    margin-bottom: 1.5rem;
  }
  
  /* Tablet responsive merge-files-grid - 3 columns */
  .merge-files-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    justify-items: center;
    max-width: 100%;
    width: 100%;
    padding: 0;
    overflow-x: hidden;
  }
  
  .merge-file-card {
    width: 100%;
    max-width: 198px;
    min-width: 0;
    height: auto;
    min-height: 244px;
    aspect-ratio: 198 / 244;
  }
  
  /* Responsive thumbnail and text on tablet */
  .merge-thumb {
    width: 100%;
    max-width: 180px;
    height: auto;
    aspect-ratio: 1 / 1;
  }
  
  .merge-file-name {
    max-width: 100%;
    font-size: 0.8rem;
  }
  
  /* Rotate PDF - Make file cards taller on mobile for better button visibility */
  [data-tool="rotate-pdf"] .merge-file-card {
    min-height: 300px;
    height: auto;
    padding: 1rem 0.75rem 0.875rem;
    gap: 0.5rem;
    align-items: stretch;
  }
  
  [data-tool="rotate-pdf"] .merge-files-grid {
    gap: 1.25rem;
    padding: 0.5rem 0;
  }
  
  [data-tool="rotate-pdf"] .merge-thumb-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    min-height: 120px;
    max-height: 140px;
    position: relative;
    gap: 0.375rem;
  }
  
  [data-tool="rotate-pdf"] .merge-thumb {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    flex-shrink: 0;
  }
  
  /* Rotation badge on mobile - position inside card, below thumbnail */
  [data-tool="rotate-pdf"] .merge-thumb-wrapper .merge-rotation-badge {
    position: static !important;
    transform: none !important;
    margin: 0 !important;
    bottom: auto !important;
    left: auto !important;
    display: inline-block;
    background: var(--accent);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    align-self: center;
    flex-shrink: 0;
  }
  
  [data-tool="rotate-pdf"] .merge-page-actions {
    display: flex !important;
    gap: 0.5rem;
    margin: 0.25rem 0 0;
    width: 100%;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
  }
  
  [data-tool="rotate-pdf"] .merge-page-actions .button.ghost {
    flex: 1;
    min-width: 0;
    padding: 0.625rem 0.5rem;
    font-size: 1.2rem;
    font-weight: 600;
    border: 1.5px solid rgba(148, 163, 184, 0.4);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.95);
    transition: all 150ms ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
  }
  
  [data-tool="rotate-pdf"] .merge-page-actions .button.ghost:active {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.6);
    transform: scale(0.96);
  }
  
  [data-tool="rotate-pdf"] .merge-file-name {
    font-size: 0.7rem;
    text-align: center;
    padding: 0;
    line-height: 1.3;
    margin: 0.25rem 0 0;
    flex-shrink: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  
  [data-tool="rotate-pdf"] .merge-order-badge {
    z-index: 2;
  }
  
  /* Ensure merge-canvas doesn't overflow */
  .merge-canvas {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    padding: 0;
    box-sizing: border-box;
  }
  
  /* Make actions bar vertical, left-aligned, and sticky */
  .merge-actions-bar {
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    align-content: flex-start;
    padding: 0;
    width: auto;
    position: sticky;
    top: 80px;
    z-index: 100;
    align-self: flex-start;
  }
  
  .merge-canvas {
    min-width: 0;
    width: 100%;
    overflow-x: hidden;
  }
  
  .merge-action-button {
    width: 48px;
    height: 48px;
    font-size: 1rem;
  }
  
  /* Ensure container doesn't overflow */
  .tool-merge .container,
  .tool-processor .container,
  .tool-page.tool-processor .container {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 1rem;
    overflow-x: hidden;
    box-sizing: border-box;
  }
  
  .processor-layout {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
    padding: 0;
  }
  
  /* Ensure merge-stage doesn't overflow */
  .merge-stage {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
  }

  .compress-result-grid {
    display: flex;
    justify-content: center;
  }

  .compress-panel-centered {
    max-width: 100%;
  }
  
  /* Prevent scrolling in merge-panel on mobile - always fully visible */
  .merge-panel {
    max-height: none !important;
    overflow-y: visible !important;
  }
  
  /* Ensure compress-pdf panel is visible on mobile */
  [data-tool="compress"] .merge-panel {
    display: block !important;
    position: static;
    width: 100%;
    max-width: 100%;
    padding: 1.5rem;
    box-sizing: border-box;
  }
  
  [data-tool="compress"] .merge-stage-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 1rem 0;
  }

  .word-to-pdf-result-grid {
    display: flex;
    justify-content: center;
  }

  .word-to-pdf-panel-centered {
    max-width: 100%;
  }
  
  /* Ensure word-to-pdf panel is visible on mobile */
  [data-tool="word-to-pdf"] .merge-panel {
    display: block !important;
    position: static;
    width: 100%;
    max-width: 100%;
    padding: 1.5rem;
    box-sizing: border-box;
  }
  
  [data-tool="word-to-pdf"] .merge-stage-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 1rem 0;
  }

  .powerpoint-to-pdf-result-grid {
    display: flex;
    justify-content: center;
  }

  .powerpoint-to-pdf-panel-centered {
    max-width: 100%;
  }
  
  /* Ensure powerpoint-to-pdf panel is visible on mobile */
  [data-tool="powerpoint-to-pdf"] .merge-panel {
    display: block !important;
    position: static;
    width: 100%;
    max-width: 100%;
    padding: 1.5rem;
    box-sizing: border-box;
  }
  
  [data-tool="powerpoint-to-pdf"] .merge-stage-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 1rem 0;
  }

  .excel-to-pdf-result-grid {
    display: flex;
    justify-content: center;
  }

  .excel-to-pdf-panel-centered {
    max-width: 100%;
  }
  
  /* Ensure excel-to-pdf panel is visible on mobile */
  [data-tool="excel-to-pdf"] .merge-panel {
    display: block !important;
    position: static;
    width: 100%;
    max-width: 100%;
    padding: 1.5rem;
    box-sizing: border-box;
  }
  
  [data-tool="excel-to-pdf"] .merge-stage-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 1rem 0;
  }

  .html-to-pdf-result-grid {
    display: flex;
    justify-content: center;
  }

  .html-to-pdf-panel-centered {
    max-width: 100%;
  }
  
  /* Ensure html-to-pdf panel is visible on mobile */
  [data-tool="html-to-pdf"] .merge-panel {
    display: block !important;
    position: static;
    width: 100%;
    max-width: 100%;
    padding: 1.5rem;
    box-sizing: border-box;
  }
  
  [data-tool="html-to-pdf"] .merge-stage-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 1rem 0;
  }
  
  /* Hide merge-panel on mobile for pdf-to-jpg */
  [data-tool="pdf-to-jpg"] .merge-panel {
    display: none !important;
  }
  
  [data-tool="pdf-to-jpg"] .merge-stage-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  [data-tool="pdf-to-jpg"] .merge-canvas {
    min-width: 0;
    width: 100%;
    overflow-x: hidden;
  }
  
  /* Ensure pdf-to-jpg merge-stage has padding bottom for mobile button */
  [data-tool="pdf-to-jpg"] .merge-stage {
    padding-bottom: 5rem;
  }

  .pdf-to-jpg-images-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
  }

  .pdf-to-word-result-grid {
    display: flex;
    justify-content: center;
  }

  .pdf-to-word-panel-centered {
    max-width: 100%;
  }
  
  /* Ensure pdf-to-word panel is visible on mobile */
  [data-tool="pdf-to-word"] .merge-panel {
    display: block !important;
    position: static;
    width: 100%;
    max-width: 100%;
    padding: 1.5rem;
    box-sizing: border-box;
  }
  
  [data-tool="pdf-to-word"] .merge-stage-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 1rem 0;
  }

  .pdf-to-powerpoint-result-grid {
    display: flex;
    justify-content: center;
  }

  .pdf-to-powerpoint-panel-centered {
    max-width: 100%;
  }
  
  /* Ensure pdf-to-powerpoint panel is visible on mobile */
  [data-tool="pdf-to-powerpoint"] .merge-panel {
    display: block !important;
    position: static;
    width: 100%;
    max-width: 100%;
    padding: 1.5rem;
    box-sizing: border-box;
  }
  
  [data-tool="pdf-to-powerpoint"] .merge-stage-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 1rem 0;
  }

  .pdf-to-excel-result-grid {
    display: flex;
    justify-content: center;
  }

  .pdf-to-excel-panel-centered {
    max-width: 100%;
  }
  
  /* Ensure pdf-to-excel panel is visible on mobile */
  [data-tool="pdf-to-excel"] .merge-panel {
    display: block !important;
    position: static;
    width: 100%;
    max-width: 100%;
    padding: 1.5rem;
    box-sizing: border-box;
  }
  
  [data-tool="pdf-to-excel"] .merge-stage-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 1rem 0;
  }

  .pdf-to-pdfa-result-grid {
    display: flex;
    justify-content: center;
  }

  .pdf-to-pdfa-panel-centered {
    max-width: 100%;
  }
  
  /* Ensure pdf-to-pdfa panel is visible on mobile */
  [data-tool="pdf-to-pdfa"] .merge-panel {
    display: block !important;
    position: static;
    width: 100%;
    max-width: 100%;
    padding: 1.5rem;
    box-sizing: border-box;
  }
  
  [data-tool="pdf-to-pdfa"] .merge-stage-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 1rem 0;
  }

  .add-page-numbers-result-grid {
    display: flex;
    justify-content: center;
  }

  .add-page-numbers-panel-centered {
    max-width: 100%;
  }

  .crop-pdf-result-grid {
    display: flex;
    justify-content: center;
  }

  .crop-pdf-panel-centered {
    max-width: 100%;
  }


  .page-numbers-options {
    padding: 1rem;
  }
  
  /* Add Page Numbers - Horizontal scrollable pages list on mobile */
  [data-tool="add-page-numbers"] .page-numbers-pages-list {
    display: flex !important;
    flex-direction: row !important;
    gap: 0.75rem;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0.5rem 1rem;
    max-height: none;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.3) transparent;
    position: relative;
    -webkit-overflow-scrolling: touch;
  }
  
  [data-tool="add-page-numbers"] .page-numbers-pages-list::-webkit-scrollbar {
    height: 6px;
  }
  
  [data-tool="add-page-numbers"] .page-numbers-pages-list::-webkit-scrollbar-track {
    background: transparent;
  }
  
  [data-tool="add-page-numbers"] .page-numbers-pages-list::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.3);
    border-radius: 3px;
  }
  
  [data-tool="add-page-numbers"] .page-numbers-pages-list::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.5);
  }
  
  /* Scroll fade indicators */
  [data-tool="add-page-numbers"] .page-numbers-pages-list::before,
  [data-tool="add-page-numbers"] .page-numbers-pages-list::after {
    content: "";
    position: sticky;
    top: 0;
    width: 40px;
    height: 100%;
    pointer-events: none;
    z-index: 10;
    transition: opacity 0.3s ease;
  }
  
  [data-tool="add-page-numbers"] .page-numbers-pages-list::before {
    left: 0;
    background: linear-gradient(to right, rgba(255, 255, 255, 0.95), transparent);
    opacity: 0;
  }
  
  [data-tool="add-page-numbers"] .page-numbers-pages-list::after {
    right: 0;
    background: linear-gradient(to left, rgba(255, 255, 255, 0.95), transparent);
    opacity: 1;
  }
  
  [data-tool="add-page-numbers"] .page-numbers-pages-list.has-left-fade::before {
    opacity: 1;
  }
  
  [data-tool="add-page-numbers"] .page-numbers-pages-list.has-right-fade::after {
    opacity: 1;
  }
  
  [data-tool="add-page-numbers"] .page-numbers-page-item {
    flex: 0 0 calc(33.333% - 0.5rem);
    min-width: calc(33.333% - 0.5rem);
    max-width: calc(33.333% - 0.5rem);
    min-height: 160px;
    padding: 0.5rem;
    border-radius: 10px;
    box-sizing: border-box;
  }
  
  [data-tool="add-page-numbers"] .page-numbers-page-thumbnail {
    max-width: 100% !important;
    width: 100% !important;
    height: auto;
    border-radius: 6px;
  }
  
  /* Wrapper for pages list on mobile - override inline styles */
  [data-tool="add-page-numbers"] .page-numbers-pages-list {
    margin: 0 -1rem;
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  /* Override inline styles from HTML */
  [data-tool="add-page-numbers"] .page-numbers-pages-list[style] {
    display: flex !important;
    flex-direction: row !important;
    max-height: none !important;
    overflow-y: hidden !important;
    overflow-x: auto !important;
    padding-right: 1rem !important;
  }
  
  /* Wrapper div styling */
  [data-tool="add-page-numbers"] .merge-stage-grid > div:first-child {
    width: 100%;
    overflow: visible;
  }
  
  [data-tool="add-page-numbers"] .merge-stage-grid {
    grid-template-columns: 1fr !important;
    gap: 1.5rem;
  }
  
  [data-tool="add-page-numbers"] .merge-canvas {
    order: 2;
    min-width: 0;
    width: 100%;
  }
  
  [data-tool="add-page-numbers"] .merge-panel {
    order: 3;
    display: block !important;
    position: static;
    width: 100%;
    max-width: 100%;
    padding: 1.5rem;
    box-sizing: border-box;
  }
  
  [data-tool="add-page-numbers"] .page-numbers-pages-list {
    order: 1;
    width: 100%;
    margin-bottom: 0;
  }
  
  /* Add Watermark - Horizontal scrollable pages list on mobile */
  [data-tool="add-watermark"] .watermark-pages-list {
    display: flex !important;
    flex-direction: row !important;
    gap: 0.75rem;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0.5rem 1rem;
    max-height: none;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.3) transparent;
    position: relative;
    -webkit-overflow-scrolling: touch;
  }
  
  [data-tool="add-watermark"] .watermark-pages-list::-webkit-scrollbar {
    height: 6px;
  }
  
  [data-tool="add-watermark"] .watermark-pages-list::-webkit-scrollbar-track {
    background: transparent;
  }
  
  [data-tool="add-watermark"] .watermark-pages-list::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.3);
    border-radius: 3px;
  }
  
  [data-tool="add-watermark"] .watermark-pages-list::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.5);
  }
  
  /* Scroll fade indicators */
  [data-tool="add-watermark"] .watermark-pages-list::before,
  [data-tool="add-watermark"] .watermark-pages-list::after {
    content: "";
    position: sticky;
    top: 0;
    width: 40px;
    height: 100%;
    pointer-events: none;
    z-index: 10;
    transition: opacity 0.3s ease;
  }
  
  [data-tool="add-watermark"] .watermark-pages-list::before {
    left: 0;
    background: linear-gradient(to right, rgba(255, 255, 255, 0.95), transparent);
    opacity: 0;
  }
  
  [data-tool="add-watermark"] .watermark-pages-list::after {
    right: 0;
    background: linear-gradient(to left, rgba(255, 255, 255, 0.95), transparent);
    opacity: 1;
  }
  
  [data-tool="add-watermark"] .watermark-pages-list.has-left-fade::before {
    opacity: 1;
  }
  
  [data-tool="add-watermark"] .watermark-pages-list.has-right-fade::after {
    opacity: 1;
  }
  
  [data-tool="add-watermark"] .watermark-page-item {
    flex: 0 0 calc(33.333% - 0.5rem);
    min-width: calc(33.333% - 0.5rem);
    max-width: calc(33.333% - 0.5rem);
    min-height: 160px;
    padding: 0.5rem;
    border-radius: 10px;
    box-sizing: border-box;
  }
  
  [data-tool="add-watermark"] .watermark-page-thumbnail {
    max-width: 100% !important;
    width: 100% !important;
    height: auto;
    border-radius: 6px;
  }
  
  [data-tool="add-watermark"] .merge-stage-grid {
    grid-template-columns: 1fr !important;
    gap: 1.5rem;
  }
  
  [data-tool="add-watermark"] .merge-canvas {
    order: 2;
    min-width: 0;
    width: 100%;
  }
  
  [data-tool="add-watermark"] .merge-panel {
    order: 3;
    display: block !important;
    position: static;
    width: 100%;
    max-width: 100%;
    padding: 1.5rem;
    box-sizing: border-box;
  }
  
  /* Wrapper for pages list on mobile - override inline styles */
  [data-tool="add-watermark"] .watermark-pages-list {
    margin: 0 -1rem;
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  /* Override inline styles from HTML */
  [data-tool="add-watermark"] .watermark-pages-list[style] {
    display: flex !important;
    flex-direction: row !important;
    max-height: none !important;
    overflow-y: hidden !important;
    overflow-x: auto !important;
    padding-right: 1rem !important;
  }
  
  /* Wrapper div styling */
  [data-tool="add-watermark"] .merge-stage-grid > div:first-child {
    width: 100%;
    overflow: visible;
  }
  
  [data-tool="add-watermark"] .watermark-pages-list {
    order: 1;
    width: 100%;
    margin-bottom: 0;
  }
  
  /* Crop PDF - Horizontal scrollable pages list on mobile */
  [data-tool="crop-pdf"] .crop-pdf-pages-list {
    display: flex !important;
    flex-direction: row !important;
    gap: 0.75rem;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0.5rem 1rem;
    max-height: none;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.3) transparent;
    position: relative;
    -webkit-overflow-scrolling: touch;
  }
  
  [data-tool="crop-pdf"] .crop-pdf-pages-list::-webkit-scrollbar {
    height: 6px;
  }
  
  [data-tool="crop-pdf"] .crop-pdf-pages-list::-webkit-scrollbar-track {
    background: transparent;
  }
  
  [data-tool="crop-pdf"] .crop-pdf-pages-list::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.3);
    border-radius: 3px;
  }
  
  [data-tool="crop-pdf"] .crop-pdf-pages-list::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.5);
  }
  
  /* Scroll fade indicators */
  [data-tool="crop-pdf"] .crop-pdf-pages-list::before,
  [data-tool="crop-pdf"] .crop-pdf-pages-list::after {
    content: "";
    position: sticky;
    top: 0;
    width: 40px;
    height: 100%;
    pointer-events: none;
    z-index: 10;
    transition: opacity 0.3s ease;
  }
  
  [data-tool="crop-pdf"] .crop-pdf-pages-list::before {
    left: 0;
    background: linear-gradient(to right, rgba(255, 255, 255, 0.95), transparent);
    opacity: 0;
  }
  
  [data-tool="crop-pdf"] .crop-pdf-pages-list::after {
    right: 0;
    background: linear-gradient(to left, rgba(255, 255, 255, 0.95), transparent);
    opacity: 1;
  }
  
  [data-tool="crop-pdf"] .crop-pdf-pages-list.has-left-fade::before {
    opacity: 1;
  }
  
  [data-tool="crop-pdf"] .crop-pdf-pages-list.has-right-fade::after {
    opacity: 1;
  }
  
  [data-tool="crop-pdf"] .crop-pdf-page-item {
    flex: 0 0 calc(33.333% - 0.5rem);
    min-width: calc(33.333% - 0.5rem);
    max-width: calc(33.333% - 0.5rem);
    min-height: 160px;
    padding: 0.5rem;
    border-radius: 10px;
    box-sizing: border-box;
  }
  
  [data-tool="crop-pdf"] .crop-pdf-page-thumbnail {
    max-width: 100% !important;
    width: 100% !important;
    height: auto;
    border-radius: 6px;
  }
  
  [data-tool="crop-pdf"] .merge-stage-grid {
    grid-template-columns: 1fr !important;
    gap: 1.5rem;
  }
  
  [data-tool="crop-pdf"] .merge-canvas {
    order: 2;
    min-width: 0;
    width: 100%;
  }
  
  [data-tool="crop-pdf"] .merge-panel {
    order: 3;
    display: block !important;
    position: static;
    width: 100%;
    max-width: 100%;
    padding: 1.5rem;
    box-sizing: border-box;
  }
  
  /* Wrapper for pages list on mobile - override inline styles */
  [data-tool="crop-pdf"] .crop-pdf-pages-list {
    margin: 0 -1rem;
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  /* Override inline styles from HTML */
  [data-tool="crop-pdf"] .crop-pdf-pages-list[style] {
    display: flex !important;
    flex-direction: row !important;
    max-height: none !important;
    overflow-y: hidden !important;
    overflow-x: auto !important;
    padding-right: 1rem !important;
  }
  
  /* Wrapper div styling */
  [data-tool="crop-pdf"] .merge-stage-grid > div:first-child {
    width: 100%;
    overflow: visible;
  }
  
  [data-tool="crop-pdf"] .crop-pdf-pages-list {
    order: 1;
    width: 100%;
    margin-bottom: 0;
  }
  
  /* Make crop canvas touch-friendly on mobile */
  [data-tool="crop-pdf"] .crop-pdf-preview-container {
    touch-action: none; /* Prevent default touch behaviors like scrolling */
    -webkit-touch-callout: none; /* Prevent iOS callout menu */
    user-select: none; /* Prevent text selection */
  }
  
  [data-tool="crop-pdf"] canvas[data-crop-pdf="preview-canvas"] {
    touch-action: none;
    -webkit-touch-callout: none;
    user-select: none;
  }


  .crop-pdf-options {
    padding: 1rem;
  }

  .crop-pdf-inputs-row {
    grid-template-columns: 1fr;
  }


  .watermark-options {
    padding: 1rem;
  }

  .unlock-pdf-result-grid {
    display: flex;
    justify-content: center;
  }

  .unlock-pdf-panel-centered {
    max-width: 100%;
  }
  
  /* Ensure unlock-pdf panel is visible on mobile */
  [data-tool="unlock-pdf"] .merge-panel {
    display: block !important;
    position: static;
    width: 100%;
    max-width: 100%;
    padding: 1.5rem;
    box-sizing: border-box;
  }
  
  [data-tool="unlock-pdf"] .merge-stage {
    display: block !important;
    width: 100%;
  }
  
  [data-tool="unlock-pdf"] .unlock-pdf-result-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 1rem 0;
    width: 100%;
  }

  .protect-pdf-result-grid {
    display: flex;
    justify-content: center;
  }

  .protect-pdf-panel-centered {
    max-width: 100%;
  }

  .protect-pdf-options {
    padding: 1rem;
  }
  
  /* Ensure protect-pdf panel is visible on mobile */
  [data-tool="protect-pdf"] .merge-panel {
    display: block !important;
    position: static;
    width: 100%;
    max-width: 100%;
    padding: 1.5rem;
    box-sizing: border-box;
  }
  
  [data-tool="protect-pdf"] .merge-stage {
    display: block !important;
    width: 100%;
  }
  
  [data-tool="protect-pdf"] .protect-pdf-result-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 1rem 0;
    width: 100%;
  }

  .sign-pdf-result-grid {
    display: flex;
    justify-content: center;
  }

  .sign-pdf-panel-centered {
    max-width: 100%;
  }
  
  /* Ensure sign-pdf panel is visible on mobile when shown (after upload) */
  [data-tool="sign-pdf"] .merge-stage:not([hidden]) .merge-panel {
    display: block !important;
    position: static;
    width: 100%;
    max-width: 100%;
    padding: 1.5rem;
    box-sizing: border-box;
  }
  
  [data-tool="sign-pdf"] .merge-stage:not([hidden]) {
    display: block !important;
    width: 100%;
  }
  
  [data-tool="sign-pdf"] .merge-stage:not([hidden]) .sign-pdf-result-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 1rem 0;
    width: 100%;
  }
  
  /* Make signature canvas responsive on mobile */
  [data-tool="sign-pdf"] .sign-pdf-canvas {
    max-width: 100%;
    height: auto;
  }

  .sign-pdf-options {
    padding: 1rem;
  }
  
  /* Ensure redact-pdf panel is visible on mobile */
  [data-tool="redact-pdf"] .merge-panel {
    display: block !important;
    position: static;
    width: 100%;
    max-width: 100%;
    padding: 1.5rem;
    box-sizing: border-box;
  }
  
  [data-tool="redact-pdf"] .merge-stage {
    display: block !important;
    width: 100%;
  }
  
  [data-tool="redact-pdf"] .merge-stage-grid.redact-pdf-result-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 1rem 0;
    width: 100%;
    grid-template-columns: 1fr !important;
  }

  .sign-pdf-canvas {
    max-width: 100%;
  }

  .redact-pdf-result-grid {
    display: flex;
    justify-content: center;
  }

  .redact-pdf-panel-centered {
    max-width: 100%;
  }

  .redact-pdf-options {
    padding: 1rem;
  }

  .redact-pdf-area-inputs {
    grid-template-columns: 1fr;
  }

  .compare-pdf-result-grid {
    display: flex;
    justify-content: center;
  }

  .compare-pdf-panel-centered {
    max-width: 100%;
  }

  .compare-pdf-uploads {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  
  .compare-pdf-dropzone {
    min-height: 56px;
    padding: 0.75rem 1rem;
    font-size: 0.8125rem;
  }
  
  .compare-pdf-dropzone .dropzone-label {
    font-size: 0.8125rem;
    color: #fff;
  }

  .compare-pdf-side-by-side {
    grid-template-columns: 1fr;
  }

  .compare-pdf-iframe {
    height: 400px;
  }

  .ocr-pdf-result-grid {
    display: flex;
    justify-content: center;
  }

  .ocr-pdf-panel-centered {
    max-width: 100%;
  }

  .ocr-pdf-options {
    padding: 1rem;
  }

  .ocr-pdf-text-output {
    padding: 1rem;
  }
  
  /* Ensure ocr-pdf panel is visible on mobile */
  [data-tool="ocr-pdf"] .merge-panel {
    display: block !important;
    position: static;
    width: 100%;
    max-width: 100%;
    padding: 1.5rem;
    box-sizing: border-box;
  }
  
  [data-tool="ocr-pdf"] .merge-stage-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 1rem 0;
  }

  .ocr-pdf-text-content {
    max-height: 300px;
  }

  .repair-pdf-result-grid {
    display: flex;
    justify-content: center;
  }

  .repair-pdf-panel-centered {
    max-width: 100%;
  }

  .repair-pdf-results {
    padding: 0.75rem;
  }
  
  /* Ensure repair-pdf panel is visible on mobile */
  [data-tool="repair-pdf"] .merge-panel {
    display: block !important;
    position: static;
    width: 100%;
    max-width: 100%;
    padding: 1.5rem;
    box-sizing: border-box;
  }
  
  [data-tool="repair-pdf"] .merge-stage-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 1rem 0;
  }
}

.editor-card {
  display: grid;
  gap: 1.25rem;
}

.editor-workspace {
  display: flex;
  align-items: flex-start;
  gap: 3rem;
  width: min(1600px, 98vw);
  margin-left: 0;
  margin-right: auto;
}

.editor-sidebar {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  min-height: 720px;
}

.editor-sidebar-title {
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
}

.editor-thumbnails {
  display: grid;
  gap: 1rem;
  overflow-y: auto;
  max-height: calc(82vh - 4rem);
  padding-right: 0.4rem;
}

.editor-thumbnail {
  position: relative;
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  background: #fff;
  box-shadow: 0 6px 18px -16px rgba(15, 23, 42, 0.5);
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.editor-thumbnail canvas {
  display: block;
  width: 100%;
  border-radius: inherit;
}

.editor-thumbnail.active {
  border-color: var(--accent);
  box-shadow: 0 10px 24px -18px rgba(220, 38, 38, 0.6);
}

.editor-shell {
  flex: 1 1 auto;
  display: grid;
  gap: 1.75rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 1.75rem;
  min-height: 760px;
  max-width: 1200px;
}

.editor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
}

.editor-header-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.editor-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: flex-end;
}

.editor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.editor-topbar {
  display: grid;
  gap: 0.75rem;
}

.editor-mode-switch {
  display: inline-flex;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
  width: fit-content;
}

.editor-mode {
  border: none;
  background: transparent;
  font-weight: 600;
  padding: 0.55rem 1.4rem;
  cursor: pointer;
  color: var(--text-muted);
  transition: background 160ms ease, color 160ms ease;
}

.editor-mode.active {
  background: var(--accent);
  color: #fff;
}

.editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  background: var(--bg-alt);
}

.editor-tool {
  display: inline-flex;
  gap: 0.35rem;
  align-items: center;
  border: 1px solid rgba(17, 24, 39, 0.12);
  background: #fff;
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
  font-size: 0.95rem;
}

.editor-tool[disabled] {
  opacity: 0.5;
  pointer-events: none;
}

.editor-tool.active {
  background: rgba(220, 38, 38, 0.12);
  border-color: rgba(220, 38, 38, 0.4);
  color: var(--accent);
}

.editor-tool-group {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--text-muted);
}

.editor-tool-group select {
  padding: 0.45rem 0.7rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-weight: 600;
}

.editor-tool-group input[type="color"] {
  width: 42px;
  height: 32px;
  border: none;
  border-radius: 6px;
  padding: 0;
  background: transparent;
}

.editor-canvas {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #fff;
  padding: 1.5rem;
  overflow: auto;
  min-height: 640px;
}

.editor-pages {
  display: grid;
  gap: 1.5rem;
  justify-items: center;
  width: 100%;
}

.editor-page {
  position: relative;
  background: #fff;
  box-shadow: 0 14px 30px -24px rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(15, 23, 42, 0.08);
  width: min(920px, 100%);
}

.editor-page canvas {
  display: block;
  width: 100%;
  height: auto;
}

.editor-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.editor-annotation {
  position: absolute;
  min-width: 120px;
  min-height: 36px;
  padding: 0.35rem 0.45rem;
  background: rgba(255, 255, 255, 0.85);
  border: 1px dashed rgba(17, 24, 39, 0.35);
  border-radius: 6px;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 18px;
  color: var(--text);
  pointer-events: all;
  cursor: move;
  user-select: text;
  white-space: pre-wrap;
  line-height: 1.35;
}

.editor-annotation:focus {
  outline: none;
}

.editor-annotation.is-selected {
  border-style: solid;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.25);
}

.editor-annotation.is-editing {
  cursor: text;
}

.editor-text-run {
  position: absolute;
  pointer-events: auto;
  cursor: text;
  color: #0f172a;
  white-space: pre;
  line-height: 1.05;
  user-select: text;
  display: inline-block;
  overflow: visible;
}

.editor-text-run.is-selected {
  outline: 2px solid rgba(220, 38, 38, 0.35);
  outline-offset: 2px;
}

.editor-text-run.removed {
  opacity: 0.3;
  text-decoration: line-through;
}

.editor-overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid transparent;
  pointer-events: none;
}

.editor-drawing-layer {
  pointer-events: none;
}

@media (max-width: 900px) {
  .editor-workspace {
    grid-template-columns: 1fr;
  }

  .editor-sidebar {
    display: none;
  }

  .editor-canvas {
    max-height: none;
  }
}

@media (max-width: 700px) {
  .processor-preview iframe {
    height: 360px;
  }

  .processor-result-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

.not-found {
  padding: 6rem 0;
  text-align: center;
}

.global-footer {
  background: #0f172a;
  color: rgba(226, 232, 240, 0.85);
  padding: 3rem 0;
  margin-top: 3rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}

.global-footer a {
  color: rgba(226, 232, 240, 0.85);
  font-size: 0.95rem;
}

.footer-meta {
  font-size: 0.85rem;
  color: rgba(148, 163, 184, 0.8);
}

.simple-footer {
  background: hsla(0, 0%, 100%, 0.85);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(148, 163, 184, 0.15);
  padding: 0.75rem 1.5rem;
  font-size: 0.75rem;
  color: var(--text);
  margin-top: auto;
}

.simple-footer-content {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.simple-footer-brand {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text);
}

.simple-footer-brand .logo-accent {
  color: var(--accent);
}

.simple-footer-description {
  flex: 1;
  color: var(--text-muted);
  text-align: center;
}

.simple-footer-copyright {
  color: var(--text-muted);
  white-space: nowrap;
}

/* Footer Language Selector Styles */
.footer-language-selector {
  margin-top: 0.5rem;
}

.footer-language-select {
  width: 100%;
  max-width: 220px;
  padding: 0.65rem 2.5rem 0.65rem 1rem;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 8px;
  color: #1a1f36;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%231a1f36' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 16px;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.footer-language-select:hover {
  border-color: rgba(220, 38, 38, 0.4);
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.1);
  background-color: #fff;
}

.footer-language-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
  background-color: #fff;
}

.footer-language-select option {
  padding: 0.5rem;
  background: #fff;
  color: #1a1f36;
}

.footer-social-title {
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: rgba(226, 232, 240, 0.95);
}

.footer-social-links {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.footer-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(226, 232, 240, 0.85);
  transition: all 0.2s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-social-link:hover {
  background: rgba(220, 38, 38, 0.2);
  color: #fff;
  border-color: rgba(220, 38, 38, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.2);
}

.footer-social-link svg {
  width: 18px;
  height: 18px;
}

/* Simple Footer Language Selector */
.simple-footer-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: flex-start;
}

.simple-footer-language {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.simple-footer-language-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.simple-footer-language-select {
  padding: 0.6rem 2.25rem 0.6rem 0.875rem;
  background: #fff;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 8px;
  color: #1a1f36;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%231a1f36' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.625rem center;
  background-size: 14px;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  min-width: 180px;
}

.simple-footer-language-select:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.1);
}

.simple-footer-language-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.simple-footer-social {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.simple-footer-social-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.simple-footer-social-links {
  display: flex;
  gap: 0.625rem;
  flex-wrap: wrap;
}

.simple-footer-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: rgba(220, 38, 38, 0.08);
  color: var(--text);
  transition: all 0.2s ease;
  border: 1px solid rgba(220, 38, 38, 0.15);
}

.simple-footer-social-link:hover {
  background: rgba(220, 38, 38, 0.15);
  color: var(--accent);
  border-color: rgba(220, 38, 38, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(220, 38, 38, 0.15);
}

.simple-footer-social-link svg {
  width: 16px;
  height: 16px;
}

@media (max-width: 768px) {
  .simple-footer {
    padding: 0.75rem 1rem;
    font-size: 0.7rem;
  }
  
  .simple-footer-content {
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
  }
  
  .simple-footer-description {
    order: 3;
    font-size: 0.65rem;
  }
  
  .simple-footer-actions {
    width: 100%;
    align-items: center;
  }
  
  .simple-footer-language,
  .simple-footer-social {
    width: 100%;
    align-items: center;
  }
  
  .simple-footer-language-select {
    width: 100%;
    max-width: 250px;
  }
  
  .footer-language-select {
    max-width: 100%;
  }
  
  .footer-social-links {
    justify-content: center;
  }
}

/* Mobile hamburger menu button */
.mobile-menu-trigger {
  display: none;
  background: none;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  z-index: 1001;
}

.hamburger-icon {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 24px;
  height: 18px;
  position: relative;
}

.hamburger-icon span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--text);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.mobile-menu-trigger[aria-expanded="true"] .hamburger-icon span:nth-child(1) {
  transform: rotate(45deg) translate(7px, 7px);
}

.mobile-menu-trigger[aria-expanded="true"] .hamburger-icon span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-trigger[aria-expanded="true"] .hamburger-icon span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

/* Mobile menu overlay */
.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-menu-overlay[aria-hidden="false"] {
  opacity: 1;
  visibility: visible;
}

.mobile-menu-content {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  max-width: 100%;
  height: 100vh;
  background: var(--bg-alt);
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  padding: 5rem 1.5rem 2rem;
  box-sizing: border-box;
}

.mobile-menu-overlay[aria-hidden="false"] .mobile-menu-content {
  transform: translateX(0);
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 0;
}

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

.mobile-nav-item > a,
.mobile-nav-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  color: var(--text);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
}

.mobile-nav-trigger {
  padding: 1rem 0;
}

.mobile-nav-item > a:hover,
.mobile-nav-trigger:hover {
  color: var(--accent);
}

.mobile-nav-dropdown .chevron {
  transition: transform 0.3s ease;
}

.mobile-nav-dropdown.open .chevron {
  transform: rotate(180deg);
}

.mobile-nav-submenu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  padding-left: 1rem;
}

.mobile-nav-dropdown.open .mobile-nav-submenu {
  max-height: 2000px;
}

.mobile-nav-submenu a {
  display: block;
  padding: 0.75rem 0;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
}

.mobile-nav-submenu a:hover {
  color: var(--accent);
}

.mobile-nav-subtitle {
  margin: 1rem 0 0.5rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.mobile-menu-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.mobile-menu-actions .button {
  width: 100%;
  justify-content: center;
}

@media (max-width: 900px) {
  html {
    overflow-x: hidden;
    max-width: 100vw;
  }
  
  body {
    overflow-x: hidden;
  }
  
  .global-header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 1000 !important;
    margin: 0 !important;
  }
  
  /* Add padding to main content to account for fixed header */
  main,
  .tool-page {
    padding-top: 70px;
  }
  
  .mobile-menu-trigger {
    display: flex;
  }

  .primary-nav {
    display: none;
  }

  .nav-actions {
    display: flex;
    gap: 0.5rem;
  }

  .nav-actions .button {
    display: none;
  }

  .global-header .container {
    justify-content: space-between;
    position: relative;
  }
  
  .brand {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    flex: 0 0 auto;
    z-index: 1;
  }
  
  .mobile-menu-trigger {
    order: -1;
    position: relative;
    z-index: 1001;
  }
  
  .nav-actions {
    order: 1;
  }

  .hero {
    padding-top: 4.5rem;
  }

  .hero-meta {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  }

  .cta-actions {
    justify-content: flex-start;
  }

  /* Language dropdown on mobile - inline instead of absolute */
  .app-menu-language-section {
    position: relative;
  }

  .app-menu-language-section::before {
    display: none;
  }

  /* Disable hover on mobile */
  .app-menu-language-section:hover .app-menu-language-dropdown {
    display: none !important;
  }

  .app-menu-language-dropdown {
    position: static;
    right: auto;
    top: auto;
    transform: none;
    display: none;
    margin-top: 0.5rem;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    box-shadow: none;
    border: none;
    border-radius: 0;
    background: transparent;
  }

  .app-menu-language-section.open .app-menu-language-dropdown {
    display: block !important;
    padding: 0.5rem 0;
    max-height: 500px;
  }

  .app-menu-language-trigger .chevron-right {
    transition: transform 0.3s ease;
  }

  .app-menu-language-section.open .app-menu-language-trigger .chevron-right {
    transform: rotate(90deg);
  }

  .app-menu-language-item {
    padding: 0.75rem 1rem;
    margin: 0.25rem 0;
    background: rgba(220, 38, 38, 0.05);
    border-radius: 8px;
  }
}

@media (max-width: 1200px) {
  .tool-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Tablet breakpoint - 2 columns for smaller tablets */
@media (max-width: 768px) {
  .merge-files-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.875rem;
  }
  
  .merge-file-card {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: auto;
    min-height: 220px;
    aspect-ratio: 198 / 244;
  }
  
  .merge-thumb {
    width: 100%;
    max-width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
  }
  
  .merge-file-name {
    max-width: 100%;
    font-size: 0.8rem;
  }
}

@media (max-width: 600px) {
  .container {
    width: 100%;
    max-width: 100%;
    padding: 0 1rem;
    box-sizing: border-box;
    overflow-x: hidden;
  }
  
  /* Mobile responsive merge-files-grid - 2 columns */
  .merge-files-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    justify-items: center;
    max-width: 100%;
    width: 100%;
    padding: 0;
    overflow-x: hidden;
  }
  
  .merge-file-card {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: auto;
    min-height: 200px;
    aspect-ratio: 198 / 244;
    padding: 0.5rem;
  }
  
  .merge-thumb {
    width: 100%;
    max-width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
  }
  
  .merge-file-name {
    max-width: 100%;
    font-size: 0.75rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-meta {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .tool-filters {
    gap: 0.5rem;
    margin: 1.5rem 0 2rem;
  }

  .tool-filter {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
  }
}

@media (max-width: 900px) {
  .tool-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 640px) {
  .tool-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  /* Very small mobile - 2 columns with smaller cards */
  .merge-files-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
    justify-items: center;
    max-width: 100%;
    width: 100%;
    padding: 0;
    overflow-x: hidden;
  }
  
  .merge-file-card {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: auto;
    min-height: 160px;
    aspect-ratio: 198 / 244;
    padding: 0.5rem;
  }
  
  .merge-thumb {
    width: 100%;
    max-width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
  }
  
  .merge-file-name {
    max-width: 100%;
    font-size: 0.7rem;
  }

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

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

  .resource-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .tool-hero-layout {
    grid-template-columns: 1fr;
  }

  .tool-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .auth-card {
    padding: 2rem 1.5rem;
  }
}

/* Legal Pages - Professional Design */
.legal-page {
  padding: 2rem 0 4rem;
  background: linear-gradient(180deg, var(--bg-main) 0%, var(--bg-alt) 100%);
  min-height: 100vh;
}

.legal-content {
  max-width: 1100px;
  margin: 0 auto;
  background: #fff;
  padding: 0;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

/* Header Section */
.legal-content h1 {
  font-size: clamp(2rem, 5vw, 2.75rem);
  margin: 0;
  padding: 2rem 3rem 0;
  color: var(--text-dark);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.legal-date {
  color: var(--text-light);
  font-size: 0.9rem;
  padding: 0.5rem 3rem 1.5rem;
  margin: 0;
  border-bottom: 2px solid #f0f0f0;
  display: block;
}

/* Section Styling */
.legal-content section {
  padding: 1.75rem 3rem;
  border-bottom: 1px solid #f5f5f5;
  position: relative;
}

.legal-content section:last-of-type {
  border-bottom: none;
  padding-bottom: 2rem;
}

.legal-content section:hover {
  background: linear-gradient(90deg, transparent 0%, rgba(239, 68, 68, 0.02) 100%);
}

.legal-content h2 {
  font-size: 1.5rem;
  margin-bottom: 0.875rem;
  color: var(--text-dark);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-left: 1.5rem;
  position: relative;
}

.legal-content h2::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 70%;
  background: var(--primary);
  border-radius: 4px;
}

.legal-content p {
  color: var(--text-medium);
  line-height: 1.65;
  margin-bottom: 0.875rem;
  font-size: 1rem;
}

.legal-content p strong {
  color: var(--text-dark);
  font-weight: 600;
}

/* List Styling with Icons */
.legal-content ul {
  margin: 1rem 0;
  padding: 0;
  list-style: none;
}

.legal-content li {
  margin-bottom: 0.625rem;
  padding-left: 2rem;
  position: relative;
  color: var(--text-medium);
  line-height: 1.6;
  font-size: 1rem;
}

.legal-content li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 0;
  width: 22px;
  height: 22px;
  background: linear-gradient(135deg, var(--primary) 0%, #dc2626 100%);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: bold;
}

/* Note/Warning Boxes */
.legal-content p:has(+ ul),
.legal-content section > p:first-of-type {
  background: linear-gradient(135deg, #fef2f2 0%, #fff 100%);
  padding: 0.875rem 1.25rem;
  border-left: 4px solid var(--primary);
  border-radius: 8px;
  margin: 1rem 0 0.75rem;
  font-weight: 500;
}

/* Links */
.legal-content a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
  padding-bottom: 1px;
}

.legal-content a:hover {
  border-bottom-color: var(--primary);
  color: #dc2626;
}

/* Email Links Special Styling */
.legal-content a[href^="mailto:"] {
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
  padding: 0.5rem 1rem;
  border-radius: 6px;
  border: 1px solid #fecaca;
  display: inline-block;
  margin-top: 0.5rem;
  font-family: 'Courier New', monospace;
}

.legal-content a[href^="mailto:"]:hover {
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  border-color: var(--primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.15);
}

.footer-meta-links {
  margin-top: 1rem;
  font-size: 0.85rem;
  opacity: 0.8;
}

.footer-meta-links a {
  color: inherit;
  text-decoration: none;
  margin-right: 1rem;
  transition: opacity 0.2s;
}

.footer-meta-links a:hover {
  opacity: 0.7;
}

/* FAQ Page */
.faq-page {
  padding: 3rem 0 6rem;
  background: linear-gradient(180deg, var(--bg-main) 0%, var(--bg-alt) 100%);
  min-height: 100vh;
}

.faq-hero {
  text-align: center;
  margin-bottom: 4rem;
}

.faq-hero h1 {
  font-size: clamp(2.5rem, 6vw, 3.5rem);
  margin-bottom: 1rem;
  color: var(--text-dark);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.faq-hero p {
  font-size: 1.25rem;
  color: var(--text-light);
}

.faq-container {
  max-width: 900px;
  margin: 0 auto 4rem;
}

.faq-item {
  background: #fff;
  border-radius: 12px;
  margin-bottom: 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  transition: all 0.3s ease;
}

.faq-item:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 2rem;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-dark);
  transition: all 0.3s ease;
}

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

.faq-question span {
  flex: 1;
  padding-right: 1rem;
}

.faq-icon {
  flex-shrink: 0;
  color: var(--primary);
  transition: transform 0.3s ease;
}

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

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.faq-answer-content {
  padding: 0 2rem 1.5rem;
  color: var(--text-medium);
  line-height: 1.7;
  font-size: 1.05rem;
}

.faq-answer-content p {
  margin: 0;
}

/* FAQ CTA Section */
.faq-cta {
  text-align: center;
  padding: 3rem 2rem;
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.06) 0%, rgba(220, 38, 38, 0.02) 100%);
  border-radius: 16px;
  max-width: 700px;
  margin: 0 auto;
}

.faq-cta h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--text-dark);
}

.faq-cta p {
  font-size: 1.125rem;
  color: var(--text-medium);
  margin-bottom: 2rem;
}

/* FAQ Responsive */
@media (max-width: 768px) {
  .faq-page {
    padding: 2rem 0 4rem;
  }

  .faq-hero {
    margin-bottom: 2.5rem;
  }

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

  .faq-hero p {
    font-size: 1rem;
  }

  .faq-question {
    padding: 1.25rem 1.5rem;
    font-size: 1rem;
  }

  .faq-answer-content {
    padding: 0 1.5rem 1.25rem;
    font-size: 0.95rem;
  }

  .faq-cta {
    padding: 2rem 1.5rem;
  }

  .faq-cta h2 {
    font-size: 1.5rem;
  }

  .faq-cta p {
    font-size: 1rem;
  }
}

/* Responsive Design for Legal Pages */
@media (max-width: 768px) {
  .legal-page {
    padding: 1.5rem 0 3rem;
  }

  .legal-content h1 {
    padding: 1.5rem 1.5rem 0;
    font-size: 1.75rem;
  }

  .legal-date {
    padding: 0.5rem 1.5rem 1.25rem;
  }

  .legal-content section {
    padding: 1.25rem 1.5rem;
  }

  .legal-content section:last-of-type {
    padding-bottom: 1.5rem;
  }

  .legal-content h2 {
    font-size: 1.25rem;
    padding-left: 1.25rem;
    margin-bottom: 0.75rem;
  }

  .legal-content h2::before {
    width: 3px;
  }

  .legal-content p {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 0.75rem;
  }

  .legal-content li {
    font-size: 0.95rem;
    padding-left: 1.75rem;
    margin-bottom: 0.5rem;
    line-height: 1.55;
  }

  .legal-content li::before {
    width: 20px;
    height: 20px;
    font-size: 0.7rem;
  }

  .legal-content ul {
    margin: 0.75rem 0;
  }

  .legal-content p:has(+ ul),
  .legal-content section > p:first-of-type {
    padding: 0.75rem 1rem;
    margin: 0.75rem 0 0.5rem;
  }
}

/* Contact Page */
.contact-page {
  padding: 3rem 0 6rem;
  background: linear-gradient(180deg, var(--bg-main) 0%, var(--bg-alt) 100%);
  min-height: 100vh;
}

.contact-hero {
  text-align: center;
  margin-bottom: 4rem;
}

.contact-hero h1 {
  font-size: clamp(2.5rem, 6vw, 3.5rem);
  margin-bottom: 1rem;
  color: var(--text-dark);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.contact-subtitle {
  font-size: 1.25rem;
  color: var(--text-light);
  max-width: 700px;
  margin: 0 auto;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 3rem;
  max-width: 1400px;
  margin: 0 auto;
}

/* Contact Form */
.contact-form-wrapper {
  background: #fff;
  border-radius: 16px;
  padding: 2.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.contact-form-header {
  margin-bottom: 2rem;
}

.contact-form-header h2 {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
  color: var(--text-dark);
  font-weight: 600;
}

.contact-form-header p {
  color: var(--text-medium);
  font-size: 1rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-dark);
}

.form-group .required {
  color: var(--accent);
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 0.875rem 1rem;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  color: var(--text);
  background: var(--bg-alt);
  transition: all 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.button-large {
  padding: 1rem 2rem;
  font-size: 1.05rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: center;
}

.button-icon {
  width: 20px;
  height: 20px;
}

.form-note {
  font-size: 0.875rem;
  color: var(--text-medium);
  text-align: center;
  margin-top: -0.5rem;
}

/* Contact Info */
.contact-info-wrapper {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.contact-info-header {
  margin-bottom: 1rem;
}

.contact-info-header h2 {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
  color: var(--text-dark);
  font-weight: 600;
}

.contact-info-header p {
  color: var(--text-medium);
  font-size: 1rem;
}

.contact-cards {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.contact-card {
  background: #fff;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
}

.contact-card:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.contact-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.contact-card-icon.email {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
}

.contact-card-icon.clock {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: #fff;
}

.contact-card-icon.calendar {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  color: #fff;
}

.contact-card-icon.help {
  background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
  color: #fff;
}

.contact-card h3 {
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
  color: var(--text-dark);
  font-weight: 600;
}

.contact-card p {
  font-size: 0.95rem;
  color: var(--text-medium);
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.contact-link {
  color: var(--accent);
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease;
  display: inline-block;
}

.contact-link:hover {
  color: var(--accent-dark);
  text-decoration: underline;
}

.contact-highlight {
  color: var(--accent) !important;
  font-weight: 600 !important;
  margin-top: 0.5rem !important;
}

.contact-hours {
  font-weight: 600;
  color: var(--text-dark) !important;
  margin-top: 0.5rem !important;
}

.contact-registered-office {
  margin-top: 1.5rem;
  padding: 1.5rem;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.contact-registered-office h3 {
  font-size: 1.125rem;
  margin: 0 0 0.75rem 0;
  color: var(--text-dark);
  font-weight: 600;
}

.contact-registered-office__address {
  font-style: normal;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-medium);
  margin: 0;
}

.contact-additional {
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.06) 0%, rgba(220, 38, 38, 0.02) 100%);
  border-radius: 12px;
  padding: 1.5rem;
  margin-top: 1rem;
}

.contact-additional h3 {
  font-size: 1.125rem;
  margin-bottom: 0.75rem;
  color: var(--text-dark);
  font-weight: 600;
}

.contact-additional p {
  font-size: 0.95rem;
  color: var(--text-medium);
  line-height: 1.6;
  margin-bottom: 0.5rem;
}

/* Contact Page Responsive */
@media (max-width: 1024px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}

@media (max-width: 768px) {
  .contact-page {
    padding: 2rem 0 4rem;
  }

  .contact-hero {
    margin-bottom: 2.5rem;
  }

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

  .contact-subtitle {
    font-size: 1rem;
  }

  .contact-form-wrapper {
    padding: 1.5rem;
  }

  .contact-form-header h2,
  .contact-info-header h2 {
    font-size: 1.5rem;
  }

  .contact-card {
    padding: 1.25rem;
  }

  .contact-additional {
    padding: 1.25rem;
  }
}

/* Contact Success Modal */
.contact-success-modal {
  display: none !important;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fadeIn 0.3s ease;
  overflow-y: auto;
}

.contact-success-modal.show {
  display: flex !important;
}

.contact-success-box {
  background: #ffffff;
  border-radius: 16px;
  padding: 2.5rem;
  max-width: 500px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: slideUp 0.3s ease;
  border: 2px solid var(--accent);
}

.contact-success-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: scaleIn 0.3s ease 0.1s both;
}

.contact-success-icon svg {
  width: 40px;
  height: 40px;
  color: white;
}

.contact-success-title {
  font-size: 1.75rem;
  font-weight: 600;
  color: #1a1f36;
  margin-bottom: 1rem;
}

.contact-success-message {
  font-size: 1rem;
  color: #4b587c;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.contact-success-button {
  background: var(--accent);
  color: white;
  border: none;
  padding: 0.875rem 2rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 120px;
}

.contact-success-button:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4);
}

.contact-success-button:active {
  transform: translateY(0);
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

@keyframes scaleIn {
  from {
    transform: scale(0);
  }
  to {
    transform: scale(1);
  }
}

/* About Page */
.about-page {
  padding: 3rem 0 6rem;
  background: linear-gradient(180deg, var(--bg-main) 0%, var(--bg-alt) 100%);
  min-height: 100vh;
}

.about-hero {
  text-align: center;
  margin-bottom: 5rem;
  padding: 2rem 0;
}

.about-hero h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  margin-bottom: 1.5rem;
  color: var(--text-dark);
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--accent) 0%, #f5576c 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.about-hero-subtitle {
  font-size: 1.5rem;
  color: var(--text-medium);
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.6;
}

.about-content {
  max-width: 1000px;
  margin: 0 auto;
}

.about-ownership-body {
  line-height: 1.7;
}

.about-section {
  background: #fff;
  border-radius: 20px;
  padding: 3.5rem;
  margin-bottom: 3rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}

.about-section:hover {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
  transform: translateY(-4px);
}

.about-section.highlight {
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.05) 0%, rgba(245, 87, 108, 0.05) 100%);
  border: 2px solid rgba(220, 38, 38, 0.2);
}

.about-section-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 3px solid var(--border);
}

.about-icon {
  width: 72px;
  height: 72px;
  background: linear-gradient(135deg, var(--accent) 0%, #f5576c 100%);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 6px 20px rgba(220, 38, 38, 0.3);
  flex-shrink: 0;
}

.about-section-header h2 {
  font-size: 2.25rem;
  color: var(--text-dark);
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.01em;
}

.about-text {
  font-size: 1.125rem;
  line-height: 1.9;
  color: var(--text-medium);
}

.about-text p {
  margin-bottom: 1.5rem;
}

.about-text p:last-child {
  margin-bottom: 0;
}

/* Features Grid */
.about-features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-top: 2.5rem;
}

.about-feature-item {
  display: flex;
  gap: 1.25rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.04) 0%, rgba(245, 87, 108, 0.04) 100%);
  border-radius: 14px;
  border: 1px solid rgba(220, 38, 38, 0.1);
  transition: all 0.3s ease;
}

.about-feature-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(220, 38, 38, 0.15);
  border-color: rgba(220, 38, 38, 0.3);
}

.feature-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--accent) 0%, #f5576c 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.about-feature-item h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--text-dark);
  font-weight: 700;
}

.about-feature-item p {
  font-size: 1rem;
  color: var(--text-medium);
  line-height: 1.7;
  margin: 0;
}

/* Highlights Grid */
.about-highlights {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

.about-highlight-item {
  padding: 1.75rem;
  background: #fff;
  border-radius: 14px;
  border: 2px solid var(--border);
  transition: all 0.3s ease;
}

.about-highlight-item:hover {
  border-color: var(--accent);
  box-shadow: 0 6px 20px rgba(220, 38, 38, 0.15);
  transform: translateY(-2px);
}

.about-highlight-item strong {
  display: block;
  font-size: 1.125rem;
  color: var(--accent);
  margin-bottom: 0.75rem;
  font-weight: 700;
}

.about-highlight-item p {
  font-size: 1rem;
  color: var(--text-medium);
  line-height: 1.7;
  margin: 0;
}

/* CTA Section */
.about-cta {
  text-align: center;
  padding: 4rem 3rem;
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.08) 0%, rgba(245, 87, 108, 0.08) 100%);
  border-radius: 24px;
  border: 2px solid rgba(220, 38, 38, 0.2);
  margin-top: 3rem;
}

.about-cta h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--text-dark);
  font-weight: 700;
}

.about-cta p {
  font-size: 1.25rem;
  color: var(--text-medium);
  margin-bottom: 2.5rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.about-cta-buttons {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* About Page Responsive */
@media (max-width: 1024px) {
  .about-section {
    padding: 2.5rem;
  }

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

  .about-highlights {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .about-page {
    padding: 2rem 0 4rem;
  }

  .about-hero {
    margin-bottom: 3rem;
    padding: 1rem 0;
  }

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

  .about-hero-subtitle {
    font-size: 1.125rem;
  }

  .about-section {
    padding: 2rem 1.5rem;
    margin-bottom: 2rem;
  }

  .about-section-header {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
    padding-bottom: 1.5rem;
  }

  .about-icon {
    width: 64px;
    height: 64px;
  }

  .about-section-header h2 {
    font-size: 1.75rem;
  }

  .about-text {
    font-size: 1rem;
  }

  .about-feature-item {
    flex-direction: column;
    text-align: center;
    padding: 1.25rem;
  }

  .feature-icon {
    margin: 0 auto;
  }

  .about-cta {
    padding: 2.5rem 1.5rem;
  }

  .about-cta h2 {
    font-size: 1.75rem;
  }

  .about-cta p {
    font-size: 1rem;
  }

  .about-cta-buttons {
    flex-direction: column;
  }

  .about-cta-buttons .button {
    width: 100%;
  }
}

/* Blog Page */
.blog-page {
  padding: 3rem 0 6rem;
  background: linear-gradient(180deg, var(--bg-main) 0%, var(--bg-alt) 100%);
  min-height: 100vh;
}

.blog-hero {
  text-align: center;
  margin-bottom: 4rem;
  padding: 2rem 0;
}

.blog-hero h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  margin-bottom: 1.5rem;
  color: var(--text-dark);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.blog-hero-subtitle {
  font-size: 1.5rem;
  color: var(--text-medium);
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.6;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2.5rem;
  margin-bottom: 4rem;
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
}

.blog-card {
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--border);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12);
  border-color: var(--accent);
}

.blog-card-image {
  height: 200px;
  background: linear-gradient(135deg, var(--bg-main) 0%, var(--bg-alt) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.blog-card-image::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.05) 0%, rgba(245, 87, 108, 0.05) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.blog-card:hover .blog-card-image::before {
  opacity: 1;
}

.blog-icon {
  width: 80px;
  height: 80px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  position: relative;
  z-index: 1;
  transition: all 0.3s ease;
}

.blog-card:hover .blog-icon {
  transform: scale(1.1) rotate(5deg);
}

.blog-icon.merge {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.blog-icon.split {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.blog-icon.compress {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.blog-icon.convert {
  background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.blog-icon.protect {
  background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.blog-icon.edit {
  background: linear-gradient(135deg, #30cfd0 0%, #330867 100%);
}

.blog-icon.remove {
  background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.blog-icon.extract {
  background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
}

.blog-icon.rotate {
  background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
}

.blog-icon.pagenumbers {
  background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
}

.blog-icon.watermark {
  background: linear-gradient(135deg, #ff8a80 0%, #ea4c89 100%);
}

.blog-icon.jpgtopdf {
  background: linear-gradient(135deg, #ff6e7f 0%, #bfe9ff 100%);
}

.blog-icon.wordtopdf {
  background: linear-gradient(135deg, #c471ed 0%, #f64f59 100%);
}

.blog-icon.pdftoword {
  background: linear-gradient(135deg, #12c2e9 0%, #c471ed 100%);
}

.blog-icon.unlock {
  background: linear-gradient(135deg, #fbc2eb 0%, #a6c1ee 100%);
}

.blog-icon.sign {
  background: linear-gradient(135deg, #fad961 0%, #f76b1c 100%);
}

.blog-card-content {
  padding: 2rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.blog-card-meta {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  align-items: center;
}

.blog-category {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
  background: rgba(220, 38, 38, 0.1);
  padding: 0.375rem 0.875rem;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.blog-date {
  font-size: 0.875rem;
  color: var(--text-medium);
}

.blog-card-content h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--text-dark);
  font-weight: 700;
  line-height: 1.3;
  flex: 1;
}

.blog-card-content p {
  font-size: 1rem;
  color: var(--text-medium);
  line-height: 1.7;
  margin-bottom: 1.5rem;
  flex: 1;
}

.blog-card-footer {
  margin-top: auto;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.blog-read-more {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--accent);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.3s ease;
}

.blog-read-more:hover {
  color: var(--accent-dark);
  gap: 0.75rem;
}

.blog-read-more svg {
  transition: transform 0.3s ease;
}

.blog-read-more:hover svg {
  transform: translateX(4px);
}

/* Blog CTA */
.blog-cta {
  text-align: center;
  padding: 4rem 3rem;
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.08) 0%, rgba(245, 87, 108, 0.08) 100%);
  border-radius: 24px;
  border: 2px solid rgba(220, 38, 38, 0.2);
  max-width: 800px;
  margin: 0 auto;
}

.blog-cta h2 {
  font-size: 2.25rem;
  margin-bottom: 1rem;
  color: var(--text-dark);
  font-weight: 700;
}

.blog-cta p {
  font-size: 1.25rem;
  color: var(--text-medium);
  margin-bottom: 2rem;
}

/* Blog Responsive */
@media (max-width: 1024px) {
  .blog-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .blog-page {
    padding: 2rem 0 4rem;
  }

  .blog-hero {
    margin-bottom: 3rem;
    padding: 1rem 0;
  }

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

  .blog-hero-subtitle {
    font-size: 1.125rem;
  }

  .blog-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .blog-card-image {
    height: 160px;
  }

  .blog-icon {
    width: 64px;
    height: 64px;
  }

  .blog-card-content {
    padding: 1.5rem;
  }

  .blog-card-content h2 {
    font-size: 1.25rem;
  }

  .blog-card-content p {
    font-size: 0.95rem;
  }

  .blog-cta {
    padding: 2.5rem 1.5rem;
  }

  .blog-cta h2 {
    font-size: 1.75rem;
  }

  .blog-cta p {
    font-size: 1rem;
  }
}

/* Blog Article Page */
.blog-article-page {
  padding: 3rem 0 6rem;
  background: linear-gradient(180deg, var(--bg-main) 0%, var(--bg-alt) 100%);
  min-height: 100vh;
}

.article-header {
  max-width: 900px;
  margin: 0 auto 4rem;
  text-align: center;
}

.article-breadcrumb {
  font-size: 0.95rem;
  color: var(--text-medium);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.article-breadcrumb a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

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

.breadcrumb-separator {
  color: var(--text-light);
}

/* Tool breadcrumbs */
.tool-breadcrumb {
  margin-bottom: 1.5rem;
  padding-top: 1rem;
}

.breadcrumb-list {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.875rem;
  color: var(--text-medium);
}

.breadcrumb-item {
  display: flex;
  align-items: center;
}

.breadcrumb-item:not(:last-child)::after {
  content: '/';
  margin-left: 0.5rem;
  color: var(--text-light);
}

.breadcrumb-item a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

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

.breadcrumb-item-current span {
  color: var(--text);
  font-weight: 500;
}

.article-meta {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.article-category {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
  background: rgba(220, 38, 38, 0.1);
  padding: 0.375rem 0.875rem;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.article-date,
.article-reading-time {
  font-size: 0.875rem;
  color: var(--text-medium);
}

.article-header h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin-bottom: 1.5rem;
  color: var(--text-dark);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.article-intro {
  font-size: 1.375rem;
  color: var(--text-medium);
  line-height: 1.7;
  max-width: 800px;
  margin: 0 auto;
}

.article-content {
  max-width: 900px;
  margin: 0 auto 4rem;
  background: #fff;
  border-radius: 24px;
  padding: 4rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--border);
}

.article-section {
  margin-bottom: 3.5rem;
}

.article-section:last-child {
  margin-bottom: 0;
}

.article-tool-link {
  margin-top: 1rem;
}
.article-tool-link a {
  font-weight: 600;
  color: var(--accent);
}
.article-tool-link a:hover {
  text-decoration: underline;
}

.article-section h2 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  color: var(--text-dark);
  font-weight: 700;
  line-height: 1.3;
}

.article-section p {
  font-size: 1.125rem;
  line-height: 1.9;
  color: var(--text-medium);
  margin-bottom: 1.5rem;
}

.article-section p:last-child {
  margin-bottom: 0;
}

/* Benefits */
.article-benefits {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-top: 2rem;
}

.benefit-item {
  display: flex;
  gap: 1.25rem;
  padding: 1.75rem;
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.05) 0%, rgba(245, 87, 108, 0.05) 100%);
  border-radius: 16px;
  border: 1px solid rgba(220, 38, 38, 0.1);
  transition: all 0.3s ease;
}

.benefit-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(220, 38, 38, 0.15);
  border-color: rgba(220, 38, 38, 0.3);
}

.benefit-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--accent) 0%, #f5576c 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.benefit-item h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--text-dark);
  font-weight: 700;
}

.benefit-item p {
  font-size: 1rem;
  color: var(--text-medium);
  line-height: 1.7;
  margin: 0;
}

/* Steps */
.article-steps {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-top: 2rem;
}

.step-item {
  display: flex;
  gap: 2rem;
  padding: 2rem;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
  border-radius: 20px;
  border: 1px solid rgba(102, 126, 234, 0.2);
  transition: all 0.3s ease;
}

.step-item:hover {
  transform: translateX(8px);
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.15);
}

.step-number {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.5rem;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.step-content h3 {
  font-size: 1.375rem;
  margin-bottom: 0.75rem;
  color: var(--text-dark);
  font-weight: 700;
}

.step-content p {
  font-size: 1.05rem;
  color: var(--text-medium);
  line-height: 1.8;
  margin: 0;
}

/* Tips */
.article-tips {
  display: grid;
  gap: 1.5rem;
  margin-top: 2rem;
}

.tip-item {
  display: flex;
  gap: 1.25rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(251, 191, 36, 0.1) 100%);
  border-radius: 16px;
  border-left: 4px solid #f59e0b;
}

.tip-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.tip-item p {
  font-size: 1.05rem;
  color: var(--text-medium);
  line-height: 1.8;
  margin: 0;
  font-weight: 500;
}

/* Article CTA */
.article-cta {
  text-align: center;
  padding: 4rem 3rem;
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.1) 0%, rgba(245, 87, 108, 0.1) 100%);
  border-radius: 24px;
  border: 2px solid rgba(220, 38, 38, 0.2);
  max-width: 800px;
  margin: 0 auto 4rem;
}

.article-cta h2 {
  font-size: 2.25rem;
  margin-bottom: 1rem;
  color: var(--text-dark);
  font-weight: 700;
}

.article-cta p {
  font-size: 1.25rem;
  color: var(--text-medium);
  margin-bottom: 2.5rem;
  line-height: 1.7;
}

/* Related Articles */
.related-articles {
  max-width: 1200px;
  margin: 0 auto;
}

.related-articles h2 {
  font-size: 2rem;
  margin-bottom: 2rem;
  color: var(--text-dark);
  font-weight: 700;
  text-align: center;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.related-card {
  background: #fff;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.related-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
  border-color: var(--accent);
}

.related-card h3 {
  font-size: 1.375rem;
  margin-bottom: 1rem;
  color: var(--text-dark);
  font-weight: 700;
  line-height: 1.3;
}

.related-card p {
  font-size: 1rem;
  color: var(--text-medium);
  line-height: 1.7;
  margin-bottom: 1.5rem;
  flex: 1;
}

.related-link {
  color: var(--accent);
  font-weight: 600;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: gap 0.3s ease;
}

.related-card:hover .related-link {
  gap: 0.75rem;
}

/* Blog Article Responsive */
@media (max-width: 1024px) {
  .article-content {
    padding: 3rem;
  }

  .article-benefits {
    grid-template-columns: 1fr;
  }

  .benefit-item {
    flex-direction: column;
    text-align: center;
  }

  .benefit-icon {
    margin: 0 auto;
  }

  .related-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
}

@media (max-width: 768px) {
  .blog-article-page {
    padding: 2rem 0 4rem;
  }

  .article-header {
    margin-bottom: 3rem;
  }

  .article-meta {
    flex-direction: column;
    gap: 0.75rem;
  }

  .article-header h1 {
    font-size: 1.75rem;
  }

  .article-intro {
    font-size: 1.125rem;
  }

  .article-content {
    padding: 2rem 1.5rem;
    margin-bottom: 3rem;
  }

  .article-section {
    margin-bottom: 2.5rem;
  }

  .article-section h2 {
    font-size: 1.5rem;
  }

  .article-section p {
    font-size: 1rem;
  }

  .step-item {
    flex-direction: column;
    gap: 1.5rem;
    padding: 1.5rem;
  }

  .step-number {
    width: 48px;
    height: 48px;
    font-size: 1.25rem;
  }

  .article-cta {
    padding: 2.5rem 1.5rem;
  }

  .article-cta h2 {
    font-size: 1.75rem;
  }

  .article-cta p {
    font-size: 1rem;
  }

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

/* Tool SEO Content Section Styles */
.tool-seo {
  max-width: 1200px;
  margin: 4rem auto;
  padding: 0 1.5rem;
}

.tool-seo .container {
  max-width: 100%;
}

.tool-seo__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-bottom: 3rem;
  padding-top: 1rem;
}

.tool-seo__badge {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  background: rgba(220, 38, 38, 0.08);
  color: var(--accent);
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
}

.tool-seo__section {
  margin-bottom: 4rem;
}

.tool-seo__heading {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1rem;
  text-align: center;
}

.tool-seo__intro {
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--text-muted);
  margin-bottom: 2rem;
  text-align: center;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.tool-seo__note {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  line-height: 1.7;
  color: var(--text-muted);
  text-align: center;
}

.tool-seo__note a {
  color: var(--accent);
  text-decoration: underline;
  transition: color 180ms ease;
}

.tool-seo__note a:hover {
  color: var(--accent-dark);
}

/* How It Works - Step Cards */
.tool-seo__steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.tool-seo__step-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 2rem;
  text-align: center;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
  transition: transform 180ms ease, box-shadow 180ms ease;
  position: relative;
}

.tool-seo__step-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.tool-seo__step-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  display: block;
}

.tool-seo__step-number {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 32px;
  height: 32px;
  background: var(--accent);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.875rem;
}

.tool-seo__step-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.75rem;
}

.tool-seo__step-text {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0;
}

/* Use Cases Grid */
.tool-seo__use-cases {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.tool-seo__use-case {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 1rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text);
}

.tool-seo__use-case-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

/* Trust Card */
.tool-seo__trust-card {
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.05), rgba(220, 38, 38, 0.12));
  border: 1px solid rgba(220, 38, 38, 0.2);
  border-radius: var(--radius-md);
  padding: 2rem;
  box-shadow: 0 4px 20px rgba(220, 38, 38, 0.1);
}

.tool-seo__trust-header {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}

.tool-seo__trust-icon {
  font-size: 2.5rem;
  flex-shrink: 0;
}

.tool-seo__trust-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.tool-seo__trust-subtitle {
  font-size: 1rem;
  color: var(--text-muted);
  margin: 0;
}

.tool-seo__trust-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem 0;
}

.tool-seo__trust-list li {
  padding: 0.75rem 0;
  padding-left: 1.5rem;
  position: relative;
  line-height: 1.7;
  color: var(--text);
}

.tool-seo__trust-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

.tool-seo__trust-footer {
  margin: 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(220, 38, 38, 0.2);
  line-height: 1.7;
  color: var(--text-muted);
}

.tool-seo__trust-footer a {
  color: var(--accent);
  text-decoration: underline;
  transition: color 180ms ease;
}

.tool-seo__trust-footer a:hover {
  color: var(--accent-dark);
}

/* Compatibility Grid */
.tool-seo__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.tool-seo__card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.tool-seo__card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.tool-seo__card-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  display: block;
}

.tool-seo__card-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.75rem;
}

.tool-seo__card-text {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0;
}

/* FAQ Accordion */
.tool-seo__faq {
  max-width: 800px;
  margin: 0 auto;
}

.tool-seo__faq-item {
  border-bottom: 1px solid var(--border);
  padding: 1.25rem 0;
}

.tool-seo__faq-item:first-child {
  border-top: 1px solid var(--border);
}

.tool-seo__faq-question {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  padding-right: 2rem;
  position: relative;
  user-select: none;
}

.tool-seo__faq-question::-webkit-details-marker {
  display: none;
}

.tool-seo__faq-question::after {
  content: "▼";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%) rotate(0deg);
  transition: transform 200ms ease;
  font-size: 0.75rem;
  color: var(--accent);
}

.tool-seo__faq-item[open] .tool-seo__faq-question::after {
  transform: translateY(-50%) rotate(180deg);
}

.tool-seo__faq-question:hover {
  color: var(--accent);
}

.tool-seo__faq-answer {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.tool-seo__faq-answer p {
  margin: 0;
  line-height: 1.7;
  color: var(--text-muted);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .tool-seo__steps {
    grid-template-columns: 1fr;
  }

  .tool-seo__use-cases {
    grid-template-columns: 1fr;
  }

  .tool-seo__grid {
    grid-template-columns: 1fr;
  }

  .tool-seo__heading {
    font-size: 1.75rem;
  }

  .tool-seo__trust-header {
    flex-direction: column;
    text-align: center;
  }

  .tool-seo__trust-icon {
    margin: 0 auto;
  }
}

/* Conversion Status Animation */
.conversion-status-text {
  margin-right: 0;
  flex-shrink: 0;
}

.conversion-status-dots {
  display: inline-block;
  margin-left: 0;
  padding-left: 2px;
  flex-shrink: 0;
}

.conversion-status-dots span {
  display: inline-block;
  animation: dotPulse 1.4s infinite;
  animation-fill-mode: both;
  margin-left: 0;
  padding-left: 0;
}

.conversion-status-dots span:nth-child(1) {
  animation-delay: 0s;
}

.conversion-status-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.conversion-status-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes dotPulse {
  0%, 80%, 100% {
    opacity: 0.3;
    transform: scale(0.8);
  }
  40% {
    opacity: 1;
    transform: scale(1);
  }
}

/* ============================================================================
   SCAN TO PDF - Desktop/Mobile Workflow
   ============================================================================ */

.scan-desktop-container {
  max-width: 1200px;
  margin: 0 auto;
}

.scan-desktop-header {
  text-align: center;
  margin-bottom: 3rem;
}

.scan-desktop-header h1 {
  font-size: 2.5rem;
  margin: 0 0 0.5rem 0;
  color: var(--text);
}

.scan-subtitle {
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--text-muted);
}

.scan-two-step-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
}

.scan-step {
  background: var(--bg-alt);
  border-radius: var(--radius-md);
  padding: 2rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.scan-step-2 {
  opacity: 0.5;
  transition: opacity 0.3s ease;
}

.scan-step-2.active {
  opacity: 1;
}

.scan-step-header {
  margin-bottom: 1.5rem;
}

.scan-step-header h2 {
  font-size: 1.25rem;
  margin: 0;
  color: var(--text);
}

.scan-qr-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.scan-qr-placeholder {
  width: 300px;
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  border-radius: var(--radius-sm);
}

.scan-qr-loading {
  text-align: center;
}

.scan-qr-loading .spinner {
  display: inline-block;
  width: 40px;
  height: 40px;
  border: 4px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

.scan-qr-code {
  width: 300px;
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.5rem;
  margin: 0 auto;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.scan-qr-code img {
  width: 100%;
  height: 100%;
  max-width: 300px;
  max-height: 300px;
  object-fit: contain;
  display: block;
  image-rendering: -moz-crisp-edges;
  image-rendering: -webkit-crisp-edges;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
  background: #ffffff;
  border-radius: 4px;
}

.scan-qr-instruction {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0;
}

.scan-status-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.scan-status {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.scan-status-indicator {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  background: var(--bg);
  border-radius: var(--radius-sm);
}

.scan-status-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ef4444;
  animation: pulse 2s infinite;
}

.scan-status-connected .scan-status-dot {
  background: #10b981;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.scan-status-text {
  font-weight: 600;
  color: var(--text);
}

.scan-device-info {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-left: auto;
}

.scan-status-instruction {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0;
}

.scan-progress {
  padding: 1rem;
  background: var(--bg);
  border-radius: var(--radius-sm);
  text-align: center;
}

.scan-progress-text {
  font-weight: 500;
  color: var(--text);
  margin: 0 0 0.5rem 0;
}

.scan-pages-count {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.scan-pages-count span {
  font-weight: 600;
  color: var(--accent);
}

[data-scan-to-pdf="finish-button"] {
  margin-top: 1rem;
  width: 100%;
  max-width: 300px;
  margin-left: auto;
  margin-right: auto;
  display: block;
}

.scan-download-stage {
  background: var(--bg-alt);
  border-radius: var(--radius-md);
  padding: 3rem 2rem;
  text-align: center;
}

.scan-download-content {
  max-width: 400px;
  margin: 0 auto;
}

.scan-download-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: #10b981;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  margin: 0 auto 1.5rem;
}

.scan-download-content h2 {
  font-size: 1.75rem;
  margin: 0 0 0.5rem 0;
  color: var(--text);
}

.scan-download-content p {
  color: var(--text-muted);
  margin: 0 0 2rem 0;
}

@media (max-width: 900px) {
  .scan-two-step-layout {
    grid-template-columns: 1fr;
  }
  
  .scan-desktop-header h1 {
    font-size: 2rem;
  }
}

/* Tool rating widget – user reviews (desktop: above download; mobile: bottom) */
.tool-rating-widget-wrapper {
  margin: 2rem 0;
  padding: 0;
}

/* Shake/buzz animatie na download – "Je hebt gedownload, wil je ons raten?" */
@keyframes rating-widget-shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-4px); }
  20%, 40%, 60%, 80% { transform: translateX(4px); }
}
.tool-rating-widget-wrapper.rating-widget-shake {
  animation: rating-widget-shake 0.6s ease-in-out;
}

.tool-rating-widget {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  max-width: 480px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.tool-rating-widget__title {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
  color: var(--text);
}

.tool-rating-widget__summary {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.tool-rating-widget__stars {
  color: #f59e0b;
  letter-spacing: 0.05em;
}

.tool-rating-widget__avg {
  font-weight: 600;
  color: var(--text);
  margin-left: 0.25rem;
}

.tool-rating-widget__form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Form extras (name, review, submit) – hidden until a star is chosen, then slide + fade in */
.tool-rating-widget__form-extras {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.4s ease-out, opacity 0.35s ease-out;
}

.tool-rating-widget__form--expanded .tool-rating-widget__form-extras {
  max-height: 320px;
  opacity: 1;
}

.tool-rating-widget__stars-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.tool-rating-widget__label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
}

.tool-rating-widget__star-inputs {
  display: inline-flex;
  gap: 0.25rem;
}

.tool-rating-widget__star-label {
  cursor: pointer;
  padding: 0.15rem;
}

.tool-rating-widget__star-label .tool-rating-widget__star {
  font-size: 1.5rem;
  color: #d1d5db;
  transition: color 0.15s ease;
}

.tool-rating-widget__star-label:hover .tool-rating-widget__star {
  color: #f59e0b;
}

/* Gekozen sterren oranje (zelfde specificiteit als default, maar later) */
.tool-rating-widget__star-label .tool-rating-widget__star--filled {
  color: #f59e0b;
}

.tool-rating-widget__star-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.tool-rating-widget__field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.tool-rating-widget__field-label {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.tool-rating-widget__input,
.tool-rating-widget__textarea {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: inherit;
  color: var(--text);
  background: var(--bg-alt);
}

.tool-rating-widget__textarea {
  resize: vertical;
  min-height: 4rem;
}

.tool-rating-widget__submit {
  align-self: flex-start;
  margin-top: 0.25rem;
}

.tool-rating-widget__message {
  font-size: 0.875rem;
  margin: 0;
}

.tool-rating-widget__message--success {
  color: #059669;
}

.tool-rating-widget__message--error {
  color: var(--accent);
}

@media (min-width: 768px) {
  .tool-rating-widget-wrapper.tool-rating-widget-wrapper--moved {
    margin: 0 0 1rem 0;
  }
}

/* Mobiel: extra ruimte tussen rating-widget en footer, zodat downloadknop niet op widget komt */
@media (max-width: 900px) {
  .tool-rating-widget-wrapper {
    margin-bottom: 5rem !important;
  }
}
