:root {
  /* Primary Colors - Consistent across all components */
  --primary: #3498db;
  --primary-dark: #2980b9;
  --primary-light: rgba(52, 152, 219, 0.1);
  --primary-alpha-20: rgba(52, 152, 219, 0.2);
  --primary-alpha-50: rgba(52, 152, 219, 0.5);
  
  /* Secondary Colors */
  --secondary: #34495e;
  --secondary-dark: #2c3e50;
  --secondary-light: rgba(52, 73, 94, 0.1);
  --secondary-dark-alpha-95: rgba(44, 62, 80, 0.95);
  
  /* Status Colors - Standardized */
  --success: #28a745;
  --success-light: rgba(40, 167, 69, 0.1);
  --danger: #dc3545;
  --danger-light: rgba(220, 53, 69, 0.1);
  --warning: #ffc107;
  --warning-light: rgba(255, 193, 7, 0.1);
  --info: #17a2b8;
  --info-light: rgba(23, 162, 184, 0.1);
  
  /* Neutral Colors */
  --light: #f8f9fa;
  --dark: #212529;
  --gray: #6c757d;
  --gray-light: #e9ecef;
  --gray-dark: #495057;
  --border-color: rgba(0, 0, 0, 0.125);
  --text-color: #495057;
  --white: #ffffff;
  --black: #000000;
  
  /* Additional colors for consolidation */
  --error-text: #c0392b;
  --muted-text: #7f8c8d;
  --dark-text: #2c3e50;
  --modal-backdrop: rgba(0, 0, 0, 0.8);
  
  /* Page-specific color schemes */
  --page-home: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --page-projects: linear-gradient(90deg, #4b6cb7 0%, #182848 100%);
  --page-classification: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --page-model: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  --page-create: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
  
  /* Gradients - Unified */
  --gradient-primary: linear-gradient(135deg, var(--primary), var(--primary-dark));
  --gradient-secondary: linear-gradient(145deg, var(--secondary), var(--secondary-dark));
  --gradient-success: linear-gradient(135deg, var(--success), #1e7e34);
  --gradient-danger: linear-gradient(135deg, var(--danger), #bd2130);
  --gradient-warning: linear-gradient(135deg, #f39c12, #e67e22);
  
  /* Additional alpha transparency values */
  --warning-alpha-20: rgba(255, 193, 7, 0.2);
  --success-alpha-20: rgba(40, 167, 69, 0.2);
  
  /* Shadows - Performance optimized */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.15);
  --shadow-hover: 0 4px 12px rgba(52, 152, 219, 0.2);
  --shadow-card: 0 3px 8px rgba(0,0,0,0.2);
  
  /* Transitions - Consistent timing */
  --transition-fast: all 0.15s ease-out;
  --transition-normal: all 0.25s ease-out;
  --transition-slow: all 0.4s ease-out;
  --transition-bounce: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  
  /* Z-index layers */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-popover: 1060;
  --z-tooltip: 1070;
  --z-toast: 1080;
  
  /* Border radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-card: 12px;
  
  /* Common sizes */
  --size-icon-sm: 1rem;
  --size-icon-md: 1.5rem;
  --size-icon-lg: 2rem;
  --size-icon-xl: 3rem;
  --icon-size: 60px;
}

/* Common Card Styles */
.card-common {
  border-radius: var(--radius-card);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-normal);
  overflow: hidden;
  position: relative;
}

.card-common:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-alpha-20);
}

/* Common Button Styles */
.btn-common {
  transition: var(--transition-normal);
  border-radius: var(--radius-md);
  font-weight: 500;
  padding: 0.6rem 1.2rem;
}

.btn-primary-common {
  background: var(--gradient-primary);
  border: none;
  color: white;
  box-shadow: var(--shadow-sm);
}

.btn-primary-common:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

/* Common Upload Area Styles */
.upload-area-common {
  border: 2px dashed var(--gray-light);
  background-color: var(--light);
  border-radius: var(--radius-md);
  transition: var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.upload-area-common:hover {
  border-color: var(--primary);
  background-color: var(--primary-light);
}

/* Common Preview Styles */
.preview-common {
  border-radius: var(--radius-md);
  transition: var(--transition-fast);
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.preview-common:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-sm);
  border-color: var(--primary);
}

/* Common animation classes */
.fade-in {
  animation: fadeIn var(--transition-normal) ease-out forwards;
}

.fade-in-up {
  animation: fadeInUp var(--transition-normal) ease-out forwards;
}

.scale-in {
  animation: scaleIn var(--transition-fast) ease-out forwards;
}

.slide-in-right {
  animation: slideInRight var(--transition-normal) ease-out forwards;
}

.card-pulse {
  animation: cardPulse 2s infinite;
}

/* Keyframes - Optimized for performance */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeInUp {
  from { 
    opacity: 0; 
    transform: translate3d(0, 20px, 0); 
  }
  to { 
    opacity: 1; 
    transform: translate3d(0, 0, 0); 
  }
}

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

@keyframes slideInRight {
  from { 
    opacity: 0; 
    transform: translate3d(30px, 0, 0); 
  }
  to { 
    opacity: 1; 
    transform: translate3d(0, 0, 0); 
  }
}

@keyframes pulse {
  0% { transform: scale3d(1, 1, 1); }
  50% { transform: scale3d(1.05, 1.05, 1); }
  100% { transform: scale3d(1, 1, 1); }
}

@keyframes bounce {
  0%, 20%, 53%, 80%, 100% { transform: translate3d(0, 0, 0); }
  40%, 43% { transform: translate3d(0, -8px, 0); }
  70% { transform: translate3d(0, -4px, 0); }
  90% { transform: translate3d(0, -2px, 0); }
}

@keyframes cardPulse {
  0% { box-shadow: 0 0 0 0 var(--primary-alpha-50); }
  70% { box-shadow: 0 0 0 10px rgba(52, 152, 219, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 152, 219, 0); }
}

/* Text Effects */
.text-gradient-common {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}