/* Design System Variables */
/* CSS Custom Properties for consistent theming */

:root {
  /* Color Palette - Neutral base that adapts to background */
  --color-primary: #ffffff;
  --color-primary-alpha: rgba(255, 255, 255, 0.95);
  --color-secondary: #f8f9fa;
  --color-accent: #4A90E2;
  --color-text-primary: #ffffff;
  --color-text-secondary: rgba(255, 255, 255, 0.85);
  --color-text-muted: rgba(255, 255, 255, 0.7);
  --color-background-overlay: rgba(0, 0, 0, 0.3);
  --color-shadow: rgba(0, 0, 0, 0.2);
  --color-shadow-hover: rgba(0, 0, 0, 0.4);
  
  /* Typography Scale */
  --font-family-primary: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, 
                          "Helvetica Neue", Arial, "Noto Sans", sans-serif,
                          "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", 
                          "Noto Color Emoji";
  --font-family-chinese: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", 
                         "WenQuanYi Micro Hei", sans-serif;
  
  /* Responsive Typography */
  --font-size-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --font-size-sm: clamp(0.875rem, 0.8rem + 0.375vw, 1rem);
  --font-size-base: clamp(1rem, 0.9rem + 0.5vw, 1.125rem);
  --font-size-lg: clamp(1.125rem, 1rem + 0.625vw, 1.25rem);
  --font-size-xl: clamp(1.25rem, 1.1rem + 0.75vw, 1.5rem);
  --font-size-2xl: clamp(1.5rem, 1.3rem + 1vw, 2rem);
  --font-size-3xl: clamp(1.875rem, 1.6rem + 1.375vw, 2.5rem);
  
  /* Line Heights */
  --line-height-tight: 1.25;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.75;
  
  /* Spacing Scale */
  --space-1: 0.25rem;   /* 4px */
  --space-2: 0.5rem;    /* 8px */
  --space-3: 0.75rem;   /* 12px */
  --space-4: 1rem;      /* 16px */
  --space-5: 1.25rem;   /* 20px */
  --space-6: 1.5rem;    /* 24px */
  --space-8: 2rem;      /* 32px */
  --space-10: 2.5rem;   /* 40px */
  --space-12: 3rem;     /* 48px */
  --space-16: 4rem;     /* 64px */
  --space-20: 5rem;     /* 80px */
  --space-24: 6rem;     /* 96px */
  
  /* Avatar Sizes - Fixed Values */
  --avatar-size-sm: 64px;     
  --avatar-size-md: 128px;    
  --avatar-size-lg: 192px;    
  --avatar-size-xl: 256px;
  
  /* Border Radius */
  --radius-sm: 0.125rem;
  --radius-md: 0.375rem;
  --radius-lg: 0.5rem;
  --radius-xl: 0.75rem;
  --radius-full: 50%;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 var(--color-shadow);
  --shadow-md: 0 4px 6px -1px var(--color-shadow);
  --shadow-lg: 0 10px 15px -3px var(--color-shadow);
  --shadow-xl: 0 20px 25px -5px var(--color-shadow);
  
  /* Animation Timing */
  --duration-fast: 150ms;
  --duration-normal: 250ms;
  --duration-slow: 350ms;
  --easing-ease-out: cubic-bezier(0, 0, 0.2, 1);
  --easing-ease-in: cubic-bezier(0.4, 0, 1, 1);
  --easing-ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Breakpoints (for reference in media queries) */
  --breakpoint-sm: 640px;
  --breakpoint-md: 768px;
  --breakpoint-lg: 1024px;
  --breakpoint-xl: 1280px;
  --breakpoint-2xl: 1536px;
}

/* Dark mode adaptation for different backgrounds */
@media (prefers-color-scheme: dark) {
  :root {
    --color-text-primary: #ffffff;
    --color-text-secondary: rgba(255, 255, 255, 0.9);
    --color-text-muted: rgba(255, 255, 255, 0.75);
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --color-text-primary: #ffffff;
    --color-shadow: rgba(0, 0, 0, 0.6);
    --color-shadow-hover: rgba(0, 0, 0, 0.8);
  }
}
