/**
 * Hub Theme System - Light & Dark Mode
 * 
 * Provides CSS variables for light and dark themes
 * Theme preference is stored in localStorage and applied via body class
 */

/* Dark Theme (Default) */
:root {
  /* Background Colors */
  --theme-bg-primary: #121212;
  --theme-bg-secondary: #1e1e1e;
  --theme-bg-tertiary: #2d2d2d;
  
  /* Text Colors */
  --theme-text-primary: #e0e0e0;
  --theme-text-secondary: #b0b0b0;
  --theme-text-tertiary: #808080;
  --theme-text-inverse: #121212;
  
  /* Border Colors */
  --theme-border: #3a3a3a;
  --theme-border-light: #2d2d2d;
  
  /* Accent Colors */
  --theme-accent-primary: #667eea;
  --theme-accent-secondary: #764ba2;
  --theme-accent-hover: #7c8ff0;
  
  /* Card Colors */
  --theme-card-bg: #1e1e1e;
  --theme-card-shadow: rgba(0, 0, 0, 0.5);
  --theme-card-shadow-hover: rgba(102, 126, 234, 0.3);
  
  /* Input Colors */
  --theme-input-bg: #2d2d2d;
  --theme-input-border: #3a3a3a;
  --theme-input-text: #e0e0e0;
  
  /* Link Colors */
  --theme-link: #7c8ff0;
  --theme-link-hover: #9ba3f5;
}

/* Light Theme */
[data-theme="light"] {
  /* Background Colors */
  --theme-bg-primary: #ffffff;
  --theme-bg-secondary: #f8f9fa;
  --theme-bg-tertiary: #e9ecef;
  
  /* Text Colors */
  --theme-text-primary: #212529;
  --theme-text-secondary: #495057;
  --theme-text-tertiary: #6c757d;
  --theme-text-inverse: #ffffff;
  
  /* Border Colors */
  --theme-border: #dee2e6;
  --theme-border-light: #e9ecef;
  
  /* Accent Colors */
  --theme-accent-primary: #667eea;
  --theme-accent-secondary: #764ba2;
  --theme-accent-hover: #5568d3;
  
  /* Card Colors */
  --theme-card-bg: #ffffff;
  --theme-card-shadow: rgba(0, 0, 0, 0.1);
  --theme-card-shadow-hover: rgba(102, 126, 234, 0.2);
  
  /* Input Colors */
  --theme-input-bg: #ffffff;
  --theme-input-border: #ced4da;
  --theme-input-text: #212529;
  
  /* Link Colors */
  --theme-link: #667eea;
  --theme-link-hover: #764ba2;
}

/* Apply theme to body */
body {
  background-color: var(--theme-bg-primary);
  color: var(--theme-text-primary);
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Theme Toggle Button */
.theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 2px solid var(--theme-border);
  background: var(--theme-card-bg);
  color: var(--theme-text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: 0 2px 8px var(--theme-card-shadow);
  transition: all 0.3s ease;
}

.theme-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px var(--theme-card-shadow-hover);
  border-color: var(--theme-accent-primary);
}

.theme-toggle:active {
  transform: scale(0.95);
}

/* Smooth transitions for theme changes */
* {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Override transitions for specific elements that shouldn't animate */
img, svg, video, canvas {
  transition: none;
}

