/* ==========================================================================
   PDFoo - Geist Design System Inspired Stylesheet
   Based on Vercel's design language
   ========================================================================== */

/* Geist Font Import */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ==========================================================================
   CSS Custom Properties (Geist Design Tokens) - Light Theme
   ========================================================================== */
:root {
  /* Background colors - Light theme */
  --geist-background: #ffffff;
  --geist-foreground: #000000;
  --accents-1: #fafafa;
  --accents-2: #eaeaea;
  --accents-3: #999999;
  --accents-4: #888888;
  --accents-5: #666666;
  --accents-6: #444444;
  --accents-7: #333333;
  --accents-8: #111111;
  
  /* Semantic colors */
  --geist-success: #0070f3;
  --geist-success-light: #3291ff;
  --geist-success-lighter: #d3e5ff;
  --geist-success-dark: #0761d1;
  
  --geist-error: #e00;
  --geist-error-light: #ff1a1a;
  --geist-error-lighter: #f7d4d6;
  --geist-error-dark: #c50000;
  
  --geist-warning: #f5a623;
  --geist-warning-light: #f7b955;
  --geist-warning-lighter: #ffefcf;
  --geist-warning-dark: #ab570a;
  
  --geist-cyan: #50e3c2;
  --geist-cyan-light: #79ffe1;
  --geist-cyan-lighter: #aaffec;
  --geist-cyan-dark: #29bc9b;
  
  --geist-violet: #7928ca;
  --geist-violet-light: #8a63d2;
  --geist-violet-lighter: #e3d7fc;
  --geist-violet-dark: #4c2889;
  
  --geist-purple: #f81ce5;
  --geist-purple-light: #eb367f;
  --geist-purple-lighter: #f9c6e8;
  
  /* Spacing */
  --geist-gap: 16pt;
  --geist-gap-half: 8pt;
  --geist-gap-quarter: 4pt;
  --geist-gap-double: 32pt;
  --geist-gap-triple: 48pt;
  
  /* Page layout */
  --geist-page-margin: 24px;
  --geist-page-width: 1200px;
  
  /* Radius */
  --geist-radius: 6px;
  --geist-radius-sm: 4px;
  --geist-radius-lg: 12px;
  --geist-radius-xl: 16px;
  
  /* Shadows */
  --geist-shadow-small: 0 5px 10px rgba(0, 0, 0, 0.08);
  --geist-shadow-medium: 0 8px 30px rgba(0, 0, 0, 0.08);
  --geist-shadow-large: 0 30px 60px rgba(0, 0, 0, 0.08);
  --geist-shadow-hover: 0 30px 60px rgba(0, 0, 0, 0.12);
  
  /* Marketing shadows (stronger) */
  --shadow-smallest: 0px 2px 4px rgba(0,0,0,0.12);
  --shadow-extra-small: 0px 4px 8px rgba(0,0,0,0.12);
  --shadow-small: 0 5px 10px rgba(0,0,0,0.12);
  --shadow-medium: 0 8px 30px rgba(0,0,0,0.12);
  --shadow-large: 0 30px 60px rgba(0,0,0,0.12);
  
  /* Border */
  --geist-border-weight: 1px;
  --accents-border: #eaeaea;
  
  /* Typography */
  --geist-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
  --geist-font-mono: 'Geist Mono', 'SF Mono', 'Roboto Mono', 'Fira Code', 'Fira Mono', 'Monaco', monospace;
  
  /* Transition */
  --transition-fast: 150ms ease;
  --transition-medium: 200ms ease;
  --transition-slow: 300ms ease;
  
  /* Primary brand color (keep for tool icons) */
  --primary: #0070f3;
  --primary-dark: #0761d1;
}

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

html {
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--geist-font);
  color: var(--geist-foreground);
  background: var(--geist-background);
  line-height: 1.5;
  min-height: 100vh;
}

::selection {
  background: var(--geist-success);
  color: var(--geist-background);
}

/* ==========================================================================
   Container
   ========================================================================== */
.container {
  max-width: var(--geist-page-width);
  margin: 0 auto;
  padding: 0 var(--geist-page-margin);
}

/* ==========================================================================
   Navigation - Geist Style
   ========================================================================== */
.navbar {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--accents-border);
  position: sticky;
  top: 0;
  z-index: 100;
  height: 64px;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 64px;
  padding: 0 var(--geist-page-margin);
}

.nav-brand {
  font-size: 1rem;
  font-weight: 600;
  color: var(--geist-foreground);
  text-decoration: none;
  cursor: pointer;
  transition: opacity var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-brand-icon {
  height: 28px;
  width: 28px;
  object-fit: contain;
}

.nav-brand:hover {
  opacity: 0.7;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 8px;
  margin: 0;
  padding: 0;
  align-items: center;
}

.nav-links > li {
  position: relative;
}

.nav-links a {
  color: var(--accents-5);
  text-decoration: none;
  font-weight: 400;
  font-size: 15px;
  padding: 8px 12px;
  border-radius: var(--geist-radius);
  transition: all var(--transition-fast);
  display: inline-block;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--geist-foreground);
  background: var(--accents-1);
}

.nav-dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}

.nav-dropdown-toggle span {
  font-size: 10px;
  transition: transform var(--transition-fast);
  opacity: 0.5;
}

.nav-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  left: auto;
  transform: none;
  background: var(--geist-background);
  border: 1px solid var(--accents-border);
  border-radius: 12px;
  box-shadow: 0 10px 38px rgba(0,0,0,0.12), 0 10px 20px rgba(0,0,0,0.08);
  list-style: none;
  padding: 6px;
  min-width: 240px;
  z-index: 1200;
  animation: dropdownFade 0.16s ease;
}

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

/* Click-based dropdown (controlled by JS) */
.nav-dropdown.active {
  display: block;
}

.nav-dropdown-toggle.active span {
  transform: rotate(180deg);
}

.nav-dropdown li {
  margin: 0;
}

.nav-dropdown li + li {
  margin-top: 4px;
}

.nav-dropdown a {
  display: block;
  padding: 12px 14px;
  color: var(--accents-6);
  font-size: 15px;
  font-weight: 500;
  border-radius: 10px;
  transition: all var(--transition-fast);
  border-left: none;
}

.nav-dropdown a:hover {
  background: var(--accents-1);
  color: var(--geist-foreground);
  box-shadow: inset 0 0 0 1px var(--accents-border);
}

.nav-dropdown a:active {
  background: var(--accents-2);
  color: var(--geist-foreground);
}

/* Mobile Navigation */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  background: none;
  border: 1px solid var(--accents-border);
  cursor: pointer;
  padding: 8px;
  gap: 4px;
  border-radius: var(--geist-radius);
  transition: all var(--transition-fast);
}

.nav-toggle:hover {
  background: var(--accents-1);
}

.nav-toggle span {
  display: block;
  width: 16px;
  height: 1.5px;
  background: var(--geist-foreground);
  border-radius: 1px;
  transition: all var(--transition-medium);
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(4px, 4px);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(4px, -4px);
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--geist-background);
    flex-direction: column;
    padding: 16px;
    gap: 4px;
    border-bottom: 1px solid var(--accents-border);
    max-height: calc(100vh - 64px);
    overflow-y: auto;
  }
  
  .nav-links.active {
    display: flex;
  }
  
  .nav-links > li {
    width: 100%;
  }
  
  .nav-links a {
    display: block;
    padding: 14px 16px;
    width: 100%;
    font-size: 16px;
    -webkit-tap-highlight-color: transparent;
  }
  
  .nav-links a:active {
    background: var(--accents-2);
  }
  
  .nav-dropdown-toggle {
    padding: 14px 16px;
    width: 100%;
    justify-content: space-between;
  }
  
  .nav-dropdown {
    position: static;
    display: none;
    box-shadow: none;
    padding: 8px 0;
    padding-left: 16px;
    margin-top: 4px;
    background: var(--accents-1);
    border: none;
    transform: none;
    animation: none;
    border-radius: var(--geist-radius);
  }
  
  .nav-dropdown.active {
    display: block;
  }
  
  .nav-dropdown a {
    padding: 12px 16px;
    font-size: 15px;
  }
  
  .nav-toggle {
    display: flex;
  }
}

/* ==========================================================================
   Header - Clean Geist Style
   ========================================================================== */
header {
  background: var(--geist-background);
  border-bottom: 1px solid var(--accents-border);
  padding: 48px 0;
  text-align: center;
}

header h1 {
  font-size: 40px;
  font-weight: 700;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  letter-spacing: -0.05em;
  color: var(--geist-foreground);
}

.header-icon {
  height: 48px;
  width: 48px;
  object-fit: contain;
}

header p {
  font-size: 16px;
  color: var(--accents-5);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ==========================================================================
   Main Content
   ========================================================================== */
main {
  margin: 48px auto;
  min-height: 60vh;
}

/* ==========================================================================
   Tool Grid - Geist Card Style
   ========================================================================== */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 48px;
  margin-top: 24px;
}

@media (max-width: 1000px) {
  .tool-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 700px) {
  .tool-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Tool Button Cards */
.tool-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 36px 22px;
  min-height: 160px;
  background: var(--geist-background);
  border: 1px solid var(--accents-border);
  border-radius: var(--geist-radius-lg);
  cursor: pointer;
  transition: all var(--transition-medium);
  position: relative;
  overflow: hidden;
}

.tool-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, var(--accents-1) 100%);
  opacity: 0;
  transition: opacity var(--transition-medium);
}

.tool-btn:hover {
  border-color: var(--geist-foreground);
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

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

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

.tool-icon {
  width: 48px;
  height: 48px;
  color: var(--primary);
  stroke-width: 1.5;
  position: relative;
  z-index: 1;
}

.tool-icon-img {
  width: 48px;
  height: 48px;
  border-radius: var(--geist-radius);
  transition: transform var(--transition-medium);
  position: relative;
  z-index: 1;
}

.tool-btn:hover .tool-icon-img {
  transform: scale(1.05);
}

.tool-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--geist-foreground);
  text-align: center;
  position: relative;
  z-index: 1;
}

/* ==========================================================================
   Tab Content
   ========================================================================== */
.tab-content {
  display: none;
  animation: contentFadeIn 0.3s ease;
}

.tab-content.active {
  display: block;
}

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

/* ==========================================================================
   Tool Card - Geist Style
   ========================================================================== */
.tool-card {
  background: var(--geist-background);
  border: 1px solid var(--accents-border);
  border-radius: var(--geist-radius-lg);
  padding: 16px 20px;
  margin-bottom: 16px;
  margin-top: 12px;
  box-shadow: none;
}

.tool-card h2 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--geist-foreground);
  letter-spacing: -0.02em;
}

.description {
  color: var(--accents-5);
  margin-bottom: 16px;
  font-size: 13px;
  line-height: 1.5;
}

/* ==========================================================================
   Upload Zone - Geist Style
   ========================================================================== */
.upload-zone {
  border: 1px dashed var(--accents-3);
  border-radius: var(--geist-radius-lg);
  padding: 32px 16px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-medium);
  margin-bottom: 16px;
  background: var(--accents-1);
  position: relative;
}

.upload-zone:hover {
  border-color: var(--geist-foreground);
  background: var(--geist-background);
  border-style: solid;
}

.upload-zone.dragover {
  border-color: var(--primary);
  background: var(--geist-success-lighter);
  border-style: solid;
}

.upload-zone svg {
  color: var(--accents-4);
  margin-bottom: 12px;
  width: 40px;
  height: 40px;
  transition: color var(--transition-fast);
}

.upload-zone:hover svg {
  color: var(--geist-foreground);
}

.upload-zone p {
  color: var(--accents-5);
  font-size: 13px;
  margin-bottom: 6px;
}

.upload-zone .upload-limit {
  color: var(--accents-4);
  font-size: 12px;
  margin-top: 8px;
  display: block;
}

/* ==========================================================================
   File List - Geist Style
   ========================================================================== */
.file-list {
  margin-bottom: 12px;
  background: var(--geist-success-lighter);
  border: 1px solid var(--geist-success);
  border-radius: var(--geist-radius-lg);
  padding: 10px;
  display: none;
  font-size: 13px;
}

.file-list:not(:empty) {
  display: block;
}

.file-item {
  background: var(--geist-background);
  padding: 12px 16px;
  border-radius: var(--geist-radius);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  border: 1px solid var(--accents-border);
  transition: all var(--transition-fast);
}

.file-item:last-child {
  margin-bottom: 0;
}

.file-item:hover {
  border-color: var(--accents-3);
}

.file-item .file-name {
  color: var(--geist-foreground);
  font-weight: 500;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-item .file-size {
  color: var(--accents-4);
  font-size: 12px;
  margin-left: 16px;
  flex-shrink: 0;
}

.file-item .file-remove {
  background: none;
  border: none;
  color: var(--geist-error);
  cursor: pointer;
  font-size: 16px;
  padding: 4px 8px;
  flex-shrink: 0;
  border-radius: var(--geist-radius-sm);
  transition: background var(--transition-fast);
}

.file-item .file-remove:hover {
  background: var(--geist-error-lighter);
}

.file-name-display {
  display: none;
  background: var(--geist-success-lighter);
  border: 1px solid var(--geist-success);
  border-radius: var(--geist-radius);
  padding: 12px 16px;
  margin-bottom: 24px;
  color: var(--geist-success-dark);
  font-size: 14px;
  font-weight: 500;
}

/* ==========================================================================
   Form Elements - Geist Style
   ========================================================================== */
.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  color: var(--geist-foreground);
  font-size: 13px;
}

.form-group small {
  display: block;
  margin-top: 4px;
  color: var(--accents-4);
  font-size: 11px;
}

.input-field {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--accents-border);
  border-radius: var(--geist-radius);
  font-size: 15px;
  font-family: var(--geist-font);
  transition: all var(--transition-fast);
  background: var(--geist-background);
  color: var(--geist-foreground);
}

/* Selects styled like Geist popover selects */
select.input-field {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  padding: 10px 36px 10px 12px;
  min-height: 42px;
  border-radius: 10px;
  border: 1px solid var(--accents-border);
  background-color: var(--geist-background);
  background-image:
    linear-gradient(45deg, transparent 50%, var(--accents-5) 50%),
    linear-gradient(135deg, var(--accents-5) 50%, transparent 50%),
    linear-gradient(var(--accents-2), var(--accents-2));
  background-position:
    calc(100% - 18px) calc(50% - 4px),
    calc(100% - 12px) calc(50% - 4px),
    calc(100% - 16px) 50%;
  background-size: 6px 6px, 6px 6px, 1px 16px;
  background-repeat: no-repeat;
  box-shadow: var(--shadow-smallest);
}

select.input-field:hover {
  border-color: var(--accents-3);
  box-shadow: var(--shadow-extra-small);
}

select.input-field:focus {
  border-color: var(--geist-foreground);
  box-shadow: 0 0 0 1px var(--geist-foreground), var(--shadow-small);
}

select.input-field option {
  color: var(--geist-foreground);
  background: var(--geist-background);
}

.input-field:hover {
  border-color: var(--accents-3);
}

.input-field:focus {
  outline: none;
  border-color: var(--geist-foreground);
  box-shadow: 0 0 0 1px var(--geist-foreground);
}

.input-field::placeholder {
  color: var(--accents-4);
}

/* Custom select popover to replace native dropdown menu */
.custom-select {
  position: relative;
  width: 100%;
}

.custom-select select {
  display: none;
}

.custom-select-trigger {
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border: 1px solid var(--accents-border);
  border-radius: var(--geist-radius-lg);
  background: var(--geist-background);
  color: var(--geist-foreground);
  font-size: 14px;
  font-family: var(--geist-font);
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-smallest);
  position: relative;
}

.custom-select-trigger::after {
  content: '';
  position: absolute;
  right: 14px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--accents-4);
  border-bottom: 2px solid var(--accents-4);
  transform: translateY(-50%) rotate(45deg);
  transition: transform var(--transition-fast);
}

.custom-select.open .custom-select-trigger {
  border-color: var(--accents-3);
  box-shadow: var(--shadow-extra-small);
}

.custom-select.open .custom-select-trigger::after {
  transform: translateY(-30%) rotate(-135deg);
}

.custom-select-options {
  list-style: none;
  margin: 6px 0 0 0;
  padding: 6px;
  position: absolute;
  width: 100%;
  left: 0;
  top: calc(100% + 2px);
  background: var(--geist-background);
  border: 1px solid var(--accents-border);
  border-radius: var(--geist-radius-lg);
  box-shadow: var(--shadow-medium);
  max-height: 240px;
  overflow-y: auto;
  display: none;
  z-index: 40;
}

.custom-select.open .custom-select-options {
  display: block;
}

.custom-select-option {
  padding: 10px 12px;
  border-radius: var(--geist-radius);
  font-size: 14px;
  color: var(--geist-foreground);
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.custom-select-option:hover {
  background: var(--accents-1);
  color: var(--geist-foreground);
}

.custom-select-option.selected {
  background: var(--accents-2);
  color: var(--geist-foreground);
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

/* ==========================================================================
   Buttons - Geist Style
   ========================================================================== */
.btn-primary {
  background: var(--geist-foreground);
  color: var(--geist-background);
  border: none;
  padding: 12px 24px;
  border-radius: var(--geist-radius);
  font-size: 14px;
  font-weight: 500;
  font-family: var(--geist-font);
  cursor: pointer;
  transition: all var(--transition-fast);
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary:hover:not(:disabled) {
  background: var(--accents-7);
  transform: translateY(-1px);
}

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

.btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Secondary Button Style */
.btn-secondary {
  background: var(--geist-background);
  color: var(--geist-foreground);
  border: 1px solid var(--accents-border);
  padding: 12px 24px;
  border-radius: var(--geist-radius);
  font-size: 14px;
  font-weight: 500;
  font-family: var(--geist-font);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-secondary:hover:not(:disabled) {
  border-color: var(--geist-foreground);
  background: var(--accents-1);
}

/* ==========================================================================
   Status Messages - Geist Style
   ========================================================================== */
.status {
  margin-top: 20px;
  padding: 12px 16px;
  border-radius: var(--geist-radius);
  font-size: 14px;
  display: none;
  border: 1px solid;
}

.status.show {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status.info {
  background: var(--geist-success-lighter);
  color: var(--geist-success-dark);
  border-color: var(--geist-success);
}

.status.success {
  background: var(--geist-cyan-lighter);
  color: var(--geist-cyan-dark);
  border-color: var(--geist-cyan);
}

.status.error {
  background: var(--geist-error-lighter);
  color: var(--geist-error-dark);
  border-color: var(--geist-error);
}

/* ==========================================================================
   Output Area - Geist Style
   ========================================================================== */
.output-area {
  width: 100%;
  padding: 16px;
  border: 1px solid var(--accents-border);
  border-radius: var(--geist-radius);
  font-family: var(--geist-font-mono);
  font-size: 13px;
  resize: vertical;
  margin-top: 24px;
  background: var(--accents-1);
  color: var(--geist-foreground);
  line-height: 1.6;
}

.output-area:focus {
  outline: none;
  border-color: var(--geist-foreground);
}

/* ==========================================================================
   Footer - Geist Style
   ========================================================================== */
footer {
  background: var(--geist-background);
  border-top: 1px solid var(--accents-border);
  padding: 24px 0;
  text-align: center;
  margin-top: 64px;
}

footer p {
  color: var(--accents-4);
  font-size: 14px;
}

.site-footer {
  background: var(--geist-background);
  border-top: 1px solid var(--accents-border);
  padding: 24px 0;
  text-align: center;
  margin-top: 48px;
}

.site-footer .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.site-footer a {
  color: var(--accents-5);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.site-footer a:hover {
  color: var(--geist-foreground);
}

/* ==========================================================================
   Responsive Styles
   ========================================================================== */
@media (max-width: 768px) {
  header {
    padding: 32px 0;
  }
  
  header h1 { 
    font-size: 28px; 
  }
  
  header p { 
    font-size: 14px;
    padding: 0 16px;
  }
  
  .header-icon { 
    height: 36px; 
    width: 36px; 
  }
  
  .container { 
    padding: 0 16px; 
  }
  
  main {
    margin: 24px auto;
  }
  
  .tool-card { 
    padding: 14px 18px;
    margin-bottom: 14px;
    border-radius: var(--geist-radius-lg);
  }
  
  .tool-grid {
    gap: 12px;
  }
  
  .tool-btn {
    padding: 24px 16px;
    gap: 10px;
  }
  
  .tool-icon-img {
    width: 40px;
    height: 40px;
  }
  
  .tool-title {
    font-size: 13px;
  }
  
  .settings-grid { 
    grid-template-columns: 1fr; 
  }
  
  .upload-zone {
    padding: 32px 20px;
  }
  
  .upload-zone svg {
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 480px) {
  header h1 { 
    font-size: 24px; 
  }
  
  .header-icon { 
    height: 32px; 
    width: 32px; 
  }
  
  .tool-grid {
    gap: 10px;
  }
  
  .tool-btn {
    padding: 20px 12px;
    gap: 8px;
  }
  
  .tool-icon-img {
    width: 36px;
    height: 36px;
  }
  
  .tool-title {
    font-size: 12px;
  }
  
  .tool-card {
    padding: 12px 16px;
    margin-bottom: 12px;
  }
  
  .tool-card h2 {
    font-size: 16px;
    margin-bottom: 2px;
  }
  
  .btn-primary {
    padding: 9px 18px;
    font-size: 12px;
  }
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }

.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

.hidden { display: none; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   Animations
   ========================================================================== */
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.animate-spin {
  animation: spin 1s linear infinite;
}

/* Loading spinner */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--accents-2);
  border-top-color: var(--geist-foreground);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

/* Skeleton loading */
.skeleton {
  background: linear-gradient(90deg, var(--accents-1) 25%, var(--accents-2) 50%, var(--accents-1) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: var(--geist-radius);
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ==========================================================================
   Focus Styles (Accessibility)
   ========================================================================== */
:focus-visible {
  outline: 2px solid var(--geist-success);
  outline-offset: 2px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--geist-success);
  outline-offset: 2px;
}
/* ==========================================================================
   Breadcrumb Navigation - SEO Routes
   ========================================================================== */
.breadcrumb {
  padding: 1rem 0;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--accents-2);
  font-size: 0.875rem;
  color: var(--accents-5);
}

.breadcrumb .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.breadcrumb a {
  color: var(--geist-success);
  text-decoration: none;
  transition: color 0.2s ease;
}

.breadcrumb a:hover {
  color: var(--geist-success-dark);
  text-decoration: underline;
}

.breadcrumb span {
  color: var(--accents-5);
  font-weight: 500;
}

/* ==========================================================================
   FAQ Section - Tool Pages
   ========================================================================== */
.tool-faq {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--accents-2);
}

.tool-faq h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--geist-foreground);
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-list details {
  padding: 1rem;
  border: 1px solid var(--accents-2);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.faq-list details:hover {
  border-color: var(--geist-success);
  background-color: var(--accents-1);
}

.faq-list details[open] {
  border-color: var(--geist-success);
  background-color: var(--accents-1);
}

.faq-list summary {
  font-weight: 600;
  color: var(--geist-foreground);
  display: flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.faq-list summary::-webkit-details-marker {
  margin-right: 0.75rem;
  color: var(--geist-success);
}

.faq-list details p {
  margin-top: 1rem;
  color: var(--accents-5);
  line-height: 1.6;
  font-size: 0.95rem;
}

/* ==========================================================================
   Related Tools Section
   ========================================================================== */
.related-tools {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--accents-2);
}

.related-tools h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--geist-foreground);
}

.related-tools-grid {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.related-tool-card {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  background: var(--accents-1);
  border: 1px solid var(--accents-2);
  border-radius: 8px;
  text-decoration: none;
  color: var(--geist-foreground);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.related-tool-card:hover {
  border-color: var(--geist-success);
  background: var(--geist-success-lighter);
  color: var(--geist-success-dark);
}

.related-tool-title {
  white-space: nowrap;
}

/* ==========================================================================
   Responsive Breadcrumb & Related Tools
   ========================================================================== */
@media (max-width: 640px) {
  .breadcrumb {
    padding: 0.75rem 0;
    margin-bottom: 1.5rem;
    font-size: 0.8125rem;
  }
  
  .related-tools {
    margin-top: 2rem;
    padding-top: 1.5rem;
  }
  
  .related-tools h3 {
    font-size: 1.125rem;
  }
  
  .related-tool-card {
    padding: 0.4rem 0.75rem;
    font-size: 0.8125rem;
  }
  
  .tool-faq {
    margin-top: 2rem;
    padding-top: 1.5rem;
  }
  
  .tool-faq h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
  }
  
  .faq-list details {
    padding: 0.75rem;
  }
  
  .faq-list summary {
    font-size: 0.95rem;
  }
  
  .faq-list details p {
    margin-top: 0.75rem;
    font-size: 0.9rem;
  }
}

/* FAQ Section */
.faq-section {
  background: var(--accents-1);
  padding: var(--geist-gap-double) var(--geist-page-margin);
  border-top: 1px solid var(--accents-border);
}

.faq-section h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: var(--geist-gap-triple);
  text-align: center;
  color: var(--geist-foreground);
}

.faq-grid {
  display: flex;
  flex-direction: column;
  gap: var(--geist-gap);
  max-width: 900px;
  margin: 0 auto;
}

.faq-item {
  background: transparent;
  border: 2px dashed var(--accents-border);
  border-radius: var(--geist-radius-lg);
  overflow: hidden;
  padding: var(--geist-gap);
}

.faq-question {
  width: 100%;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--geist-gap);
  font-size: 1rem;
  font-weight: 600;
  color: var(--geist-foreground);
  transition: background var(--transition-fast);
}

.faq-question:hover {
  background: transparent;
}

.faq-question span {
  text-align: left;
  flex: 1;
}

.faq-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--primary);
  transition: transform var(--transition-fast);
}

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

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-medium);
}

.faq-item.active .faq-answer {
  max-height: 500px;
}

.faq-answer p {
  padding: var(--geist-gap) 0 0 0;
  color: var(--accents-5);
  line-height: 1.6;
  margin: 0;
}

@media (max-width: 768px) {
  .faq-section h2 {
    font-size: 1.5rem;
  }

  .faq-question {
    padding: var(--geist-gap-half) var(--geist-gap);
    font-size: 0.95rem;
  }

  .faq-answer p {
    padding: 0 var(--geist-gap-half) var(--geist-gap-half) var(--geist-gap-half);
    font-size: 0.9rem;
  }
}

/* Legal Pages (Privacy, Terms, Contact) */
.legal-page {
  max-width: 800px;
  margin: 0 auto;
  padding: var(--geist-gap-triple) var(--geist-page-margin);
}

.legal-page h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: var(--geist-gap-half);
  color: var(--geist-foreground);
}

.legal-page .last-updated,
.legal-page .intro {
  color: var(--accents-5);
  margin-bottom: var(--geist-gap-double);
}

.legal-page section {
  margin-bottom: var(--geist-gap-double);
}

.legal-page h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: var(--geist-gap);
  color: var(--geist-foreground);
}

.legal-page h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: var(--geist-gap) 0 var(--geist-gap-half);
  color: var(--geist-foreground);
}

.legal-page p {
  line-height: 1.7;
  color: var(--accents-5);
  margin-bottom: var(--geist-gap);
}

.legal-page ul {
  margin: var(--geist-gap) 0;
  padding-left: var(--geist-gap-double);
}

.legal-page li {
  line-height: 1.7;
  color: var(--accents-5);
  margin-bottom: var(--geist-gap-half);
}

.legal-page a {
  color: var(--primary);
  text-decoration: none;
}

.legal-page a:hover {
  text-decoration: underline;
}

/* Contact Page Specific */
.contact-page .contact-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--geist-gap);
  margin: var(--geist-gap-double) 0;
}

.contact-card {
  background: var(--accents-1);
  border: 1px solid var(--accents-border);
  border-radius: var(--geist-radius-lg);
  padding: var(--geist-gap);
  text-align: center;
}

.contact-icon {
  font-size: 2rem;
  margin-bottom: var(--geist-gap-half);
}

.contact-card h2 {
  font-size: 1.1rem;
  margin-bottom: var(--geist-gap-half);
}

.contact-card p {
  font-size: 0.9rem;
  margin-bottom: var(--geist-gap);
}

.contact-email {
  display: inline-block;
  background: var(--primary);
  color: white !important;
  padding: 8px 16px;
  border-radius: var(--geist-radius);
  font-weight: 500;
  transition: background var(--transition-fast);
}

.contact-email:hover {
  background: var(--primary-dark);
  text-decoration: none !important;
}

.quick-faq-list {
  margin-top: var(--geist-gap);
}

.quick-faq-list details {
  background: var(--accents-1);
  border: 1px solid var(--accents-border);
  border-radius: var(--geist-radius);
  margin-bottom: var(--geist-gap-half);
}

.quick-faq-list summary {
  padding: var(--geist-gap);
  cursor: pointer;
  font-weight: 500;
  color: var(--geist-foreground);
}

.quick-faq-list details p {
  padding: 0 var(--geist-gap) var(--geist-gap);
  margin: 0;
}

.response-time {
  background: var(--accents-1);
  border: 1px solid var(--accents-border);
  border-radius: var(--geist-radius-lg);
  padding: var(--geist-gap);
  text-align: center;
}

.response-time h2 {
  margin-bottom: var(--geist-gap-half);
}

.response-time p {
  margin: 0;
}

/* Enhanced Footer */
.footer-content {
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: var(--geist-gap);
  margin-bottom: var(--geist-gap);
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--accents-5);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color var(--transition-fast), background var(--transition-fast);
  padding: var(--geist-gap-half) var(--geist-gap);
  border-radius: var(--geist-radius-base);
}

.footer-links a:hover {
  color: var(--geist-foreground);
  background: var(--accents-1);
}

.copyright {
  font-size: 0.8rem;
  color: var(--accents-4);
  margin-top: var(--geist-gap-half);
}

/* Tool SEO Content Section */
.tool-seo-content {
  margin-top: var(--geist-gap-double);
  padding-top: 0;
  border-top: none;
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.seo-section-box {
  border: 2px dashed var(--accents-border);
  border-radius: var(--geist-radius-lg);
  padding: var(--geist-gap);
}

.tool-seo-content h2 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: var(--geist-gap);
  color: var(--geist-foreground);
}

.tool-seo-content h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: var(--geist-gap) 0 var(--geist-gap-half);
  color: var(--geist-foreground);
}

.tool-seo-content p {
  line-height: 1.7;
  color: var(--accents-5);
  margin-bottom: var(--geist-gap);
}

.tool-seo-content ol {
  margin: var(--geist-gap) 0;
  padding-left: var(--geist-gap-double);
}

.tool-seo-content li {
  line-height: 1.7;
  color: var(--accents-5);
  margin-bottom: var(--geist-gap-half);
}

.seo-faq-list {
  display: flex;
  flex-direction: column;
  gap: var(--geist-gap);
}

.seo-faq-item {
  border: 1px solid var(--accents-border);
  border-radius: var(--geist-radius-base);
  padding: var(--geist-gap-half);
}

.seo-faq-item h3 {
  margin: 0 0 var(--geist-gap-half) 0;
}

.seo-faq-item p {
  margin: 0;
}

.tool-benefits {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--geist-gap);
  margin: var(--geist-gap) 0;
}

.benefit-item {
  display: flex;
  align-items: flex-start;
  gap: var(--geist-gap-half);
}

.benefit-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
}

.benefit-text {
  font-size: 0.95rem;
  color: var(--accents-5);
}

@media (max-width: 768px) {
  .legal-page h1 {
    font-size: 1.75rem;
  }

  .legal-page h2 {
    font-size: 1.25rem;
  }

  .contact-page .contact-cards {
    grid-template-columns: 1fr;
  }

  .footer-links {
    flex-direction: column;
    gap: var(--geist-gap);
  }

  .footer-links a {
    border: 1px solid var(--accents-border);
    padding: var(--geist-gap) var(--geist-gap);
    text-align: center;
    font-size: 0.95rem;
  }
}