/* 
   PDFTOOLS - MONOCHROME DESIGN SYSTEM 
   Strictly Monochrome: Obsidian, Zinc, Slate, Pure White.
   NO PURPLE GRADIENTS OR TINTS.
*/

:root {
  --bg-dark: #09090b;
  --bg-card: #121215;
  --bg-card-hover: #1a1a1e;
  --bg-elevated: #1f1f23;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.18);
  --border-focus: #ffffff;
  
  --text-main: #fafafa;
  --text-muted: #a1a1aa;
  --text-dim: #71717a;

  --accent-white: #ffffff;
  --accent-black: #000000;
  --accent-zinc: #27272a;
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 36px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 25px rgba(255, 255, 255, 0.07);

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;

  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

/* Background Subtle Canvas Noise/Grid */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.03) 0%, transparent 60%),
    linear-gradient(to right, rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 100% 100%, 40px 40px, 40px 40px;
  pointer-events: none;
  z-index: 0;
}

/* Layout */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(9, 9, 11, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 1rem 2rem;
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-main);
}

.brand-icon {
  width: 38px;
  height: 38px;
  background: #ffffff;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000000;
  font-weight: 800;
  font-size: 1.2rem;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

.brand-name {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-badge {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-full);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
}

/* Header Navigation Menu Tabs */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg-card);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.nav-tab {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0.45rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.nav-tab:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.04);
}

.nav-tab.active {
  background: var(--accent-white);
  color: var(--accent-black);
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(255, 255, 255, 0.18);
}

/* Tool Hub Grid (iLovePDF Style) */
.tool-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  margin: 2.5rem 0 4rem;
}

.tool-grid-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  text-decoration: none;
  color: var(--text-main);
}

.tool-grid-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
  background: transparent;
  transition: var(--transition);
}

.tool-grid-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  background: var(--bg-card-hover);
}

.tool-grid-card:hover::before {
  background: var(--accent-white);
}

.tool-card-icon {
  width: 54px;
  height: 54px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 1.5rem;
  transition: var(--transition);
}

.tool-grid-card:hover .tool-card-icon {
  background: #ffffff;
  color: #000000;
  transform: scale(1.08);
}

.tool-card-title {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tool-card-desc {
  font-size: 0.925rem;
  color: var(--text-muted);
  line-height: 1.55;
  flex: 1;
}

.tool-card-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

/* SEO Content & FAQ Section */
.seo-section {
  padding: 4rem 0;
  border-top: 1px solid var(--border-subtle);
}

.seo-title {
  font-size: 2rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.seo-subtitle {
  text-align: center;
  color: var(--text-muted);
  max-width: 650px;
  margin: 0 auto 3rem;
  font-size: 1.05rem;
}

.seo-features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 4rem;
}

.seo-feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.seo-feature-icon {
  font-size: 1.75rem;
  margin-bottom: 0.25rem;
}

.seo-feature-h3 {
  font-size: 1.1rem;
  font-weight: 700;
}

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

/* SEO How-To 3-Step Process Cards */
.seo-howto-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 1.5rem 0 3.5rem;
  width: 100%;
}

.seo-howto-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  position: relative;
  transition: var(--transition);
}

.seo-howto-card:hover {
  border-color: var(--border-strong);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.seo-step-badge {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #ffffff;
  color: #000000;
  font-size: 1.1rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.25rem;
}

/* SEO Competitor Comparison Matrix */
.seo-comparison-table-wrapper {
  width: 100%;
  overflow-x: auto;
  margin: 1.5rem 0 3.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.seo-comparison-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.925rem;
  min-width: 600px;
}

.seo-comparison-table th, 
.seo-comparison-table td {
  padding: 1.15rem 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
}

.seo-comparison-table th {
  background: var(--bg-elevated);
  font-weight: 700;
  color: #ffffff;
  font-size: 0.95rem;
}

.seo-comparison-table tbody tr:last-child td {
  border-bottom: none;
}

.seo-comparison-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.table-highlight {
  background: rgba(255, 255, 255, 0.05);
  font-weight: 600;
  color: #ffffff;
}

.seo-badge-yes {
  display: inline-flex;
  align-items: center;
  background: #ffffff;
  color: #000000;
  font-weight: 700;
  font-size: 0.8rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
}

.seo-badge-no {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  font-size: 0.8rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
}

.seo-guide-section {
  margin: 2.5rem 0;
}

/* FAQ Accordions */
.faq-accordion {
  max-width: 850px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

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

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

.faq-question:hover {
  background: var(--bg-card-hover);
}

.faq-toggle-icon {
  font-size: 1.2rem;
  transition: transform 0.25s ease;
}

.faq-item.active .faq-toggle-icon {
  transform: rotate(45deg);
}

.faq-answer {
  display: none;
  padding: 0 1.5rem 1.25rem;
  font-size: 0.925rem;
  color: var(--text-muted);
  line-height: 1.65;
  border-top: 1px solid var(--border-subtle);
  padding-top: 1rem;
}

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

/* Footer */
.app-footer {
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-dark);
  padding: 3rem 2rem 2rem;
  margin-top: 4rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.footer-container {
  max-width: 1300px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2rem;
}


.main-content {
  flex: 1;
  max-width: 1300px;
  width: 100%;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
  position: relative;
  z-index: 1;
}

/* Hero & Upload Dropzone */
.hero-section {
  text-align: center;
  margin-bottom: 2.5rem;
}

.hero-title {
  font-size: 2.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 0.75rem;
  color: #ffffff;
}

.hero-subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto 2rem;
}

/* Dropzone Box */
.dropzone-container {
  background: var(--bg-card);
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 3.5rem 2rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.dropzone-container:hover, .dropzone-container.drag-over {
  border-color: var(--accent-white);
  background: var(--bg-card-hover);
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}

.dropzone-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.25rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  color: var(--text-main);
  transition: var(--transition);
}

.dropzone-container:hover .dropzone-icon {
  background: var(--accent-white);
  color: var(--accent-black);
  transform: scale(1.08);
}

.dropzone-text {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.dropzone-hint {
  font-size: 0.875rem;
  color: var(--text-dim);
}

#file-input {
  display: none;
}

/* Settings Bar */
.extraction-options {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.option-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-card);
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.option-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  padding-left: 0.5rem;
}

.segment-control {
  display: flex;
  background: var(--bg-dark);
  padding: 3px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.segment-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0.4rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition);
}

.segment-btn.active {
  background: var(--accent-white);
  color: var(--accent-black);
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(255, 255, 255, 0.15);
}

.select-input {
  background: var(--bg-dark);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
  outline: none;
  cursor: pointer;
}

/* Loading & Progress Overlay */
.progress-card {
  display: none;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  text-align: center;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-lg);
}

.spinner-mono {
  width: 48px;
  height: 48px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 1.25rem;
}

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

.progress-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.progress-bar-bg {
  width: 100%;
  max-width: 400px;
  height: 6px;
  background: var(--bg-elevated);
  border-radius: var(--radius-full);
  margin: 1rem auto 0;
  overflow: hidden;
}

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

/* Workspace / Results Dashboard */
.workspace-container {
  display: none;
}

.doc-info-bar {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.doc-details {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.pdf-icon-badge {
  width: 44px;
  height: 44px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
}

.doc-name {
  font-size: 1.1rem;
  font-weight: 600;
}

.doc-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
}

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

/* Toolbar & Filters */
.toolbar-container {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.filter-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.search-box {
  position: relative;
}

.search-input {
  background: var(--bg-dark);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.8rem 0.45rem 2.2rem;
  color: var(--text-main);
  font-size: 0.85rem;
  outline: none;
  width: 180px;
  transition: var(--transition);
}

.search-input:focus {
  border-color: var(--accent-white);
  width: 230px;
}

.search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  font-size: 0.85rem;
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.55rem 1.1rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--accent-white);
  color: var(--accent-black);
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.15);
}

.btn-primary:hover {
  background: #e4e4e7;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(255, 255, 255, 0.25);
}

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

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-strong);
  color: #ffffff;
}

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

.badge-count {
  background: var(--accent-black);
  color: var(--accent-white);
  font-size: 0.75rem;
  padding: 0.1rem 0.45rem;
  border-radius: var(--radius-full);
  margin-left: 0.2rem;
}

/* Gallery Grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.image-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.image-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.image-card.selected {
  border-color: var(--accent-white);
  box-shadow: 0 0 0 2px var(--accent-white);
}

.card-thumb-container {
  height: 200px;
  background: #000000;
  background-image: 
    linear-gradient(45deg, #121215 25%, transparent 25%), 
    linear-gradient(-45deg, #121215 25%, transparent 25%), 
    linear-gradient(45deg, transparent 75%, #121215 75%), 
    linear-gradient(-45deg, transparent 75%, #121215 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.card-thumb {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  transition: var(--transition);
}

.image-card:hover .card-thumb {
  transform: scale(1.05);
}

.card-select-checkbox {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  width: 20px;
  height: 20px;
  accent-color: var(--accent-white);
  cursor: pointer;
  z-index: 10;
}

.card-page-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
}

.card-details {
  padding: 0.9rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-card);
}

.card-filename {
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.card-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.4rem;
}

/* Lightbox Modal */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  max-width: 1000px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.25s ease-out;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

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

.modal-title {
  font-size: 1.1rem;
  font-weight: 600;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.modal-close-btn:hover {
  color: #ffffff;
  background: var(--bg-elevated);
}

.modal-body {
  padding: 1.5rem;
  display: flex;
  gap: 1.5rem;
  overflow-y: auto;
  align-items: center;
  justify-content: center;
}

.modal-image-preview {
  max-width: 65%;
  max-height: 60vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.8);
}

.modal-info-panel {
  flex: 1;
  background: var(--bg-dark);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.info-row {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.5rem;
  font-size: 0.875rem;
}

.info-label {
  color: var(--text-muted);
}

.info-val {
  font-weight: 600;
  font-family: var(--font-mono);
}

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

.toast {
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  color: var(--text-main);
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  animation: toastIn 0.3s ease-out;
}

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

/* Empty State */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
  grid-column: 1 / -1;
}

.empty-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
  display: none;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: #ffffff;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  position: relative;
  z-index: 1001;
  pointer-events: auto;
}

.mobile-menu-toggle svg {
  pointer-events: none;
}

.mobile-menu-toggle:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-strong);
}

/* =========================================================================
   RESPONSIVE DESIGN SYSTEM (Tablets, Mobile & Touch Devices)
   ========================================================================= */

@media (max-width: 900px) {
  .mobile-menu-toggle {
    display: flex;
  }

  .app-header {
    padding: 0.85rem 1.25rem;
    position: sticky;
    top: 0;
    z-index: 1000;
  }

  .header-container {
    position: relative;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 0;
    width: 100%;
  }

  .nav-menu {
    position: absolute;
    top: calc(100% + 0.85rem);
    left: -1.25rem;
    right: -1.25rem;
    background: #0d0d10;
    border-bottom: 1px solid var(--border-strong);
    border-top: 1px solid var(--border-subtle);
    flex-direction: column;
    align-items: stretch;
    padding: 1rem 1.25rem;
    gap: 0.5rem;
    display: none;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.95);
    z-index: 9999;
  }

  .nav-menu.open {
    display: flex !important;
    animation: menuSlideDown 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .nav-tab {
    width: 100%;
    text-align: left;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .nav-tab.active {
    background: #ffffff;
    color: #000000;
    border-color: #ffffff;
    font-weight: 700;
  }

  .tool-hub-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
    margin: 2rem 0;
    width: 100%;
    box-sizing: border-box;
  }

  .tool-grid-card {
    width: 100%;
    box-sizing: border-box;
  }

  .hero-title {
    font-size: clamp(1.6rem, 5vw, 2.5rem);
  }

  .hero-subtitle {
    font-size: clamp(0.875rem, 2.2vw, 1.05rem);
  }
}


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


@media (max-width: 768px) {
  .main-content {
    padding: 1.25rem 0.85rem;
    width: 100%;
    box-sizing: border-box;
  }

  .hero-section {
    padding: 1.25rem 0;
    width: 100%;
  }

  .tool-hub-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
    margin: 1.5rem 0 2.5rem;
  }

  .dropzone-container {
    padding: 2rem 0.85rem;
    width: 100%;
    box-sizing: border-box;
  }

  .dropzone-text {
    font-size: 0.95rem;
  }

  .toolbar-container {
    flex-direction: column;
    align-items: stretch;
    gap: 0.85rem;
    width: 100%;
    box-sizing: border-box;
  }

  .filter-controls {
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
    width: 100%;
  }

  .search-box {
    width: 100%;
  }

  .search-input {
    width: 100%;
    box-sizing: border-box;
  }

  .option-group {
    width: 100%;
    justify-content: space-between;
    box-sizing: border-box;
  }

  .select-input {
    flex: 1;
    min-width: 0;
  }

  .batch-actions {
    flex-wrap: wrap;
    justify-content: stretch;
    gap: 0.5rem;
    width: 100%;
  }

  .batch-actions .btn {
    flex: 1 1 calc(50% - 0.5rem);
    min-width: 120px;
    justify-content: center;
    text-align: center;
  }

  .doc-info-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.85rem;
    padding: 0.85rem;
    width: 100%;
    box-sizing: border-box;
  }

  .doc-actions {
    width: 100%;
    display: flex;
    gap: 0.5rem;
  }

  .doc-actions .btn {
    flex: 1;
    justify-content: center;
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 0.75rem;
    width: 100%;
  }

  .seo-section {
    padding: 2.5rem 0;
    width: 100%;
    box-sizing: border-box;
  }

  .seo-title {
    font-size: 1.35rem;
  }

  .seo-subtitle {
    font-size: 0.875rem;
    margin-bottom: 1.75rem;
  }

  .seo-features-grid {
    grid-template-columns: 1fr;
    gap: 0.85rem;
    margin-bottom: 2rem;
    width: 100%;
  }

  .faq-question {
    padding: 0.85rem 1rem;
    font-size: 0.9rem;
  }

  .faq-answer {
    padding: 0 1rem 0.85rem;
    font-size: 0.825rem;
  }

  .app-footer {
    padding: 2rem 1rem 1.25rem;
    margin-top: 2.5rem;
    width: 100%;
    box-sizing: border-box;
  }

  .footer-container {
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
  }

  .toast-container {
    left: 0.85rem;
    right: 0.85rem;
    bottom: 0.85rem;
  }

  .toast {
    width: 100%;
    box-sizing: border-box;
  }

  .modal-content {
    width: 95%;
    max-height: 90vh;
  }

  .modal-body {
    flex-direction: column;
    max-height: 75vh;
  }
}

@media (max-width: 480px) {
  .brand-name {
    font-size: 1.05rem;
  }

  .tool-hub-grid {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  .tool-grid-card {
    padding: 1.25rem 1rem;
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }

  .segment-control {
    width: 100%;
    flex-direction: column;
  }

  .segment-btn {
    width: 100%;
    text-align: center;
  }
}


