.chatbot-trigger {
    position: fixed;
    right: 0.7rem;
    /* 调整位置：位于屏幕下方的十分之一处 */
    bottom: 10%;
    /* 宽度再次放大：适配更大的图标 */
    width: 120px;
    /* 高度再次放大：适配更大的图标 */
    height: 120px;
    /*background: #409EFF;*/
    color: white;
    border-radius: 50%; /* 圆形图标 */
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    /*box-shadow: 0 4px 15px rgba(64, 158, 255, 0.4);*/
    z-index: 998; /* 低于float-box的z-index */
    transition: all 0.3s ease;
    /* 内边距 */
    padding: 25px;
}

/* 保留hover效果，适配紧凑尺寸 */
.chatbot-trigger:hover {
    /*background: #66b1ff;*/
    transform: scale(1.05);
}

.chatbot-trigger i {
    font-size: 24px;
}

/* 调整chatbot-icon样式 */
.chatbot-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: url('kftb.png') no-repeat center center;
    background-size: cover;
}

.chatbot-container {
    position: fixed;
    bottom: 100px;
    right: 180px;
    width: 380px;
    height: 500px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    overflow: hidden;
    display: none;
    flex-direction: column;
    transition: all 0.3s ease;
}

.chatbot-container.active {
    display: flex;
    width: 50%;
    height: 87%;
}

.chatbot-header {
    background: #409EFF;
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chatbot-header h3 {
    margin: 0;
    font-size: 18px;
}

.close-btn {
    cursor: pointer;
    font-size: 20px;
    font-weight: bold;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

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

.chatbot-container iframe {
    flex: 1;
    width: 100%;
    border: none;
}
/* 响应式设计 */
@media (max-width: 768px) {
    .home {
        padding: 15px;
    }

    .index-btn-box {
        grid-template-columns: 1fr;
    }

    .el-card__body {
        padding: 20px;
    }

    .chatbot-container {
        width: 50%;
        right: 10%;
        bottom: 80px;
        height: 87%;
    }

    .chatbot-trigger {
        bottom: 20px;
        right: 20px;
    }
}

/* 新增：控制栏（最小化+最大化图标） */
.chatbot-control-bar {
    height: 30px;
    background: #409EFF; /* 与触发按钮同色系，保持风格统一 */
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: flex-end; /* 图标靠右排列 */
    padding: 0 12px;
    cursor: pointer;
}

/* 控制栏图标样式：间距+ hover效果 */
/* 控制栏图标通用样式（适配Element图标和“口”字符） */
.chatbot-control-bar i,
.chatbot-control-bar .max-icon {
    font-size: 16px; /* 图标/字符大小统一 */
    margin-left: 16px; /* 图标间距不变 */
    transition: all 0.2s ease;
    /*font-weight: 500; !* 字符“口”加粗更清晰 *!*/
}

/* hover效果：统一放大反馈 */
.chatbot-control-bar i,
.chatbot-control-bar .max-icon {
    font-size: 16px; /* 图标/字符大小统一 */
    margin-left: 16px; /* 图标间距不变 */
    transition: all 0.2s ease;
    font-weight: 500; /* 字符“口”加粗更清晰 */
}

/* hover效果：统一放大反馈 */
.chatbot-control-bar i:hover,
.chatbot-control-bar .max-icon:hover {
    transform: scale(1.1);
}

/* iframe：占满容器，无边框 */
.chatbot-container iframe {
    width: 100%;
    height: calc(100% - 40px); /* 减去控制栏高度，避免溢出 */
    border: none; /* 清除iframe默认边框 */
}
.chatbot-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: url('kftb.png') no-repeat center center;
    background-size: cover;
}
