/* ═══════════════════════════════════════════════════════════
   CSS RESET & VARIABLES
   ═══════════════════════════════════════════════════════════ */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ── Dark theme (default) ── */
:root, [data-theme="dark"] {
  --bg-primary: #0a0a0f;
  --bg-secondary: #111118;
  --bg-card: #16161e;
  --bg-card-hover: #1c1c26;
  --bg-input: #1a1a24;
  --bg-bubble-user: #1e3a2a;
  --bg-bubble-assistant: #16161e;
  --bg-tool: #1a1a28;
  --accent: #21c25e;
  --accent-hover: #1daf53;
  --accent-dim: rgba(33, 194, 94, 0.12);
  --accent-dim-border: rgba(33, 194, 94, 0.25);
  --text-primary: #e4e4e7;
  --text-secondary: #a1a1aa;
  --text-tertiary: #71717a;
  --text-muted: #52525b;
  --border: #27272a;
  --border-light: #3f3f46;
  --danger: #ef4444;
  --danger-hover: #dc2626;
  --danger-dim: rgba(239, 68, 68, 0.12);
  --code-bg: #0d1117;
  --sidebar-width: 280px;
  --header-height: 56px;
  --input-area-min: 72px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.5);
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Light theme ── */
[data-theme="light"] {
  --bg-primary: #ffffff;
  --bg-secondary: #f4f4f5;
  --bg-card: #fafafa;
  --bg-card-hover: #f0f0f2;
  --bg-input: #ffffff;
  --bg-bubble-user: #e8f5e9;
  --bg-bubble-assistant: #f5f5f5;
  --bg-tool: #f0f0f8;
  --accent: #16a34a;
  --accent-hover: #15803d;
  --accent-dim: rgba(22, 163, 74, 0.08);
  --accent-dim-border: rgba(22, 163, 74, 0.2);
  --text-primary: #18181b;
  --text-secondary: #52525b;
  --text-tertiary: #71717a;
  --text-muted: #a1a1aa;
  --border: #e4e4e7;
  --border-light: #d4d4d8;
  --danger: #dc2626;
  --danger-hover: #b91c1c;
  --danger-dim: rgba(220, 38, 38, 0.08);
  --code-bg: #f6f8fa;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
}

[data-theme="light"] .code-block-wrapper { background: var(--code-bg); }
[data-theme="light"] .code-block-wrapper pre code { color: #24292e !important; }
[data-theme="light"] .message-bubble code:not(pre code) { background: rgba(0,0,0,0.06); color: #c7254e; }

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: var(--border-light); }
