/* 响应式布局样式 */
.chat-interface {
    padding-top: 80px; /* 添加顶部内边距，确保内容不被导航栏遮挡 */
}

.chat-container {
    display: flex;
    height: calc(100vh - 180px); /* 调整高度以适应顶部内边距 */
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
}

.chat-sidebar {
    width: 250px;
    background-color: #f5f7fa;
    border-right: 1px solid #e0e5eb;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: #fff;
    position: relative;
}

.chat-info {
    width: 280px;
    background-color: #f5f7fa;
    border-left: 1px solid #e0e5eb;
    padding: 15px;
    overflow-y: auto;
    transition: all 0.3s ease;
}

.sidebar-header {
    padding: 15px;
    border-bottom: 1px solid #e0e5eb;
}

.new-agent-btn {
    width: 100%;
    padding: 10px;
    background-color: #4a6cf7;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.sidebar-section {
    padding: 15px;
    border-bottom: 1px solid #e0e5eb;
}

    .sidebar-section h3 {
        font-size: 14px;
        margin-bottom: 10px;
        color: #666;
    }

.agent-list, .template-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

    .agent-list li, .template-list li {
        padding: 8px 10px;
        margin-bottom: 5px;
        border-radius: 5px;
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 14px;
    }

        .agent-list li.active {
            background-color: #e6f0ff;
            color: #4a6cf7;
        }

        .agent-list li:hover, .template-list li:hover {
            background-color: #f0f2f5;
        }

.sidebar-footer {
    padding: 15px;
    margin-top: auto;
    display: flex;
    justify-content: space-between;
}

    .sidebar-footer a {
        color: #666;
        font-size: 14px;
        text-decoration: none;
        display: flex;
        align-items: center;
        gap: 5px;
    }

.chat-header {
    padding: 15px 20px;
    border-bottom: 1px solid #e0e5eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

    .chat-header h2 {
        margin: 0;
        font-size: 18px;
    }

.header-actions {
    display: flex;
    gap: 10px;
}

.action-btn {
    padding: 6px 12px;
    background-color: #f0f2f5;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.message {
    margin-bottom: 20px;
    max-width: 85%;
}

    .message.system {
        margin-left: 0;
    }

    .message.user {
        margin-left: auto;
        text-align: right;
    }

        .message.user .message-content {
            background-color: #4a6cf7;
            color: white;
            padding: 12px 16px;
            border-radius: 18px 18px 0 18px;
            display: inline-block;
            text-align: left;
        }

    .message.system h3 {
        margin-top: 0;
        margin-bottom: 10px;
        font-size: 16px;
    }

.quick-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.option-btn {
    padding: 8px 15px;
    background-color: #f0f2f5;
    border: 1px solid #e0e5eb;
    border-radius: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    transition: all 0.2s;
}

    .option-btn:hover {
        background-color: #e6f0ff;
        border-color: #4a6cf7;
    }

.form-group {
    margin-bottom: 15px;
}

    .form-group label {
        display: block;
        margin-bottom: 5px;
        font-weight: 500;
    }

    .form-group input, .form-group select {
        width: 100%;
        padding: 10px;
        border: 1px solid #e0e5eb;
        border-radius: 5px;
    }

.tag-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 5px;
}

.tag {
    padding: 5px 12px;
    background-color: #f0f2f5;
    border-radius: 15px;
    font-size: 13px;
    cursor: pointer;
}

    .tag.selected {
        background-color: #e6f0ff;
        color: #4a6cf7;
        border: 1px solid #4a6cf7;
    }

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn {
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    border: none;
}

.btn-primary {
    background-color: #4a6cf7;
    color: white;
}

.btn-secondary {
    background-color: #f0f2f5;
    color: #333;
}

.btn-tertiary {
    background-color: white;
    color: #4a6cf7;
    border: 1px solid #4a6cf7;
}

.knowledge-upload {
    background-color: #f9fafc;
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px;
}

.upload-area {
    border: 2px dashed #e0e5eb;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    margin: 15px 0;
}

    .upload-area i {
        font-size: 40px;
        color: #aaa;
        margin-bottom: 10px;
    }

.btn-outline {
    background-color: white;
    border: 1px solid #4a6cf7;
    color: #4a6cf7;
    margin-top: 10px;
}

.online-resources {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.resource-option {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    border: 1px solid #e0e5eb;
    border-radius: 8px;
    cursor: pointer;
}

    .resource-option i {
        font-size: 24px;
        margin-bottom: 8px;
        color: #666;
    }

.agent-preview {
    display: flex;
    align-items: center;
    gap: 15px;
    background-color: #f9fafc;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
}

.agent-avatar {
    width: 50px;
    height: 50px;
    background-color: #e6f0ff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .agent-avatar i {
        font-size: 24px;
        color: #4a6cf7;
    }

.agent-info {
    flex: 1;
}

    .agent-info h4 {
        margin: 0 0 5px 0;
    }

    .agent-info p {
        margin: 0 0 10px 0;
        font-size: 14px;
        color: #666;
    }

.agent-tags {
    display: flex;
    gap: 5px;
}

.action-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.chat-input {
    padding: 15px;
    border-top: 1px solid #e0e5eb;
    display: flex;
    flex-direction: column;
}

    .chat-input textarea {
        width: 100%;
        padding: 12px;
        border: 1px solid #e0e5eb;
        border-radius: 8px;
        resize: none;
        height: 60px;
        margin-bottom: 10px;
    }

.input-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.send-btn {
    padding: 8px 20px;
    background-color: #4a6cf7;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.info-header {
    padding-bottom: 10px;
    border-bottom: 1px solid #e0e5eb;
    margin-bottom: 15px;
}

    .info-header h3 {
        margin: 0;
        font-size: 16px;
    }

.info-section {
    margin-bottom: 20px;
}

    .info-section h4 {
        font-size: 14px;
        margin: 0 0 10px 0;
        color: #666;
    }

.info-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
}

.label {
    color: #666;
}

.feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

    .feature-list li {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-bottom: 8px;
        font-size: 14px;
    }

        .feature-list li i {
            color: #4a6cf7;
        }

.suggestion-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 10px;
    background-color: #f0f2f5;
    padding: 10px;
    border-radius: 8px;
}

    .suggestion-item i {
        color: #f5a623;
        margin-top: 2px;
    }

    .suggestion-item p {
        margin: 0;
        font-size: 13px;
    }

/* 移动端响应式设计 */
.sidebar-toggle, .info-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #666;
}

@media (max-width: 1024px) {
    .chat-container {
        height: calc(100vh - 100px);
    }

    .chat-info {
        width: 240px;
    }
}

@media (max-width: 768px) {
    .chat-container {
        flex-direction: column;
        height: auto;
        min-height: calc(100vh - 100px);
    }

    .chat-sidebar {
        position: fixed;
        left: -250px;
        top: 60px;
        bottom: 0;
        z-index: 100;
        box-shadow: 2px 0 5px rgba(0,0,0,0.1);
    }

        .chat-sidebar.active {
            left: 0;
        }

    .chat-info {
        position: fixed;
        right: -280px;
        top: 60px;
        bottom: 0;
        z-index: 100;
        box-shadow: -2px 0 5px rgba(0,0,0,0.1);
    }

        .chat-info.active {
            right: 0;
        }

    .sidebar-toggle, .info-toggle {
        display: block;
    }

    .chat-header {
        padding: 10px 15px;
    }

    .chat-messages {
        padding: 15px;
    }

    .message {
        max-width: 95%;
    }

    .quick-options {
        flex-direction: column;
        gap: 8px;
    }

    .option-btn {
        width: 100%;
        justify-content: center;
    }

    .form-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .online-resources {
        flex-direction: column;
    }

    .action-buttons {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .chat-header h2 {
        font-size: 16px;
    }

    .header-actions {
        gap: 5px;
    }

    .action-btn {
        padding: 5px 8px;
        font-size: 12px;
    }

    .message.system h3 {
        font-size: 15px;
    }

    .tag-options {
        gap: 5px;
    }

    .tag {
        padding: 4px 8px;
        font-size: 12px;
    }
}

/* 移动端菜单覆盖层 */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0,0,0,0.5);
    z-index: 90;
}

    .overlay.active {
        display: block;
    }
