/* Global Theme System for Smart Memory */
/* This file provides universal theming across all pages using CSS custom properties */

/* Base theme variables that all themes will override */
:root {
  /* Typography */
  --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --font-size-lg: 24px;
  --font-size-md: 16px;
  --font-size-sm: 14px;
  --font-size-xs: 12px;

  /* Spacing */
  --sidebar-width: 260px;
  --content-padding: 30px 20px;
  --border-radius: 10px;
  --border-radius-small: 6px;

  /* Default Deep Focus theme variables */
  --bg-primary: linear-gradient(135deg, #f8f9fa 0%, #e8eaed 50%, #dfe2e8 100%);
  --bg-secondary: rgba(255, 255, 255, 0.95);
  --bg-tertiary: rgba(241, 245, 249, 0.8);
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --accent-primary: #3b82f6;
  --accent-secondary: #8b5cf6;
  --border-color: rgba(203, 213, 225, 0.3);
  --success-color: #10b981;
  --error-color: #ef4444;
  --warning-color: #f59e0b;

  /* Shadows */
  --shadow-card: 0 2px 8px rgba(15, 23, 42, 0.05);
  --shadow-hover: 0 4px 16px rgba(15, 23, 42, 0.08);
  --shadow-sidebar: 2px 0 15px rgba(15, 23, 42, 0.03);

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #3b82f6, #8b5cf6);
  --gradient-secondary: linear-gradient(135deg, #2563eb, #7c3aed);
}

/* Claude Light Theme */
.theme-claude-light {
  --bg-primary: #f4f2ed;
  --bg-secondary: #ffffff;
  --bg-tertiary: rgba(244, 242, 237, 0.8);
  --text-primary: #2d2d2d;
  --text-secondary: #5a5a5a;
  --text-muted: #888888;
  --accent-primary: #dc6b47;
  --accent-secondary: #c95d3b;
  --border-color: rgba(220, 107, 71, 0.2);
  --success-color: #10b981;
  --error-color: #ef4444;
  --warning-color: #f59e0b;

  --shadow-card: 0 2px 8px rgba(45, 45, 45, 0.08);
  --shadow-hover: 0 4px 16px rgba(45, 45, 45, 0.12);
  --shadow-sidebar: 2px 0 15px rgba(45, 45, 45, 0.05);

  --gradient-primary: linear-gradient(135deg, #dc6b47, #c95d3b);
  --gradient-secondary: linear-gradient(135deg, #c95d3b, #b54a28);
}

/* Claude Advanced Theme */
.theme-claude-dark {
  --bg-primary: #f4f2ed;
  --bg-secondary: #ffffff;
  --bg-tertiary: rgba(244, 242, 237, 0.8);
  --text-primary: #2d2d2d;
  --text-secondary: #5a5a5a;
  --text-muted: #888888;
  --accent-primary: #c95d3b;
  --accent-secondary: #b54a28;
  --border-color: rgba(201, 93, 59, 0.2);
  --success-color: #10b981;
  --error-color: #ef4444;
  --warning-color: #f59e0b;

  --shadow-card: 0 2px 8px rgba(45, 45, 45, 0.08);
  --shadow-hover: 0 4px 16px rgba(45, 45, 45, 0.12);
  --shadow-sidebar: 2px 0 15px rgba(45, 45, 45, 0.05);

  --gradient-primary: linear-gradient(135deg, #c95d3b, #b54a28);
  --gradient-secondary: linear-gradient(135deg, #b54a28, #a03d1f);
}

/* Professional Black Theme */
.theme-professional-black {
  --bg-primary: linear-gradient(135deg, #ffffff 0%, #f8f9fa 50%, #e9ecef 100%);
  --bg-secondary: rgba(255, 255, 255, 0.95);
  --bg-tertiary: rgba(248, 249, 250, 0.8);
  --text-primary: #1e293b;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --accent-primary: #6c757d;
  --accent-secondary: #495057;
  --border-color: rgba(108, 117, 125, 0.2);
  --success-color: #10b981;
  --error-color: #ef4444;
  --warning-color: #f59e0b;

  --shadow-card: 0 2px 8px rgba(30, 41, 59, 0.08);
  --shadow-hover: 0 4px 16px rgba(30, 41, 59, 0.12);
  --shadow-sidebar: 2px 0 15px rgba(30, 41, 59, 0.05);

  --gradient-primary: linear-gradient(135deg, #6c757d, #495057);
  --gradient-secondary: linear-gradient(135deg, #495057, #343a40);
}

/* Minimal Gray Theme */
.theme-minimal-gray {
  --bg-primary: #fafafa;
  --bg-secondary: #ffffff;
  --bg-tertiary: rgba(245, 245, 245, 0.8);
  --text-primary: #2d2d2d;
  --text-secondary: #555555;
  --text-muted: #888888;
  --accent-primary: #555555;
  --accent-secondary: #333333;
  --border-color: rgba(85, 85, 85, 0.2);
  --success-color: #10b981;
  --error-color: #ef4444;
  --warning-color: #f59e0b;

  --shadow-card: 0 2px 8px rgba(45, 45, 45, 0.08);
  --shadow-hover: 0 4px 16px rgba(45, 45, 45, 0.12);
  --shadow-sidebar: 2px 0 15px rgba(45, 45, 45, 0.05);

  --gradient-primary: linear-gradient(135deg, #555555, #333333);
  --gradient-secondary: linear-gradient(135deg, #333333, #1a1a1a);
}

/* Deep Focus Theme (Default) */
.theme-deep-focus {
  --bg-primary: linear-gradient(135deg, #f8f9fa 0%, #e8eaed 50%, #dfe2e8 100%);
  --bg-secondary: rgba(255, 255, 255, 0.95);
  --bg-tertiary: rgba(241, 245, 249, 0.8);
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --accent-primary: #3b82f6;
  --accent-secondary: #8b5cf6;
  --border-color: rgba(203, 213, 225, 0.3);
  --success-color: #10b981;
  --error-color: #ef4444;
  --warning-color: #f59e0b;

  --shadow-card: 0 2px 8px rgba(15, 23, 42, 0.05);
  --shadow-hover: 0 4px 16px rgba(15, 23, 42, 0.08);
  --shadow-sidebar: 2px 0 15px rgba(15, 23, 42, 0.03);

  --gradient-primary: linear-gradient(135deg, #3b82f6, #8b5cf6);
  --gradient-secondary: linear-gradient(135deg, #2563eb, #7c3aed);
}

/* Global base styles with theme awareness */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-family: var(--font-family);
}

body {
  font-family: var(--font-family);
  background: var(--bg-primary);
  min-height: 100vh;
  color: var(--text-primary);
  transition: all 0.3s ease;
}

/* Universal component styles using theme variables */
.sidebar {
  background: var(--bg-secondary);
  backdrop-filter: blur(10px);
  border-right: 1px solid var(--border-color);
  box-shadow: var(--shadow-sidebar);
}

.card {
  background: var(--bg-secondary);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-card);
  transition: all 0.3s ease;
}

.card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: var(--border-radius-small);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary:hover {
  background: var(--gradient-secondary);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  padding: 8px 16px;
  border-radius: var(--border-radius-small);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background: var(--bg-tertiary);
  transform: translateY(-1px);
}

.input {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-small);
  color: var(--text-primary);
  padding: 8px 12px;
  transition: all 0.2s ease;
}

.input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.text-theme-primary {
  color: var(--text-primary);
}

.text-theme-secondary {
  color: var(--text-secondary);
}

.text-theme-muted {
  color: var(--text-muted);
}

.text-theme-accent {
  color: var(--accent-primary);
}

.bg-theme-primary {
  background: var(--bg-primary);
}

.bg-theme-secondary {
  background: var(--bg-secondary);
}

.bg-theme-tertiary {
  background: var(--bg-tertiary);
}

.border-theme {
  border-color: var(--border-color);
}

/* Success, warning, error states */
.text-success {
  color: var(--success-color);
}

.text-warning {
  color: var(--warning-color);
}

.text-error {
  color: var(--error-color);
}

.bg-success {
  background-color: var(--success-color);
}

.bg-warning {
  background-color: var(--warning-color);
}

.bg-error {
  background-color: var(--error-color);
}