/* 现代化样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-gradient);
    color: var(--text-color);
    line-height: 1.6;
    overflow: hidden;
    font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 现代化CSS变量 */
:root {
    /* 背景渐变 */
    --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --bg-color: #ffffff;
    --sidebar-bg: rgba(255, 255, 255, 0.95);
    --sidebar-blur: blur(20px);
    --text-color: #1a1a1a;
    --text-secondary: #6b7280;
    --border-color: rgba(255, 255, 255, 0.2);
    --border-light: rgba(0, 0, 0, 0.1);
    
    /* 现代化色彩系统 */
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --primary-light: rgba(99, 102, 241, 0.1);
    --secondary-color: #8b5cf6;
    --accent-color: #06b6d4;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    
    /* 现代化阴影 */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.3);
    
    /* 精致圆角 */
    --radius-sm: 4px;
    --radius: 8px;
    --radius-md: 10px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;
    
    /* 现代化过渡 */
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 深色主题 */
[data-theme="dark"] {
    --bg-gradient: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
    --bg-color: #0f172a;
    --sidebar-bg: rgba(15, 23, 42, 0.95);
    --text-color: #f8fafc;
    --text-secondary: #94a3b8;
    --border-color: rgba(255, 255, 255, 0.1);
    --border-light: rgba(255, 255, 255, 0.05);
    
    --primary-color: #818cf8;
    --primary-hover: #6366f1;
    --primary-light: rgba(129, 140, 248, 0.1);
    --secondary-color: #a78bfa;
    --accent-color: #22d3ee;
    --success-color: #34d399;
    --danger-color: #f87171;
    --warning-color: #fbbf24;
    --info-color: #60a5fa;
    
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
    --shadow-glow: 0 0 20px rgba(129, 140, 248, 0.3);
}

/* 自动主题 - 跟随系统 */
@media (prefers-color-scheme: dark) {
    [data-theme="auto"] {
        --bg-color: #1a1a1a;
        --sidebar-bg: #2d2d2d;
        --text-color: #ffffff;
        --border-color: #404040;
        --primary-color: #4dabf7;
        --primary-hover: #339af0;
        --secondary-color: #868e96;
        --success-color: #51cf66;
        --danger-color: #ff6b6b;
        --warning-color: #ffd43b;
        --info-color: #74c0fc;
        --shadow: 0 2px 4px rgba(0,0,0,0.3);
        --shadow-lg: 0 4px 8px rgba(0,0,0,0.4);
    }
}

/* 主应用布局 */
#app {
    display: flex;
    height: 100vh;
    width: 100vw;
    max-width: 100vw;
    position: relative;
    padding: 0.25rem;
    gap: 0.25rem;
    box-sizing: border-box;
    overflow-x: hidden;
}

/* 现代化侧边栏 */
.sidebar {
    width: 300px;
    background: var(--sidebar-bg);
    backdrop-filter: var(--sidebar-blur);
    -webkit-backdrop-filter: var(--sidebar-blur);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    transition: var(--transition-slow);
    position: relative;
    z-index: 10;
}

.sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.1) 0%, transparent 100%);
    pointer-events: none;
    z-index: -1;
}

/* 现代化侧边栏头部 */
.sidebar-header {
    padding: 2rem 1.5rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.sidebar-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 1.5rem;
    right: 1.5rem;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, var(--border-color) 50%, transparent 100%);
}

.sidebar-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.025em;
}

/* 配置卡片设计 */
.config-card {
    margin: 1.5rem;
    background: var(--bg-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
    overflow: hidden;
}

.config-header {
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, var(--primary-light) 0%, rgba(139, 92, 246, 0.1) 100%);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.config-header h3 {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-color);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.config-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-light);
    transition: var(--transition);
    cursor: pointer;
}

.config-item:hover {
    background: var(--primary-light);
}

.config-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-right: 1rem;
    flex-shrink: 0;
}

.config-info {
    flex: 1;
    min-width: 0;
}

.config-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.config-value {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.config-actions {
    flex-shrink: 0;
}

.config-btn {
    padding: 0.5rem 1rem;
    background: var(--bg-color);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    color: var(--text-color);
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.config-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

.provider-section::before,
.model-section::before,
.agent-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 1.5rem;
    right: 1.5rem;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, var(--border-color) 50%, transparent 100%);
}

.provider-section label,
.model-section label,
.agent-section label {
    display: block;
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0;
}

/* 聊天历史 */
.chat-history {
    flex: 1;
    padding: 0.75rem;
    overflow-y: auto;
}

.chat-history-header {
    margin-bottom: 1rem;
}

.chat-history h3 {
    margin-bottom: 0.75rem;
    font-size: 1rem;
    color: var(--text-color);
}

.chat-search {
    position: relative;
    margin-bottom: 0.75rem;
    width: 100%;
    display: flex;
    align-items: center;
}

.chat-search-input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius);
    color: var(--text-color);
    font-size: 0.875rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.chat-search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.chat-search-input::placeholder {
    color: var(--secondary-color);
    opacity: 0.7;
}

.clear-search-btn {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--secondary-color);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.25rem;
    width: 1.5rem;
    height: 1.5rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.clear-search-btn:hover {
    color: var(--text-color);
    background: rgba(255, 255, 255, 0.1);
}

.new-chat-btn {
    width: 100%;
    padding: 0.75rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border: none;
    border-radius: var(--radius);
    color: white;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.new-chat-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.chat-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.chat-item {
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
    border: 2px solid transparent;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.chat-item:hover::before {
    opacity: 0.1;
}

.chat-item:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 
        0 12px 35px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border-color: var(--primary-color);
}

.chat-item.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
}

.chat-item-content {
    flex: 1;
    min-width: 0;
}

.chat-title {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
    color: inherit;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.chat-preview {
    font-size: 0.75rem;
    color: var(--secondary-color);
    opacity: 0.8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    margin-bottom: 0.25rem;
}

.chat-time {
    font-size: 0.7rem;
    color: var(--secondary-color);
    opacity: 0.6;
    display: block;
}

/* 空状态样式 */
.empty-state {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--secondary-color);
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    color: var(--text-color);
}

.empty-state p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.8;
}


.chat-item-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.chat-item:hover .chat-item-actions {
    opacity: 1;
}

.chat-delete-btn {
    background: none;
    border: none;
    color: var(--error-color);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.25rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-delete-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error-color);
    transform: scale(1.1);
}

.chat-item.active::before {
    opacity: 0;
}

/* 现代化主聊天区域 */
.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--bg-color);
    position: relative;
}

.main::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 50%, rgba(255,255,255,0.05) 100%);
    pointer-events: none;
    z-index: 0;
}

.chat-header {
    padding: 0.75rem 1.5rem;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, rgba(255,255,255,0.98) 0%, rgba(255,255,255,0.95) 100%);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 2px 20px rgba(0,0,0,0.05);
    gap: 1rem;
}

/* 当前配置显示 */
.current-config {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex: 0 0 auto;
    justify-content: flex-start;
}

.config-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: rgba(255,255,255,0.8);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    min-width: 0;
    flex: 0 0 auto;
    max-width: 180px;
}

.config-item:hover {
    background: rgba(255,255,255,0.95);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.config-icon {
    font-size: 1rem;
    flex-shrink: 0;
}

.config-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
    flex: 1;
    gap: 0.1rem;
}

.config-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    line-height: 1;
    margin-bottom: 0.2rem;
}

.config-value {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-color);
    line-height: 1.2;
    word-break: break-word;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    max-width: 100%;
}

.config-edit-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: var(--radius);
    transition: all 0.2s ease;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.config-edit-btn:hover {
    color: var(--primary-color);
    background: rgba(99, 102, 241, 0.1);
    transform: scale(1.1);
}

/* 头部操作按钮 */
.header-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex: 1;
    justify-content: flex-end;
}

.action-btn {
    background: rgba(255,255,255,0.8);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.action-btn:hover {
    background: rgba(255,255,255,0.95);
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.chat-info {
    display: flex;
    gap: 1.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.chat-info span {
    padding: 0.25rem 0.75rem;
    background: var(--primary-light);
    border-radius: var(--radius-full);
    font-weight: 500;
    color: var(--primary-color);
}

.chat-actions {
    display: flex;
    gap: 0.5rem;
}

/* 现代化聊天容器 */
.chat-container {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.5rem;
    position: relative;
    z-index: 1;
}

.messages {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.welcome-message {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
    background: var(--bg-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
}

.welcome-message h3 {
    margin-bottom: 1rem;
    color: var(--text-color);
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 现代化消息样式 */
.message {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    animation: messageSlideIn 0.3s ease-out;
}

@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message.user {
    flex-direction: row-reverse;
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: var(--shadow);
    border: 2px solid var(--bg-color);
}

.message.user .message-avatar {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: white;
}

.message.assistant .message-avatar {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--accent-color) 100%);
    color: white;
}

.message-content {
    flex: 1;
    max-width: 75%;
    position: relative;
}

.message.user .message-content {
    text-align: right;
}

.message-bubble {
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    word-wrap: break-word;
    line-height: 1.6;
    font-size: 0.875rem;
    box-shadow: var(--shadow);
    position: relative;
}

.message.user .message-bubble {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: white;
    border-bottom-right-radius: var(--radius-sm);
}

.message.assistant .message-bubble {
    background: var(--bg-color);
    color: var(--text-color);
    border: 1px solid var(--border-light);
    border-bottom-left-radius: var(--radius-sm);
}

/* 智能体消息特殊样式 */
.message.assistant .message-avatar {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    width: 2.5rem;
    height: 2.5rem;
    box-shadow: var(--shadow);
}

.message.assistant .message-avatar:hover {
    transform: scale(1.05);
    transition: var(--transition);
}

.message-bubble::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 100%);
    border-radius: inherit;
    pointer-events: none;
}

/* 消息内容格式化样式 */
.message-bubble pre {
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 0.75rem;
    margin: 0.5rem 0;
    overflow-x: auto;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.8rem;
    line-height: 1.4;
}

.message-bubble code {
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: 3px;
    padding: 0.2rem 0.4rem;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.8rem;
    color: var(--primary-color);
}

.message-bubble pre code {
    background: transparent;
    border: none;
    padding: 0;
    color: var(--text-color);
}

.message-bubble strong {
    font-weight: 600;
    color: var(--text-color);
}

.message-bubble em {
    font-style: italic;
    color: var(--text-secondary);
}

.message-bubble ul {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

.message-bubble li {
    margin: 0.25rem 0;
    line-height: 1.5;
}

.message-bubble p {
    margin: 0.5rem 0;
    line-height: 1.6;
}

.message-bubble p:first-child {
    margin-top: 0;
}

.message-bubble p:last-child {
    margin-bottom: 0;
}

/* 消息播放按钮样式 */
.message-play-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 2rem;
    height: 2rem;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
    box-shadow: var(--shadow);
    z-index: 10;
}

.message:hover .message-play-btn {
    opacity: 1;
}

.message-play-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

.message.user .message-play-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.message.user .message-play-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    color: white;
}

/* 流式输出光标 */
.streaming-cursor {
    animation: blink 1s infinite;
    color: var(--primary-color);
    font-weight: bold;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* 语音设置样式 */
.voice-model-selector {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.voice-model-option {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
}

.voice-model-option:hover {
    border-color: var(--primary-color);
    background: var(--primary-light);
}

.voice-model-option.selected {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, var(--primary-light) 0%, rgba(139, 92, 246, 0.1) 100%);
    box-shadow: var(--shadow);
}

.voice-model-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-right: 1rem;
    flex-shrink: 0;
}

.voice-model-info {
    flex: 1;
    min-width: 0;
}

.voice-model-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.25rem;
}

.voice-model-desc {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.voice-settings {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 0.5rem;
}

.voice-setting-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.voice-setting-item label {
    min-width: 3rem;
    font-size: 0.875rem;
    color: var(--text-color);
}

.voice-setting-item input[type="range"] {
    flex: 1;
    height: 0.5rem;
    background: var(--bg-secondary);
    border-radius: 0.25rem;
    outline: none;
    -webkit-appearance: none;
}

.voice-setting-item input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 1.25rem;
    height: 1.25rem;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: var(--shadow);
}

.voice-setting-item input[type="range"]::-moz-range-thumb {
    width: 1.25rem;
    height: 1.25rem;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: var(--shadow);
}

.voice-setting-item span {
    min-width: 2rem;
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.message-time {
    font-size: 0.75rem;
    color: var(--secondary-color);
    margin-top: 0.25rem;
}

/* 现代化输入区域 */
.input-area {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    background: var(--sidebar-bg);
    backdrop-filter: var(--sidebar-blur);
    -webkit-backdrop-filter: var(--sidebar-blur);
    position: relative;
    z-index: 1;
}

.input-container {
    display: flex;
    gap: 0.5rem;
    align-items: flex-end;
    max-width: 900px;
    margin: 0 auto;
    background: var(--bg-color);
    border-radius: var(--radius);
    padding: 0.75rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
    position: relative;
}

#messageInput {
    flex: 1;
    padding: 1rem 1.25rem;
    border: none;
    border-radius: var(--radius);
    background: transparent;
    color: var(--text-color);
    font-family: inherit;
    font-size: 0.875rem;
    resize: vertical;
    min-height: 48px;
    max-height: 120px;
    transition: var(--transition);
    line-height: 1.5;
    width: 100%;
    box-sizing: border-box;
}

#messageInput:focus {
    outline: none;
    background: var(--primary-light);
}

#messageInput::placeholder {
    color: var(--text-secondary);
}

.send-btn {
    padding: 0.875rem 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 48px;
    box-shadow: 
        0 8px 25px rgba(102, 126, 234, 0.4),
        0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    flex-shrink: 0;
}

.send-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.6s ease;
}

.send-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
    transition: all 0.4s ease;
    transform: translate(-50%, -50%);
    border-radius: 50%;
}

.send-btn:hover::before {
    left: 100%;
}

.send-btn:hover::after {
    width: 300px;
    height: 300px;
}

.send-btn:hover:not(:disabled) {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 
        0 20px 45px rgba(102, 126, 234, 0.5),
        0 5px 15px rgba(0, 0, 0, 0.2);
    background: linear-gradient(135deg, #764ba2 0%, #667eea 50%, #f093fb 100%);
}

.send-btn:active:not(:disabled) {
    transform: translateY(-1px) scale(0.98);
    transition: all 0.1s ease;
}

.send-btn:disabled {
    background: linear-gradient(135deg, #9ca3af 0%, #6b7280 100%);
    cursor: not-allowed;
    transform: none;
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    opacity: 0.6;
}

/* 输入框上方的操作按钮 */
.input-actions-top {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    justify-content: flex-end;
    margin-bottom: 0.75rem;
}

.input-actions-top .icon-btn {
    width: 2.5rem;
    height: 2.5rem;
    padding: 0.5rem;
    background: var(--bg-color);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    color: var(--text-secondary);
    transition: var(--transition);
}

.input-actions-top .icon-btn:hover {
    color: var(--primary-color);
    background: var(--primary-light);
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

/* 奢华按钮样式 */
.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 10px 30px rgba(102, 126, 234, 0.4),
        0 1px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.6s ease;
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
    transition: all 0.4s ease;
    transform: translate(-50%, -50%);
    border-radius: 50%;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover::after {
    width: 300px;
    height: 300px;
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 
        0 20px 40px rgba(102, 126, 234, 0.5),
        0 5px 15px rgba(0, 0, 0, 0.2);
    background: linear-gradient(135deg, #764ba2 0%, #667eea 50%, #f093fb 100%);
}

.btn-primary:active {
    transform: translateY(-1px) scale(0.98);
    transition: all 0.1s ease;
}

.btn-secondary {
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
    color: var(--text-color);
    border: 2px solid transparent;
    padding: 1rem 2rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.875rem;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
}

.btn-secondary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.btn-secondary:hover::before {
    opacity: 0.1;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 12px 35px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-secondary:active {
    transform: translateY(0);
    transition: all 0.1s ease;
}

/* 奢华图标按钮 */
.icon-btn {
    background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0.05) 100%);
    border: 2px solid transparent;
    padding: 0.875rem;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1rem;
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
}

.icon-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.icon-btn:hover::before {
    opacity: 0.1;
}

.icon-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 
        0 12px 35px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border-color: var(--primary-color);
}

.icon-btn:active {
    transform: translateY(0) scale(0.95);
    transition: all 0.1s ease;
}

.icon-btn svg {
    transition: all 0.3s ease;
}

.icon-btn:hover svg {
    transform: scale(1.1);
    filter: drop-shadow(0 0 8px rgba(99, 102, 241, 0.5));
}

/* 现代化表单元素 */
.select,
.input,
.textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    background: var(--bg-color);
    color: var(--text-color);
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
    position: relative;
}

.select:focus,
.input:focus,
.textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 
        0 0 0 3px rgba(99, 102, 241, 0.1),
        var(--shadow);
    transform: translateY(-1px);
}

/* 现代化下拉框样式 */
.select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1rem;
    padding-right: 2.5rem;
    cursor: pointer;
}

.select:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow);
    transform: translateY(-1px);
}

.range {
    width: 100%;
    margin: 0.5rem 0;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.9) 100%);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: var(--radius-lg);
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(255,255,255,0.1),
        inset 0 1px 0 rgba(255,255,255,0.3);
    max-width: 600px;
    width: 95%;
    height: 80vh;
    min-height: 400px;
    max-height: 500px;
    overflow: hidden;
    animation: slideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: flex;
    flex-direction: column;
}

.modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
    border-radius: inherit;
    pointer-events: none;
    z-index: -1;
}

.modal-header {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.modal-header h3 {
    margin: 0;
    color: var(--text-color);
    font-size: 1.25rem;
    font-weight: 700;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--secondary-color);
    transition: var(--transition);
    padding: 0.5rem;
    border-radius: var(--radius);
}

.close-btn:hover {
    color: var(--text-color);
    background: var(--primary-light);
}

.modal-body {
    padding: 0.75rem;
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

/* 标签页 */
.tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1rem;
    flex-shrink: 0;
}

.tab-btn {
    background: none;
    border: none;
    padding: 1rem 1.5rem;
    cursor: pointer;
    color: var(--secondary-color);
    border-bottom: 2px solid transparent;
    transition: var(--transition);
    font-weight: 500;
    font-size: 0.875rem;
    position: relative;
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-btn:hover:not(.active) {
    color: var(--text-color);
    background: var(--primary-light);
}

.tab-content {
    display: none;
    flex: 1;
    overflow-y: auto;
}

.tab-content.active {
    display: flex;
    flex-direction: column;
}

/* 选择列表样式 */
.selection-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.selection-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--bg-color);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.selection-item:hover {
    border-color: var(--primary-color);
    background: var(--primary-light);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.selection-item.selected {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, var(--primary-light) 0%, rgba(139, 92, 246, 0.1) 100%);
    box-shadow: var(--shadow);
}

.selection-item-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-right: 1rem;
    flex-shrink: 0;
}

.selection-item-info {
    flex: 1;
    min-width: 0;
}

.selection-item-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.25rem;
}

.selection-item-desc {
    font-size: 0.75rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.selection-item-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.selection-item-status {
    padding: 0.25rem 0.5rem;
    background: var(--success-color);
    color: white;
    border-radius: var(--radius-sm);
    font-size: 0.625rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.selection-item .edit-btn,
.selection-item .delete-btn {
    width: 2rem;
    height: 2rem;
    border: none;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    opacity: 0.7;
}

.selection-item .edit-btn:hover {
    background: var(--primary-color);
    color: white;
    opacity: 1;
    transform: scale(1.05);
}

.selection-item .delete-btn:hover {
    background: var(--danger-color);
    color: white;
    opacity: 1;
    transform: scale(1.05);
}

.selection-item:hover .edit-btn,
.selection-item:hover .delete-btn {
    opacity: 1;
}

.modal-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
}

/* 表单组 */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
}

.form-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

/* 智能体管理页面样式 */
.agent-management-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-light);
}

.agent-stats {
    display: flex;
    gap: 2rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.25rem;
}

.agent-categories {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.category-section h4 {
    margin: 0 0 1rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-light);
}

.agent-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.agent-card {
    background: var(--bg-color);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 1.25rem;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.agent-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.agent-card-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.agent-card-icon {
    width: 3rem;
    height: 3rem;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-right: 1rem;
    flex-shrink: 0;
}

.agent-card-info {
    flex: 1;
    min-width: 0;
}

.agent-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.25rem;
}

.agent-card-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.agent-card-scenarios {
    font-size: 0.75rem;
    color: var(--text-secondary);
    background: var(--primary-light);
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    margin-top: 0.75rem;
}

/* 智能体详情页面样式 */
.agent-detail-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.agent-detail-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--primary-light);
    border-radius: var(--radius);
}

.agent-detail-icon {
    width: 4rem;
    height: 4rem;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    flex-shrink: 0;
}

.agent-detail-info h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-color);
}

.agent-detail-info p {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.5;
}

.agent-detail-section h5 {
    margin: 0 0 0.75rem 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-color);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.agent-prompt-display {
    background: var(--bg-color);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 0.75rem;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--text-color);
    white-space: pre-wrap;
    max-height: 200px;
    overflow-y: auto;
}

.agent-scenarios {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.scenario-tag {
    background: var(--primary-light);
    color: var(--primary-color);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 500;
}

.agent-detail-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
}

/* 表单帮助样式 */
.form-help {
    margin-top: 0.5rem;
    padding: 0.75rem;
    background: var(--primary-light);
    border-radius: var(--radius);
    font-size: 0.875rem;
    color: var(--text-color);
}

.form-help strong {
    color: var(--primary-color);
    display: block;
    margin-bottom: 0.5rem;
}

.form-help ul {
    margin: 0;
    padding-left: 1.25rem;
}

.form-help li {
    margin-bottom: 0.25rem;
    line-height: 1.4;
}

/* 主题选择器样式 */
.theme-selector {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.theme-option {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    background: var(--bg-color);
    border: 2px solid var(--border-light);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
}

.theme-option:hover {
    border-color: var(--primary-color);
    background: var(--primary-light);
    transform: translateY(-1px);
}

.theme-option.selected {
    border-color: var(--primary-color);
    background: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.theme-icon {
    width: 3rem;
    height: 3rem;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-right: 1rem;
    flex-shrink: 0;
}

.theme-info {
    flex: 1;
}

.theme-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.25rem;
}

.theme-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* 语言选择器样式 */
.language-selector {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.language-option {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    background: var(--bg-color);
    border: 2px solid var(--border-light);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
}

.language-option:hover {
    border-color: var(--primary-color);
    background: var(--primary-light);
    transform: translateY(-1px);
}

.language-option.selected {
    border-color: var(--primary-color);
    background: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.language-flag {
    width: 3rem;
    height: 3rem;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-right: 1rem;
    flex-shrink: 0;
}

.language-info {
    flex: 1;
}

.language-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.25rem;
}

.language-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* 服务商类型选择器样式 */
.provider-type-selector {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.provider-type-option {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    background: var(--bg-color);
    border: 2px solid var(--border-light);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
}

.provider-type-option:hover {
    border-color: var(--primary-color);
    background: var(--primary-light);
    transform: translateY(-1px);
}

.provider-type-option.selected {
    border-color: var(--primary-color);
    background: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.provider-type-icon {
    width: 3rem;
    height: 3rem;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-right: 1rem;
    flex-shrink: 0;
}

.provider-type-info {
    flex: 1;
}

.provider-type-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.25rem;
}

.provider-type-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* 智能体分类选择器样式 */
.agent-category-selector {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.agent-category-option {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    background: var(--bg-color);
    border: 2px solid var(--border-light);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
}

.agent-category-option:hover {
    border-color: var(--primary-color);
    background: var(--primary-light);
    transform: translateY(-1px);
}

.agent-category-option.selected {
    border-color: var(--primary-color);
    background: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.agent-category-icon {
    width: 3rem;
    height: 3rem;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-right: 1rem;
    flex-shrink: 0;
}

.agent-category-info {
    flex: 1;
}

.agent-category-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.25rem;
}

.agent-category-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* 设置项 */
.setting-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.setting-item label {
    min-width: 120px;
    font-weight: 500;
    color: var(--text-color);
}

/* 列表样式 */
.providers-list,
.agents-list {
    margin-bottom: 1rem;
}

.list-item {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--sidebar-bg);
}

.list-item-actions {
    display: flex;
    gap: 0.5rem;
}

.list-item-actions button {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
}

/* 加载指示器 */
.loading-indicator {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: var(--bg-color);
    padding: 1rem 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    display: none;
    align-items: center;
    gap: 0.5rem;
    z-index: 2000;
}

.loading-indicator.show {
    display: flex;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* 现代化动画 */
@keyframes fadeIn {
    from { 
        opacity: 0;
        transform: scale(0.95);
    }
    to { 
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideIn {
    from { 
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px var(--primary-color);
    }
    50% {
        box-shadow: 0 0 20px var(--primary-color), 0 0 30px var(--primary-color);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -320px;
        top: 0;
        height: 100vh;
        z-index: 100;
        transition: left 0.3s ease;
    }
    
    .sidebar.open {
        left: 0;
    }
    
    .main {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        overflow-x: hidden;
    }
    
    .chat-header {
        padding: 0.4rem 0.8rem;
        flex-direction: column;
        gap: 0.4rem;
        align-items: stretch;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .current-config {
        flex-direction: row;
        gap: 0.4rem;
        width: 100%;
        overflow-x: auto;
        padding-bottom: 0.25rem;
    }
    
    .config-item {
        min-width: 110px;
        max-width: 110px;
        padding: 0.3rem 0.5rem;
        flex-shrink: 0;
        border: 1px solid var(--border-light);
        border-radius: var(--radius-lg);
    }
    
    .config-label {
        font-size: 0.65rem;
    }
    
    .config-value {
        font-size: 0.75rem;
    }
    
    .header-actions {
        justify-content: center;
        gap: 0.5rem;
    }
    
    .action-btn {
        padding: 0.4rem;
    }
    
    .mobile-menu-btn {
        display: block;
        align-self: flex-start;
    }
    
    /* 旧的配置切换器样式已删除，使用新的 current-config 样式 */
    
    .chat-actions {
        justify-content: center;
    }
    
    .input-actions-top {
        justify-content: center;
        gap: 1rem;
    }
    
    .input-actions-top .icon-btn {
        width: 3rem;
        height: 3rem;
    }
    
    #messageInput {
        width: 100%;
        box-sizing: border-box;
    }
    
    .input-wrapper {
        width: 100%;
        box-sizing: border-box;
    }
    
    .chat-info {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .input-container {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .send-btn {
        width: 100%;
    }
    
    .modal-content {
        width: calc(100% - 2rem);
        margin: 1rem;
        max-height: calc(100vh - 2rem);
    }
    
    /* 智能体管理弹窗特殊优化 */
    #agentManagementModal .modal-content {
        width: calc(100% - 2rem);
        margin: 1rem;
        max-height: calc(100vh - 2rem);
        overflow: hidden;
    }
    
    #agentManagementModal .modal-body {
        padding: 0.75rem;
        overflow-y: auto;
        flex: 1;
    }
    
    #agentManagementModal .modal-header {
        padding: 0.75rem;
        flex-shrink: 0;
    }
    
    #agentManagementModal .close-btn {
        font-size: 1.5rem;
        padding: 0.25rem;
        min-width: 2rem;
        min-height: 2rem;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .setting-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .setting-item label {
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .sidebar {
        width: 100%;
        left: -100%;
    }
    
    /* 搜索框移动端优化 */
    .chat-search {
        margin-bottom: 0.5rem;
    }
    
    .chat-search-input {
        padding: 0.4rem 2rem 0.4rem 0.6rem;
        font-size: 0.8rem;
    }
    
    .clear-search-btn {
        right: 0.4rem;
        width: 1.2rem;
        height: 1.2rem;
        padding: 0.2rem;
    }
    
    /* 旧的配置切换器样式已删除，使用新的 current-config 样式 */
    
    .chat-header {
        padding: 0.3rem 0.5rem;
        gap: 0.3rem;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .current-config {
        flex-direction: row;
        gap: 0.3rem;
        overflow-x: auto;
        padding-bottom: 0.2rem;
    }
    
    .config-item {
        min-width: 90px;
        max-width: 90px;
        padding: 0.25rem 0.4rem;
        flex-shrink: 0;
        border: 1px solid var(--border-light);
        border-radius: var(--radius-lg);
    }
    
    .config-label {
        font-size: 0.55rem;
    }
    
    .config-value {
        font-size: 0.7rem;
    }
    
    .header-actions {
        gap: 0.3rem;
    }
    
    .action-btn {
        padding: 0.3rem;
    }
    
    .chat-actions {
        flex-direction: row;
        gap: 0.3rem;
        justify-content: center;
    }
    
    .chat-actions button {
        flex: 1;
        font-size: 0.7rem;
        padding: 0.3rem 0.4rem;
    }
    
    .input-actions-floating {
        bottom: 0.4rem;
        right: 0.4rem;
        gap: 0.3rem;
    }
    
    .floating-btn {
        width: 2rem;
        height: 2rem;
    }
    
    #messageInput {
        width: 100%;
        box-sizing: border-box;
    }
    
    .input-wrapper {
        width: 100%;
        box-sizing: border-box;
    }
    
    .input-actions-top .icon-btn {
        width: 100%;
        height: 2.5rem;
    }
    
    .message-content {
        max-width: 85%;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions button {
        width: 100%;
    }
    
    .modal-content {
        width: calc(100% - 1rem);
        height: calc(100vh - 1rem);
        margin: 0.5rem;
        border-radius: var(--radius);
        max-height: calc(100vh - 1rem);
    }
    
    /* 智能体管理弹窗特殊优化 */
    #agentManagementModal .modal-content {
        width: calc(100% - 1rem);
        height: calc(100vh - 1rem);
        margin: 0.5rem;
        border-radius: var(--radius);
        max-height: calc(100vh - 1rem);
        overflow: hidden;
    }
    
    #agentManagementModal .modal-body {
        padding: 0.5rem;
        overflow-y: auto;
        flex: 1;
    }
    
    #agentManagementModal .modal-header {
        padding: 0.5rem;
        flex-shrink: 0;
    }
    
    #agentManagementModal .close-btn {
        font-size: 1.5rem;
        padding: 0.25rem;
        min-width: 2rem;
        min-height: 2rem;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .theme-selector,
    .language-selector,
    .provider-type-selector,
    .agent-category-selector {
        gap: 0.5rem;
    }
    
    .theme-option,
    .language-option,
    .provider-type-option,
    .agent-category-option {
        padding: 0.75rem;
    }
    
    .agent-grid {
        grid-template-columns: 1fr;
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--sidebar-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* 选择文本样式 */
::selection {
    background-color: var(--primary-color);
    color: white;
}

/* 焦点样式 */
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* 禁用状态 */
button:disabled,
input:disabled,
textarea:disabled,
select:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 工具提示 */


/* 错误状态 */
.error {
    border-color: var(--danger-color) !important;
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.25) !important;
}

.error-message {
    color: var(--danger-color);
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

/* 成功状态 */
.success {
    border-color: var(--success-color) !important;
    box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.25) !important;
}

/* 警告状态 */
.warning {
    border-color: var(--warning-color) !important;
    box-shadow: 0 0 0 2px rgba(255, 193, 7, 0.25) !important;
}

/* 现代化特效类 */
.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hover-lift {
    transition: var(--transition);
}

.hover-lift:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.glow-effect {
    animation: glow 2s ease-in-out infinite alternate;
}

.float-animation {
    animation: float 3s ease-in-out infinite;
}

.pulse-animation {
    animation: pulse 2s ease-in-out infinite;
}

/* 现代化滚动条 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: var(--radius-full);
    border: 2px solid var(--bg-color);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--primary-hover) 0%, var(--primary-color) 100%);
}

/* 现代化选择文本 */
::selection {
    background: var(--primary-light);
    color: var(--primary-color);
}

/* 现代化焦点样式 */
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: none;
    box-shadow: 0 0 0 3px var(--primary-light);
    transform: translateY(-1px);
}

/* 现代化禁用状态 */
button:disabled,
input:disabled,
textarea:disabled,
select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* 移动端菜单按钮 */
.mobile-menu-btn {
    display: none;
    background: var(--bg-color);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    color: var(--text-color);
    padding: 0.5rem;
    cursor: pointer;
    transition: var(--transition);
}

.mobile-menu-btn:hover {
    background: var(--primary-light);
    border-color: var(--primary-color);
}

/* 旧的配置切换器样式已删除，使用新的 current-config 样式 */

.config-switch-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: var(--bg-color);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    color: var(--text-color);
    font-size: 0.875rem;
    cursor: pointer;
    transition: var(--transition);
    min-width: 120px;
}

.config-switch-btn:hover {
    border-color: var(--primary-color);
    background: var(--primary-light);
    transform: translateY(-1px);
}

.config-switch-btn .config-icon {
    font-size: 1rem;
    flex-shrink: 0;
}

.config-switch-btn .config-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
}

.config-switch-btn .config-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1;
}

.config-switch-btn .config-value {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-color);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 80px;
}

/* 自定义确认弹窗 */
.confirm-modal {
    max-width: 400px;
    width: 90%;
}

.confirm-modal .modal-header {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    color: white;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.confirm-modal .modal-header h3 {
    color: white;
    margin: 0;
}

.confirm-modal .close-btn {
    color: white;
}

.confirm-modal .close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.confirm-modal .modal-body {
    text-align: center;
    padding: 1.5rem;
}

.confirm-modal .modal-body p {
    margin: 0;
    font-size: 1rem;
    color: var(--text-color);
    line-height: 1.5;
}

.confirm-modal .modal-actions {
    padding: 1rem 1.5rem;
    gap: 1rem;
}

.confirm-modal .btn-secondary {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #6c757d;
}

.confirm-modal .btn-secondary:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.confirm-modal .btn-primary {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    border: none;
    color: white;
}

.confirm-modal .btn-primary:hover {
    background: linear-gradient(135deg, #ff5252 0%, #e53935 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
}

/* 测试模式样式 */
#testModeModal .modal-content {
    max-width: 600px;
    width: 90%;
}

.test-info {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1rem;
    margin-top: 1rem;
}

.test-info p {
    margin: 0.5rem 0;
    font-size: 0.875rem;
}

.test-info strong {
    color: var(--primary-color);
}

#testTemperature {
    width: 100%;
    margin: 0.5rem 0;
}

#temperatureValue {
    display: inline-block;
    margin-left: 1rem;
    font-weight: 600;
    color: var(--primary-color);
    min-width: 3rem;
}

#testPrompt {
    resize: vertical;
    min-height: 100px;
}

#runTestBtn {
    background: linear-gradient(135deg, #10b981, #059669);
    border: none;
    color: white;
    font-weight: 600;
}

#runTestBtn:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-1px);
}

/* 多智能体模式样式 */
#multiAgentModal .modal-content {
    max-width: 700px;
    width: 90%;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05));
    border: 1px solid rgba(255,255,255,0.2);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    box-shadow: 0 25px 50px rgba(0,0,0,0.25);
}

#multiAgentModal .modal-header {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(139, 92, 246, 0.2));
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

#multiAgentModal .modal-header h3 {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.multi-agent-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    max-height: 300px;
    overflow-y: auto;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: relative;
}

.multi-agent-list::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), rgba(139, 92, 246, 0.05));
    border-radius: var(--radius);
    z-index: -1;
}

.multi-agent-item {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05));
    border: 2px solid transparent;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.multi-agent-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.multi-agent-item:hover {
    border-color: rgba(99, 102, 241, 0.5);
    background: linear-gradient(135deg, rgba(255,255,255,0.15), rgba(255,255,255,0.08));
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.15);
}

.multi-agent-item:hover::before {
    opacity: 1;
}

.multi-agent-item.selected {
    border-color: #6366f1;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.3);
}

.multi-agent-item.selected::before {
    opacity: 0;
}

.multi-agent-item input[type="checkbox"] {
    margin-right: 0.75rem;
    transform: scale(1.2);
}

.multi-agent-item-info {
    flex: 1;
}

.multi-agent-item-name {
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
    color: var(--text-color);
    transition: color 0.3s ease;
}

.multi-agent-item-desc {
    font-size: 0.75rem;
    opacity: 0.8;
    line-height: 1.3;
    color: var(--text-muted);
    transition: color 0.3s ease;
}

.multi-agent-item-config {
    font-size: 0.7rem;
    color: var(--primary-color);
    margin-top: 0.25rem;
    font-weight: 500;
    opacity: 0.9;
}

.multi-agent-item.selected .multi-agent-item-name,
.multi-agent-item.selected .multi-agent-item-desc {
    color: white;
    opacity: 1;
}

.multi-agent-info {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1rem;
    margin-top: 1rem;
}

.multi-agent-info p {
    margin: 0.5rem 0;
    font-size: 0.875rem;
}

.multi-agent-info strong {
    color: var(--primary-color);
}

#startMultiAgentBtn {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border: none;
    color: white;
    font-weight: 600;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

#startMultiAgentBtn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

#startMultiAgentBtn:hover {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

#startMultiAgentBtn:hover::before {
    left: 100%;
}

/* 多智能体消息样式 */
.message.multi-agent {
    /* 使用普通消息样式，不添加特殊边框和背景 */
    display: flex;
    align-items: flex-start;
    margin-bottom: 1rem;
}

/* 多智能体头像样式 */
.message.multi-agent .message-avatar {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    font-weight: 600;
}

.message.multi-agent.system-message .message-avatar {
    background: linear-gradient(135deg, #10b981, #059669);
}

/* 缓存管理样式 */
.cache-management {
    padding: 1rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
}

.cache-info {
    margin: 0 0 1rem 0;
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.5;
}

#clearCacheBtn {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border: none;
    color: white;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

#clearCacheBtn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

#clearCacheBtn:hover {
    background: linear-gradient(135deg, #2563eb, #1e40af);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

#clearCacheBtn:hover::before {
    left: 100%;
}

/* 输入框包装器 */
.input-wrapper {
    position: relative;
    flex: 1;
    width: 100%;
    box-sizing: border-box;
}

/* 浮动按钮容器 */
.input-actions-floating {
    position: absolute;
    bottom: 0.75rem;
    right: 0.75rem;
    display: flex;
    gap: 0.5rem;
    z-index: 10;
}

/* 浮动按钮样式 */
.floating-btn {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.8) 100%);
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.floating-btn:hover {
    background: linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.9) 100%);
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.floating-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
