.ba-wrapper {
    position: relative;          /* 关键：参与正常文档流，后续内容尊重其高度 */
    width: 100%;
    overflow: hidden;
    user-select: none;
    background: #000;            /* 加载前占位防白屏 */
    margin-bottom: 2rem;         /* 安全间距，防止紧贴下方内容，可调或删 */
}

.ba-image {
    position: absolute;
    inset: 0;
}

.ba-img {
    width: 100%    !important;
    height: 100%   !important;
    object-fit: cover;
    display: block;
    object-position: left center; /* 从左对齐，右边剪裁 */
}

.ba-after {
    z-index: 1;
}

.ba-before {
    z-index: 2;
    overflow: hidden;
}

.ba-before-clip {
    position: relative;
    width: 50%;                  /* JS 动态修改 */
    height: 100%;
    overflow: hidden;
}

.ba-handle {
    position: absolute;
    top: 0;
    left: 50%;
    width: 4px;
    height: 100%;
    background: #ffffff;
    transform: translateX(-50%);
    cursor: col-resize;
    z-index: 10;
}

.ba-handle::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 32px;
    height: 32px;
    background: #ffffff;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
}

.ba-label {
    position: absolute;
    top: 12px;
    padding: 5px 12px;
    font-size: 13px;
    font-weight: bold;
    background: rgba(0,0,0,0.7);
    color: #ffffff;
    z-index: 20;
    pointer-events: none;
    border-radius: 4px;
}

.ba-label-before {
    left: 12px;
}

.ba-label-after {
    right: 12px;
}

/* 手机端小屏调整 */
@media (max-width: 600px) {
    .ba-label {
        font-size: 11px;
        padding: 4px 8px;
    }
    .ba-handle::before {
        width: 26px;
        height: 26px;
    }
}