@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
  /* Brand Color Palette matching www.flexdoc.com */
  --bg-main: #f3f6f9;
  --bg-surface: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f9fafb;
  
  --primary: #e13038; /* FlexDoc Brand Red */
  --primary-hover: #c61f26;
  --primary-glow: rgba(225, 48, 56, 0.1);
  
  --accent: #4b5563; /* Slate Dark Gray */
  --accent-hover: #374151;
  
  --text-primary: #1f2937; /* Dark Slate Gray */
  --text-secondary: #4b5563;
  --text-muted: #9ca3af;
  
  --border-color: #e5e7eb;
  --border-hover: #d1d5db;
  --border-focus: #e13038;
  
  --success: #10b981;
  --error: #ef4444;
  --warning: #f59e0b;
  
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px 0 rgba(0, 0, 0, 0.03);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
  --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 10px 10px -5px rgba(0, 0, 0, 0.03);
}

:root[data-theme="dark"] {
  --bg-main: #111827;
  --bg-surface: #1f2937;
  --bg-card: #1f2937;
  --bg-card-hover: #263244;
  --primary: #f05252;
  --primary-hover: #ef4444;
  --primary-glow: rgba(240, 82, 82, 0.18);
  --accent: #d1d5db;
  --accent-hover: #f9fafb;
  --text-primary: #f9fafb;
  --text-secondary: #d1d5db;
  --text-muted: #9ca3af;
  --border-color: #374151;
  --border-hover: #4b5563;
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.28);
  --shadow-md: 0 8px 18px -8px rgba(0, 0, 0, 0.45);
  --shadow-hover: 0 20px 28px -12px rgba(0, 0, 0, 0.5);
}

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

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

/* Header / Navigation */
header {
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.85rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  line-height: 1;
}

.logo-icon {
  background: var(--primary);
  color: #fff;
  width: 48px;
  height: 38px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.25rem;
  box-shadow: 0 2px 8px rgba(225, 48, 56, 0.25);
  margin: 0;
  padding: 0;
}

.logo-text {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.45rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  line-height: 1;
  padding-bottom: 2px; /* Visual balance adjustment for the font baseline */
}

.logo-accent {
  color: var(--primary);
  font-weight: 800;
}

.nav-links {
  display: flex;
  gap: 1.25rem;
  align-items: center;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  transition: var(--transition-fast);
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
}

.nav-link:hover {
  color: var(--primary);
  background-color: rgba(225, 48, 56, 0.05);
}
.dropdown {
  position: relative;
  display: inline-block;
}

.dropbtn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  transition: var(--transition-fast);
}

.dropbtn:hover {
  color: var(--primary);
  background-color: rgba(225, 48, 56, 0.05);
}

.dropdown-content {
  display: none;
  position: absolute;
  right: 0;
  background-color: var(--bg-surface);
  width: min(520px, calc(100vw - 2rem));
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  z-index: 1;
  padding: 0.5rem 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.15rem 0.25rem;
}

.dropdown:hover .dropdown-content {
  display: grid;
}

.dropdown-content a {
  color: var(--text-primary);
  padding: 0.55rem 0.85rem;
  text-decoration: none;
  display: block;
  font-size: 0.9rem;
  white-space: nowrap;
}

.dropdown-content a:hover {
  background-color: rgba(225, 48, 56, 0.05);
  color: var(--primary);
}
/* Common Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition-normal);
  border: none;
}

.btn-primary {
  background-color: var(--primary);
  color: white;
  box-shadow: 0 4px 10px rgba(225, 48, 56, 0.2);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(225, 48, 56, 0.3);
}

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

.btn-secondary {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

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

/* Main Content Area */
main {
  flex: 1;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 3rem 2rem;
}

.page-layout {
  width: 100%;
  max-width: 1560px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr) 160px;
  gap: 1.25rem;
  align-items: start;
  flex: 1;
}

.page-layout.landing-layout {
  display: block;
  max-width: 1200px;
}

.page-layout.landing-layout .ad-slot {
  display: none;
}

.ad-slot {
  position: sticky;
  top: 96px;
  min-height: 600px;
  margin-top: 3rem;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  background: var(--bg-surface);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 0.8rem;
  padding: 1rem;
}

.ad-slot span {
  display: block;
  max-width: 110px;
}

@media (max-width: 1180px) {
  .page-layout {
    display: block;
  }

  .ad-slot {
    display: none;
  }
}

/* Hero Section */
.hero {
  text-align: center;
  margin-bottom: 3.5rem;
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: 3.2rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.hero h1 span {
  color: var(--primary);
}

.hero p {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 650px;
  margin: 0 auto;
}

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

/* Brand Card */
.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 2rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  cursor: pointer;
  transition: var(--transition-normal);
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-sm);
}

.tool-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  background-color: var(--bg-card-hover);
}



/* Card Icons */
.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  margin-bottom: 0.25rem;
}

.card-icon svg {
  width: 24px;
  height: 24px;
  stroke-width: 2;
}

/* Ensure Lucide icons have proper size */
.card-icon i {
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.card-icon i svg {
  width: 24px;
  height: 24px;
  stroke-width: 2;
  fill: currentColor;
  stroke: currentColor;
}

.icon-merge { background-color: #3b82f6; }
.icon-split { background-color: #ef4444; }
.icon-rotate { background-color: #10b981; }
.icon-watermark { background-color: #f59e0b; }
.icon-organize { background-color: #0284c7; }
.icon-page-number { background-color: #ec4899; }
.icon-img-to-pdf { background-color: #6366f1; }
.icon-pdf-to-img { background-color: #a855f7; }
.icon-compress { background-color: #06b6d4; }
.icon-remove-pages { background-color: #f97316; }
.icon-extract-pages { background-color: #22c55e; }
.icon-optimize-pdf { background-color: #14b8a6; }
.icon-repair-pdf { background-color: #64748b; }
.icon-ocr-pdf { background-color: #8b5cf6; }
.icon-jpg-to-pdf { background-color: #0ea5e9; }
.icon-word-to-pdf { background-color: #2563eb; }
.icon-edit-pdf { background-color: #7c3aed; }
.icon-sign-pdf { background-color: #dc2626; }
.icon-excel-to-pdf { background-color: #16a34a; }

.tool-card h3 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
}

.tool-card p {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

/* SPA App view styling */
.app-view {
  display: none;
  animation: fadeIn 0.3s ease-out;
}

.app-view.active {
  display: block;
}

/* Back navigation */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

.back-link:hover {
  color: var(--primary);
  transform: translateX(-2px);
}

/* Tool Workspace Layout */
.workspace {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 900px) {
  .workspace.has-files {
    grid-template-columns: 1fr 340px;
  }
}

/* White panel container */
.glass-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: var(--shadow-md);
}

/* Upload Zone */
.upload-zone {
  border: 2px dashed #cbd5e1;
  border-radius: 12px;
  padding: 4.5rem 2rem;
  text-align: center;
  cursor: pointer;
  background: var(--bg-main);
  transition: var(--transition-normal);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.upload-zone:hover, .upload-zone.dragover {
  border-color: var(--primary);
  background: rgba(225, 48, 56, 0.02);
}

.upload-icon-wrapper {
  width: 64px;
  height: 64px;
  background: rgba(225, 48, 56, 0.04);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  border: 1px solid rgba(225, 48, 56, 0.1);
  transition: var(--transition-normal);
}

.upload-zone:hover .upload-icon-wrapper {
  color: white;
  background: var(--primary);
  box-shadow: 0 4px 10px rgba(225, 48, 56, 0.25);
  transform: translateY(-2px);
}

.upload-zone h2 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

.upload-zone p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.file-input {
  display: none;
}

/* Uploaded Files Manager */
.files-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.files-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.75rem;
}

.files-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 1.25rem;
}

/* Preview Card */
.file-card {
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 0.85rem;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: var(--transition-normal);
}

.file-card:hover {
  background: var(--bg-surface);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-sm);
}

.thumbnail-box {
  background: var(--bg-surface);
  border-radius: 6px;
  aspect-ratio: 1 / 1.3;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid var(--border-color);
  position: relative;
}

.thumbnail-canvas {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.thumbnail-icon-fallback {
  color: var(--text-muted);
}

.file-card-details {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.file-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-meta {
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.card-remove-btn {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 22px;
  height: 22px;
  background: var(--error);
  color: white;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-fast);
  z-index: 5;
  font-size: 0.95rem;
  font-weight: 700;
}

.card-remove-btn:hover {
  transform: scale(1.15);
  background: #dc2626;
}

.rotate-overlay-btn {
  position: absolute;
  bottom: 6px;
  right: 6px;
  width: 28px;
  height: 28px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-normal);
  box-shadow: var(--shadow-sm);
}

.rotate-overlay-btn:hover {
  background: var(--primary);
  color: white;
  transform: rotate(90deg);
  border-color: var(--primary);
}

/* Sidebar Settings Configuration */
.sidebar-settings {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.sidebar-settings h3 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
  color: var(--text-primary);
}

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

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

.form-control {
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 0.65rem;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition-fast);
}

.form-control:focus {
  border-color: var(--primary);
  background-color: var(--bg-surface);
  box-shadow: 0 0 0 2px var(--primary-glow);
}

select.form-control option {
  background-color: var(--bg-surface);
  color: var(--text-primary);
}

.signature-pad {
  width: 100%;
  height: 180px;
  display: block;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  cursor: crosshair;
  touch-action: none;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
}

.editor-hint {
  color: var(--text-secondary);
  font-size: 0.82rem;
  line-height: 1.5;
  margin-top: 0.85rem;
}

.pdf-editor-pages {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  overflow-x: auto;
  padding: 0.25rem 0 0.75rem;
}

.pdf-editor-page {
  position: relative;
  align-self: center;
  max-width: 100%;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.pdf-editor-page-label {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 3;
  background: rgba(17, 24, 39, 0.74);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.45rem;
  border-radius: 6px;
  pointer-events: none;
}

.pdf-editor-canvas {
  display: block;
  max-width: 100%;
  height: auto;
}

.pdf-editor-overlay {
  position: absolute;
  inset: 0;
  cursor: crosshair;
}

.editor-annotation {
  position: absolute;
  z-index: 4;
  display: inline-flex;
  align-items: stretch;
  min-width: 96px;
  max-width: min(420px, 86%);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(124, 58, 237, 0.55);
  border-radius: 6px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.12);
  cursor: text;
}

.editor-annotation-handle,
.editor-annotation-delete {
  border: 0;
  color: #fff;
  cursor: grab;
  font-size: 0.66rem;
  font-weight: 800;
  padding: 0 0.38rem;
}

.editor-annotation-handle {
  background: #7c3aed;
  border-radius: 5px 0 0 5px;
  writing-mode: vertical-rl;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.editor-annotation-delete {
  background: #dc2626;
  border-radius: 0 5px 5px 0;
  font-size: 1rem;
  line-height: 1;
}

.editor-annotation-text {
  display: inline-block;
  min-width: 56px;
  padding: 0.25rem 0.4rem;
  outline: none;
  word-break: break-word;
  white-space: pre-wrap;
}

.editor-annotation-text:focus {
  background: rgba(124, 58, 237, 0.08);
}

.editor-shape {
  position: absolute;
  z-index: 4;
  min-width: 14px;
  min-height: 14px;
  border-style: solid;
  border-radius: 3px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.1);
}

.editor-shape-highlight {
  border-color: transparent !important;
  mix-blend-mode: multiply;
}

.editor-drawing-wrap,
.editor-drawing {
  position: absolute;
  inset: 0;
  z-index: 4;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.editor-drawing-wrap {
  pointer-events: none;
}

.editor-drawing {
  pointer-events: none;
}

.editor-floating-delete {
  position: absolute;
  top: -10px;
  right: -10px;
  z-index: 7;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 50%;
  background: #dc2626;
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  pointer-events: auto;
}

.editor-drawing .editor-floating-delete {
  top: 8px;
  right: 8px;
}

.editor-loading {
  color: var(--text-secondary);
  border: 1px dashed var(--border-color);
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
}

.theme-toggle {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-surface);
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-fast);
}

.theme-toggle:hover {
  color: var(--primary);
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
}

.content-page {
  max-width: 1040px;
  margin: 0 auto;
  padding: 2.5rem 2rem;
}

.content-hero {
  margin-bottom: 2rem;
}

.content-hero h1 {
  font-family: var(--font-heading);
  font-size: 2.6rem;
  line-height: 1.15;
  margin-bottom: 0.75rem;
}

.content-hero p {
  max-width: 760px;
  color: var(--text-secondary);
  font-size: 1.05rem;
}

.content-section {
  margin-top: 2rem;
}

.content-section h2 {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  margin-bottom: 1rem;
}

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

.info-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.1rem;
  box-shadow: var(--shadow-sm);
}

.info-card h3 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  margin-bottom: 0.45rem;
}

.info-card p,
.content-section li {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.tool-use-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.tool-use-list article {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1rem;
  box-shadow: var(--shadow-sm);
}

.tool-use-list h3 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  margin-bottom: 0.35rem;
}

.tool-use-list a {
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
}

.blog-article {
  display: block;
}

.blog-intro p,
.blog-tool-guide p {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 0.85rem;
}

.blog-tool-guide {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.4rem;
  box-shadow: var(--shadow-sm);
}

.blog-tool-guide h3 {
  font-family: var(--font-heading);
  font-size: 1.12rem;
  margin: 1rem 0 0.4rem;
}

.blog-tool-guide a,
.blog-toc a {
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
}

.blog-toc {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.65rem;
  margin-top: 1.25rem;
}

.blog-toc a {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.75rem 0.85rem;
  box-shadow: var(--shadow-sm);
}

.site-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  margin-top: auto;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 1.5rem;
}

.footer-brand p,
.footer-column a,
.footer-bottom {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.footer-brand h2,
.footer-column h3 {
  font-family: var(--font-heading);
  margin-bottom: 0.65rem;
}

.footer-brand h2 {
  color: var(--primary);
  font-size: 1.35rem;
}

.footer-column h3 {
  font-size: 1rem;
}

.footer-column a {
  display: block;
  text-decoration: none;
  margin: 0.4rem 0;
}

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

.footer-bottom {
  border-top: 1px solid var(--border-color);
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem 1.4rem;
}

@media (max-width: 760px) {
  .nav-container {
    padding: 0.75rem 1rem;
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .nav-links {
    gap: 0.35rem;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .nav-link,
  .dropbtn {
    padding: 0.45rem 0.5rem;
  }

  main,
  .content-page {
    padding: 1.5rem 1rem;
  }

  .hero {
    margin-bottom: 2rem;
  }

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

  .tool-card {
    padding: 1.35rem;
  }

  .dropdown-content {
    left: 0;
    right: auto;
    width: min(340px, calc(100vw - 2rem));
    grid-template-columns: 1fr;
  }

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

/* Loading Panel Overlay */
.loading-panel {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  text-align: center;
  padding: 3rem 0;
}

.spinner {
  width: 44px;
  height: 44px;
  border: 3px solid rgba(225, 48, 56, 0.1);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s infinite linear;
}

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

.loading-panel h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* Success download panel */
.download-panel {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  text-align: center;
  padding: 2rem 0;
}

.success-icon-wrapper {
  width: 64px;
  height: 64px;
  background: rgba(16, 185, 129, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.download-panel h2 {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.8rem;
  color: var(--text-primary);
}

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