 /* --- 核心代码开始 --- */

        /* 1. 悬浮容器 */
        .cs-float-widget {
            position: fixed;
            top: 50%; /* 垂直居中 */
            right: 0;
            transform: translateY(-50%); /* 修正垂直居中偏移 */
            z-index: 9999; /* 保证在最上层 */
            font-family: Arial, sans-serif;
        }

        /* 2. 触发按钮（客服图标） */
        .cs-trigger-btn {
            width: 60px;
            height: 120px;
            background-color: #065cad; /* 微信绿 */
            color: #fff;
            text-align: center;
            cursor: pointer;
            border-top-left-radius: 5px;
            border-bottom-left-radius: 5px;
            box-shadow: -2px 2px 10px rgba(0,0,0,0.1);
            float: right; /* 让按钮靠右 */
            position: relative;
            z-index: 2;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            transition: background-color 0.3s;
        }

        .cs-trigger-btn:hover {
            background-color: #004494;
        }

        /* 按钮内的文字和图标 */
        .cs-icon-text {
            writing-mode: vertical-rl; /* 竖排文字 */
            letter-spacing: 4px;
            font-size: 16px;
            font-weight: bold;
        }
        
        .cs-arrow-icon {
            margin-bottom: 5px;
            font-size: 12px;
            transition: transform 0.3s;
        }

        /* 当面板打开时，箭头旋转 */
        .cs-open .cs-arrow-icon {
            transform: rotate(180deg);
        }

        /* 3. 二维码面板 */
        .cs-qr-panel {
            float: right; /* 浮动在按钮左侧 */
            width: 200px;
            background: #fff;
            padding: 15px;
            box-sizing: border-box;
            border-radius: 5px 0 0 5px;
            box-shadow: -2px 2px 10px rgba(0,0,0,0.1);
            margin-right: -200px; /* 默认隐藏（向右偏移自身宽度） */
            transition: margin-right 0.3s ease-in-out; /* 动画效果 */
            position: relative;
            z-index: 1;
            text-align: center;
        }

        /* 打开状态：面板归位 */
        .cs-float-widget.active .cs-qr-panel {
            margin-right: 0;
        }

        .cs-qr-panel h4 {
            margin: 0 0 10px 0;
            font-size: 16px;
            color: #333;
        }

        .cs-qr-panel img {
            width: 100%;
            height: auto;
            display: block;
        }

        .cs-qr-panel p {
            margin: 10px 0 0 0;
            font-size: 12px;
            color: #999;
        }
        
        /* 关闭按钮（仅在小屏幕或需要强制关闭时使用） */
        .cs-close-btn {
            position: absolute;
            top: 5px;
            right: 5px;
            cursor: pointer;
            color: #999;
            font-size: 14px;
            line-height: 1;
        }
        .cs-close-btn:hover {
            color: #333;
        }
        @media (max-width: 768px) {
            #csWidget{
                display: none;
            }
        }
        /* --- 核心代码结束 --- */