/* AI客服系统 - 商务主题 */

:root[data-theme="corporate"] {
    /* 主题标识 */
    --theme-name: "商务主题";
    --theme-description: "专业的商务风格主题，适合企业使用";
    
    /* 背景和文本 - iPhone 12 Pro 金属蓝 */
    --background: linear-gradient(135deg, #0f172a 0%, #1e293b 25%, #334155 50%, #475569 75%, #64748b 100%);
    --text-color: #f8fafc;
    --text-color-secondary: #cbd5e1;
    --text-color-muted: #94a3b8;
    
    /* 卡片和容器 - 深色半透明 */
    --card-background: rgba(15, 23, 42, 0.95);
    --card-background-hover: rgba(15, 23, 42, 0.98);
    --card-background-light: rgba(15, 23, 42, 0.9);
    --card-background-chat: rgba(15, 23, 42, 0.95);
    --card-background-header: rgba(30, 41, 59, 0.9);
    --card-background-input: rgba(30, 41, 59, 0.9);
    --card-background-content: rgba(15, 23, 42, 0.8);
    --card-background-input-area: rgba(30, 41, 59, 0.9);
    
    /* 边框颜色 - 金属蓝 */
    --border-color: rgba(148, 163, 184, 0.3);
    --border-color-hover: #3b82f6;
    --border-color-input: rgba(148, 163, 184, 0.4);
    --border-color-focus: #3b82f6;
    --border-color-divider: rgba(148, 163, 184, 0.2);
    
    /* 毛玻璃效果 - 商务主题不使用毛玻璃 */
    --backdrop-filter: none;
    --backdrop-filter-light: none;
    --backdrop-filter-mini: none;
    
    /* 阴影效果 */
    --shadow-card: 
        0 2px 4px rgba(0, 123, 255, 0.1),
        0 1px 2px rgba(0, 123, 255, 0.06);
    --shadow-button: 
        0 2px 4px rgba(0, 123, 255, 0.1),
        0 1px 2px rgba(0, 123, 255, 0.06);
    --shadow-button-hover: 
        0 4px 8px rgba(0, 123, 255, 0.2),
        0 2px 4px rgba(0, 123, 255, 0.1);
    --shadow-input: 0 1px 3px rgba(0, 123, 255, 0.1);
    --shadow-input-focus: 0 0 0 3px rgba(0, 123, 255, 0.1);
    --shadow-avatar: 0 2px 4px rgba(0, 123, 255, 0.1);
    --shadow-ai-avatar: 0 2px 4px rgba(0, 123, 255, 0.2);
    --shadow-user-message: 0 2px 4px rgba(0, 123, 255, 0.2);
    --shadow-notification: 0 4px 12px rgba(0, 123, 255, 0.15);
    --shadow-user-info: 
        0 4px 12px rgba(0, 123, 255, 0.15),
        0 2px 4px rgba(0, 123, 255, 0.1);
    
    /* 按钮样式 - 金属蓝 */
    --button-primary-bg: linear-gradient(135deg, #3b82f6, #2563eb);
    --button-primary-color: white;
    --button-primary-hover: linear-gradient(135deg, #2563eb, #1d4ed8);
    --button-secondary-bg: rgba(30, 41, 59, 0.9);
    --button-secondary-color: #f8fafc;
    --button-secondary-hover: rgba(51, 65, 85, 0.9);
    --button-danger-bg: #dc3545;
    --button-danger-hover: #c82333;
    
    /* 输入框样式 - 金属感 */
    --input-background: rgba(15, 23, 42, 0.9);
    --input-background-focus: rgba(15, 23, 42, 0.95);
    --input-border: rgba(148, 163, 184, 0.4);
    --input-border-focus: #3b82f6;
    --input-placeholder: #94a3b8;
    
    /* 状态颜色 */
    --status-online: #28a745;
    --status-offline: #dc3545;
    --status-reconnecting: #ffc107;
    --status-error: #dc3545;
    
    /* 用户头像渐变 - 金属蓝 */
    --avatar-gradient: linear-gradient(135deg, #3b82f6, #2563eb, #1d4ed8);
    --avatar-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
    
    /* AI头像渐变 - 金属蓝变种 */
    --ai-avatar-gradient: linear-gradient(135deg, #64748b, #475569, #334155);
    --ai-avatar-shadow: 0 2px 8px rgba(100, 116, 139, 0.3);
    
    /* 消息气泡样式 - 背景渐变 */
    --user-message-bg: linear-gradient(135deg, #334155, #475569, #64748b);
    --user-message-color: #f8fafc;
    --user-message-shadow: 0 2px 8px rgba(15, 23, 42, 0.3);
    --ai-message-bg: #f8f9fa;
    --ai-message-color: var(--text-color);
    
    /* 通知样式 */
    --notification-bg: #ffffff;
    --notification-border: #dee2e6;
    --notification-shadow: 0 4px 12px rgba(0, 123, 255, 0.15);
    --notification-success-border: #28a745;
    --notification-error-border: #dc3545;
    --notification-info-border: #17a2b8;
    
    /* 加载动画 */
    --loading-bg: #f8f9fa;
    --loading-border: #dee2e6;
    --loading-text: #6c757d;
    --loading-spinner-border: #dee2e6;
    --loading-spinner-border-top: #007bff;
    
    /* 错误和成功消息 */
    --error-bg: #f8d7da;
    --error-border: #f5c6cb;
    --error-color: #721c24;
    --success-bg: #d4edda;
    --success-border: #c3e6cb;
    --success-color: #155724;
    
    /* 思考动画 */
    --thinking-color: #3b82f6;
    
    /* 背景动画 - 商务主题不使用背景动画 */
    --background-animation: none;
}

/* 直接覆盖body样式 - iPhone 12 Pro 金属蓝 */
body[data-theme="corporate"] {
    background: linear-gradient(135deg, 
        #0f172a 0%, 
        #1e293b 25%, 
        #334155 50%, 
        #475569 75%, 
        #64748b 100%) !important;
    color: #f8fafc !important;
}

body[data-theme="corporate"] .center-card {
    background: rgba(15, 23, 42, 0.95) !important;
    backdrop-filter: blur(10px) !important;
    box-shadow: 
        0 8px 32px rgba(15, 23, 42, 0.3),
        0 4px 16px rgba(15, 23, 42, 0.2) !important;
    border: 1px solid rgba(148, 163, 184, 0.3) !important;
}

body[data-theme="corporate"] .site-title {
    color: #f8fafc !important;
}

body[data-theme="corporate"] .site-subtitle {
    color: #cbd5e1 !important;
}

body[data-theme="corporate"] .action-button.login-btn {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
}

body[data-theme="corporate"] .action-button.login-btn:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
}

body[data-theme="corporate"] .action-button.register-btn {
    background: rgba(30, 41, 59, 0.9);
    color: #f8fafc;
    border: 1px solid rgba(148, 163, 184, 0.4);
}

body[data-theme="corporate"] .action-button.register-btn:hover {
    background: rgba(51, 65, 85, 0.9);
}

/* 主题切换器样式 - 金属感 */
body[data-theme="corporate"] .theme-switcher {
    position: fixed !important;
    top: 20px !important;
    right: 20px !important;
    z-index: 10000 !important;
}

body[data-theme="corporate"] .theme-toggle-btn {
    background: rgba(30, 41, 59, 0.9) !important;
    color: #f8fafc !important;
    border: 1px solid rgba(148, 163, 184, 0.3) !important;
    backdrop-filter: blur(10px) !important;
}

body[data-theme="corporate"] .theme-dropdown {
    background: rgba(15, 23, 42, 0.95) !important;
    border: 1px solid rgba(148, 163, 184, 0.3) !important;
    backdrop-filter: blur(20px) !important;
}

body[data-theme="corporate"] .theme-dropdown-header h3 {
    color: #f8fafc !important;
}

body[data-theme="corporate"] .theme-dropdown-close {
    color: #cbd5e1 !important;
}

body[data-theme="corporate"] .theme-item {
    color: #f8fafc !important;
}

body[data-theme="corporate"] .theme-item:hover {
    background: rgba(30, 41, 59, 0.8) !important;
}

body[data-theme="corporate"] .theme-item.active {
    background: linear-gradient(135deg, #3b82f6, #2563eb) !important;
    color: white !important;
}

body[data-theme="corporate"] .theme-item-name {
    color: inherit !important;
}

body[data-theme="corporate"] .theme-item-description {
    color: inherit !important;
}

/* 箭头按钮样式 - 金属感 */
body[data-theme="corporate"] .arrow-button {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

body[data-theme="corporate"] .arrow-button:hover {
    background: rgba(59, 130, 246, 0.2);
    color: #2563eb;
}


/* 登录页面样式 */
body[data-theme="corporate"] .login-card {
    background: var(--card-background);
    backdrop-filter: var(--backdrop-filter);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-color);
}

body[data-theme="corporate"] .page-title {
    color: var(--text-color);
    text-shadow: var(--shadow-sm);
}

body[data-theme="corporate"] .page-subtitle {
    color: var(--text-color-secondary);
}

/* 注册页面样式 */
body[data-theme="corporate"] .register-card {
    background: var(--card-background);
    backdrop-filter: var(--backdrop-filter);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-color);
}

/* 聊天页面样式 */
body[data-theme="corporate"] .chat-card {
    background: var(--card-background);
    backdrop-filter: var(--backdrop-filter);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-color);
}

body[data-theme="corporate"] .chat-header {
    background: var(--card-background-header);
    border-bottom: 1px solid var(--border-color-divider);
}

body[data-theme="corporate"] .chat-title {
    color: var(--text-color);
}

body[data-theme="corporate"] .chat-messages {
    background: var(--card-background-content);
}

body[data-theme="corporate"] .message-text {
    color: var(--text-color);
}

body[data-theme="corporate"] .user-message .message-content {
    background: var(--user-message-bg);
    color: var(--user-message-color);
    box-shadow: var(--user-message-shadow);
    border-radius: 18px 18px 4px 18px;
    padding: 16px 20px;
}

body[data-theme="corporate"] .ai-message {
    background: none;
    color: var(--text-color);
    border: none;
    padding: 12px 0;
    box-shadow: none;
}

body[data-theme="corporate"] .chat-input {
    background: var(--input-background);
    border: 1px solid var(--input-border);
    color: var(--text-color);
}

body[data-theme="corporate"] .chat-input:focus {
    border-color: var(--input-border-focus);
    box-shadow: var(--shadow-input-focus);
}

body[data-theme="corporate"] .send-button {
    background: var(--button-primary-bg);
    color: var(--button-primary-color);
}

body[data-theme="corporate"] .send-button:hover {
    background: var(--button-primary-hover);
}

body[data-theme="corporate"] .form-input {
    background: var(--input-background);
    border: 1px solid var(--input-border);
    color: var(--text-color);
}

body[data-theme="corporate"] .form-input:focus {
    border-color: var(--input-border-focus);
    box-shadow: var(--shadow-input-focus);
}

body[data-theme="corporate"] .form-label {
    color: var(--text-color);
}

body[data-theme="corporate"] .submit-btn {
    background: var(--button-primary-bg);
    color: var(--button-primary-color);
}

body[data-theme="corporate"] .submit-btn:hover {
    background: var(--button-primary-hover);
}

body[data-theme="corporate"] .back-btn {
    background: var(--button-secondary-bg);
    color: var(--button-secondary-color);
    border: 1px solid var(--border-color);
}

body[data-theme="corporate"] .back-btn:hover {
    background: var(--button-secondary-hover);
}

body[data-theme="corporate"] .logout-btn {
    background: var(--button-danger-bg);
    color: white;
}

body[data-theme="corporate"] .logout-btn:hover {
    background: var(--button-danger-hover);
}

/* 强制设置body背景 */
html[data-theme="corporate"] body,
body[data-theme="corporate"] {
    background: var(--background) !important;
}

/* 更强制性的背景设置 - iPhone 12 Pro 金属蓝 */
html[data-theme="corporate"] body,
body[data-theme="corporate"] {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 25%, #334155 50%, #475569 75%, #64748b 100%) !important;
}

/* 最高优先级的背景设置 */
html[data-theme="corporate"] body {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 25%, #334155 50%, #475569 75%, #64748b 100%) !important;
    background-attachment: fixed !important;
    background-size: cover !important;
    background-repeat: no-repeat !important;
}