/* ============================================
   PDFDaddy - Modern Design System
   File: static/css/main.css
   Location: E:\MyDesktop\PDFDaddy\pdf_toolkit_roadmap\backend\static\css\main.css
   ============================================ */

/* ============================================
   1. CSS VARIABLES (Design Tokens)
   ============================================ */
:root {
  /* Colors - Adobe Creative Cloud Dark Theme */
  /* Backgrounds */
  --color-bg-primary: #1E1E1E;
  --color-bg-secondary: #252526;
  --color-bg-tertiary: #2D2D30;
  --color-bg-canvas: #1A1A1A;

  /* Surface & Panel Colors */
  --color-surface: #2D2D30;
  --color-surface-stronger: #323233;
  --color-surface-hover: #37373D;
  --color-surface-border: #3E3E42;
  --color-background: #1E1E1E;

  /* Border Colors */
  --color-border: #3E3E42;
  --color-border-light: #454545;
  --color-border-strong: #555555;

  /* Text Colors (WCAG AA Compliant) */
  --color-text-primary: #CCCCCC;
  --color-text-secondary: #9D9D9D;
  --color-text-muted: #6E6E6E;
  --color-text-white: #FFFFFF;

  /* Accent Colors (Adobe Blue Palette) */
  --color-accent: #0078D4;
  --color-accent-light: #2B88D8;
  --color-accent-dark: #005A9E;
  --color-accent-glow: #00BCF2;

  /* Category-Specific Colors */
  --color-organize: #0078D4;
  --color-convert: #16A34A;
  --color-edit: #8B5CF6;
  --color-optimize: #F59E0B;
  --color-security: #DC2626;
  --color-automation: #EC4899;

  /* Semantic Colors */
  --color-success: #16A34A;
  --color-success-light: #22C55E;
  --color-warning: #F59E0B;
  --color-info: #0078D4;
  --color-error: #DC2626;

  /* Legacy Compatibility (kept for backwards compatibility) */
  --color-primary: #2D2D30;
  --color-primary-light: #37373D;
  --color-primary-dark: #1A1A1A;
  --color-highlight: #F59E0B;
  --color-highlight-subtle: #F59E0B33;
  
  /* Typography */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-display: 'DM Sans', var(--font-primary);
  --font-mono: 'Space Mono', 'Courier New', monospace;
  
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 1.875rem;
  --font-size-4xl: 2.25rem;
  --font-size-5xl: 3rem;
  
  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  
  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;
  
  /* Shadows (Dark Theme - Deeper Shadows) */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.6);
  --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.7);
  --shadow-2xl: 0 25px 50px rgba(0, 0, 0, 0.8);
  --shadow-accent: 0 0 20px rgba(0, 120, 212, 0.3);
  
  /* Transitions */
  --transition-fast: 150ms ease-in-out;
  --transition-base: 250ms ease-in-out;
  --transition-slow: 350ms ease-in-out;
  
  /* Z-index */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-popover: 1060;
  --z-tooltip: 1070;
}

/* ============================================
   2. BASE STYLES & RESETS
   ============================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-primary);
  font-size: var(--font-size-base);
  line-height: 1.6;
  color: var(--color-text-primary);
  background-color: var(--color-background);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  margin: 0 !important;
  padding: 0 !important;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-primary-dark);
  margin-bottom: var(--space-4);
}

h1 { font-size: var(--font-size-4xl); }
h2 { font-size: var(--font-size-3xl); }
h3 { font-size: var(--font-size-2xl); }
h4 { font-size: var(--font-size-xl); }
h5 { font-size: var(--font-size-lg); }
h6 { font-size: var(--font-size-base); }

p {
  margin-bottom: var(--space-4);
  color: var(--color-text-secondary);
}

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

a:hover {
  color: var(--color-accent-dark);
}

/* ============================================
   3. LAYOUT COMPONENTS
   ============================================ */

/* Container */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.container-full {
  width: 100%;
  max-width: none;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.container-narrow {
  max-width: 800px;
}

.container-wide {
  max-width: 1400px;
}

/* Main content area */
.main-content {
  flex: 1;
  padding: var(--space-8) 0;
}

/* ============================================
   4. NAVIGATION
   ============================================ */
.navbar {
  background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
  border-bottom: 2px solid rgba(251, 191, 36, 0.4);
  box-shadow: 0 4px 24px rgba(37, 99, 235, 0.3);
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  padding: 1.25rem 0;
  position: relative;
  width: 100%;
  left: 0;
  right: 0;
}

/* Glossy shine overlay */
.navbar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 60%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 100%);
  pointer-events: none;
  z-index: 0;
}

/* Gold accent line at bottom */
.navbar::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(to right, transparent 0%, #fbbf24 50%, transparent 100%);
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.5);
  z-index: 1;
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--space-6);
  position: relative;
  z-index: 2;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 900;
  color: white;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.logo:hover {
  color: #fbbf24;
  transform: translateY(-2px);
  text-shadow: 0 4px 16px rgba(251, 191, 36, 0.6);
}

.logo-icon {
  font-size: 3.25rem;
  line-height: 1;
  display: inline-block;
  transition: transform 0.3s ease;
  filter: brightness(1.15);
}

.logo:hover .logo-icon {
  transform: scale(1.15) rotate(-5deg);
  filter: brightness(1.35);
}

.logo-image {
  height: 3.25rem;
  width: auto;
  display: inline-block;
  transition: transform 0.3s ease;
  filter: brightness(1.15) drop-shadow(0 2px 8px rgba(244, 185, 66, 0.4));
}

.logo:hover .logo-image {
  transform: scale(1.15) rotate(-5deg);
  filter: brightness(1.35) drop-shadow(0 4px 16px rgba(244, 185, 66, 0.6));
}

.logo-text {
  font-weight: 900;
}

.logo-beta {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  color: #1e3a8a;
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 800;
  margin-left: 0.65rem;
  box-shadow: 0 3px 10px rgba(251, 191, 36, 0.5);
  animation: betaPulse 3s ease-in-out infinite;
  letter-spacing: 0.5px;
}

@keyframes betaPulse {
  0%, 100% {
    box-shadow: 0 3px 10px rgba(251, 191, 36, 0.5);
  }
  50% {
    box-shadow: 0 6px 20px rgba(251, 191, 36, 0.8);
  }
}

.navbar-menu {
  display: flex;
  align-items: center;
  flex: 1;
  justify-content: flex-end;
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.nav-link {
  font-weight: 700;
  font-size: 1.1rem;
  color: #ffffff !important;
  padding: 0.75rem 1.35rem;
  border-radius: 10px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  position: relative;
  overflow: hidden;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
}

.nav-link::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.15) 0%, rgba(245, 158, 11, 0.15) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.nav-link:hover {
  color: #fbbf24 !important;
  background: rgba(251, 191, 36, 0.2);
  transform: translateY(-2px);
  text-shadow: 0 3px 12px rgba(251, 191, 36, 0.7);
}

.nav-link:hover::before {
  opacity: 1;
}

.nav-link[aria-current="page"] {
  color: #fbbf24 !important;
  background: rgba(251, 191, 36, 0.25);
  font-weight: 800;
  text-shadow: 0 3px 12px rgba(251, 191, 36, 0.8);
}

.nav-link[aria-current="page"]::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 3px;
  background: linear-gradient(to right, #fbbf24 0%, #f59e0b 100%);
  box-shadow: 0 0 12px #fbbf24;
}

.nav-icon {
  font-size: 1.75rem;
  line-height: 1;
  display: inline-block;
  transition: transform 0.3s ease;
  filter: brightness(1.2);
}

.nav-link:hover .nav-icon {
  transform: scale(1.3);
  filter: brightness(1.4);
}

.nav-item {
  display: flex;
  align-items: center;
  color: white;
  font-weight: 700;
  font-size: 0.95rem;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.usage-badge {
  padding: var(--space-2) var(--space-4);
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-lg);
  font-size: var(--font-size-sm);
  color: #ffffff;
  font-weight: 600;
  border: 1px solid rgba(244, 185, 66, 0.4);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.usage-text {
  color: #ffffff;
  font-weight: 700;
  font-size: 0.95rem;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.badge-icon {
  margin-right: 0.4rem;
  font-size: 1.35rem;
  line-height: 1;
  display: inline-block;
  filter: brightness(1.15);
}

.badge-pro {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  color: #1e3a8a;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-full);
  font-weight: 800;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  box-shadow: 0 4px 14px rgba(251, 191, 36, 0.5);
}

.usage-indicator {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  color: white;
}

.usage-bar {
  width: 100px;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  overflow: hidden;
}

.usage-progress {
  height: 100%;
  background: linear-gradient(90deg, #fbbf24 0%, #f59e0b 100%);
  transition: width 0.3s ease;
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.7);
}

/* Mobile menu toggle */
.navbar-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: white;
  flex-direction: column;
  gap: 4px;
  padding: var(--space-2);
}

.navbar-toggle span {
  display: block;
  width: 24px;
  height: 3px;
  background: white;
  border-radius: 2px;
  transition: all var(--transition-fast);
}

.navbar-toggle:hover span {
  background: #F4B942;
}

/* Hamburger to X animation when menu is open */
.navbar-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.navbar-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.navbar-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* Primary button in navbar */
.navbar .btn-primary {
  background: linear-gradient(135deg, #fbbf24 0%, #6366f1 100%);
  color: #1e3a8a;
  font-weight: 800;
  padding: 0.65rem 1.5rem;
  border: none;
  box-shadow: 0 4px 14px rgba(251, 191, 36, 0.4);
  font-size: 1.05rem;
}

.navbar .btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(251, 191, 36, 0.6);
  background: linear-gradient(135deg, #f59e0b 0%, #6366f1 100%);
}

/* Dropdown Menu Styles */
.dropdown-toggle {
  background: rgba(251, 191, 36, 0.15);
  border: 1px solid rgba(251, 191, 36, 0.3);
  color: white;
  padding: 0.65rem 1.15rem;
  border-radius: 10px;
  transition: all 0.3s ease;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.05rem;
}

.dropdown-toggle svg {
  stroke: white;
  transition: stroke 0.3s ease;
}

.dropdown-toggle:hover {
  background: rgba(251, 191, 36, 0.25);
  border-color: #fbbf24;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(251, 191, 36, 0.3);
}

.dropdown-toggle:hover svg {
  stroke: #fbbf24;
}

.user-avatar {
  background: linear-gradient(135deg, #fbbf24 0%, #6366f1 100%);
  color: #1e3a8a;
  font-weight: 800;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  margin-right: 0.5rem;
  font-size: 1.05rem;
  box-shadow: 0 2px 8px rgba(251, 191, 36, 0.3);
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 220px;
  background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
  border: 2px solid rgba(251, 191, 36, 0.3);
  box-shadow: 0 10px 30px rgba(37, 99, 235, 0.4);
  border-radius: 12px;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: var(--z-dropdown);
}

.dropdown-menu.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-header {
  border-bottom: 1px solid rgba(251, 191, 36, 0.3);
  padding: 1.15rem;
}

.user-email {
  color: white;
  font-weight: 700;
  font-size: 1.05rem;
}

.user-tier {
  color: #fbbf24;
  font-size: 0.85rem;
  font-weight: 700;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.dropdown-item {
  color: rgba(255, 255, 255, 0.9);
  transition: all 0.3s ease;
  padding: 0.85rem 1.15rem;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 1.05rem;
  font-weight: 600;
}

.dropdown-item .item-icon {
  font-size: 1.5rem;
  min-width: 2rem;
  text-align: center;
  line-height: 1;
  display: inline-block;
  transition: transform 0.3s ease;
  filter: brightness(1.15);
}

.dropdown-item:hover {
  background: rgba(251, 191, 36, 0.15);
  color: #fbbf24;
  transform: translateX(4px);
}

.dropdown-item:hover .item-icon {
  transform: scale(1.25);
  filter: brightness(1.3);
}

.dropdown-item.highlight {
  color: #fbbf24;
  font-weight: 800;
}

.dropdown-item.highlight:hover {
  background: rgba(251, 191, 36, 0.25);
}

.dropdown-divider {
  border-color: rgba(251, 191, 36, 0.25);
  margin: 0.5rem 0;
}

/* ============================================
   5. BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-family: var(--font-primary);
  font-size: var(--font-size-base);
  font-weight: 600;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  border: 2px solid transparent;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

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

/* Button Variants */
.btn-primary {
  background: var(--color-accent);
  color: white;
  border-color: var(--color-accent);
}

.btn-primary:hover:not(:disabled) {
  background: var(--color-accent-dark);
  border-color: var(--color-accent-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-secondary {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

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

.btn-outline:hover:not(:disabled) {
  background: var(--color-background);
  border-color: var(--color-primary);
}

.btn-ghost {
  background: transparent;
  color: var(--color-text-secondary);
  border-color: transparent;
}

.btn-ghost:hover:not(:disabled) {
  background: var(--color-background);
  color: var(--color-primary);
}

.btn-success {
  background: var(--color-success);
  color: white;
  border-color: var(--color-success);
}

.btn-success:hover:not(:disabled) {
  background: #38a169;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* Button Sizes */
.btn-sm {
  padding: var(--space-2) var(--space-4);
  font-size: var(--font-size-sm);
}

.btn-lg {
  padding: var(--space-4) var(--space-8);
  font-size: var(--font-size-lg);
}

.btn-full {
  width: 100%;
}

/* Button icons (emoji) */
.btn-icon {
  font-size: 1.3rem;
  line-height: 1;
  display: inline-block;
  filter: brightness(1.15);
}

/* ============================================
   6. CARDS & SURFACES
   ============================================ */
.card {
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  padding: var(--space-6);
  transition: all var(--transition-base);
}

.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.card-header {
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--color-border);
}

.card-title {
  font-size: var(--font-size-2xl);
  font-weight: 700;
  margin-bottom: var(--space-2);
}

.card-description {
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
}

.card-body {
  margin-bottom: var(--space-6);
}

.card-footer {
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
  display: flex;
  gap: var(--space-3);
  justify-content: flex-end;
}

/* ============================================
   7. TOOL CARDS (Homepage)
   ============================================ */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-6);
  margin: var(--space-8) 0;
}

.tool-card {
  background: var(--color-surface);
  border: 2px solid var(--color-border-light);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  text-decoration: none;
  transition: all var(--transition-base);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.tool-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-highlight));
  transform: scaleX(0);
  transition: transform var(--transition-base);
}

.tool-card:hover {
  border-color: var(--color-accent);
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.tool-card:hover::before {
  transform: scaleX(1);
}

.tool-card-icon {
  font-size: var(--font-size-4xl);
  line-height: 1;
}

.tool-card-content {
  flex: 1;
}

.tool-card-title {
  font-size: var(--font-size-lg);
  font-weight: 700;
  color: var(--color-primary-dark);
  margin-bottom: var(--space-2);
}

.tool-card-description {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  line-height: 1.5;
}

.tool-card-badge {
  display: inline-block;
  padding: var(--space-1) var(--space-3);
  background: var(--color-highlight-subtle);
  color: var(--color-primary);
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ============================================
   8. FORMS & INPUTS
   ============================================ */
.form-group {
  margin-bottom: var(--space-6);
}

.form-label {
  display: block;
  font-weight: 600;
  color: var(--color-primary-dark);
  margin-bottom: var(--space-2);
  font-size: var(--font-size-sm);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font-family: var(--font-primary);
  font-size: var(--font-size-base);
  color: var(--color-text-primary);
  background: var(--color-surface);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-lg);
  transition: all var(--transition-fast);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(245, 101, 101, 0.1);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

.form-help {
  display: block;
  margin-top: var(--space-2);
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.form-error {
  color: var(--color-accent);
  font-size: var(--font-size-sm);
  margin-top: var(--space-2);
}

/* File Upload */
.file-upload {
  position: relative;
}

.file-upload-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.file-upload-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  padding: var(--space-12);
  background: var(--color-surface);
  border: 3px dashed var(--color-border);
  border-radius: var(--radius-xl);
  cursor: pointer;
  transition: all var(--transition-base);
  text-align: center;
}

.file-upload-label:hover {
  border-color: var(--color-accent);
  background: var(--color-highlight-subtle);
}

.file-upload-label.drag-over {
  border-color: var(--color-accent);
  background: var(--color-highlight-subtle);
  transform: scale(1.02);
}

.file-upload-icon {
  font-size: var(--font-size-5xl);
  color: var(--color-accent);
}

.file-upload-text {
  font-size: var(--font-size-lg);
  font-weight: 600;
  color: var(--color-primary);
}

.file-upload-hint {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

/* File List */
.file-list {
  margin-top: var(--space-6);
}

.file-item {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4);
  background: var(--color-background);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-3);
}

.file-item-icon {
  font-size: var(--font-size-2xl);
  color: var(--color-accent);
}

.file-item-info {
  flex: 1;
}

.file-item-name {
  font-weight: 600;
  color: var(--color-primary);
  font-family: var(--font-mono);
  font-size: var(--font-size-sm);
}

.file-item-size {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

.file-item-remove {
  background: none;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  font-size: var(--font-size-xl);
  padding: var(--space-2);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.file-item-remove:hover {
  background: var(--color-accent);
  color: white;
}

/* ============================================
   9. ALERTS & MESSAGES
   ============================================ */
.alert {
  padding: var(--space-4) var(--space-6);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-6);
  display: flex;
  align-items: start;
  gap: var(--space-3);
  border-left: 4px solid;
  animation: slideInDown 0.3s ease-out;
}

.alert-icon {
  font-size: var(--font-size-xl);
}

.alert-content {
  flex: 1;
}

.alert-title {
  font-weight: 700;
  margin-bottom: var(--space-1);
}

.alert-message {
  font-size: var(--font-size-sm);
  margin: 0;
}

.alert-close {
  background: none;
  border: none;
  font-size: var(--font-size-xl);
  cursor: pointer;
  opacity: 0.5;
  transition: opacity var(--transition-fast);
}

.alert-close:hover {
  opacity: 1;
}

.alert-success {
  background: #F0FFF4;
  border-left-color: var(--color-success);
  color: #22543D;
}

.alert-error {
  background: #FFF5F5;
  border-left-color: var(--color-accent);
  color: #742A2A;
}

.alert-warning {
  background: #FFFAF0;
  border-left-color: var(--color-warning);
  color: #7C2D12;
}

.alert-info {
  background: #EBF8FF;
  border-left-color: var(--color-info);
  color: #2C5282;
}

/* ============================================
   10. LOADING STATES
   ============================================ */
.spinner {
  display: inline-block;
  width: 40px;
  height: 40px;
  border: 4px solid var(--color-border);
  border-top-color: var(--color-accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.spinner-sm {
  width: 20px;
  height: 20px;
  border-width: 2px;
}

.spinner-lg {
  width: 60px;
  height: 60px;
  border-width: 6px;
}

.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-6);
  z-index: var(--z-modal);
}

.loading-text {
  font-size: var(--font-size-lg);
  font-weight: 600;
  color: var(--color-primary);
}

/* Progress Bar */
.progress {
  width: 100%;
  height: 8px;
  background: var(--color-border-light);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--color-accent), var(--color-highlight));
  border-radius: var(--radius-full);
  transition: width var(--transition-base);
  animation: shimmer 1.5s infinite;
}

/* ============================================
   11. FOOTER
   ============================================ */
.footer {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  margin-top: auto;
  padding: var(--space-12) 0 var(--space-6);
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-8);
  margin-bottom: var(--space-8);
}

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

@media (max-width: 640px) {
  .footer-content {
    grid-template-columns: 1fr;
  }
}

.footer-col h3,
.footer-col h4 {
  font-size: var(--font-size-lg);
  font-weight: 700;
  margin-bottom: var(--space-4);
  color: var(--color-primary-dark);
}

.footer-col p {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-4);
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col ul li {
  margin-bottom: var(--space-2);
}

.footer-col ul li a {
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  transition: color var(--transition-fast);
}

.footer-col ul li a:hover {
  color: var(--color-accent);
}

.social-links {
  display: flex;
  gap: var(--space-4);
  margin-top: var(--space-4);
}

.social-links a {
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  transition: color var(--transition-fast);
}

.social-links a:hover {
  color: var(--color-accent);
}

.footer-logo {
  margin-bottom: var(--space-4);
}

.footer-logo .logo-image {
  height: 2.5rem;
  width: auto;
  filter: brightness(1.1) drop-shadow(0 2px 6px rgba(244, 185, 66, 0.3));
}

.footer-section-title {
  font-size: var(--font-size-lg);
  font-weight: 700;
  margin-bottom: var(--space-4);
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.footer-link {
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  transition: color var(--transition-fast);
}

.footer-link:hover {
  color: var(--color-accent);
}

.footer-bottom {
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
  flex-wrap: wrap;
  gap: var(--space-4);
}

.footer-bottom p {
  margin: 0;
}

.trust-badges-footer {
  display: flex;
  gap: var(--space-6);
  align-items: center;
}

.trust-badges-footer span {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
}

@media (max-width: 640px) {
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

/* ============================================
   12. HERO SECTION
   ============================================ */
.hero {
  text-align: center;
  padding: var(--space-20) 0 var(--space-16);
  background: linear-gradient(135deg, #FEEBC8 0%, #FED7D7 100%);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23F56565' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.4;
}

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

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  margin-bottom: var(--space-6);
  background: linear-gradient(135deg, var(--color-primary-dark), var(--color-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: var(--font-size-xl);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-8);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-cta {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  flex-wrap: wrap;
}

/* ============================================
   13. SECTION HEADERS
   ============================================ */
.section {
  padding: var(--space-16) 0;
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-12);
}

.section-title {
  font-size: var(--font-size-4xl);
  font-weight: 800;
  margin-bottom: var(--space-4);
}

.section-subtitle {
  font-size: var(--font-size-lg);
  color: var(--color-text-secondary);
  max-width: 700px;
  margin: 0 auto;
}

.section-category {
  display: inline-block;
  padding: var(--space-2) var(--space-4);
  background: var(--color-accent);
  color: white;
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-8);
}

/* ============================================
   14. ANIMATIONS
   ============================================ */
@keyframes spin {
  to { transform: rotate(360deg); }
}

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

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

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

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

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

.animate-fade-in {
  animation: fadeIn 0.5s ease-out;
}

/* Mobile menu backdrop and scroll lock */
body.menu-open {
  overflow: hidden;
}

.menu-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.menu-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.animate-slide-in {
  animation: slideInDown 0.5s ease-out;
}

.animate-scale-in {
  animation: scaleIn 0.3s ease-out;
}

/* ============================================
   15. UTILITIES
   ============================================ */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-normal { font-weight: 400; }

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

.mt-0 { margin-top: 0; }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mt-12 { margin-top: var(--space-12); }

.mb-0 { margin-bottom: 0; }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }
.mb-12 { margin-bottom: var(--space-12); }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-4 { gap: var(--space-4); }

/* ============================================
   16. RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  :root {
    --font-size-4xl: 2rem;
    --font-size-3xl: 1.5rem;
  }

  /* Make navbar MUCH more compact on mobile */
  .navbar {
    padding: 0.5rem 0 !important;
  }

  /* Reduce logo size significantly */
  .logo {
    font-size: 1.15rem !important;
    gap: 0.35rem !important;
  }

  .logo-icon {
    font-size: 1.5rem !important;
  }

  .logo-image {
    height: 1.5rem !important;
  }

  .logo-text {
    font-size: 1.15rem !important;
  }

  .logo-beta {
    font-size: 0.5rem !important;
    padding: 0.15rem 0.35rem !important;
    margin-left: 0.25rem !important;
  }

  /* Remove side padding to use full width on mobile */
  .navbar .container {
    padding: 0 0.75rem !important;
    max-width: 100% !important;
  }

  /* Mobile Menu - MUST be hidden by default */
  .navbar-menu {
    display: none !important;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    border-top: 2px solid rgba(251, 191, 36, 0.4);
    box-shadow: 0 6px 24px rgba(37, 99, 235, 0.4);
    padding: var(--space-4) 0;
    z-index: 1000;
    max-height: 80vh;
    overflow-y: auto;
  }

  /* Show mobile menu when active */
  .navbar-menu.active {
    display: block !important;
    animation: slideDown 0.3s ease-out;
  }

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

  /* Stack navbar items vertically on mobile */
  .navbar-nav {
    flex-direction: column;
    gap: var(--space-2);
    padding: 0 var(--space-4);
  }

  /* Full width nav links on mobile - increased touch target to 44px min height */
  .nav-link {
    width: 100%;
    text-align: left;
    padding: 1rem var(--space-4); /* 14px = ~44px total height with font */
    display: flex;
    align-items: center;
    gap: 0.85rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(251, 191, 36, 0.2);
    margin-bottom: var(--space-1);
    min-height: 48px; /* iOS accessibility guideline */
    font-size: 1.1rem;
    font-weight: 700;
  }

  /* Ensure mobile nav icons are properly sized */
  .nav-link .nav-icon {
    font-size: 1.85rem;
    line-height: 1;
    filter: brightness(1.25);
  }

  /* Ensure text is visible on mobile */
  .nav-link,
  .logo-text,
  .usage-text,
  .badge-pro,
  .dropdown-toggle {
    color: #ffffff !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
  }

  /* Show hamburger menu - make it more compact */
  .navbar-toggle {
    display: flex;
    z-index: 1001;
    padding: 0.35rem !important;
  }

  .navbar-toggle span {
    width: 20px !important;
    height: 2px !important;
  }

  /* Dropdown styling for mobile */
  .dropdown-toggle {
    width: 100%;
    justify-content: space-between;
    background: rgba(251, 191, 36, 0.2);
    min-height: 48px; /* iOS accessibility */
    font-size: 1.1rem;
  }

  /* Dropdown menu on mobile - relative positioning */
  .dropdown-menu {
    position: relative;
    top: 0;
    right: auto;
    width: 100%;
    margin-top: var(--space-2);
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .dropdown-menu.active {
    display: block;
  }

  /* Usage badge on mobile */
  .usage-badge {
    width: 100%;
    margin: var(--space-2) 0;
    padding: var(--space-3) var(--space-4);
    background: rgba(255, 255, 255, 0.1);
  }

  /* Tool grid */
  .tool-grid {
    grid-template-columns: 1fr;
  }

  /* Adjust body to prevent content overlap with sticky navbar */
  body {
    padding-top: 0;
  }

  /* Hero section */
  .hero {
    padding: var(--space-12) 0;
  }

  .hero-cta {
    flex-direction: column;
  }

  /* Buttons */
  .btn {
    width: 100%;
  }

  /* Dropdown menu on mobile */
  .dropdown-menu {
    position: relative;
    width: 100%;
    margin-top: var(--space-2);
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 var(--space-4);
  }
  
  .card {
    padding: var(--space-4);
  }
  
  .section {
    padding: var(--space-8) 0;
  }
}

/* ============================================
   17. PRINT STYLES
   ============================================ */
@media print {
  .navbar,
  .footer,
  .btn,
  .alert {
    display: none;
  }
  
  .card {
    box-shadow: none;
    border: 1px solid #ddd;
  }
}
