/* ========================================
   知识库管理系统 - 主样式
   风格：类似腾讯IMA，简约清爽
   ======================================== */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

/* ========================================
   顶部标签栏
   ======================================== */
.top-tab-bar {
    background-color: #fff;
    border-bottom: 1px solid #e0e0e0;
    padding: 8px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 50px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.tabs-container {
    display: flex;
    align-items: center;
    gap: 4px;
}

.tab-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background-color: #f5f5f5;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    color: #666;
    transition: all 0.2s;
    min-width: 100px;
    max-width: 150px;
}

.tab-item:hover {
    background-color: #e8e8e8;
}

.tab-item.active {
    background-color: #fff;
    color: #1a73e8;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.tab-icon {
    font-size: 12px;
}

.tab-close {
    margin-left: auto;
    opacity: 0;
    transition: opacity 0.2s;
}

.tab-item:hover .tab-close {
    opacity: 1;
}

.add-tab-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f5f5f5;
    border-radius: 6px;
    cursor: pointer;
    color: #666;
    transition: all 0.2s;
}

.add-tab-btn:hover {
    background-color: #e8e8e8;
    color: #1a73e8;
}

.new-version-btn {
    border-radius: 20px;
    font-size: 12px;
}

/* ========================================
   主容器
   ======================================== */
.main-container {
    display: flex;
    min-height: calc(100vh - 50px);
}

/* ========================================
   左侧边栏
   ======================================== */
.left-sidebar {
    width: 60px;
    background-color: #fff;
    border-right: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 0;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
}

.sidebar-user {
    margin-bottom: 20px;
    position: relative;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
}

.user-avatar:hover {
    border-color: #1a73e8;
    transform: scale(1.05);
}

#userAvatarBtn {
    border: none;
}

/* 用户下拉菜单 */
.user-dropdown-menu {
    position: absolute;
    left: 50px;
    top: 0;
    width: 260px;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: none;
    animation: slideIn 0.2s ease-out;
}

.user-dropdown-menu.show {
    display: block;
}

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

.user-dropdown-header {
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid #f0f0f0;
}

.dropdown-user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e0e0e0;
}

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

.dropdown-user-name {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dropdown-user-id {
    font-size: 12px;
    color: #999;
}

.user-dropdown-divider {
    height: 1px;
    background-color: #f0f0f0;
}

.user-dropdown-body {
    padding: 8px 0;
}

.dropdown-item {
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: background-color 0.2s;
    font-size: 14px;
    color: #333;
}

.dropdown-item:hover {
    background-color: #f5f5f5;
}

.dropdown-item i {
    color: #666;
    width: 16px;
    text-align: center;
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.menu-item {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    border-radius: 8px;
    cursor: pointer;
    color: #666;
    font-size: 18px;
    transition: all 0.2s;
}

.menu-item:hover {
    background-color: #f5f5f5;
    color: #1a73e8;
}

.menu-item.active {
    background-color: #e8f5e9;
    color: #2e7d32;
}

/* ========================================
   主内容区
   ======================================== */
.main-content {
    flex: 1;
    margin-left: 60px;
    padding: 24px;
}

.page-content {
    display: none;
}

.page-content.active {
    display: block;
}

/* ========================================
   页面头部
   ======================================== */
.page-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.page-title {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.search-box {
    flex: 1;
    max-width: 400px;
    display: flex;
    align-items: center;
    background-color: #f5f5f5;
    border-radius: 20px;
    padding: 8px 16px;
}

.search-box i {
    color: #999;
    margin-right: 8px;
}

.search-input {
    flex: 1;
    border: none;
    background: none;
    outline: none;
    font-size: 14px;
    color: #333;
}

.search-input::placeholder {
    color: #999;
}

.search-clear-btn {
    color: #999;
    cursor: pointer;
    margin-left: 8px;
    font-size: 12px;
    transition: color 0.2s;
}

.search-clear-btn:hover {
    color: #666;
}

/* ========================================
   分类标签栏
   ======================================== */
.category-tabs {
    display: flex;
    gap: 24px;
    padding: 16px 0;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 24px;
    overflow-x: auto;
}

.category-item {
    font-size: 14px;
    color: #666;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.2s;
    white-space: nowrap;
}

.category-item:hover {
    background-color: #f5f5f5;
    color: #1a73e8;
}

.category-item.active {
    background-color: #e8f5e9;
    color: #2e7d32;
    font-weight: 500;
}

/* ========================================
   板块头部
   ======================================== */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.refresh-btn {
    color: #666;
    font-size: 13px;
}

.refresh-btn:hover {
    color: #1a73e8;
}

.sort-options {
    display: flex;
    gap: 8px;
}

.sort-item {
    font-size: 14px;
    color: #666;
    cursor: pointer;
    padding: 4px 12px;
    border-radius: 16px;
    transition: all 0.2s;
}

.sort-item:hover {
    background-color: #f5f5f5;
    color: #1a73e8;
}

.sort-item.active {
    background-color: #e8f5e9;
    color: #2e7d32;
    font-weight: 500;
}

/* ========================================
   卡片网格
   ======================================== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.kb-card {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.kb-card:hover {
    border-color: #1a73e8;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.kb-card-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.kb-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

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

.kb-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.kb-description {
    font-size: 13px;
    color: #999;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.kb-stats {
    display: flex;
    gap: 16px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
}

.kb-stat {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #666;
}

.kb-stat i {
    font-size: 12px;
}

.kb-author {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
}

.kb-author-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
}

.kb-author-name {
    font-size: 12px;
    color: #666;
}

/* ========================================
   知识库详情
   ======================================== */
.kb-header {
    background-color: #fff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #e0e0e0;
}

.kb-header-main {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 16px;
}

.kb-header-icon-wrapper {
    flex-shrink: 0;
}

.kb-header-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    background: linear-gradient(135deg, #ff9a56 0%, #ff6b35 100%);
}

.kb-header-content {
    flex: 1;
    min-width: 0;
}

.kb-header-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 智能体收藏按钮 */
.agent-favorite-btn {
    background: transparent;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 6px 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    color: #666;
}

.agent-favorite-btn:hover {
    border-color: #ff6b6b;
    color: #ff6b6b;
    background: #fff5f5;
}

.agent-favorite-btn i {
    font-size: 14px;
}

.agent-favorite-btn.favorited {
    background: #ff6b6b;
    border-color: #ff6b6b;
    color: #fff;
}

.agent-favorite-btn.favorited:hover {
    background: #ff5252;
    border-color: #ff5252;
    color: #fff;
}

.agent-favorite-btn.favorited i {
    color: #fff;
}

.kb-header-creator {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.verified-badge {
    color: #faad14;
    font-size: 14px;
}

.kb-header-desc {
    font-size: 13px;
    color: #999;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.kb-header-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
}

.kb-header-stats {
    display: flex;
    gap: 20px;
}

.kb-stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #666;
}

.kb-stat-item i {
    font-size: 14px;
    color: #999;
}

.kb-header-actions {
    display: flex;
    gap: 12px;
}

.kb-favorite-btn {
    background-color: transparent;
    border: 1px solid #d9d9d9;
    color: #666;
    font-size: 14px;
    padding: 8px 20px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.kb-favorite-btn:hover {
    background-color: #f5f5f5;
    color: #333;
}

.kb-favorite-btn.active {
    background-color: #ff4d4f;
    border-color: #ff4d4f;
    color: #fff;
}

.kb-join-btn {
    background-color: #000;
    border-color: #000;
    color: #fff;
    font-size: 14px;
    padding: 8px 24px;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 80px; /* 添加最小宽度，防止换行 */
}

.kb-join-btn:hover {
    background-color: #333;
    border-color: #333;
    color: #fff; /* 确保hover时文字颜色为白色 */
}

.kb-join-btn:disabled {
    background-color: #d9d9d9;
    border-color: #d9d9d9;
    color: #fff;
    cursor: not-allowed;
}

/* 暂时隐藏加入和喜欢按钮 */
.kb-join-btn {
    display: none;
}

.kb-header-actions {
    display: none;
}
    border-color: #d9d9d9;
    cursor: not-allowed;
}

/* 移除旧的样式 */
.kb-header-info,
.kb-header-meta {
    display: none;
}

.kb-header-meta {
    display: flex;
    gap: 24px;
    font-size: 13px;
    color: #999;
}

.kb-header-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
}

/* 发布者信息卡片（已移除，使用精简设计） */

/* ========================================
   知识库详情左右分栏
   ======================================== */
.kb-detail-container {
    display: flex;
    gap: 20px;
    height: calc(100vh - 140px);
}

.kb-detail-left {
    flex: 0 0 600px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.kb-detail-right {
    flex: 1;
    background-color: #fff;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* 调整文档列表标题样式 */
.kb-detail-left .document-list-section {
    flex: 1;
    overflow-y: auto;
}

.kb-detail-left .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.document-sort {
    font-size: 13px;
    color: #999;
}

/* ========================================
   对话框样式
   ======================================== */
.chat-header {
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.chat-title {
    font-size: 14px;
    color: #666;
}

.chat-quick-questions {
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.quick-question-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background-color: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quick-question-item:hover {
    background-color: #e8e8e8;
}

.quick-question-item:last-child {
    margin-bottom: 0;
}

.quick-question-item span {
    font-size: 14px;
    color: #333;
}

.quick-question-item i {
    font-size: 12px;
    color: #999;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.empty-chat-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #999;
}

.empty-chat-state i {
    font-size: 48px;
    margin-bottom: 12px;
}

.empty-chat-state p {
    font-size: 14px;
    margin: 0;
}

.chat-message {
    display: flex;
    gap: 12px;
}

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

.chat-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #f0f0f0;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #999;
}

.chat-message.user .chat-avatar {
    background-color: #1890ff;
    color: #fff;
}

.chat-content {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
}

.chat-message.assistant .chat-content {
    background-color: #f8f9fa;
    color: #333;
}

.chat-message.user .chat-content {
    background-color: #1890ff;
    color: #fff;
}

.chat-input-area {
    padding: 20px;
    border-top: 1px solid #e0e0e0;
}

.chat-input-wrapper {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-input-container {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    background-color: #f8f9fa;
    border-radius: 12px;
    padding: 12px;
}

.chat-input {
    flex: 1;
    border: none;
    background: transparent;
    resize: none;
    font-size: 14px;
    color: #333;
    line-height: 1.5;
    min-height: 24px;
    max-height: 120px;
    font-family: inherit;
}

.chat-input:focus {
    outline: none;
}

.chat-input::placeholder {
    color: #999;
}

.chat-mode-selector,
.chat-model-selector {
    display: flex;
    gap: 8px;
}

.chat-mode-select,
.chat-model-select {
    padding: 6px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    background-color: #fff;
    font-size: 12px;
    color: #333;
    cursor: pointer;
}

.chat-mode-select:focus,
.chat-model-select:focus {
    outline: none;
}

.chat-input-actions {
    display: flex;
    gap: 8px;
}

.chat-action-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: none;
    background-color: transparent;
    color: #999;
    cursor: pointer;
    transition: all 0.3s ease;
}

.chat-action-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: #333;
}

.chat-send-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: none;
    background-color: #1890ff;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.chat-send-btn:hover {
    background-color: #40a9ff;
}

.chat-send-btn:disabled {
    background-color: #d9d9d9;
    cursor: not-allowed;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .kb-detail-left {
        flex: 0 0 500px;
    }
}

@media (max-width: 768px) {
    .kb-detail-container {
        flex-direction: column;
    }

    .kb-detail-left {
        flex: 1;
        max-height: 50vh;
    }

    .kb-detail-right {
        flex: 1;
        min-height: 50vh;
    }
}

/* ========================================
   文档列表
   ======================================== */
.document-list {
    display: grid;
    gap: 8px;
}

.doc-item {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.doc-item:hover {
    border-color: #1a73e8;
    background-color: #f8f9fa;
}

.doc-icon {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    background-color: #e8f5e9;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2e7d32;
    font-size: 20px;
}

.doc-info {
    flex: 1;
}

.doc-title {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 4px;
}

.doc-meta {
    font-size: 12px;
    color: #999;
}

.doc-arrow {
    color: #999;
}

/* ========================================
   文档详情
   ======================================== */
.document-detail-container {
    background-color: #fff;
    border-radius: 12px;
    padding: 32px;
    min-height: 600px;
    border: 1px solid #e0e0e0;
}

.doc-detail-title {
    font-size: 28px;
    font-weight: 600;
    color: #333;
    margin-bottom: 16px;
}

.doc-detail-content {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
}

/* ========================================
   登录提示
   ======================================== */
.login-prompt {
    background-color: #fff;
    border-radius: 12px;
    padding: 48px;
    text-align: center;
    border: 1px solid #e0e0e0;
}

.login-prompt-content {
    max-width: 400px;
    margin: 0 auto;
}

.login-icon {
    font-size: 64px;
    color: #ddd;
    margin-bottom: 16px;
}

.login-prompt h3 {
    font-size: 20px;
    color: #333;
    margin-bottom: 24px;
}

.login-btn {
    padding: 12px 32px;
    font-size: 16px;
    border-radius: 20px;
}

/* ========================================
   用户资料
   ======================================== */
.user-profile {
    background-color: #fff;
    border-radius: 12px;
    padding: 24px;
    border: 1px solid #e0e0e0;
}

.user-profile-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid #f0f0f0;
}

.user-profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.user-profile-info h3 {
    font-size: 20px;
    color: #333;
    margin-bottom: 4px;
}

.user-profile-info p {
    font-size: 14px;
    color: #666;
}

.user-profile-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.user-stat-card {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 16px;
    text-align: center;
}

.user-stat-value {
    font-size: 24px;
    font-weight: 600;
    color: #1a73e8;
}

.user-stat-label {
    font-size: 13px;
    color: #666;
    margin-top: 4px;
}

/* 可点击的统计卡片样式 */
.stat-card-clickable {
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.stat-card-clickable:hover {
    background-color: #1a73e8;
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.3);
}

.stat-card-clickable:hover .user-stat-value {
    color: #fff;
}

.stat-card-clickable:hover .user-stat-label {
    color: #fff;
}

.stat-card-clickable:hover .user-stat-icon {
    opacity: 1;
}

.stat-card-clickable:active {
    transform: translateY(-2px);
}

.user-stat-icon {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    opacity: 0;
    transition: opacity 0.3s ease;
    color: #fff;
    font-size: 14px;
}

/* ========================================
   管理列表
   ======================================== */
.manage-list {
    display: grid;
    gap: 12px;
}

.manage-item {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.2s;
}

.manage-item:hover {
    border-color: #1a73e8;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.manage-item-info {
    flex: 1;
}

.manage-item-title {
    font-size: 16px;
    font-weight: 500;
    color: #333;
    margin-bottom: 4px;
}

.manage-item-description {
    font-size: 14px;
    color: #666;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.5;
    max-height: 42px;
}

.manage-item-meta {
    font-size: 13px;
    color: #999;
}

.manage-item-actions {
    display: flex;
    gap: 8px;
}

/* ========================================
   响应式
   ======================================== */
@media (max-width: 768px) {
    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .search-box {
        width: 100%;
        max-width: none;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }

    .kb-header-top {
        flex-direction: column;
    }

    .user-profile-stats {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   设置页面
   ======================================== */
.settings-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.settings-card {
    background-color: #fff;
    border-radius: 12px;
    padding: 24px;
    border: 1px solid #e0e0e0;
}

.settings-card-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.settings-card-title i {
    color: #1a73e8;
}

.settings-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.form-control {
    padding: 12px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: #1a73e8;
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1);
}

.form-text {
    font-size: 12px;
    color: #999;
}

.test-api-btn,
.save-api-btn {
    padding: 10px 20px;
    font-size: 14px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    align-self: flex-start;
}

.api-status {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background-color: #f8f9fa;
    border-radius: 8px;
    margin-top: 16px;
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.status-indicator.success {
    background-color: #52c41a;
}

.status-indicator.error {
    background-color: #ff4d4f;
}

.status-indicator.loading {
    background-color: #1890ff;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.status-text {
    font-size: 14px;
    color: #333;
}

.api-endpoints {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.endpoint-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.endpoint-method {
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    min-width: 50px;
    text-align: center;
}

.endpoint-method.GET {
    background-color: #e6f7ff;
    color: #1890ff;
}

.endpoint-method.POST {
    background-color: #f6ffed;
    color: #52c41a;
}

.endpoint-method.PUT {
    background-color: #fff7e6;
    color: #faad14;
}

.endpoint-method.DELETE {
    background-color: #fff1f0;
    color: #ff4d4f;
}

.endpoint-path {
    flex: 1;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: #1a73e8;
}

.endpoint-desc {
    font-size: 13px;
    color: #666;
    min-width: 100px;
    text-align: right;
}

/* ========================================
   登录注册模态框
   ======================================== */
.auth-modal {
    border: none;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    overflow: visible;
}

.modal-close-btn {
    position: absolute;
    top: -40px;
    right: 0;
    background: #fff;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
}

.modal-close-btn:hover {
    transform: rotate(90deg);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.auth-header {
    padding: 32px 32px 24px;
    text-align: center;
    border-bottom: 1px solid #f0f0f0;
}

.auth-tabs {
    display: flex;
    justify-content: center;
    gap: 40px;
}

.auth-tab {
    border: none;
    background: none;
    font-size: 18px;
    font-weight: 500;
    color: #999;
    padding: 8px 16px;
    cursor: pointer;
    position: relative;
    transition: color 0.2s;
}

.auth-tab:hover {
    color: #1a73e8;
}

.auth-tab.active {
    color: #1a73e8;
    font-weight: 600;
}

.auth-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 3px;
    background-color: #1a73e8;
    border-radius: 2px;
}

.auth-form {
    padding: 32px;
    display: none;
}

.auth-form.active {
    display: block;
}

.auth-form .form-label {
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
}

.auth-form .input-group {
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
}

.auth-form .input-group:focus-within {
    border-color: #1a73e8;
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1);
}

.auth-form .input-group-text {
    background-color: #f8f9fa;
    border: none;
    color: #999;
    width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-form .form-control {
    border: none;
    padding: 12px 16px;
    font-size: 14px;
}

.auth-form .form-control:focus {
    box-shadow: none;
}

.auth-form .toggle-password {
    border: none;
    background: none;
    color: #999;
    padding: 0 12px;
    cursor: pointer;
}

.auth-form .toggle-password:hover {
    color: #666;
}

.auth-form .form-check {
    display: flex;
    align-items: center;
    gap: 8px;
}

.auth-form .form-check-input {
    cursor: pointer;
}

.auth-form .form-check-label {
    cursor: pointer;
    font-size: 14px;
    color: #666;
}

.auth-form .form-text {
    font-size: 12px;
    color: #999;
    margin-top: 4px;
}

.auth-submit-btn {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    font-weight: 500;
    border-radius: 8px;
    background-color: #1a73e8;
    border: none;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.auth-submit-btn:hover {
    background-color: #1557b0;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.3);
}

.auth-submit-btn:active {
    transform: translateY(0);
}

.auth-submit-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* 响应式设计 */
@media (max-width: 576px) {
    .modal-dialog {
        margin: 10px;
    }

    .auth-header {
        padding: 24px 20px 20px;
    }

    .auth-tabs {
        gap: 30px;
    }

    .auth-tab {
        font-size: 16px;
    }

    .auth-form {
        padding: 24px 20px;
    }
}

/* ========================================
   知识库管理模态框
   ======================================== */
.kb-modal {
    border: none;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.kb-modal .modal-header {
    border-bottom: 1px solid #f0f0f0;
    padding: 20px 24px;
    background-color: #fafafa;
    border-radius: 16px 16px 0 0;
}

.kb-modal .modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.kb-modal .modal-body {
    padding: 24px;
}

.kb-modal .form-label {
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
}

.kb-modal .form-control,
.kb-modal .form-select {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 14px;
}

.kb-modal .form-control:focus,
.kb-modal .form-select:focus {
    border-color: #1a73e8;
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1);
}

/* 知识库图标上传容器 */
.kb-icon-upload-container {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 16px;
    border: 2px dashed #e0e0e0;
    border-radius: 8px;
    background-color: #fafafa;
}

.kb-icon-preview {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    border: 2px dashed #e0e0e0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #fff;
    flex-shrink: 0;
}

.kb-icon-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.kb-icon-upload-btn {
    flex: 1;
}

.kb-icon-hint {
    font-size: 12px;
    color: #999;
    margin-top: 8px;
    text-align: center;
}

.kb-modal .form-check {
    margin-bottom: 8px;
    padding: 10px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.kb-modal .form-check:hover {
    border-color: #1a73e8;
    background-color: #f5f7fa;
}

.kb-modal .form-check-input:checked + .form-check-label {
    color: #1a73e8;
    font-weight: 500;
}

.kb-modal .form-check-label {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.kb-modal .modal-footer {
    border-top: 1px solid #f0f0f0;
    padding: 16px 24px;
}

.kb-modal .btn-primary {
    background-color: #1a73e8;
    border: none;
    border-radius: 8px;
    padding: 10px 24px;
    font-weight: 500;
}

.kb-modal .btn-primary:hover {
    background-color: #1557b0;
}

.kb-modal .btn-primary:disabled {
    background-color: #ccc;
}

/* ========================================
   知识库管理列表样式
   ======================================== */
.kb-manage-list {
    margin-top: 24px;
}

.manage-item {
    display: flex;
    align-items: center;
    padding: 20px;
    background-color: #fff;
    border-radius: 12px;
    margin-bottom: 16px;
    border: 1px solid #e0e0e0;
    transition: all 0.2s;
}

.manage-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: #1a73e8;
}

.kb-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
    margin-right: 16px;
    flex-shrink: 0;
}

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

.manage-item-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.manage-item-meta {
    font-size: 13px;
    color: #999;
    display: flex;
    align-items: center;
    gap: 8px;
}

.manage-item-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.manage-item-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.manage-item-actions .btn {
    border-radius: 6px;
    font-size: 13px;
    padding: 6px 14px;
}

.doc-manage-list {
    margin-top: 24px;
}

/* 文档模态框样式 */
#docModal .modal-lg {
    max-width: 700px;
}

#docModal #docContent {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 14px;
    line-height: 1.6;
}

#docModal .form-label {
    font-weight: 500;
    color: #333;
}

#docModal .form-control:focus,
#docModal .form-select:focus {
    border-color: #1890ff;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.1);
}

/* ========================================
   编辑资料模态框样式
   ======================================== */

/* 头像上传容器 */
.avatar-upload-container {
    text-align: center;
}

.avatar-preview {
    width: 150px;
    height: 150px;
    margin: 0 auto 15px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #e0e0e0;
    background-color: #f5f5f5;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.avatar-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-upload-btn {
    margin-bottom: 10px;
}

.avatar-hint {
    font-size: 12px;
    color: #999;
}

/* 编辑资料按钮样式 */
.edit-profile-trigger {
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
}

.edit-profile-trigger:hover {
    background-color: #f5f5f5;
    color: #1a73e8;
}

/* ========================================
   收藏按钮样式
   ======================================== */

/* 收藏按钮基础样式 */
#favoriteBtn {
    transition: all 0.3s ease;
    font-weight: 500;
}

/* 未收藏状态 */
#favoriteBtn:not(.favorite-active) {
    background-color: transparent;
    border-color: #1890ff;
    color: #1890ff;
}

#favoriteBtn:not(.favorite-active):hover {
    background-color: #1890ff;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(24, 144, 255, 0.3);
}

/* 已收藏状态 */
#favoriteBtn.favorite-active {
    background-color: #1890ff;
    border-color: #1890ff;
    color: #fff;
    animation: favoritePulse 0.3s ease;
}

#favoriteBtn.favorite-active:hover {
    background-color: #40a9ff;
    border-color: #40a9ff;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(24, 144, 255, 0.4);
}

/* 收藏图标动画 */
#favoriteBtn.favorite-active i {
    animation: starPop 0.4s ease;
}

@keyframes favoritePulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes starPop {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.3);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ========================================
   分页组件样式
   ======================================== */

.pagination-container {
    margin-top: 30px;
    padding: 20px 0;
    display: flex;
    justify-content: center;
}

.pagination {
    display: flex;
    gap: 8px;
    align-items: center;
    margin: 0;
    padding: 0;
    list-style: none;
}

.page-item {
    display: flex;
    align-items: center;
}

.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    user-select: none;
}

.page-link:hover {
    background-color: #f5f7fa;
    border-color: #d0d0d0;
    color: #1890ff;
}

.page-item.active .page-link {
    background-color: #1890ff;
    border-color: #1890ff;
    color: #fff;
}

.page-item.disabled .page-link {
    background-color: #f5f5f5;
    border-color: #e0e0e0;
    color: #ccc;
    cursor: not-allowed;
}

.page-item.disabled .page-link:hover {
    background-color: #f5f5f5;
    border-color: #e0e0e0;
    color: #ccc;
}

.page-link i {
    font-size: 12px;
}

/* 分页信息提示 */
.pagination-info {
    display: flex;
    align-items: center;
    margin-left: 20px;
    font-size: 14px;
    color: #666;
}

.pagination-info span {
    color: #1890ff;
    font-weight: 600;
}

/* ========================================
   知识库筛选样式
   ======================================== */

.kb-filter-section {
    margin-bottom: 20px;
    padding: 16px;
    background-color: #fff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.filter-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-label {
    font-size: 14px;
    color: #666;
    font-weight: 500;
    white-space: nowrap;
}

.filter-select {
    min-width: 200px;
    font-size: 14px;
    border-color: #e0e0e0;
    transition: all 0.2s ease;
}

.filter-select:focus {
    border-color: #1890ff;
    box-shadow: 0 0 0 3px rgba(24, 144, 255, 0.1);
}

/* 搜索框容器样式 */
.search-box-wrapper {
    position: relative;
    min-width: 250px;
}

.search-box-wrapper .search-input {
    padding-right: 36px;
}

.search-box-wrapper .search-clear-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 4px;
    font-size: 14px;
    transition: color 0.2s ease;
}

.search-box-wrapper .search-clear-btn:hover {
    color: #666;
}

/* 知识库管理列表点击样式 */

.kb-icon-clickable,
.kb-title-clickable {
    cursor: pointer;
    transition: all 0.2s ease;
}

.kb-icon-clickable:hover {
    opacity: 0.8;
    transform: scale(1.05);
}

.kb-title-clickable:hover {
    color: #1890ff;
}

/* ========================================
   上传提示样式
   ======================================== */
.upload-hints {
    background-color: #fffbe6;
    border: 1px solid #ffe58f;
    border-radius: 6px;
    padding: 12px;
    margin-top: 10px;
}

.hint-item {
    font-size: 13px;
    color: #faad14;
    margin-bottom: 8px;
    font-weight: 500;
}

.hint-item i {
    margin-right: 6px;
}

.hint-list {
    margin: 0;
    padding-left: 20px;
    font-size: 12px;
    color: #666;
    line-height: 1.8;
}

.hint-list li {
    margin-bottom: 4px;
}

.hint-list li:last-child {
    margin-bottom: 0;
}

/* 文档表单中的 form-text 样式增强 */
.form-text .upload-hints {
    margin-top: 8px;
}

.form-text > div:first-child {
    margin-bottom: 8px;
}

/* ========================================
   收藏管理页面样式
   ======================================== */

/* 收藏类型Tab */
.favorite-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    padding: 4px;
    background-color: #f5f5f5;
    border-radius: 8px;
    width: fit-content;
}

.favorite-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    background-color: transparent;
    border: none;
    transition: all 0.3s ease;
}

.favorite-tab:hover {
    background-color: rgba(26, 115, 232, 0.08);
    color: #1a73e8;
}

.favorite-tab.active {
    background-color: #fff;
    color: #1a73e8;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    font-weight: 600;
}

.favorite-tab i {
    font-size: 14px;
}

/* 收藏列表容器 */
.favorite-list {
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    min-height: 300px;
}

/* 收藏列表项 - 文档收藏 */
.favorite-doc-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 12px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.favorite-doc-item:hover {
    border-color: #1a73e8;
    box-shadow: 0 2px 8px rgba(26, 115, 232, 0.12);
    transform: translateY(-2px);
}

.favorite-doc-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f5f7fa;
    border-radius: 8px;
    font-size: 24px;
    color: #666;
    flex-shrink: 0;
}

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

.favorite-doc-title {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.favorite-doc-meta {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: #999;
}

.favorite-doc-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.favorite-doc-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

/* 收藏列表项 - AI工具收藏 */
.favorite-ai-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 12px;
    transition: all 0.2s ease;
    cursor: pointer;
    background-color: #fff;
}

.favorite-ai-item:hover {
    border-color: #1a73e8;
    box-shadow: 0 2px 8px rgba(26, 115, 232, 0.12);
    transform: translateY(-2px);
}

.favorite-ai-logo {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
    background-color: #f5f7fa;
}

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

.favorite-ai-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.favorite-ai-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background-color: #52c41a;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    border-radius: 4px;
}

.favorite-ai-desc {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.favorite-ai-meta {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: #999;
}

.favorite-ai-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.favorite-ai-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
}

/* 收藏列表项 - 智能体收藏 */
.favorite-agent-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 12px;
    transition: all 0.2s ease;
    cursor: pointer;
    background-color: #fff;
}

.favorite-agent-item:hover {
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.12);
    transform: translateY(-2px);
}

.favorite-agent-logo {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
    background-color: #f5f7fa;
}

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

.favorite-agent-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.favorite-agent-desc {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.favorite-agent-meta {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: #999;
}

.favorite-agent-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.favorite-agent-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
}

/* ========================================
   智能体管理页面样式
   ======================================== */

/* 智能体分类Tab */
.agent-category-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    padding: 4px;
    background-color: #f5f5f5;
    border-radius: 8px;
    overflow-x: auto;
}

.agent-tab-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    background-color: transparent;
    border: none;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.agent-tab-item:hover {
    background-color: rgba(26, 115, 232, 0.08);
    color: #1a73e8;
}

.agent-tab-item.active {
    background-color: #fff;
    color: #1a73e8;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    font-weight: 600;
}

/* 智能体列表容器 */
.agent-list-container {
    padding: 0;
}

/* 智能体卡片 */
.agent-card {
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid #e0e0e0;
}

.agent-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-color: #1a73e8;
}

.agent-logo {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background-color: #f5f7fa;
    border-radius: 8px 8px 0 0;
}

.agent-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.agent-card:hover .agent-logo img {
    transform: scale(1.05);
}

.agent-card .card-body {
    padding: 20px;
}

.agent-card .card-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.agent-card .card-text {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.agent-category {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #999;
    padding: 4px 8px;
    background-color: #f5f7fa;
    border-radius: 4px;
    width: fit-content;
}

/* 智能体聊天页面 */
.agent-chat-container {
    height: calc(100vh - 120px);
    background-color: #fff;
    border-radius: 8px;
}

.agent-chat-content {
    height: calc(100vh - 120px);
}

.agent-chat-iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 8px;
}

/* 智能体标题logo */
.agent-title-logo {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    margin-right: 12px;
    object-fit: cover;
}

/* 空状态提示 */
.favorite-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #999;
}

.favorite-empty-icon {
    font-size: 64px;
    color: #e0e0e0;
    margin-bottom: 16px;
}

.favorite-empty-text {
    font-size: 14px;
    color: #999;
}

.favorite-empty-btn {
    margin-top: 16px;
}




/* ========================================
   会员中心样式
   ======================================== */

/* 用户信息卡片 */
.user-info-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
    color: #fff;
}

.user-avatar-section {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.user-avatar-img {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 3px solid rgba(255,255,255,0.3);
}

.user-info .user-name {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 4px;
}

.user-info .user-id {
    font-size: 12px;
    opacity: 0.8;
}

.user-vip-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(255,255,255,0.2);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    margin-top: 6px;
}

.user-vip-badge i {
    color: #ffd700;
}

.user-stats {
    display: flex;
    justify-content: space-around;
    background: rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 16px;
}

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

.stat-value {
    font-size: 24px;
    font-weight: 700;
}

.stat-label {
    font-size: 12px;
    opacity: 0.8;
    margin-top: 4px;
}

/* 功能入口 */
.member-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.action-card {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.action-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.action-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-right: 12px;
}

.recharge-card .action-icon {
    background: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
    color: #fff;
}

.vip-card .action-icon {
    background: linear-gradient(135deg, #a18cd1 0%, #fbc2eb 100%);
    color: #fff;
}

.points-log-card .action-icon {
    background: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%);
    color: #fff;
}

.orders-card .action-icon {
    background: linear-gradient(135deg, #a1c4fd 0%, #c2e9fb 100%);
    color: #fff;
}

.action-content {
    flex: 1;
}

.action-title {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.action-desc {
    font-size: 12px;
    color: #999;
}

.action-arrow {
    color: #ccc;
}

/* 套餐容器 */
.package-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    padding: 20px;
}

.package-card {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.package-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.package-card.selected {
    border-color: #667eea;
}

.package-card.recommended {
    border-color: #f6d365;
}

.package-card.recommended::before {
    content: '推荐';
    position: absolute;
    top: 12px;
    right: -30px;
    background: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
    color: #fff;
    padding: 4px 40px;
    font-size: 12px;
    transform: rotate(45deg);
}

.package-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.package-name {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.package-points {
    font-size: 32px;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 8px;
}

.package-points span {
    font-size: 14px;
    color: #999;
}

.package-bonus {
    display: inline-block;
    background: #fff3e0;
    color: #ff9800;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    margin-bottom: 12px;
}

.package-price {
    font-size: 28px;
    font-weight: 700;
    color: #f56c6c;
}

.package-price span {
    font-size: 14px;
}

.package-original-price {
    font-size: 14px;
    color: #999;
    text-decoration: line-through;
    margin-top: 4px;
}

.package-desc {
    font-size: 13px;
    color: #666;
    margin-top: 12px;
}

.package-buy-btn {
    margin-top: 16px;
    width: 100%;
}

/* 积分明细 */
.points-log-container {
    padding: 20px;
}

.points-log-item {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
}

.log-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-size: 16px;
}

.log-icon.income {
    background: #e8f5e9;
    color: #4caf50;
}

.log-icon.expense {
    background: #ffebee;
    color: #f44336;
}

.log-content {
    flex: 1;
}

.log-type {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.log-time {
    font-size: 12px;
    color: #999;
    margin-top: 4px;
}

.log-points {
    font-size: 18px;
    font-weight: 600;
}

.log-points.positive {
    color: #4caf50;
}

.log-points.negative {
    color: #f44336;
}

/* 订单列表 */
.orders-container {
    padding: 20px;
}

.order-item {
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
}

.order-no {
    font-size: 12px;
    color: #999;
}

.order-status {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
}

.order-status.paid {
    background: #e8f5e9;
    color: #4caf50;
}

.order-status.pending {
    background: #fff3e0;
    color: #ff9800;
}

.order-status.cancelled {
    background: #fafafa;
    color: #999;
}

.order-status.refunded {
    background: #ffebee;
    color: #f44336;
}

.order-body {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.order-info .order-name {
    font-size: 15px;
    font-weight: 500;
    color: #333;
}

.order-info .order-type {
    font-size: 12px;
    color: #999;
    margin-top: 4px;
}

.order-amount {
    font-size: 18px;
    font-weight: 600;
    color: #f56c6c;
}

.order-footer {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.order-time {
    font-size: 12px;
    color: #999;
}

/* 返回按钮 */
.back-btn {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    font-size: 64px;
    color: #ddd;
    margin-bottom: 16px;
}

.empty-text {
    font-size: 14px;
    color: #999;
}

/* 支付弹窗 */
.payment-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.payment-modal-content {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    width: 90%;
    max-width: 400px;
}

.payment-modal-header {
    text-align: center;
    margin-bottom: 20px;
}

.payment-modal-title {
    font-size: 18px;
    font-weight: 600;
}

.payment-modal-amount {
    font-size: 36px;
    font-weight: 700;
    color: #f56c6c;
    margin-top: 8px;
}

.payment-options {
    margin-bottom: 20px;
}

.payment-option {
    display: flex;
    align-items: center;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.payment-option:hover {
    border-color: #667eea;
}

.payment-option.selected {
    border-color: #667eea;
    background: #f5f7ff;
}

.payment-option-icon {
    font-size: 24px;
    margin-right: 12px;
}

.payment-option-icon.wechat {
    color: #07c160;
}

.payment-option-icon.alipay {
    color: #1677ff;
}

.payment-option-name {
    flex: 1;
    font-size: 15px;
}

.payment-option-check {
    color: #667eea;
}


/* ========================================
   聊天增强功能样式
   ======================================== */

/* 流量统计栏 */
.chat-stats-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
    border-radius: 8px;
    margin-top: 8px;
    font-size: 13px;
}

.chat-stats-bar .stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #666;
}

.chat-stats-bar .stat-item i {
    color: #667eea;
}

.chat-stats-bar .stat-item strong {
    color: #333;
    font-weight: 600;
}

/* 快捷提示 */
.quick-tips {
    margin-top: 20px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 12px;
    text-align: left;
    font-size: 13px;
    color: #666;
}

.quick-tips p {
    margin-bottom: 8px;
    font-weight: 500;
}

.quick-tips ul {
    margin: 0;
    padding-left: 20px;
}

.quick-tips li {
    margin: 4px 0;
}

/* 聊天工具栏 */
.chat-toolbar {
    display: flex;
    gap: 4px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 8px;
}

.toolbar-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    border-radius: 8px;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.toolbar-btn:hover {
    background: #e8f5e9;
    color: #2e7d32;
}

.toolbar-btn.active {
    background: #e8f5e9;
    color: #2e7d32;
}

.toolbar-btn.recording {
    background: #fee2e2;
    color: #ef4444;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* 上传文件预览 */
.uploaded-files-preview {
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 12px;
}

.uploaded-files-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.uploaded-file-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 13px;
    max-width: 200px;
}

.uploaded-file-item .file-icon {
    color: #667eea;
}

.uploaded-file-item .file-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.uploaded-file-item .file-remove {
    color: #999;
    cursor: pointer;
    padding: 2px;
}

.uploaded-file-item .file-remove:hover {
    color: #ef4444;
}

/* 文件上传中状态 */
.uploaded-file-item.uploading {
    border-color: #667eea;
    background: #f5f7ff;
}

.uploaded-file-item.uploading .file-icon {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 语音输入状态 */
.voice-input-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px;
    background: linear-gradient(135deg, #667eea10 0%, #764ba210 100%);
    border-radius: 12px;
    margin-top: 12px;
}

.voice-animation {
    display: flex;
    align-items: center;
    gap: 3px;
    height: 24px;
}

.voice-animation span {
    width: 3px;
    height: 12px;
    background: #667eea;
    border-radius: 3px;
    animation: wave 0.8s ease-in-out infinite;
}

.voice-animation span:nth-child(1) { animation-delay: 0s; }
.voice-animation span:nth-child(2) { animation-delay: 0.1s; }
.voice-animation span:nth-child(3) { animation-delay: 0.2s; }
.voice-animation span:nth-child(4) { animation-delay: 0.3s; }

@keyframes wave {
    0%, 100% { height: 8px; }
    50% { height: 24px; }
}

.voice-text {
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

/* 消息操作按钮 */
.message-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    opacity: 0;
    transition: opacity 0.2s;
}

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

.message-action-btn {
    padding: 4px 8px;
    border: 1px solid #e0e0e0;
    background: #fff;
    border-radius: 4px;
    font-size: 12px;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s;
}

.message-action-btn:hover {
    border-color: #667eea;
    color: #667eea;
}

.message-action-btn i {
    font-size: 11px;
}

/* Token消耗标签 */
.token-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 12px;
    font-size: 11px;
    color: #0284c7;
    margin-top: 8px;
}

.token-badge i {
    font-size: 10px;
}

/* 播放按钮 */
.play-btn {
    padding: 4px 10px;
    border: 1px solid #10b981;
    background: #ecfdf5;
    border-radius: 12px;
    font-size: 12px;
    color: #10b981;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s;
}

.play-btn:hover {
    background: #d1fae5;
}

.play-btn.playing {
    background: #10b981;
    color: #fff;
}

.play-btn i {
    font-size: 11px;
}

/* 复制按钮 */
.copy-btn {
    padding: 4px 10px;
    border: 1px solid #e0e0e0;
    background: #fff;
    border-radius: 12px;
    font-size: 12px;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s;
}

.copy-btn:hover {
    border-color: #667eea;
    color: #667eea;
}

.copy-btn.copied {
    background: #f0fdf4;
    border-color: #10b981;
    color: #10b981;
}

/* 空状态增强 */
.empty-chat-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #6c757d;
    padding: 40px 20px;
}

.empty-chat-state i {
    font-size: 48px;
    margin-bottom: 16px;
    color: #d1d5db;
}

.empty-chat-state p {
    font-size: 16px;
    margin-bottom: 8px;
}

/* 消息元数据 */
.message-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
    font-size: 11px;
    color: #999;
}

.message-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* 模型选择器 */
.model-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 13px;
}

.model-selector label {
    color: #666;
}

.model-selector select {
    padding: 4px 8px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background: #fff;
    font-size: 13px;
    cursor: pointer;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .chat-stats-bar {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .chat-toolbar {
        flex-wrap: wrap;
    }
    
    .uploaded-file-item {
        max-width: 100%;
    }
    
    .message-actions {
        opacity: 1;
    }
}
