/* ==========================================================================
   SmartDocify — JPG to PDF Tool Stylesheet
   Matches SmartDocify Design System: Dark Premium Theme, Plus Jakarta Sans,
   Vibrant Blue/Purple Accents, Responsive 2-Column Workspace & SEO Grid
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. CSS VARIABLES & DESIGN TOKENS
   -------------------------------------------------------------------------- */
:root {
  /* Color Palette - Dark Premium Theme */
  --bg-page: #080d1a;
  --bg-surface: #111c30;
  --bg-surface-elevated: #16233b;
  --bg-surface-hover: #1c2c4a;
  --bg-input: #0c1424;

  /* Primary Accent - Electric Blue to Purple */
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-glow: rgba(37, 99, 235, 0.25);
  --primary-gradient: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  --secondary: #7c3aed;
  --secondary-hover: #6d28d9;

  /* Status Colors */
  --success: #10b981;
  --success-glow: rgba(16, 185, 129, 0.2);
  --error: #ef4444;
  --error-bg: rgba(239, 68, 68, 0.12);
  --error-border: rgba(239, 68, 68, 0.25);
  --warning: #f59e0b;

  /* Typography Colors */
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --text-inverse: #ffffff;

  /* Borders & Dividers */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(37, 99, 235, 0.45);
  --border-focus: #3b82f6;

  /* Elevation & Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 30px rgba(37, 99, 235, 0.2);

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

  /* Typography */
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --container-max: 1200px;
}

/* Light Theme Overrides */
[data-theme="light"] {
  --bg-page: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #f1f5f9;
  --bg-surface-hover: #e2e8f0;
  --bg-input: #ffffff;

  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-dim: #94a3b8;
  --text-inverse: #ffffff;

  --border-subtle: #e2e8f0;
  --border-hover: rgba(37, 99, 235, 0.45);
  --border-focus: #2563eb;

  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08);
  --shadow-glow: 0 0 20px rgba(37, 99, 235, 0.15);
}

/* --------------------------------------------------------------------------
   2. RESET & BASE ELEMENTS
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: var(--bg-page);
  color: var(--text-main);
  overflow-x: hidden;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

main {
  flex: 1 0 auto;
}

/* Accessible Visually Hidden File Input (Essential: NOT display: none) */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

[hidden] {
  display: none !important;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

/* --------------------------------------------------------------------------
   3. HEADER & NAVIGATION
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(8, 13, 26, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

[data-theme="light"] .site-header {
  background: rgba(248, 250, 252, 0.88);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 20px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  user-select: none;
}

.logo-icon-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.logo-svg {
  width: 28px;
  height: 28px;
  display: block;
}

.logo-text {
  font-size: 1.18rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-main);
  background: linear-gradient(135deg, #ffffff 40%, var(--text-muted) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="light"] .logo-text {
  background: linear-gradient(135deg, #0f172a 40%, #2563eb 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.desktop-nav {
  display: none;
}

@media (min-width: 900px) {
  .desktop-nav {
    display: block;
  }
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
}

.nav-link {
  display: inline-block;
  padding: 8px 14px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.nav-link:hover {
  color: var(--text-main);
  background: var(--bg-surface-hover);
}

.nav-link.active {
  color: var(--text-main);
  background: rgba(37, 99, 235, 0.15);
  font-weight: 600;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.action-btn:hover {
  color: var(--text-main);
  border-color: var(--border-hover);
  background: var(--bg-surface-elevated);
}

.ui-icon {
  width: 20px;
  height: 20px;
}

[data-theme="dark"] .icon-sun {
  display: block;
}
[data-theme="dark"] .icon-moon {
  display: none;
}
[data-theme="light"] .icon-sun {
  display: none;
}
[data-theme="light"] .icon-moon {
  display: block;
}

.menu-toggle {
  display: flex;
}

@media (min-width: 900px) {
  .menu-toggle {
    display: none;
  }
}

.hamburger-box {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 18px;
  height: 14px;
}

.hamburger-line {
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}

/* Mobile Drawer */
.mobile-nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1050;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.mobile-nav-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-nav-drawer {
  position: fixed;
  top: 0;
  right: -320px;
  width: 300px;
  height: 100%;
  background: var(--bg-surface);
  border-left: 1px solid var(--border-subtle);
  z-index: 1100;
  transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  padding: 24px 20px;
}

.mobile-nav-drawer.open {
  right: 0;
}

.mobile-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.mobile-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mobile-nav-link {
  display: block;
  padding: 10px 14px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 1rem;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
  color: var(--text-main);
  background: rgba(37, 99, 235, 0.15);
}

/* --------------------------------------------------------------------------
   4. BUTTONS & UI CONTROLS
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.btn-primary {
  background: var(--primary-gradient);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
  filter: brightness(1.08);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-secondary {
  background: var(--bg-surface-elevated);
  border-color: var(--border-subtle);
  color: var(--text-main);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--bg-surface-hover);
  border-color: var(--border-hover);
  color: #ffffff;
}

.btn-outline {
  background: transparent;
  border-color: var(--border-subtle);
  color: var(--text-muted);
}

.btn-outline:hover:not(:disabled) {
  border-color: var(--border-hover);
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.04);
}

.btn-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

.btn-success:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
  filter: brightness(1.08);
}

.btn-lg {
  padding: 14px 28px;
  font-size: 1.05rem;
  border-radius: var(--radius-lg);
}

.btn-sm {
  padding: 7px 14px;
  font-size: 0.85rem;
}

.btn-xs {
  padding: 4px 10px;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
}

.btn-block {
  width: 100%;
}

/* --------------------------------------------------------------------------
   5. STEP 1: HERO UPLOAD SECTION
   -------------------------------------------------------------------------- */
.tool-hero-section {
  position: relative;
  padding: 60px 0 80px;
  text-align: center;
  overflow: hidden;
}

.hero-bg-accent {
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.12;
  pointer-events: none;
  z-index: 0;
}

.hero-bg-accent-left {
  top: -150px;
  left: -100px;
  background: #2563eb;
}

.hero-bg-accent-right {
  top: -100px;
  right: -100px;
  background: #7c3aed;
}

.tool-hero-container {
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(37, 99, 235, 0.12);
  border: 1px solid rgba(37, 99, 235, 0.25);
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #60a5fa;
  margin-bottom: 20px;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #3b82f6;
  box-shadow: 0 0 8px #3b82f6;
}

.tool-hero-title {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 16px;
  color: var(--text-main);
  background: linear-gradient(135deg, #ffffff 40%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.tool-hero-description {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 650px;
  margin: 0 auto 28px;
}

.privacy-trust-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  color: #34d399;
  margin-bottom: 40px;
}

.trust-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* Dropzone */
.empty-upload-card {
  max-width: 780px;
  margin: 0 auto;
}

.dropzone {
  position: relative;
  background: var(--bg-surface);
  border: 2px dashed rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-xl);
  padding: 50px 30px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-md);
}

.dropzone:hover {
  border-color: rgba(37, 99, 235, 0.6);
  background: var(--bg-surface-elevated);
  box-shadow: var(--shadow-glow);
}

.dropzone.dragover {
  border-color: #3b82f6 !important;
  background: rgba(37, 99, 235, 0.12) !important;
  transform: scale(1.01);
  box-shadow: 0 0 40px rgba(37, 99, 235, 0.4);
}

.dropzone-icon-box {
  width: 72px;
  height: 72px;
  margin: 0 auto 24px;
  background: rgba(37, 99, 235, 0.1);
  border: 1px solid rgba(37, 99, 235, 0.25);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #3b82f6;
  transition: transform 0.2s ease;
}

.dropzone:hover .dropzone-icon-box {
  transform: scale(1.08);
}

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

.dropzone-or-text {
  margin-top: 18px;
  font-size: 0.95rem;
  color: var(--text-dim);
}

.dropzone-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 24px;
  font-size: 0.82rem;
  color: var(--text-dim);
}

.meta-pill {
  padding: 3px 10px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.meta-dot {
  color: rgba(255, 255, 255, 0.2);
}

/* Alert Error */
.alert-error {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  margin-top: 20px;
  background: var(--error-bg);
  border: 1px solid var(--error-border);
  border-radius: var(--radius-md);
  color: #fca5a5;
  font-size: 0.9rem;
  text-align: left;
}

.alert-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--error);
}

/* --------------------------------------------------------------------------
   6. STEP 2: ACTIVE WORKSPACE (2-Column Grid)
   -------------------------------------------------------------------------- */
.tool-workspace-section {
  padding: 30px 0 80px;
}

.workspace-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  margin-bottom: 16px;
}

.topbar-left, .topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tool-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tool-header-icon {
  width: 38px;
  height: 38px;
  background: rgba(37, 99, 235, 0.12);
  border: 1px solid rgba(37, 99, 235, 0.25);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #3b82f6;
}

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

.workspace-tool-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
}

.workspace-tool-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.summary-pill {
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* Privacy Banner inside Workspace */
.workspace-privacy-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  background: rgba(16, 185, 129, 0.06);
  border: 1px solid rgba(16, 185, 129, 0.18);
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  color: #34d399;
  margin-bottom: 16px;
}

.banner-trust-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.workspace-instruction {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

/* 2-Column Grid */
.workspace-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 960px) {
  .workspace-grid {
    grid-template-columns: 1.25fr 1fr;
    align-items: start;
  }
}

/* --------------------------------------------------------------------------
   7. LEFT COLUMN: IMAGE CARDS & QUICK ADD
   -------------------------------------------------------------------------- */
.files-column {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.image-card-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Card item */
.image-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 18px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  user-select: none;
}

.image-card:hover {
  border-color: rgba(37, 99, 235, 0.4);
  background: var(--bg-surface-elevated);
}

.image-card.dragging {
  opacity: 0.45;
  transform: scale(0.98);
  border: 2px dashed #3b82f6;
}

.image-card.drag-over {
  border-top: 2px solid #3b82f6;
}

.card-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex: 1;
}

/* Drag Handle */
.drag-handle {
  cursor: grab;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  transition: color 0.15s ease;
}

.drag-handle:hover {
  color: var(--text-main);
}

.drag-handle svg {
  width: 18px;
  height: 18px;
}

/* Order Badge */
.order-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  background: rgba(37, 99, 235, 0.15);
  border: 1px solid rgba(37, 99, 235, 0.3);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 700;
  color: #60a5fa;
  flex-shrink: 0;
}

/* Real Image Thumbnail */
.image-thumb-box {
  width: 58px;
  height: 58px;
  border-radius: var(--radius-md);
  background: #000000;
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.image-thumb-format {
  position: absolute;
  bottom: 2px;
  right: 2px;
  padding: 1px 4px;
  background: rgba(0, 0, 0, 0.75);
  border-radius: 3px;
  font-size: 0.65rem;
  font-weight: 700;
  color: #93c5fd;
  text-transform: uppercase;
}

/* File Details */
.image-details {
  min-width: 0;
  flex: 1;
}

.image-title {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

.image-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.meta-dim {
  color: #60a5fa;
  font-weight: 500;
}

/* Card Actions */
.card-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.card-ctrl-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.card-ctrl-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  border-color: var(--border-hover);
}

.card-ctrl-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.btn-remove:hover:not(:disabled) {
  background: rgba(239, 68, 68, 0.15) !important;
  color: #f87171 !important;
  border-color: rgba(239, 68, 68, 0.35) !important;
}

.card-ctrl-btn svg {
  width: 16px;
  height: 16px;
}

/* Bottom Quick Dropzone */
.bottom-dropzone-box {
  background: rgba(17, 28, 48, 0.5);
  border: 2px dashed rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.bottom-dropzone-box:hover {
  background: var(--bg-surface);
  border-color: rgba(37, 99, 235, 0.5);
}

.bottom-dropzone-box.dragover {
  background: rgba(37, 99, 235, 0.1) !important;
  border-color: #3b82f6 !important;
}

.bottom-dropzone-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.bottom-plus-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.15s ease;
}

.bottom-plus-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

.bottom-plus-btn svg {
  width: 16px;
  height: 16px;
}

.bottom-dropzone-sub {
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* --------------------------------------------------------------------------
   8. RIGHT COLUMN: PREVIEW & SETTINGS PANEL
   -------------------------------------------------------------------------- */
.settings-column {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.settings-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 20px;
}

/* Live Page Preview Stage */
.preview-card {
  padding: 20px;
}

.preview-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.preview-card-header .settings-card-title {
  margin-bottom: 0;
}

.preview-badge {
  padding: 3px 10px;
  background: rgba(37, 99, 235, 0.12);
  border: 1px solid rgba(37, 99, 235, 0.25);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  color: #60a5fa;
}

.pdf-stage-viewport {
  background: #090e1a;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 320px;
  overflow: hidden;
}

.pdf-sheet-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

/* The White Paper Sheet */
.pdf-sheet {
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
  display: flex;
  transition: all 0.2s ease;
}

/* Margin Zone inside Paper */
.pdf-sheet-margin {
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

#pdf-preview-img {
  max-width: 100%;
  max-height: 100%;
  display: block;
}

/* Pagination Bar */
.preview-pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
}

.pagination-info {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* Settings Form Controls */
.setting-group {
  margin-bottom: 16px;
}

.setting-group:last-child {
  margin-bottom: 0;
}

.setting-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.setting-select,
.setting-input {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.92rem;
  transition: all 0.15s ease;
  outline: none;
}

.setting-select:focus,
.setting-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.setting-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' 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 14px center;
  padding-right: 40px;
  cursor: pointer;
}

.setting-divider {
  border: 0;
  height: 1px;
  background: var(--border-subtle);
  margin: 20px 0;
}

/* Output File Name with Suffix */
.input-with-suffix {
  display: flex;
  align-items: center;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all 0.15s ease;
}

.input-with-suffix:focus-within {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.input-with-suffix .setting-input {
  border: none;
  border-radius: 0;
  box-shadow: none !important;
}

.input-suffix {
  padding: 0 14px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.03);
  border-left: 1px solid var(--border-subtle);
  user-select: none;
}

/* Branding Checkbox */
.branding-checkbox-wrap {
  margin-top: 10px;
}

.custom-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.custom-checkbox {
  width: 17px;
  height: 17px;
  accent-color: var(--primary);
  cursor: pointer;
}

.checkbox-text {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.field-hint {
  display: block;
  font-size: 0.76rem;
  color: var(--text-dim);
  margin-top: 6px;
}

.field-hint strong {
  color: #60a5fa;
  font-weight: 600;
}

/* Progress Box */
.convert-progress-box {
  margin: 18px 0;
  padding: 14px 18px;
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.25);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 14px;
}

.convert-spinner {
  width: 24px;
  height: 24px;
  border: 3px solid rgba(37, 99, 235, 0.3);
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}

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

.convert-progress-info {
  flex: 1;
}

.convert-progress-text {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #93c5fd;
  margin-bottom: 6px;
}

.convert-progress-bar-wrap {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.convert-progress-bar-fill {
  height: 100%;
  background: var(--primary-gradient);
  border-radius: var(--radius-full);
  transition: width 0.25s ease;
}

/* --------------------------------------------------------------------------
   9. STEP 3: SUCCESS RESULT CARD
   -------------------------------------------------------------------------- */
.success-result-card {
  margin-top: 30px;
  text-align: center;
  padding: 40px 30px;
  background: var(--bg-surface);
  border: 1px solid rgba(16, 185, 129, 0.3);
  box-shadow: 0 10px 40px rgba(16, 185, 129, 0.15);
}

.success-card-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  color: #34d399;
  margin-bottom: 16px;
}

.success-card-badge svg {
  width: 16px;
  height: 16px;
}

.success-card-title {
  font-size: 1.8rem;
  font-weight: 800;
  color: #34d399;
  margin-bottom: 8px;
}

.success-card-sub {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.success-meta-pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 32px;
}

.meta-stat {
  padding: 12px 20px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  min-width: 140px;
}

.stat-label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  margin-bottom: 4px;
}

.stat-value {
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  word-break: break-all;
}

.success-actions-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

/* --------------------------------------------------------------------------
   10. SEO CONTENT & FAQ ACCORDION
   -------------------------------------------------------------------------- */
.tool-seo-section {
  padding: 70px 0 90px;
  border-top: 1px solid var(--border-subtle);
  background: rgba(17, 28, 48, 0.3);
}

.seo-block {
  margin-bottom: 54px;
}

.seo-block:last-child {
  margin-bottom: 0;
}

.seo-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.seo-text {
  font-size: 1.02rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* How it works steps */
.steps-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-top: 24px;
}

@media (min-width: 640px) {
  .steps-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .steps-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.step-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  position: relative;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.step-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-hover);
}

.step-number {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--primary-gradient);
  color: #ffffff;
  font-size: 1rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.step-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
}

.step-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Why choose features */
.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-top: 24px;
}

@media (min-width: 640px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.seo-feature-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.seo-icon-box {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: rgba(37, 99, 235, 0.12);
  border: 1px solid rgba(37, 99, 235, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #3b82f6;
}

.seo-icon-box svg {
  width: 22px;
  height: 22px;
}

.seo-feature-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
}

.seo-feature-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* FAQ Accordion */
.faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}

.accordion-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.accordion-item:hover {
  border-color: var(--border-hover);
}

.accordion-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  background: transparent;
  border: none;
  color: var(--text-main);
  font-family: inherit;
  font-size: 1.02rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.accordion-icon {
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  transition: transform 0.25s ease;
  flex-shrink: 0;
}

.accordion-trigger[aria-expanded="true"] .accordion-icon {
  transform: rotate(180deg);
}

.accordion-panel {
  padding: 0 22px 20px;
}

.accordion-content {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* --------------------------------------------------------------------------
   11. SITE FOOTER
   -------------------------------------------------------------------------- */
.site-footer {
  background: #050811;
  border-top: 1px solid var(--border-subtle);
  padding: 60px 0 30px;
  color: var(--text-muted);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  margin-bottom: 50px;
}

@media (min-width: 640px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
  }
}

.footer-tagline {
  font-size: 0.92rem;
  color: var(--text-dim);
  line-height: 1.6;
  margin: 16px 0 20px;
}

.footer-privacy-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  color: #34d399;
}

.footer-privacy-badge svg {
  width: 16px;
  height: 16px;
}

.footer-heading {
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-main);
  margin-bottom: 18px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.15s ease;
}

.footer-links a:hover {
  color: var(--text-main);
}

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-dim);
}

/* --------------------------------------------------------------------------
   12. RESPONSIVENESS TWEAKS
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  .tool-hero-section {
    padding: 40px 0 60px;
  }

  .dropzone {
    padding: 36px 18px;
  }

  .workspace-topbar {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .topbar-left, .topbar-right {
    justify-content: center;
  }

  .tool-title-wrap {
    justify-content: center;
  }

  .image-card {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .card-left {
    width: 100%;
  }

  .card-right {
    justify-content: flex-end;
    border-top: 1px solid var(--border-subtle);
    padding-top: 10px;
  }
}

/* --------------------------------------------------------------------------
   13. LIGHT THEME COMPONENT OVERRIDES
   -------------------------------------------------------------------------- */
[data-theme="light"] .tool-hero-title {
  background: linear-gradient(135deg, #0f172a 40%, #2563eb 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="light"] .dropzone {
  border-color: var(--border-hover);
  background: var(--bg-surface);
}

[data-theme="light"] .dropzone:hover {
  border-color: var(--primary);
  background: var(--bg-surface-elevated);
}

[data-theme="light"] .meta-pill {
  background: var(--bg-surface-elevated);
  border-color: var(--border-subtle);
  color: var(--text-muted);
}

[data-theme="light"] .bottom-dropzone-box {
  background: var(--bg-surface-elevated);
  border-color: var(--border-hover);
}

[data-theme="light"] .bottom-dropzone-box:hover {
  background: var(--bg-surface-hover);
}

[data-theme="light"] .card-ctrl-btn {
  background: var(--bg-surface-elevated);
  border-color: var(--border-subtle);
  color: var(--text-muted);
}

[data-theme="light"] .card-ctrl-btn:hover:not(:disabled) {
  background: var(--bg-surface-hover);
  color: var(--text-main);
}

[data-theme="light"] .pdf-stage-viewport {
  background: #cbd5e1;
  border-color: var(--border-subtle);
}

[data-theme="light"] .tool-seo-section {
  background: transparent;
}

[data-theme="light"] .footer-privacy-badge {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #065f46;
}

[data-theme="light"] .site-footer {
  background: #f1f5f9;
  border-top-color: var(--border-subtle);
}
