/* CSS Custom Properties (Variables) */
:root {
  /* Colors - Primary Palette */
  --color-primary-50: #f0f9ff;
  --color-primary-100: #e0f2fe;
  --color-primary-200: #bae6fd;
  --color-primary-300: #7dd3fc;
  --color-primary-400: #38bdf8;
  --color-primary-500: #0ea5e9;
  --color-primary-600: #0284c7;
  --color-primary-700: #0369a1;
  --color-primary-800: #075985;
  --color-primary-900: #0c4a6e;

  /* Colors - Secondary Palette */
  --color-secondary-50: #faf5ff;
  --color-secondary-100: #f3e8ff;
  --color-secondary-200: #e9d5ff;
  --color-secondary-300: #d8b4fe;
  --color-secondary-400: #c084fc;
  --color-secondary-500: #a855f7;
  --color-secondary-600: #9333ea;
  --color-secondary-700: #7c2d12;
  --color-secondary-800: #6b21a8;
  --color-secondary-900: #581c87;

  /* Colors - Accent */
  --color-accent-50: #fefce8;
  --color-accent-100: #fef9c3;
  --color-accent-200: #fef08a;
  --color-accent-300: #fde047;
  --color-accent-400: #facc15;
  --color-accent-500: #eab308;
  --color-accent-600: #ca8a04;
  --color-accent-700: #a16207;
  --color-accent-800: #854d0e;
  --color-accent-900: #713f12;

  /* Colors - Success */
  --color-success-50: #f0fdf4;
  --color-success-100: #dcfce7;
  --color-success-200: #bbf7d0;
  --color-success-300: #86efac;
  --color-success-400: #4ade80;
  --color-success-500: #22c55e;
  --color-success-600: #16a34a;
  --color-success-700: #15803d;
  --color-success-800: #166534;
  --color-success-900: #14532d;

  /* Colors - Warning */
  --color-warning-50: #fffbeb;
  --color-warning-100: #fef3c7;
  --color-warning-200: #fde68a;
  --color-warning-300: #fcd34d;
  --color-warning-400: #fbbf24;
  --color-warning-500: #f59e0b;
  --color-warning-600: #d97706;
  --color-warning-700: #b45309;
  --color-warning-800: #92400e;
  --color-warning-900: #78350f;

  /* Colors - Error */
  --color-error-50: #fef2f2;
  --color-error-100: #fee2e2;
  --color-error-200: #fecaca;
  --color-error-300: #fca5a5;
  --color-error-400: #f87171;
  --color-error-500: #ef4444;
  --color-error-600: #dc2626;
  --color-error-700: #b91c1c;
  --color-error-800: #991b1b;
  --color-error-900: #7f1d1d;

  /* Colors - Grayscale */
  --color-gray-50: #f9fafb;
  --color-gray-100: #f3f4f6;
  --color-gray-200: #e5e7eb;
  --color-gray-300: #d1d5db;
  --color-gray-400: #9ca3af;
  --color-gray-500: #6b7280;
  --color-gray-600: #4b5563;
  --color-gray-700: #374151;
  --color-gray-800: #1f2937;
  --color-gray-900: #111827;

  /* Colors - Special */
  --color-white: #ffffff;
  --color-black: #000000;

  /* Theme Colors - Default Dark */
  --color-background: #0a0a0a;
  --color-background-secondary: #141414;
  --color-background-tertiary: #1a1a1a;
  --color-surface: #1f1f1f;
  --color-surface-secondary: #2a2a2a;
  --color-border: #333333;
  --color-border-light: #404040;

  /* Text Colors - Default Dark */
  --color-text-primary: #ffffff;
  --color-text-secondary: #b3b3b3;
  --color-text-tertiary: #808080;
  --color-text-muted: #666666;

  /* Typography - Font Families */
  --font-family-base: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --font-family-mono: 'JetBrains Mono', 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;

  /* Typography - Font Weights */
  --font-weight-light: 300;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-extrabold: 800;
  --font-weight-black: 900;

  /* Typography - Font Sizes */
  --font-size-xs: 0.75rem;    /* 12px */
  --font-size-sm: 0.875rem;   /* 14px */
  --font-size-base: 1rem;     /* 16px */
  --font-size-lg: 1.125rem;   /* 18px */
  --font-size-xl: 1.25rem;    /* 20px */
  --font-size-2xl: 1.5rem;    /* 24px */
  --font-size-3xl: 1.875rem;  /* 30px */
  --font-size-4xl: 2.25rem;   /* 36px */
  --font-size-5xl: 3rem;      /* 48px */
  --font-size-6xl: 3.75rem;   /* 60px */
  --font-size-7xl: 4.5rem;    /* 72px */
  --font-size-8xl: 6rem;      /* 96px */

  /* Typography - Line Heights */
  --line-height-none: 1;
  --line-height-tight: 1.25;
  --line-height-snug: 1.375;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.625;
  --line-height-loose: 2;
  --line-height-base: 1.6;

  /* Spacing Scale */
  --spacing-0: 0;
  --spacing-1: 0.25rem;    /* 4px */
  --spacing-2: 0.5rem;     /* 8px */
  --spacing-3: 0.75rem;    /* 12px */
  --spacing-4: 1rem;       /* 16px */
  --spacing-5: 1.25rem;    /* 20px */
  --spacing-6: 1.5rem;     /* 24px */
  --spacing-8: 2rem;       /* 32px */
  --spacing-10: 2.5rem;    /* 40px */
  --spacing-12: 3rem;      /* 48px */
  --spacing-16: 4rem;      /* 64px */
  --spacing-20: 5rem;      /* 80px */
  --spacing-24: 6rem;      /* 96px */
  --spacing-32: 8rem;      /* 128px */
  --spacing-40: 10rem;     /* 160px */
  --spacing-48: 12rem;     /* 192px */
  --spacing-56: 14rem;     /* 224px */
  --spacing-64: 16rem;     /* 256px */

  /* Border Radius */
  --border-radius-none: 0;
  --border-radius-sm: 0.25rem;    /* 4px */
  --border-radius-base: 0.375rem; /* 6px */
  --border-radius-md: 0.5rem;     /* 8px */
  --border-radius-lg: 0.75rem;    /* 12px */
  --border-radius-xl: 1rem;       /* 16px */
  --border-radius-2xl: 1.5rem;    /* 24px */
  --border-radius-3xl: 2rem;      /* 32px */
  --border-radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-base: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06);
  --shadow-none: 0 0 #0000;

  /* Glow Effects */
  --glow-primary: 0 0 20px rgba(14, 165, 233, 0.3);
  --glow-secondary: 0 0 20px rgba(168, 85, 247, 0.3);
  --glow-accent: 0 0 20px rgba(234, 179, 8, 0.3);
  --glow-success: 0 0 20px rgba(34, 197, 94, 0.3);

  /* Transitions */
  --transition-base: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);

  /* Easing Functions */
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-in: cubic-bezier(0.4, 0, 1, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);

  /* Z-Index Scale */
  --z-index-dropdown: 1000;
  --z-index-sticky: 1020;
  --z-index-fixed: 1030;
  --z-index-modal-backdrop: 1040;
  --z-index-modal: 1050;
  --z-index-popover: 1060;
  --z-index-tooltip: 1070;
  --z-index-toast: 1080;

  /* Breakpoints (for reference in media queries) */
  --breakpoint-sm: 640px;
  --breakpoint-md: 768px;
  --breakpoint-lg: 1024px;
  --breakpoint-xl: 1280px;
  --breakpoint-2xl: 1536px;

  /* Layout */
  --container-max-width: 1280px;
  --container-padding: var(--spacing-6);
  --navbar-height: 80px;
  --footer-height: 200px;

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, var(--color-primary-500) 0%, var(--color-secondary-500) 100%);
  --gradient-secondary: linear-gradient(135deg, var(--color-secondary-500) 0%, var(--color-accent-500) 100%);
  --gradient-accent: linear-gradient(135deg, var(--color-accent-500) 0%, var(--color-primary-500) 100%);
  --gradient-hero: radial-gradient(ellipse at center, rgba(14, 165, 233, 0.15) 0%, transparent 70%);

  /* Animation Durations */
  --duration-fast: 150ms;
  --duration-normal: 300ms;
  --duration-slow: 500ms;
  --duration-slower: 750ms;

  /* Backdrop Filters */
  --backdrop-blur-sm: blur(4px);
  --backdrop-blur-md: blur(8px);
  --backdrop-blur-lg: blur(12px);
  --backdrop-blur-xl: blur(16px);

  /* Custom Properties for Component States */
  --button-padding-sm: var(--spacing-2) var(--spacing-4);
  --button-padding-md: var(--spacing-3) var(--spacing-6);
  --button-padding-lg: var(--spacing-4) var(--spacing-8);

  /* Form Elements */
  --form-border-color: var(--color-border);
  --form-border-color-focus: var(--color-primary-500);
  --form-background: var(--color-surface);
  --form-padding: var(--spacing-3) var(--spacing-4);

  /* Glass Effect */
  --glass-background: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-backdrop: blur(10px) saturate(180%);
}

/* Light Theme Variables */
.light-theme {
  /* Light Theme Colors - 更现代、简洁、舒适 */
  --color-background: #f8fafc;               /* base page background */
  --color-background-secondary: #ffffff;      /* sections/cards background */
  --color-background-tertiary: #f1f5f9;       /* subtle alt background */
  --color-surface: #ffffff;                   /* surfaces */
  --color-surface-secondary: #f8fafc;         /* muted surfaces */
  --color-border: rgba(15, 23, 42, 0.06);     /* slate-900 @6% */
  --color-border-light: rgba(15, 23, 42, 0.04);

  /* Text Colors - 更好可读性 */
  --color-text-primary: #0f172a;   /* slate-900 */
  --color-text-secondary: #334155; /* slate-700 */
  --color-text-tertiary: #475569;  /* slate-600 */
  --color-text-muted: #64748b;     /* slate-500 */

  /* Glass Effect - 降低饱和度与增强明度 */
  --glass-background: rgba(255, 255, 255, 0.9);
  --glass-border: rgba(15, 23, 42, 0.06);
  --glass-backdrop: blur(16px) saturate(160%) brightness(1.05);

  /* Shadows - 自然柔和 */
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-base: 0 2px 8px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 6px 16px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 10px 24px rgba(15, 23, 42, 0.10);
  --shadow-xl: 0 18px 40px rgba(15, 23, 42, 0.12);

  /* Glow Effects - 更克制 */
  --glow-primary: 0 0 24px rgba(99, 102, 241, 0.25);       /* indigo-500 */
  --glow-secondary: 0 0 24px rgba(14, 165, 233, 0.2);      /* cyan-500 */
  --glow-accent: 0 0 20px rgba(236, 72, 153, 0.18);        /* pink-500 */
  --glow-success: 0 0 20px rgba(34, 197, 94, 0.2);

  /* Gradients - 双色过渡，更现代 */
  --gradient-primary: linear-gradient(135deg, #6366f1 0%, #06b6d4 100%);
  --gradient-secondary: linear-gradient(135deg, #8b5cf6 0%, #38bdf8 100%);
  --gradient-accent: linear-gradient(135deg, #3b82f6 0%, #22c55e 100%);
  --gradient-hero: radial-gradient(ellipse at center, rgba(99, 102, 241, 0.12) 0%, rgba(6, 182, 212, 0.08) 45%, transparent 70%);

  /* Patterns - 更轻微 */
  --pattern-dots: radial-gradient(circle at 1px 1px, rgba(15, 23, 42, 0.06) 1px, transparent 0);
  --pattern-grid: linear-gradient(rgba(15, 23, 42, 0.06) 1px, transparent 1px), linear-gradient(90deg, rgba(15, 23, 42, 0.06) 1px, transparent 1px);
}