/* ===== 全局重置 & 变量 ===== */
:root {
  --color-bg-primary: #ffffff;
  --color-bg-secondary: #f5f5f7;
  --color-bg-sidebar: #f0f0f2;
  --color-bg-input: #ffffff;
  --color-text-primary: #1a1a2e;
  --color-text-secondary: #4a4a6a;
  --color-text-muted: #8a8aaa;
  --color-border: #e0e0e6;
  --color-accent: #6c5ce7;
  --color-accent-hover: #5a4bd1;
  --color-accent-light: #e8e4f8;
  --color-success: #00b894;
  --color-danger: #e17055;
  --color-warning: #fdcb6e;
  --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.10);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.15);
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;
  --sidebar-width: 280px;
  --sidebar-collapsed: 60px;
  --header-height: 64px;
  --input-height: 80px;
}

/* 暗色主题 */
[data-theme="dark"] {
  --color-bg-primary: #1a1a2e;
  --color-bg-secondary: #16213e;
  --color-bg-sidebar: #0f0f1a;
  --color-bg-input: #25254a;
  --color-text-primary: #e8e8f0;
  --color-text-secondary: #a0a0c0;
  --color-text-muted: #6a6a8a;
  --color-border: #2a2a4a;
  --color-accent-light: #2a2a5a;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.4);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.5);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.6);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  color: var(--color-text-primary);
  background: var(--color-bg-secondary);
  line-height: 1.5;
}

button {
  cursor: pointer;
  font-family: inherit;
  border: none;
  background: none;
  color: inherit;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background: var(--color-bg-input);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: var(--spacing-sm) var(--spacing-md);
  outline: none;
  transition: border-color var(--transition-fast);
}
input:focus, textarea:focus, select:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 2px var(--color-accent-light);
}
textarea {
  resize: vertical;
  min-height: 40px;
}
img {
  max-width: 100%;
  display: block;
}
ul, ol {
  list-style: none;
}
a {
  color: var(--color-accent);
  text-decoration: none;
}
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-text-muted);
}