:root {
  /* Background Layers */
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-elevated: #1a1a24;
  --bg-surface: #1e1e2a;

  /* Glass Effects */
  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-bg-hover: rgba(255, 255, 255, 0.06);
  --glass-bg-active: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-border-light: rgba(255, 255, 255, 0.12);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --glass-shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);

  /* Accent Colors */
  --accent-primary: #6366f1;
  --accent-primary-light: #818cf8;
  --accent-primary-dark: #4f46e5;
  --accent-secondary: #8b5cf6;
  --accent-gradient: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  --accent-gradient-hover: linear-gradient(135deg, var(--accent-primary-light), #a78bfa);

  /* Voice States */
  --voice-idle: #6b7280;
  --voice-idle-glow: rgba(107, 114, 128, 0.25);
  --voice-listening: #60a5fa;
  --voice-listening-glow: rgba(96, 165, 250, 0.4);
  --voice-processing: #fbbf24;
  --voice-processing-glow: rgba(251, 191, 36, 0.4);
  --voice-speaking: #a78bfa;
  --voice-speaking-glow: rgba(167, 139, 250, 0.4);

  /* Semantic Colors */
  --success: #4ade80;
  --success-bg: rgba(74, 222, 128, 0.1);
  --warning: #fbbf24;
  --warning-bg: rgba(251, 191, 36, 0.1);
  --error: #f87171;
  --error-bg: rgba(248, 113, 113, 0.1);
  --info: #60a5fa;
  --info-bg: rgba(96, 165, 250, 0.1);

  /* Text Colors */
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.7);
  --text-tertiary: rgba(255, 255, 255, 0.5);
  --text-disabled: rgba(255, 255, 255, 0.3);

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Blur */
  --blur-sm: 8px;
  --blur-md: 16px;
  --blur-lg: 24px;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Typography */
  --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  --font-mono: 'SF Mono', SFMono-Regular, ui-monospace, Menlo, Monaco, 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: 2rem;
  --line-height-tight: 1.25;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.75;

  /* Z-Index Scale */
  --z-base: 0;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-sidebar: 250;
  --z-modal-backdrop: 300;
  --z-modal: 310;
  --z-toast: 400;
  --z-tooltip: 500;

  /* Layout */
  --sidebar-width: 280px;
  --sidebar-collapsed-width: 64px;
  --right-panel-width: 300px;
  --right-panel-collapsed-width: 48px;
  --dock-height: 64px;
  --header-height: 0px;
}

/* Light Theme */
[data-theme="light"] {
  --bg-primary: #f8f9fc;
  --bg-secondary: #eef0f5;
  --bg-elevated: #ffffff;
  --bg-surface: #f1f3f8;

  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-bg-hover: rgba(255, 255, 255, 0.85);
  --glass-bg-active: rgba(255, 255, 255, 0.95);
  --glass-border: rgba(0, 0, 0, 0.08);
  --glass-border-light: rgba(0, 0, 0, 0.12);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  --glass-shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.12);

  --text-primary: #1a1a2e;
  --text-secondary: rgba(26, 26, 46, 0.7);
  --text-tertiary: rgba(26, 26, 46, 0.5);
  --text-disabled: rgba(26, 26, 46, 0.3);
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  :root {
    --transition-fast: 0ms;
    --transition-normal: 0ms;
    --transition-slow: 0ms;
    --transition-bounce: 0ms;
  }
}

/* Font Size Preferences */
html[data-font-size="small"] { font-size: 14px; }
html[data-font-size="medium"] { font-size: 16px; }
html[data-font-size="large"] { font-size: 18px; }
