/* =============================================================================
   THEME SYSTEM - Central color and style definitions
   ============================================================================= 
   
   All theme-dependent CSS properties (colors, shadows, borders, effects)
   are defined as CSS variables here. Use var(--variable-name) in your CSS.
   
   See THEME_USAGE.md for detailed examples and documentation.
   
   ============================================================================= */

/* Default Dark Theme (GitHub-inspired) */
:root {
  /* Background colors */
  --bg-primary: #0d1117;
  --bg-secondary: #161b22;
  --bg-tertiary: #21262d;
  --bg-elevated: #1c2128;
  
  /* Surface colors */
  --surface-primary: rgba(13, 17, 23, 0.92);
  --surface-secondary: rgba(22, 27, 34, 0.95);
  --surface-overlay: rgba(13, 17, 23, 0.98);
  
  /* Border colors */
  --border-default: rgba(240, 246, 252, 0.08);
  --border-muted: rgba(240, 246, 252, 0.05);
  --border-strong: rgba(240, 246, 252, 0.16);
  
  /* Text colors */
  --text-primary: rgba(255, 255, 255, 0.9);
  --text-secondary: rgba(255, 255, 255, 0.7);
  --text-tertiary: rgba(255, 255, 255, 0.6);
  --text-muted: rgba(255, 255, 255, 0.5);
  
  /* Interactive element colors */
  --interactive-default: rgba(255, 255, 255, 0.7);
  --interactive-hover: rgba(255, 255, 255, 0.95);
  --interactive-active: #ffffff;
  
  /* Background hover/active states */
  --bg-hover: rgba(255, 255, 255, 0.05);
  --bg-active: rgba(255, 255, 255, 0.1);
  --bg-selected: rgba(255, 255, 255, 0.15);
  
  /* Accent colors */
  --accent-primary: rgba(102, 126, 234, 0.9);
  --accent-hover: rgba(102, 126, 234, 1);
  --accent-bg: rgba(102, 126, 234, 0.32);
  --accent-subtle: rgba(102, 126, 234, 0.16);
  
  /* Highlight colors (for animations/flash effects) */
  --highlight-bg-start: rgba(102, 126, 234, 0.2);
  --highlight-bg-mid: rgba(102, 126, 234, 0.35);
  --highlight-bg-end: var(--feed-card-bg);
  
  /* Sidebar specific */
  --sidebar-bg: rgba(13, 17, 23, 0.92);
  --sidebar-border: rgba(240, 246, 252, 0.08);
  --sidebar-shadow: rgba(0, 0, 0, 0.2);
  --sidebar-item-hover: rgba(255, 255, 255, 0.05);
  --sidebar-item-active-bg: rgba(255, 255, 255, 0.08);
  --sidebar-item-active-indicator: rgba(102, 126, 234, 0.9);
  
  /* Body/Page background */
  --body-bg: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --body-bg-solid: #0d1117;
  
  /* Topbar */
  --topbar-bg: rgba(13, 17, 23, 0.95);
  --topbar-border: rgba(240, 246, 252, 0.08);
  
  /* Feed/Content */
  --feed-bg: transparent;
  --feed-card-bg: rgba(22, 27, 34, 0.95);
  --feed-card-border: rgba(240, 246, 252, 0.08);
  
  /* Buttons */
  --button-bg: rgba(240, 246, 252, 0.08);
  --button-hover-bg: rgba(240, 246, 252, 0.16);
  --button-active-bg: rgba(240, 246, 252, 0.2);
  --button-text: rgba(255, 255, 255, 0.88);
  
  /* Input fields */
  --input-bg: rgba(255, 255, 255, 0.08);
  --input-border: rgba(255, 255, 255, 0.16);
  --input-focus-border: rgba(102, 126, 234, 0.5);
  
  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.2);
  --shadow-lg: 6px 0 20px rgba(0, 0, 0, 0.2);
  --shadow-xl: 0 10px 40px rgba(0, 0, 0, 0.3);
  --shadow-none: none;
  
  /* Effects */
  --backdrop-blur: blur(18px);
  --backdrop-blur-strong: blur(24px);
  
  /* Border radius */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  
  /* Border widths */
  --border-width-thin: 1px;
  --border-width-default: 1px;
  --border-width-thick: 2px;
  
  /* IDE specific (VS Code dark theme colors) */
  --ide-bg: #252526;
  --ide-panel-bg: #1e1e1e;
  --ide-sidebar-bg: #1e1e1e;
  --ide-sidebar-rail-bg: #1e1e1e;
  --ide-border: #3e3e42;
  --ide-text: #cccccc;
  --ide-text-muted: #858585;
  --ide-header-bg: #252526;
  --ide-icon-color: #858585;
  --ide-icon-hover: #cccccc;
  --ide-icon-active: #ffffff;
}

/* Light Theme */
body.theme-light {
  /* Background colors */
  --bg-primary: #ffffff;
  --bg-secondary: #f6f8fa;
  --bg-tertiary: #eaeef2;
  --bg-elevated: #ffffff;
  
  /* Surface colors */
  --surface-primary: rgba(255, 255, 255, 0.92);
  --surface-secondary: rgba(246, 248, 250, 0.95);
  --surface-overlay: rgba(255, 255, 255, 0.98);
  
  /* Border colors */
  --border-default: rgba(31, 41, 51, 0.08);
  --border-muted: rgba(31, 41, 51, 0.05);
  --border-strong: rgba(31, 41, 51, 0.16);
  
  /* Text colors */
  --text-primary: rgba(31, 41, 51, 0.9);
  --text-secondary: rgba(31, 41, 51, 0.7);
  --text-tertiary: rgba(31, 41, 51, 0.6);
  --text-muted: rgba(31, 41, 51, 0.5);
  
  /* Interactive element colors */
  --interactive-default: rgba(31, 41, 51, 0.7);
  --interactive-hover: rgba(31, 41, 51, 0.95);
  --interactive-active: rgba(31, 41, 51, 1);
  
  /* Background hover/active states */
  --bg-hover: rgba(31, 41, 51, 0.05);
  --bg-active: rgba(31, 41, 51, 0.1);
  --bg-selected: rgba(31, 41, 51, 0.15);
  
  /* Accent colors */
  --accent-primary: rgba(79, 70, 229, 0.85);
  --accent-hover: rgba(79, 70, 229, 1);
  --accent-bg: rgba(79, 70, 229, 0.22);
  --accent-subtle: rgba(79, 70, 229, 0.12);
  
  /* Highlight colors (for animations/flash effects) */
  --highlight-bg-start: rgba(255, 251, 230, 1);
  --highlight-bg-mid: rgba(255, 241, 184, 1);
  --highlight-bg-end: var(--feed-card-bg);
  
  /* Sidebar specific */
  --sidebar-bg: rgba(255, 255, 255, 0.92);
  --sidebar-border: rgba(31, 41, 51, 0.08);
  --sidebar-shadow: rgba(0, 0, 0, 0.08);
  --sidebar-item-hover: rgba(31, 41, 51, 0.05);
  --sidebar-item-active-bg: rgba(31, 41, 51, 0.08);
  --sidebar-item-active-indicator: rgba(79, 70, 229, 0.85);
  
  /* Body/Page background */
  --body-bg: linear-gradient(135deg, #ffffff 0%, #f0f4ff 100%);
  --body-bg-solid: #ffffff;
  
  /* Topbar */
  --topbar-bg: rgba(255, 255, 255, 0.95);
  --topbar-border: rgba(31, 41, 51, 0.08);
  
  /* Feed/Content */
  --feed-bg: transparent;
  --feed-card-bg: rgba(255, 255, 255, 0.95);
  --feed-card-border: rgba(31, 41, 51, 0.08);
  
  /* Buttons */
  --button-bg: rgba(17, 24, 39, 0.08);
  --button-hover-bg: rgba(17, 24, 39, 0.16);
  --button-active-bg: rgba(17, 24, 39, 0.2);
  --button-text: rgba(31, 41, 51, 0.86);
  
  /* Input fields */
  --input-bg: rgba(31, 41, 51, 0.04);
  --input-border: rgba(31, 41, 51, 0.12);
  --input-focus-border: rgba(79, 70, 229, 0.5);
  
  /* Shadows - Light theme has lighter shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
  --shadow-xl: 0 12px 32px rgba(0, 0, 0, 0.15);
  --shadow-none: none;
  
  /* Effects */
  --backdrop-blur: blur(12px);
  --backdrop-blur-strong: blur(20px);
  
  /* IDE specific (VS Code light theme colors) */
  --ide-bg: #ffffff;
  --ide-panel-bg: #f8f8f8;
  --ide-sidebar-bg: #f8f8f8;
  --ide-sidebar-rail-bg: #ebebeb;
  --ide-border: #e5e5e5;
  --ide-text: #333333;
  --ide-text-muted: #6a737d;
  --ide-header-bg: #f3f3f3;
  --ide-icon-color: #424242;
  --ide-icon-hover: #2c2c2c;
  --ide-icon-active: #000000;
  
  /* Border radius - can be different per theme */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  
  /* Border widths */
  --border-width-thin: 1px;
  --border-width-default: 1px;
  --border-width-thick: 1px;
}

/* Dev Theme (Alternative dark) */
body.theme-dev {
  /* Inherits from default dark theme, can override specific variables */
  --accent-primary: #58a6ff;
  --accent-hover: #79c0ff;
  --body-bg-solid: #0d1117;
  
  /* Dev theme might have different shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.15);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.25);
  --shadow-lg: 6px 0 20px rgba(0, 0, 0, 0.3);
  
  /* IDE colors inherit from default dark theme */
}
