/* Global Styles - Optimized for Performance */

* {
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

:root {
  --color-primary: #2563eb;
  --color-primary-dark: #1d4ed8;
  --color-accent: #eab308;
  --color-success: #10b981;
  --color-danger: #f43f5e;
  --color-bg-light: #f8fafc;
  --color-bg-dark: #f1f5f9;
  --color-text-dark: #0f172a;
  --color-text-soft: #64748b;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

html, body {
  margin: 0;
  padding: 0;
  font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--color-bg-light);
  color: var(--color-text-dark);
  line-height: 1.5;
  overflow-x: hidden;
}

/* Optimize Image Loading */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Smooth Scrolling */
html {
  scroll-behavior: smooth;
}

/* Loading State */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

/* Utility Classes for Performance */
.will-change-transform {
  will-change: transform;
}

.gpu-accelerated {
  transform: translateZ(0);
  backface-visibility: hidden;
}

/* Optimize Transitions */
.transition-all {
  transition: all 0.3s ease;
}

.transition-colors {
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

/* Print Styles */
@media print {
  body {
    background: white;
  }
  .no-print {
    display: none !important;
  }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  :root {
    --color-bg-light: #1e293b;
    --color-text-dark: #f1f5f9;
    --color-text-soft: #cbd5e1;
  }
  
  html, body {
    background-color: var(--color-bg-light);
    color: var(--color-text-dark);
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
