/* ==========================================================================
   PDFStrix - All-in-One Web PDF Suite (by VA Developers)
   Design System & Styling
   ========================================================================== */

:root {
  /* Color Palette */
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-light: #eef2ff;
  --primary-glow: rgba(79, 70, 229, 0.25);

  --secondary: #06b6d4;
  --secondary-glow: rgba(6, 182, 212, 0.2);

  --accent-purple: #8b5cf6;
  --accent-emerald: #10b981;
  --accent-rose: #f43f5e;
  --accent-amber: #f59e0b;

  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --bg-glass: rgba(255, 255, 255, 0.85);
  --bg-glass-card: rgba(255, 255, 255, 0.7);

  --border-light: #e2e8f0;
  --border-focus: #6366f1;

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

  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 25px 50px -12px rgba(79, 70, 229, 0.25);

  --transition-fast: all 0.15s ease;
  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);

  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Dark Mode Variables */
body.dark-mode {
  --bg-main: #0b0f19;
  --bg-card: #151d30;
  --bg-card-hover: #1c263e;
  --bg-glass: rgba(15, 23, 42, 0.88);
  --bg-glass-card: rgba(21, 29, 48, 0.75);

  --border-light: #22304d;
  --border-focus: #818cf8;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 10px 20px -3px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 20px 30px -5px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 25px 50px -12px rgba(79, 70, 229, 0.35);
}

/* Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

/* Ambient Background Glow */
.ambient-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.35;
  transition: opacity 0.5s ease;
}

.glow-orb-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #6366f1 0%, transparent 70%);
  top: -150px;
  left: -100px;
}

.glow-orb-2 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, #06b6d4 0%, transparent 70%);
  top: 30%;
  right: -200px;
}

.glow-orb-3 {
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, #ec4899 0%, transparent 70%);
  bottom: 5%;
  left: 20%;
}

body.dark-mode .glow-orb {
  opacity: 0.22;
}

/* Container */
.container {
  width: 92%;
  max-width: 1240px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* Typography */
h1, h2, h3, h4, h5 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.25;
}

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

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

/* ==========================================================================
   Navigation Bar
   ========================================================================== */
.site-navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-light);
  padding: 0.85rem 0;
  transition: var(--transition);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-logo-img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.brand-badge {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.brand-sub {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: -3px;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.nav-link {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-xs);
  transition: var(--transition-fast);
}

.nav-link:hover {
  color: var(--primary);
  background: rgba(79, 70, 229, 0.06);
}

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

/* Theme Toggle Button */
.btn-icon-toggle {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-light);
  background: var(--bg-card);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-icon-toggle:hover {
  color: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 0 12px var(--primary-glow);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.35rem;
  font-size: 0.92rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-body);
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px var(--primary-glow);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #4338ca 0%, #4f46e5 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.4);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-light);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--text-dim);
  transform: translateY(-2px);
}

.btn-outline-primary {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
}

.btn-outline-primary:hover {
  background: var(--primary);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--primary-glow);
}

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

.btn-success:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45);
}

.btn-danger {
  background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(244, 63, 94, 0.3);
}

.btn-danger:hover {
  background: linear-gradient(135deg, #e11d48 0%, #be123c 100%);
  transform: translateY(-2px);
}

.btn-lg {
  padding: 0.85rem 1.75rem;
  font-size: 1.05rem;
  border-radius: var(--radius-md);
}

.btn-sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.82rem;
  border-radius: var(--radius-sm);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
  padding: 4.5rem 0 3.5rem;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 3.5rem;
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}

.pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.95rem;
  background: rgba(79, 70, 229, 0.1);
  border: 1px solid rgba(79, 70, 229, 0.2);
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--primary);
  width: fit-content;
}

.pill-badge .material-symbols-outlined {
  font-size: 1.1rem;
}

.hero-title {
  font-size: clamp(2.4rem, 4.5vw, 3.8rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.hero-title .gradient-text {
  background: linear-gradient(135deg, #4f46e5 0%, #06b6d4 50%, #8b5cf6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: 1.12rem;
  line-height: 1.65;
  color: var(--text-muted);
  max-width: 580px;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.hero-stats-row {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-light);
  margin-top: 1rem;
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.15rem;
}

.stat-label {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
}

/* Hero Media / Banner Mockup */
.hero-media-wrapper {
  position: relative;
  border-radius: var(--radius-lg);
  perspective: 1000px;
}

.hero-banner-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border-light);
  background: var(--bg-card);
  transition: transform 0.5s ease;
}

.hero-banner-card:hover {
  transform: translateY(-6px) scale(1.01);
}

.hero-banner-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.hero-banner-overlay-badge {
  position: absolute;
  bottom: 1.25rem;
  left: 1.25rem;
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  padding: 0.75rem 1.15rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.overlay-badge-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.overlay-badge-text {
  display: flex;
  flex-direction: column;
}

.overlay-badge-text strong {
  font-size: 0.9rem;
  color: var(--text-main);
}

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

/* ==========================================================================
   Tools Hub Section
   ========================================================================== */
.tools-section {
  padding: 4rem 0 5rem;
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 2.5rem;
}

.section-header .section-tag {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--primary);
  margin-bottom: 0.5rem;
  display: block;
}

.section-header h2 {
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  margin-bottom: 0.85rem;
}

.section-header p {
  font-size: 1.05rem;
}

/* Search & Filter Toolbar */
.tools-toolbar {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1rem 1.5rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.search-box-wrap {
  position: relative;
  flex: 1;
  min-width: 260px;
}

.search-box-wrap .search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.85rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-light);
  background: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition-fast);
}

.search-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--primary-glow);
  background: var(--bg-card);
}

.category-filter-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.filter-pill {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-light);
  background: var(--bg-main);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

.filter-pill:hover,
.filter-pill.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 2px 8px var(--primary-glow);
}

/* Tools Grid */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.tool-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.75rem 1.5rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.25rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  overflow: hidden;
}

.tool-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--card-color-1, #6366f1), var(--card-color-2, #06b6d4));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.tool-card:hover {
  transform: translateY(-6px);
  border-color: var(--primary-light);
  box-shadow: var(--shadow-lg), 0 0 20px var(--card-glow, var(--primary-glow));
}

.tool-card:hover::before {
  opacity: 1;
}

.tool-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.tool-icon-wrapper {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--card-color-1, #6366f1) 0%, var(--card-color-2, #06b6d4) 100%);
  box-shadow: 0 4px 12px var(--card-glow, var(--primary-glow));
  transition: transform 0.3s ease;
}

.tool-card:hover .tool-icon-wrapper {
  transform: scale(1.08) rotate(4deg);
}

.tool-badge-pill {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  background: var(--bg-main);
  border: 1px solid var(--border-light);
  color: var(--text-muted);
}

.tool-card-body h3 {
  font-size: 1.25rem;
  margin-bottom: 0.4rem;
  color: var(--text-main);
}

.tool-card-body p {
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.tool-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border-light);
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--primary);
}

.tool-card-footer .tool-arrow {
  transition: transform 0.2s ease;
}

.tool-card:hover .tool-card-footer .tool-arrow {
  transform: translateX(4px);
}

/* Specific Card Themes */
.card-theme-indigo { --card-color-1: #4f46e5; --card-color-2: #818cf8; --card-glow: rgba(79, 70, 229, 0.25); }
.card-theme-cyan { --card-color-1: #0891b2; --card-color-2: #06b6d4; --card-glow: rgba(6, 182, 212, 0.25); }
.card-theme-emerald { --card-color-1: #059669; --card-color-2: #10b981; --card-glow: rgba(16, 185, 129, 0.25); }
.card-theme-purple { --card-color-1: #7c3aed; --card-color-2: #a855f7; --card-glow: rgba(139, 92, 246, 0.25); }
.card-theme-rose { --card-color-1: #e11d48; --card-color-2: #fb7185; --card-glow: rgba(244, 63, 94, 0.25); }
.card-theme-amber { --card-color-1: #d97706; --card-color-2: #f59e0b; --card-glow: rgba(245, 158, 11, 0.25); }
.card-theme-teal { --card-color-1: #0d9488; --card-color-2: #14b8a6; --card-glow: rgba(20, 184, 166, 0.25); }

/* ==========================================================================
   Interactive Tool Workspace Modal / Fullscreen Overlay
   ========================================================================== */
.tool-workspace-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: var(--bg-main);
  z-index: 1000;
  display: none;
  flex-direction: column;
  overflow-y: auto;
  animation: fadeIn 0.2s ease forwards;
}

.tool-workspace-overlay.active {
  display: flex;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.99); }
  to { opacity: 1; transform: scale(1); }
}

.workspace-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-light);
  padding: 0.85rem 1.5rem;
}

.workspace-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1300px;
  margin: 0 auto;
}

.workspace-title-box {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.workspace-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  color: var(--text-main);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

.workspace-back-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--primary);
  color: var(--primary);
}

.workspace-title-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.workspace-icon-mini {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
}

.workspace-heading {
  font-size: 1.25rem;
  font-weight: 700;
}

/* Workspace Main Container */
.workspace-content {
  flex: 1;
  max-width: 1200px;
  width: 92%;
  margin: 2rem auto;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Drag & Drop File Zone */
.dropzone-container {
  background: var(--bg-card);
  border: 2px dashed var(--border-light);
  border-radius: var(--radius-lg);
  padding: 3.5rem 2rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.dropzone-container:hover,
.dropzone-container.drag-active {
  border-color: var(--primary);
  background: rgba(79, 70, 229, 0.03);
  transform: translateY(-2px);
  box-shadow: 0 10px 25px var(--primary-glow);
}

.dropzone-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.dropzone-icon-circle {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

body.dark-mode .dropzone-icon-circle {
  background: rgba(79, 70, 229, 0.2);
}

.dropzone-container:hover .dropzone-icon-circle {
  transform: scale(1.1);
}

.dropzone-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-main);
}

.dropzone-subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
}

.dropzone-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  background: var(--bg-main);
  border: 1px solid var(--border-light);
  color: var(--text-muted);
}

.file-input-hidden {
  display: none;
}

/* File List & Cards inside Tool */
.uploaded-files-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.file-card-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
  transition: var(--transition-fast);
}

.file-card-item:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

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

.file-card-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: #fee2e2;
  color: #ef4444;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

body.dark-mode .file-card-icon {
  background: rgba(239, 68, 68, 0.2);
}

.file-card-details {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.file-card-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 450px;
}

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

.file-card-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.file-card-btn {
  background: transparent;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xs);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
}

.file-card-btn:hover {
  color: var(--text-main);
  border-color: var(--text-main);
}

.file-card-btn.btn-remove:hover {
  color: #ef4444;
  border-color: #ef4444;
  background: #fee2e2;
}

body.dark-mode .file-card-btn.btn-remove:hover {
  background: rgba(239, 68, 68, 0.2);
}

/* Tool Configuration & Actions Box */
.tool-controls-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.control-panel-heading {
  font-size: 1.2rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border-light);
}

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

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

.form-input,
.form-select {
  padding: 0.7rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  background: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 0.92rem;
  outline: none;
  transition: var(--transition-fast);
}

.form-input:focus,
.form-select:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--primary-glow);
  background: var(--bg-card);
}

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

.option-select-card {
  padding: 1rem;
  border-radius: var(--radius-md);
  border: 2px solid var(--border-light);
  background: var(--bg-main);
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.option-select-card:hover {
  border-color: var(--primary);
  background: rgba(79, 70, 229, 0.04);
}

.option-select-card.selected {
  border-color: var(--primary);
  background: rgba(79, 70, 229, 0.08);
}

.option-select-card h4 {
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.option-select-card p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Page Thumbnail Grid for Organize, Split, Rotate */
.page-thumbnails-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.25rem;
  margin-top: 1rem;
}

.page-thumb-card {
  position: relative;
  background: var(--bg-card);
  border: 2px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-fast);
  cursor: grab;
}

.page-thumb-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.page-thumb-card.selected {
  border-color: var(--primary);
  background: rgba(79, 70, 229, 0.05);
}

.page-thumb-canvas-wrap {
  width: 100%;
  aspect-ratio: 1 / 1.414; /* A4 Ratio */
  background: #f1f5f9;
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

body.dark-mode .page-thumb-canvas-wrap {
  background: #1e293b;
}

.page-thumb-canvas {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.page-thumb-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.page-number-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  background: var(--bg-main);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
}

.page-thumb-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  width: 100%;
  justify-content: space-between;
}

.page-action-btn {
  background: var(--bg-main);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xs);
  color: var(--text-muted);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
}

.page-action-btn:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--bg-card);
}

.page-action-btn.delete:hover {
  color: #ef4444;
  border-color: #ef4444;
}

/* Signature Studio Pad */
.signature-studio-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.signature-tabs {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 0.5rem;
}

.sig-tab-btn {
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

.sig-tab-btn.active {
  background: var(--primary-light);
  color: var(--primary);
  border-color: rgba(79, 70, 229, 0.2);
}

body.dark-mode .sig-tab-btn.active {
  background: rgba(79, 70, 229, 0.2);
}

.signature-canvas-wrap {
  border: 2px dashed var(--border-light);
  border-radius: var(--radius-md);
  background: #ffffff;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

#signatureCanvas {
  width: 100%;
  max-width: 600px;
  height: 200px;
  background: #ffffff;
  border-radius: var(--radius-xs);
  cursor: crosshair;
  touch-action: none;
}

.signature-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 600px;
  margin-top: 0.75rem;
}

.color-picker-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.color-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.15s ease;
}

.color-dot:hover {
  transform: scale(1.15);
}

.color-dot.active {
  border-color: var(--text-main);
}

/* Typing Signature Preview */
.typed-sig-previews {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.typed-sig-card {
  padding: 1.5rem 1rem;
  background: #ffffff;
  border: 2px solid var(--border-light);
  border-radius: var(--radius-md);
  text-align: center;
  font-size: 1.8rem;
  color: #0f172a;
  cursor: pointer;
  transition: var(--transition-fast);
}

.typed-sig-card:hover,
.typed-sig-card.selected {
  border-color: var(--primary);
  background: rgba(79, 70, 229, 0.04);
}

.font-caveat { font-family: 'Caveat', cursive; }
.font-dancing { font-family: 'Dancing Script', cursive; }
.font-pacifico { font-family: 'Pacifico', cursive; }
.font-vibes { font-family: 'Great Vibes', cursive; }

/* Interactive Page Placement Overlay for Watermarks / Signatures */
.pdf-interactive-viewport {
  position: relative;
  margin: 1.5rem auto;
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius-xs);
  overflow: hidden;
  max-width: 800px;
  background: #ffffff;
}

#interactivePdfCanvas {
  display: block;
  width: 100%;
  height: auto;
}

.draggable-element {
  position: absolute;
  border: 2px dashed var(--primary);
  background: rgba(79, 70, 229, 0.15);
  cursor: move;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  touch-action: none;
  box-sizing: border-box;
}

.draggable-element img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  pointer-events: none;
}

/* Word to PDF / PDF to Word live preview container */
.doc-preview-container {
  background: #ffffff;
  color: #1e293b;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 2.5rem;
  max-height: 500px;
  overflow-y: auto;
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.05);
  font-family: 'Inter', Georgia, serif;
  line-height: 1.8;
}

.doc-preview-container h1,
.doc-preview-container h2,
.doc-preview-container h3 {
  color: #0f172a;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

/* ==========================================================================
   Loading & Processing Modal
   ========================================================================== */
.processing-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
}

.processing-overlay.active {
  display: flex;
}

.processing-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 2.5rem 3rem;
  box-shadow: var(--shadow-xl);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  max-width: 440px;
  width: 90%;
  text-align: center;
}

.spinner-ring {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 4px solid var(--border-light);
  border-top-color: var(--primary);
  animation: spin 0.8s linear infinite;
}

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

.processing-title {
  font-size: 1.35rem;
  font-weight: 700;
}

.processing-status {
  font-size: 0.95rem;
  color: var(--text-muted);
}

.progress-info-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-bottom: -0.5rem;
}

.progress-percent-label {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--primary);
  background: rgba(79, 70, 229, 0.1);
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-full);
}

.progress-bar-wrap {
  width: 100%;
  height: 10px;
  background: var(--border-light);
  border-radius: var(--radius-full);
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #4f46e5, #06b6d4, #10b981);
  border-radius: var(--radius-full);
  transition: width 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   Result / Download Ready Card Styling
   ========================================================================== */
.result-ready-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 3rem 2.5rem;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.5rem;
  max-width: 650px;
  margin: 0 auto;
  animation: fadeInScale 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeInScale {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

.result-check-badge {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px rgba(16, 185, 129, 0.35);
  animation: pulseSuccess 2s infinite ease-in-out;
}

.result-check-badge .material-symbols-outlined {
  font-size: 3rem;
}

@keyframes pulseSuccess {
  0% { transform: scale(1); box-shadow: 0 10px 25px rgba(16, 185, 129, 0.35); }
  50% { transform: scale(1.06); box-shadow: 0 14px 30px rgba(16, 185, 129, 0.5); }
  100% { transform: scale(1); box-shadow: 0 10px 25px rgba(16, 185, 129, 0.35); }
}

.result-title-group h3 {
  font-size: 1.85rem;
  font-weight: 800;
  margin-bottom: 0.35rem;
}

.result-title-group p {
  font-size: 1rem;
  color: var(--text-muted);
}

.result-file-info-box {
  width: 100%;
  background: var(--bg-main);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  text-align: left;
}

.result-file-left {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
}

.result-file-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.result-file-details {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.result-file-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 320px;
}

.result-file-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.15rem;
}

.result-size-pill {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  font-weight: 600;
}

.result-actions-stack {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.btn-download-primary {
  width: 100%;
  padding: 1.1rem 2rem;
  font-size: 1.15rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  border: none;
  cursor: pointer;
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
  transition: var(--transition);
}

.btn-download-primary:hover {
  transform: translateY(-3px);
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  box-shadow: 0 12px 30px rgba(16, 185, 129, 0.55);
}

.btn-download-primary .material-symbols-outlined {
  font-size: 1.6rem;
}

.result-secondary-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Compression Comparison Box */
.compression-comparison-box {
  width: 100%;
  background: rgba(16, 185, 129, 0.06);
  border: 1.5px dashed #10b981;
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-around;
  text-align: center;
}

.comp-stat-col {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.comp-stat-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-weight: 600;
}

.comp-stat-value {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
}

.comp-savings-badge {
  background: #10b981;
  color: #ffffff;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-weight: 800;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* Toast Notification */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.toast {
  padding: 0.85rem 1.35rem;
  background: var(--bg-card);
  color: var(--text-main);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.92rem;
  font-weight: 500;
  animation: slideInRight 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(50px); }
  to { opacity: 1; transform: translateX(0); }
}

.toast.toast-success { border-left: 4px solid #10b981; }
.toast.toast-error { border-left: 4px solid #ef4444; }
.toast.toast-info { border-left: 4px solid #4f46e5; }

/* ==========================================================================
   Features & Trust Section
   ========================================================================== */
.features-section {
  padding: 5rem 0;
  background: var(--bg-card);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.feature-item-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 2rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  background: var(--bg-main);
  transition: var(--transition-smooth);
}

.feature-item-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

.feature-icon-box {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

body.dark-mode .feature-icon-box {
  background: rgba(79, 70, 229, 0.2);
}

/* FAQ Section */
.faq-section {
  padding: 5rem 0;
}

.faq-accordion {
  max-width: 800px;
  margin: 2.5rem auto 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-item {
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  overflow: hidden;
  transition: var(--transition-fast);
}

.faq-question {
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-weight: 600;
  font-size: 1.05rem;
}

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

.faq-answer {
  padding: 0 1.5rem 1.25rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  display: none;
}

.faq-item.active .faq-answer {
  display: block;
}

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

.faq-chevron {
  transition: transform 0.2s ease;
}

/* Footer */
.site-footer {
  background: var(--bg-main);
  border-top: 1px solid var(--border-light);
  padding: 4.5rem 0 2rem;
  color: var(--text-muted);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand p {
  margin-top: 0.75rem;
  font-size: 0.92rem;
  max-width: 320px;
}

.footer-column h4 {
  font-size: 1rem;
  color: var(--text-main);
  margin-bottom: 1.2rem;
}

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

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

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

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Responsive Breakpoints */
@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2.5rem;
  }

  .hero-content {
    align-items: center;
  }

  .hero-desc {
    max-width: 100%;
  }

  .hero-cta-group,
  .hero-stats-row {
    justify-content: center;
  }

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

  .nav-menu {
    display: none;
  }
}

@media (max-width: 640px) {
  .tools-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .search-box-wrap {
    min-width: 100%;
  }

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

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

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

  .workspace-header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
}
