/* AI客服系统 - 简约主题 */

:root[data-theme="minimal"] {
    /* 主题标识 */
    --theme-name: "简约主题";
    --theme-description: "极简设计风格，注重内容本身";
    
    /* 背景和文本 - 黑白灰色阶 */
    --background: linear-gradient(135deg, 
        #ffffff 0%, 
        #f8f9fa 25%, 
        #f1f3f4 50%, 
        #e8eaed 75%, 
        #dadce0 100%);
    --text-color: #1a1a1a;
    --text-color-secondary: #666666;
    --text-color-muted: #999999;
    
    /* 卡片和容器 */
    --card-background: #ffffff;
    --card-background-hover: #f8f9fa;
    --card-background-light: #ffffff;
    --card-background-chat: #ffffff;
    --card-background-header: #ffffff;
    --card-background-input: #ffffff;
    --card-background-content: #f8f9fa;
    
    /* 边框颜色 - 黑白灰色阶 */
    --border-color: #e0e0e0;
    --border-color-hover: #cccccc;
    --border-color-input: #e0e0e0;
    --border-color-focus: #666666;
    --border-color-divider: #f0f0f0;
    
    /* 毛玻璃效果 - 简约主题不使用毛玻璃 */
    --backdrop-filter: none;
    --backdrop-filter-light: none;
    --backdrop-filter-mini: none;
    
    /* 阴影效果 - 简约主题使用最少的阴影 */
    --shadow-card: 
        0 1px 3px rgba(0, 0, 0, 0.05),
        0 1px 2px rgba(0, 0, 0, 0.1);
    --shadow-button: 
        0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-button-hover: 
        0 2px 4px rgba(0, 0, 0, 0.1),
        0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-input: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-input-focus: 0 0 0 2px rgba(102, 102, 102, 0.2);
    --shadow-avatar: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-ai-avatar: 0 1px 2px rgba(0, 0, 0, 0.1);
    --shadow-user-message: 0 1px 2px rgba(0, 0, 0, 0.1);
    --shadow-notification: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-user-info: 
        0 2px 8px rgba(0, 0, 0, 0.1),
        0 1px 2px rgba(0, 0, 0, 0.05);
    
    /* 按钮样式 - 黑白灰色阶 */
    --button-primary-bg: #333333;
    --button-primary-color: white;
    --button-primary-hover: #1a1a1a;
    --button-secondary-bg: #ffffff;
    --button-secondary-color: #333333;
    --button-secondary-hover: #f5f5f5;
    --button-danger-bg: #666666;
    --button-danger-hover: #4d4d4d;
    
    /* 输入框样式 - 黑白灰色阶 */
    --input-background: #ffffff;
    --input-background-focus: #ffffff;
    --input-border: #e0e0e0;
    --input-border-focus: #666666;
    --input-placeholder: #999999;
    
    /* 状态颜色 - 黑白灰色阶 */
    --status-online: #666666;
    --status-offline: #999999;
    --status-reconnecting: #808080;
    --status-error: #4d4d4d;
    
    /* 用户头像渐变 - 科技专业感 */
    --avatar-gradient: linear-gradient(135deg, #2c2c2c 0%, #1a1a1a 50%, #000000 100%);
    --avatar-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 2px 6px rgba(0, 0, 0, 0.1);
    
    /* AI头像渐变 - 科技专业感 */
    --ai-avatar-gradient: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 50%, #dee2e6 100%);
    --ai-avatar-shadow: 0 4px 12px rgba(0, 0, 0, 0.1), 0 2px 6px rgba(0, 0, 0, 0.05);
    
    /* 消息气泡样式 - 专业灰色系 */
    --user-message-bg: linear-gradient(135deg, #f8f9fa 0%, #f1f3f4 100%);
    --user-message-color: #2c2c2c;
    --user-message-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.1);
    --ai-message-bg: #f8f9fa;
    --ai-message-color: var(--text-color);
    
    /* 通知样式 - 黑白灰色阶 */
    --notification-bg: #ffffff;
    --notification-border: #e0e0e0;
    --notification-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --notification-success-border: #666666;
    --notification-error-border: #999999;
    --notification-info-border: #808080;
    
    /* 加载动画 - 黑白灰色阶 */
    --loading-bg: #f8f9fa;
    --loading-border: #e0e0e0;
    --loading-text: #999999;
    --loading-spinner-border: #e0e0e0;
    --loading-spinner-border-top: #666666;
    
    /* 错误和成功消息 - 黑白灰色阶 */
    --error-bg: #f5f5f5;
    --error-border: #e0e0e0;
    --error-color: #4d4d4d;
    --success-bg: #f8f9fa;
    --success-border: #e0e0e0;
    --success-color: #333333;
    
    /* 思考动画 - 黑白灰色阶 */
    --thinking-color: #666666;
    
    /* 背景动画 - 简约主题不使用背景动画 */
    --background-animation: none;
}

/* 直接覆盖body样式 */
body[data-theme="minimal"] {
    background: linear-gradient(135deg, 
        #f5f5f5 0%, 
        #e8e8e8 25%, 
        #d3d3d3 50%, 
        #c0c0c0 75%, 
        #a9a9a9 100%) !important;
    color: #1a1a1a !important;
}

body[data-theme="minimal"] .center-card {
    background: #ffffff !important;
    backdrop-filter: none !important;
    box-shadow: 
        0 1px 3px rgba(0, 0, 0, 0.05),
        0 1px 2px rgba(0, 0, 0, 0.1) !important;
    border: 1px solid #e0e0e0 !important;
}

body[data-theme="minimal"] .action-button.login-btn {
    background: #333333;
    color: white;
}

body[data-theme="minimal"] .action-button.login-btn:hover {
    background: #1a1a1a;
}

body[data-theme="minimal"] .action-button.register-btn {
    background: #ffffff;
    color: #333333;
    border: 1px solid #e0e0e0;
}

body[data-theme="minimal"] .action-button.register-btn:hover {
    background: #f5f5f5;
}

/* 主题切换器样式 - 黑白灰色阶 */
body[data-theme="minimal"] .theme-switcher {
    position: fixed !important;
    top: 20px !important;
    right: 20px !important;
    z-index: 10000 !important;
}

body[data-theme="minimal"] .theme-toggle-btn {
    background: #ffffff !important;
    color: #333333 !important;
    border: 1px solid #e0e0e0 !important;
}

body[data-theme="minimal"] .theme-dropdown {
    background: #ffffff !important;
    border: 1px solid #e0e0e0 !important;
}

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

/* Header内部主题选择器样式 - 简约主题 */
body[data-theme="minimal"] .theme-toggle-btn-inline {
    background: #f8f9fa !important;
    color: #2c2c2c !important;
    border: 1px solid #e8e8e8 !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05) !important;
}

body[data-theme="minimal"] .theme-toggle-btn-inline:hover {
    background: #e9ecef !important;
    color: #1a1a1a !important;
    border-color: #d0d0d0 !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1) !important;
}

body[data-theme="minimal"] .theme-dropdown-inline {
    background: #ffffff !important;
    border: 1px solid #e8e8e8 !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1), 0 4px 12px rgba(0, 0, 0, 0.05) !important;
}

body[data-theme="minimal"] .theme-dropdown-inline .theme-dropdown-header {
    border-bottom: 1px solid #e8e8e8 !important;
}

body[data-theme="minimal"] .theme-dropdown-inline .theme-dropdown-header h3 {
    color: #2c2c2c !important;
}

body[data-theme="minimal"] .theme-dropdown-inline .theme-dropdown-close {
    color: #666666 !important;
}

body[data-theme="minimal"] .theme-dropdown-inline .theme-dropdown-close:hover {
    background: #f5f5f5 !important;
    color: #2c2c2c !important;
}

body[data-theme="minimal"] .theme-dropdown-inline .theme-item {
    color: #2c2c2c !important;
}

body[data-theme="minimal"] .theme-dropdown-inline .theme-item:hover {
    background: #f8f9fa !important;
}

body[data-theme="minimal"] .theme-dropdown-inline .theme-item.active {
    background: #333333 !important;
    color: #ffffff !important;
}

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

body[data-theme="minimal"] .theme-dropdown-inline .theme-item-description {
    color: inherit !important;
    opacity: 0.7 !important;
}

body[data-theme="minimal"] .theme-dropdown-inline .theme-item-check {
    border-color: currentColor !important;
}

/* 主题图标颜色 - 简约主题保持彩色 */
body[data-theme="minimal"] .theme-icon {
    filter: none !important;
    opacity: 1 !important;
}

body[data-theme="minimal"] .theme-item-icon {
    filter: none !important;
    opacity: 1 !important;
}

body[data-theme="minimal"] .theme-item.active .theme-item-icon {
    filter: none !important;
    opacity: 1 !important;
}

/* iPhone刘海屏效果 - 简约主题 */
body[data-theme="minimal"] .theme-notch {
    background: #f8f9fa !important;
    border: 1px solid #e8e8e8 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
    cursor: pointer !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

body[data-theme="minimal"] .theme-notch:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12) !important;
}

body[data-theme="minimal"] .theme-notch::before {
    background: #f8f9fa !important;
    border: 1px solid #e8e8e8 !important;
    border-bottom: none !important;
}

body[data-theme="minimal"] .theme-toggle-btn-notch {
    background: #ffffff !important;
    color: #2c2c2c !important;
    border: 1px solid #e8e8e8 !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05) !important;
    pointer-events: none !important;
}

body[data-theme="minimal"] .theme-notch:hover .theme-toggle-btn-notch {
    background: #e9ecef !important;
    color: #1a1a1a !important;
    border-color: #d0d0d0 !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1) !important;
    transform: scale(1.1) !important;
}

body[data-theme="minimal"] .theme-dropdown-notch {
    background: #ffffff !important;
    border: 1px solid #e8e8e8 !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1), 0 4px 12px rgba(0, 0, 0, 0.05) !important;
}

body[data-theme="minimal"] .theme-dropdown-notch .theme-dropdown-header {
    border-bottom: 1px solid #e8e8e8 !important;
}

body[data-theme="minimal"] .theme-dropdown-notch .theme-dropdown-header h3 {
    color: #2c2c2c !important;
}

body[data-theme="minimal"] .theme-dropdown-notch .theme-dropdown-close {
    color: #666666 !important;
}

body[data-theme="minimal"] .theme-dropdown-notch .theme-dropdown-close:hover {
    background: #f5f5f5 !important;
    color: #2c2c2c !important;
}

body[data-theme="minimal"] .theme-dropdown-notch .theme-item {
    color: #2c2c2c !important;
}

body[data-theme="minimal"] .theme-dropdown-notch .theme-item:hover {
    background: #f8f9fa !important;
}

body[data-theme="minimal"] .theme-dropdown-notch .theme-item.active {
    background: #333333 !important;
    color: #ffffff !important;
}

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

body[data-theme="minimal"] .theme-dropdown-notch .theme-item-description {
    color: inherit !important;
    opacity: 0.7 !important;
}

body[data-theme="minimal"] .theme-dropdown-notch .theme-item-check {
    border-color: currentColor !important;
}

/* 简约主题滚动条样式 */
body[data-theme="minimal"] .theme-dropdown-notch .theme-list::-webkit-scrollbar {
    width: 4px !important;
}

body[data-theme="minimal"] .theme-dropdown-notch .theme-list::-webkit-scrollbar-track {
    background: transparent !important;
    border-radius: 2px !important;
}

body[data-theme="minimal"] .theme-dropdown-notch .theme-list::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15) !important;
    border-radius: 2px !important;
}

body[data-theme="minimal"] .theme-dropdown-notch .theme-list::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.25) !important;
}

/* 刘海屏主题图标颜色 - 简约主题保持彩色 */
body[data-theme="minimal"] .theme-notch .theme-icon {
    filter: none !important;
    opacity: 1 !important;
}

body[data-theme="minimal"] .theme-notch .theme-item-icon {
    filter: none !important;
    opacity: 1 !important;
}

body[data-theme="minimal"] .theme-notch .theme-item.active .theme-item-icon {
    filter: none !important;
    opacity: 1 !important;
}

/* 小屏幕优化 - 简约主题 */
@media (max-width: 480px) {
    body[data-theme="minimal"] .theme-dropdown-notch {
        width: calc(100vw - 32px) !important;
        max-width: 280px !important;
    }
    
    body[data-theme="minimal"] .theme-dropdown-notch .theme-dropdown-header {
        padding: 12px 16px !important;
    }
    
    body[data-theme="minimal"] .theme-dropdown-notch .theme-dropdown-header h3 {
        font-size: 14px !important;
    }
    
    body[data-theme="minimal"] .theme-dropdown-notch .theme-list {
        padding: 6px !important;
    }
    
    body[data-theme="minimal"] .theme-dropdown-notch .theme-item {
        padding: 10px !important;
        margin-bottom: 2px !important;
    }
    
    body[data-theme="minimal"] .theme-dropdown-notch .theme-item-name {
        font-size: 13px !important;
    }
    
    body[data-theme="minimal"] .theme-dropdown-notch .theme-item-description {
        font-size: 11px !important;
        line-height: 1.2 !important;
    }
    
    body[data-theme="minimal"] .theme-dropdown-notch .theme-item-icon {
        font-size: 16px !important;
        width: 20px !important;
    }
}

@media (max-width: 360px) {
    body[data-theme="minimal"] .theme-dropdown-notch {
        width: calc(100vw - 24px) !important;
    }
    
    body[data-theme="minimal"] .theme-dropdown-notch .theme-item {
        padding: 8px !important;
    }
    
    body[data-theme="minimal"] .theme-dropdown-notch .theme-item-name {
        font-size: 12px !important;
    }
    
    body[data-theme="minimal"] .theme-dropdown-notch .theme-item-description {
        font-size: 10px !important;
    }
}

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

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

body[data-theme="minimal"] .theme-item:hover {
    background: #f5f5f5 !important;
}

body[data-theme="minimal"] .theme-item.active {
    background: #333333 !important;
    color: white !important;
}

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

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

/* 箭头按钮样式 */
body[data-theme="minimal"] .arrow-button {
    background: rgba(51, 51, 51, 0.1);
    color: #333333;
}

body[data-theme="minimal"] .arrow-button:hover {
    background: rgba(51, 51, 51, 0.2);
    color: #1a1a1a;
}


/* 登录页面样式 */
body[data-theme="minimal"] .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="minimal"] .page-title {
    color: var(--text-color);
    text-shadow: var(--shadow-sm);
}

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

/* 注册页面样式 */
body[data-theme="minimal"] .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="minimal"] .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="minimal"] .chat-header {
    background: var(--card-background-header);
    border-bottom: 1px solid var(--border-color-divider);
}

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

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

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

body[data-theme="minimal"] .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;
    border: 1px solid #e8e8e8;
    position: relative;
    transition: all 0.2s ease;
}

body[data-theme="minimal"] .user-message .message-content:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

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

/* 简约主题头像样式 - 科技专业感 */
body[data-theme="minimal"] .user-message .message-avatar,
body[data-theme="minimal"] .ai-message .message-avatar {
    border: 2px solid #e8e8e8;
    box-shadow: var(--avatar-shadow);
    position: relative;
    overflow: hidden;
}

body[data-theme="minimal"] .user-message .message-avatar {
    background: var(--avatar-gradient);
    color: #ffffff;
    border-color: #2c2c2c;
}

body[data-theme="minimal"] .ai-message .message-avatar {
    background: var(--ai-avatar-gradient);
    color: #2c2c2c;
    border-color: #e8e8e8;
}

/* 头像悬停效果 */
body[data-theme="minimal"] .user-message .message-avatar:hover,
body[data-theme="minimal"] .ai-message .message-avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2), 0 3px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

/* AI头像特殊效果 - 科技感 */
body[data-theme="minimal"] .ai-message .message-avatar {
    position: relative;
}

body[data-theme="minimal"] .ai-message .message-avatar::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #e8e8e8, #f8f9fa, #e8e8e8);
    border-radius: 50%;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

body[data-theme="minimal"] .ai-message .message-avatar:hover::after {
    opacity: 0.6;
    animation: pulse 2s infinite;
}

/* 用户头像特殊效果 - 专业感 */
body[data-theme="minimal"] .user-message .message-avatar {
    position: relative;
}

body[data-theme="minimal"] .user-message .message-avatar::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #2c2c2c, #1a1a1a, #2c2c2c);
    border-radius: 50%;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

body[data-theme="minimal"] .user-message .message-avatar:hover::after {
    opacity: 0.8;
    animation: pulse 2s infinite;
}

/* 脉冲动画 */
@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.3;
    }
    100% {
        transform: scale(1);
        opacity: 0.6;
    }
}

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

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

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

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

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

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

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

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

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

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

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

body[data-theme="minimal"] .logout-btn {
    background: var(--button-danger-bg);
    color: white;
    box-shadow: 0 2px 4px rgba(77, 77, 77, 0.3);
}

body[data-theme="minimal"] .logout-btn:hover {
    background: var(--button-danger-hover);
    box-shadow: 0 4px 8px rgba(77, 77, 77, 0.4);
}

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