/* =============================================================================
   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.
   
   ============================================================================= */

body {
  --border-width-default: 1px;
  --radius-sm: 12px;
}

/* Light Theme */
body.theme-light {
  /* Background colors */
  --bg-primary: #ffffff;
  --bg-secondary: #f6f8fa;
  --bg-tertiary: #eaeef2;
  --bg-elevated: #ffffff;
  --card-bg: #ffffff;

  /* Highlighted button - VS Code light blue */
  --highlighted-button-bg: #005fb8;
  --highlighted-button-hover-bg: #004c93;
  --highlighted-button-active-bg: #003d7a; 
  --highlighted-button-text: #ffffff;

  /* Orange highlighted button - vibrant orange */
  --orange-highlighted-button-bg: #ff6b35;
  --orange-highlighted-button-hover-bg: #ff5722;
  --orange-highlighted-button-active-bg: #e64a19;
  --orange-highlighted-button-text: #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);
  --text-contrast: #464646;
  --text-contrast-highlight: #151212;
  
  /* 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);
  --bg-light: rgba(255, 255, 255, 0.57);
  
  /* 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);
  
  /* Sidebar panel (Library, Files, Workflows) */
  --sidebar-panel-bg: rgba(255, 255, 255, 0.98);
  --sidebar-panel-border: rgba(31, 41, 51, 0.12);
  --sidebar-panel-shadow: 2px 0 16px rgba(0, 0, 0, 0.1);

  /* Icon color groups (icon box + matching panel background) */
  --icon-group-1-box: rgb(118, 161, 251);
  --icon-group-1-panel: rgb(189, 203, 234);
  --icon-group-2-box: rgb(255, 174, 43);
  --icon-group-2-panel: rgb(255, 210, 137);
  --icon-group-3-box: rgb(150, 101, 255);
  --icon-group-3-panel: rgb(173, 159, 204);
  --icon-group-4-box: rgb(142, 228, 201);
  --icon-group-4-panel: rgb(183, 230, 217);
  --icon-group-5-box: rgb(255, 221, 64);
  --icon-group-5-panel: rgb(255, 239, 164);
  --icon-group-6-box: rgb(123, 162, 240);
  --icon-group-6-panel: rgb(53, 110, 234);
  --icon-group-7-box: rgb(201, 201, 201);
  --icon-group-7-panel: rgb(22, 22, 23);
  
  /* Body/Page background */
  --body-bg: #ffffff;
  --body-bg-solid: #ffffff;
  --page-bg: #ececec;
  --active-bg: #d9d9d9;
  --hover-bg: #e6e6e6;
  
  /* Topbar */
  --topbar-bg: rgba(255, 255, 255, 0.95);
  --topbar-border: rgba(31, 41, 51, 0.08);
  --topbar-font-size: 13px;
  --topbar-font-weight: 300;
  --topbar-text-default: rgba(31, 41, 51, 0.65);
  --topbar-text-hover: rgba(31, 41, 51, 0.85);
  --topbar-text-active: #3e3e3e;
  --topbar-bg-hover: rgba(31, 41, 51, 0.06);
  --topbar-bg-active: rgba(31, 41, 51, 0.12);
  
  /* 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-text: rgba(31, 41, 51, 0.9);
  --input-bg: #d6d8db;
  --input-border: #84848457;
  --input-focus-border: #98a4ab57;
  
  /* 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;
  --active-file-bg: #b5e1ff;
  --active-file-border: #007acc;
  --ide-editor-bg: #eaeaea;
  
  /* 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 with GitHub-inspired blues) */
body.theme-dev {
  /* Background colors */
  --bg-primary: #0d1117;
  --bg-secondary: #161b22;
  --bg-tertiary: #21262d;
  --bg-elevated: #1c2128;
  --card-bg: #161b22;

  /* Highlighted button - VS Code dark blue */
  --highlighted-button-bg: #0e639c;
  --highlighted-button-hover-bg: #1177bb;
  --highlighted-button-active-bg: #1a8cd8; 
  --highlighted-button-text: #ffffff;

  /* Orange highlighted button - vibrant orange */
  --orange-highlighted-button-bg: #ff6b35;
  --orange-highlighted-button-hover-bg: #ff5722;
  --orange-highlighted-button-active-bg: #e64a19;
  --orange-highlighted-button-text: #ffffff;
  
  /* 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);
  --text-contrast: #464646;
  --text-contrast-highlight: #151212;
  
  /* 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);
  --bg-light: rgba(255, 255, 255, 0.57);
  
  /* Accent colors - GitHub blue */
  --accent-primary: #58a6ff;
  --accent-hover: #79c0ff;
  --accent-bg: rgba(88, 166, 255, 0.32);
  --accent-subtle: rgba(88, 166, 255, 0.16);
  
  /* Highlight colors (for animations/flash effects) */
  --highlight-bg-start: rgba(88, 166, 255, 0.2);
  --highlight-bg-mid: rgba(88, 166, 255, 0.35);
  --highlight-bg-end: var(--feed-card-bg);
  
  /* Sidebar specific */
  --sidebar-bg: #1c1c1c;
  --sidebar-border: none;
  --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: #58a6ff;
  
  /* Sidebar panel (Library, Files, Workflows) */
  --sidebar-panel-bg: rgb(26, 27, 28);
  --sidebar-panel-border: rgb(26, 27, 28);
  --sidebar-panel-shadow: 2px 0 16px rgb(0, 0, 0);

  /* Icon color groups (icon box + matching panel background) */
  --icon-group-1-box: rgb(118, 161, 251);
  --icon-group-1-panel: rgb(189, 203, 234);
  --icon-group-2-box: rgb(255, 174, 43);
  --icon-group-2-panel: rgb(255 230 188);
  --icon-group-3-box: rgb(150, 101, 255);
  --icon-group-3-panel: rgb(173, 159, 204);
  --icon-group-4-box: rgb(142, 228, 201);
  --icon-group-4-panel: rgb(183, 230, 217);
  --icon-group-5-box: rgb(255, 221, 64);
  --icon-group-5-panel: rgb(255, 239, 164);
  --icon-group-6-box: rgb(123, 162, 240);
  --icon-group-6-panel: rgb(189, 203, 234);
  --icon-group-7-box: rgb(67, 68, 70);
  --icon-group-7-panel: rgb(22, 22, 22);
  
  /* Body/Page background */
  --body-bg: #232323;
  --body-bg-solid: #232323;
  --page-bg: #000000;
  --active-bg: #37373d;
  --hover-bg: #2a2a2a;
  
  /* Topbar */
  --topbar-bg: #1c1c1c;
  --topbar-border: none;
  --topbar-font-size: 13px;
  --topbar-font-weight: 300;
  --topbar-text-default: rgba(255, 255, 255, 0.6);
  --topbar-text-hover: rgba(255, 255, 255, 0.8);
  --topbar-text-active: #ffffff;
  --topbar-bg-hover: rgba(255, 255, 255, 0.06);
  --topbar-bg-active: rgba(255, 255, 255, 0.12);
  
  /* 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-text: rgba(238, 238, 238, 0.931);
  --input-bg: rgba(255, 255, 255, 0.08);
  --input-border: rgb(30, 28, 28);
  --input-focus-border: rgb(30, 26, 26);
  
  /* 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);
  --shadow-xl: 0 10px 40px rgba(0, 0, 0, 0.35);
  --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;
  --active-file-bg: #094771;
  --active-file-border: #007acc;
}

/* Vibe Theme (Grey/purple tones) */
body.theme-vibe {
  /* Background colors - grey tones */
  --bg-primary: #2a2a3e;
  --bg-secondary: #232336;
  --bg-tertiary: #1e1e2e;
  --bg-elevated: #2f2f45;
  --card-bg: #293d4f;

  /* Highlighted button - VS Code dark blue */
  --highlighted-button-bg: #0e639c;
  --highlighted-button-hover-bg: #1177bb;
  --highlighted-button-active-bg: #1a8cd8; 
  --highlighted-button-text: #ffffff;

  /* Orange highlighted button - vibrant orange */
  --orange-highlighted-button-bg: #ff6b35;
  --orange-highlighted-button-hover-bg: #ff5722;
  --orange-highlighted-button-active-bg: #e64a19;
  --orange-highlighted-button-text: #ffffff;
  
  /* Surface colors */
  --surface-primary: rgba(42, 42, 62, 0.92);
  --surface-secondary: rgba(35, 35, 54, 0.95);
  --surface-overlay: rgba(42, 42, 62, 0.98);
  
  /* Border colors */
  --border-default: rgba(255, 255, 255, 0.08);
  --border-muted: rgba(255, 255, 255, 0.05);
  --border-strong: rgba(255, 255, 255, 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);
  --text-contrast: #464646;
  --text-contrast-highlight: #151212;
  
  /* 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);
  --bg-light: rgba(255, 255, 255, 0.57);
  
  /* Accent colors - purple/blue */
  --accent-primary: rgba(138, 116, 249, 0.9);
  --accent-hover: rgba(138, 116, 249, 1);
  --accent-bg: rgba(138, 116, 249, 0.32);
  --accent-subtle: rgba(138, 116, 249, 0.16);
  
  /* Sidebar specific */
  --sidebar-bg: #232336;
  --sidebar-border: rgba(255, 255, 255, 0.06);
  --sidebar-shadow: rgba(0, 0, 0, 0.3);
  --sidebar-item-hover: rgba(255, 255, 255, 0.05);
  --sidebar-item-active-bg: rgba(255, 255, 255, 0.08);
  --sidebar-item-active-indicator: rgba(138, 116, 249, 0.9);
  
  /* Sidebar panel (Library, Files, Workflows) */
  --sidebar-panel-bg: rgba(35, 35, 54, 0.98);
  --sidebar-panel-border: rgba(255, 255, 255, 0.12);
  --sidebar-panel-shadow: 2px 0 16px rgba(0, 0, 0, 0.4);
  
  /* Icon color groups (icon box + matching panel background) */
  --icon-group-1-box: rgb(118, 161, 251);
  --icon-group-1-panel: rgb(189, 203, 234);
  --icon-group-2-box: rgb(255, 174, 43);
  --icon-group-2-panel: rgb(255 230 188);
  --icon-group-3-box: rgb(150, 101, 255);
  --icon-group-3-panel: rgb(173, 159, 204);
  --icon-group-4-box: rgb(142, 228, 201);
  --icon-group-4-panel: rgb(183, 230, 217);
  --icon-group-5-box: rgb(255, 221, 64);
  --icon-group-5-panel: rgb(255, 239, 164);
  --icon-group-6-box: rgb(122, 149, 203);
  --icon-group-6-panel: rgb(189, 203, 234);
  --icon-group-7-box: rgb(67, 68, 70);
  --icon-group-7-panel: rgb(2, 11, 30);

  /* Body/Page background - grey */
  --body-bg: #2a2a3e;
  --body-bg-solid: #2a2a3e;
  --page-bg: #151524;
  --active-bg: #42427c;
  --hover-bg: #3d3d68;
  
  
  /* Topbar */
  --topbar-bg: #232336;
  --topbar-border: rgba(255, 255, 255, 0.06);
  --topbar-font-size: 13px;
  --topbar-font-weight: 300;
  --topbar-text-default: rgba(255, 255, 255, 0.6);
  --topbar-text-hover: rgba(255, 255, 255, 0.8);
  --topbar-text-active: #ffffff;
  --topbar-bg-hover: rgba(255, 255, 255, 0.06);
  --topbar-bg-active: rgba(255, 255, 255, 0.12);
  
  /* Feed/Content */
  --feed-bg: transparent;
  --feed-card-bg: rgba(35, 35, 54, 0.95);
  --feed-card-border: rgba(255, 255, 255, 0.08);
  
  /* Buttons */
  --button-bg: rgba(255, 255, 255, 0.08);
  --button-hover-bg: rgba(255, 255, 255, 0.16);
  --button-active-bg: rgba(255, 255, 255, 0.2);
  --button-text: rgba(255, 255, 255, 0.88);
  
  /* Input fields */
  --input-text: rgba(255, 255, 255, 0.931);
  --input-bg: rgba(255, 255, 255, 0.08);
  --input-border: rgb(32, 32, 49);
  --input-focus-border: rgb(32, 32, 55);
  
  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3);
  --shadow-lg: 6px 0 20px rgba(0, 0, 0, 0.35);
  --shadow-xl: 0 10px 40px rgba(0, 0, 0, 0.4);
  --shadow-none: none;
  
  /* Effects */
  --backdrop-blur: blur(18px);
  --backdrop-blur-strong: blur(24px);
  
  /* IDE specific */
  --ide-bg: #2a2a3e;
  --ide-panel-bg: #232336;
  --ide-sidebar-bg: #232336;
  --ide-sidebar-rail-bg: #1e1e2e;
  --ide-border: #3e3e52;
  --ide-text: #d4d4d4;
  --ide-text-muted: #9d9db3;
  --ide-header-bg: #2a2a3e;
  --ide-icon-color: #9d9db3;
  --ide-icon-hover: #d4d4d4;
  --ide-icon-active: #ffffff;
  --active-file-bg: #0f68a4;
  --active-file-border: #007acc;
}

