/* ==========================================
   主题配置系统 - 元创AI
   完整版：包含所有元素的颜色变量
   ========================================== */

/* ==========================================
   深色主题（原版风格）
   ========================================== */
[data-theme="dark"] {
    /* 基础背景色 */
    --bg-primary: #0d0d0d;
    --bg-secondary: #171717;
    --bg-tertiary: #1f1f1f;
    --bg-hover: #2a2a2a;
    --bg-active: #333333;

    /* 边框色 */
    --border-primary: #2a2a2a;
    --border-secondary: #3a3a3a;
    --border-hover: #4a4a4a;

    /* 文字色 */
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --text-tertiary: #707070;
    --text-muted: #505050;

    /* 强调色 */
    --accent-primary: #fbbf24;
    --accent-secondary: #f59e0b;

    /* 按钮 */
    --btn-bg: #2a2a2a;
    --btn-text: #ffffff;
    --btn-border: #3a3a3a;
    --btn-hover-bg: #333333;
    --btn-hover-border: #4a4a4a;
    --btn-secondary-bg: #1f1f1f;
    --btn-secondary-text: #a0a0a0;

    /* 消息气泡 */
    --message-user-bg: #2a2a2a;
    --message-user-text: #ffffff;
    --message-ai-bg: #1f1f1f;
    --message-ai-text: #ffffff;
    --message-border: #3a3a3a;

    /* 输入框 */
    --input-bg: #1f1f1f;
    --input-border: #3a3a3a;
    --input-focus-border: #4a4a4a;
    --input-text: #ffffff;
    --input-placeholder: #707070;

    /* 卡片 */
    --card-bg: #1f1f1f;
    --card-border: #2a2a2a;
    --card-hover: #2a2a2a;

    /* 面板 */
    --panel-bg: #171717;
    --panel-border: #2a2a2a;
    --panel-header-border: #2a2a2a;

    /* 表格 */
    --table-header-bg: #1f1f1f;
    --table-row-bg: #171717;
    --table-row-hover: #1f1f1f;
    --table-border: #2a2a2a;

    /* Logo和头像 */
    --logo-bg: #2a2a2a;
    --avatar-bg: #2a2a2a;

    /* 阴影 */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.5);
}

/* ==========================================
   白色主题（优雅简约风格）
   ========================================== */
[data-theme="white"] {
    /* 基础背景色 */
    --bg-primary: #ffffff;
    --bg-secondary: #fafbfc;
    --bg-tertiary: #f5f7fa;
    --bg-hover: #f0f2f5;
    --bg-active: #e8ebef;

    /* 边框色 */
    --border-primary: #e8ebef;
    --border-secondary: #dfe3e8;
    --border-hover: #c1c9d2;

    /* 文字色 */
    --text-primary: #1a1d1f;
    --text-secondary: #4e5969;
    --text-tertiary: #86909c;
    --text-muted: #c9cdd4;

    /* 强调色 */
    --accent-primary: #ff9500;
    --accent-secondary: #ff8800;

    /* 按钮 */
    --btn-bg: #667eea;
    --btn-text: #ffffff;
    --btn-border: #667eea;
    --btn-hover-bg: #5568d3;
    --btn-hover-border: #5568d3;
    --btn-secondary-bg: #f5f7fa;
    --btn-secondary-text: #4e5969;

    /* 消息气泡 */
    --message-user-bg: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --message-user-text: #ffffff;
    --message-ai-bg: #f5f7fa;
    --message-ai-text: #1a1d1f;
    --message-border: #e8ebef;

    /* 输入框 */
    --input-bg: #fafbfc;
    --input-border: #dfe3e8;
    --input-focus-border: #667eea;
    --input-text: #1a1d1f;
    --input-placeholder: #86909c;

    /* 卡片 */
    --card-bg: #ffffff;
    --card-border: #e8ebef;
    --card-hover: #fafbfc;

    /* 面板 */
    --panel-bg: #ffffff;
    --panel-border: #e8ebef;
    --panel-header-border: #e8ebef;

    /* 表格 */
    --table-header-bg: #f5f7fa;
    --table-row-bg: #ffffff;
    --table-row-hover: #fafbfc;
    --table-border: #e8ebef;

    /* Logo和头像 */
    --logo-bg: #667eea;
    --avatar-bg: #f5f7fa;

    /* 阴影 */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.08);
}

/* ==========================================
   科技蓝主题（未来科技风格）
   ========================================== */
[data-theme="tech"] {
    /* 基础背景色 */
    --bg-primary: #0f1729;
    --bg-secondary: #1a2332;
    --bg-tertiary: #243447;
    --bg-hover: #2d3f56;
    --bg-active: #364a63;

    /* 边框色 */
    --border-primary: #364a63;
    --border-secondary: #4a5f7a;
    --border-hover: #5d7491;

    /* 文字色 */
    --text-primary: #e8f0ff;
    --text-secondary: #b8c9e0;
    --text-tertiary: #8a9fb8;
    --text-muted: #5d7491;

    /* 强调色 */
    --accent-primary: #00d4ff;
    --accent-secondary: #0099ff;

    /* 按钮 */
    --btn-bg: #364a63;
    --btn-text: #e8f0ff;
    --btn-border: #4a5f7a;
    --btn-hover-bg: #2d3f56;
    --btn-hover-border: #5d7491;
    --btn-secondary-bg: #243447;
    --btn-secondary-text: #b8c9e0;

    /* 消息气泡 */
    --message-user-bg: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --message-user-text: #ffffff;
    --message-ai-bg: #1a2332;
    --message-ai-text: #e8f0ff;
    --message-border: #364a63;

    /* 输入框 */
    --input-bg: #1a2332;
    --input-border: #364a63;
    --input-focus-border: #667eea;
    --input-text: #e8f0ff;
    --input-placeholder: #8a9fb8;

    /* 卡片 */
    --card-bg: rgba(26, 35, 50, 0.7);
    --card-border: #364a63;
    --card-hover: rgba(36, 52, 71, 0.9);

    /* 面板 */
    --panel-bg: #1a2332;
    --panel-border: #364a63;
    --panel-header-border: #364a63;

    /* 表格 */
    --table-header-bg: #243447;
    --table-row-bg: #1a2332;
    --table-row-hover: #243447;
    --table-border: #364a63;

    /* Logo和头像 */
    --logo-bg: #364a63;
    --avatar-bg: #243447;

    /* 阴影 */
    --shadow-sm: 0 2px 8px rgba(102, 126, 234, 0.15);
    --shadow-md: 0 4px 16px rgba(102, 126, 234, 0.2);
    --shadow-lg: 0 12px 32px rgba(102, 126, 234, 0.25);
}

/* ==========================================
   通用样式变量（所有主题共用）
   ========================================== */
:root {
    /* 圆角 */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 20px;
    --radius-full: 50%;

    /* 间距 */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;

    /* 字体大小 */
    --font-xs: 0.75rem;
    --font-sm: 0.85rem;
    --font-base: 0.9rem;
    --font-md: 0.95rem;
    --font-lg: 1.1rem;
    --font-xl: 1.6rem;

    /* 过渡动画 */
    --transition-fast: 0.15s ease;
    --transition-base: 0.2s ease;
    --transition-slow: 0.3s ease;

    /* 字体 */
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* ==========================================
   主题切换动画
   ========================================== */
body {
    transition: background-color var(--transition-slow), color var(--transition-slow);
}
