/**
 * RiPro-V2 会员开通弹幕样式
 */
#zpro-barrage {
    position: fixed;
    z-index: 9998;
    display: flex;
    flex-direction: column;
    gap: 9px;
    max-width: min(430px, 86vw);
    pointer-events: none;
}

#zpro-barrage.zp-bottom-right {
    right: 18px;
    bottom: 18px;
    align-items: flex-end;
}

#zpro-barrage.zp-bottom-left {
    left: 18px;
    bottom: 18px;
    align-items: flex-start;
}

#zpro-barrage.zp-top-right {
    right: 18px;
    top: 78px;
    align-items: flex-end;
}

#zpro-barrage.zp-top-left {
    left: 18px;
    top: 78px;
    align-items: flex-start;
}

#zpro-barrage .zp-barrage-item {
    pointer-events: auto;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    max-width: 100%;
    padding: 4px 13px 4px 4px;
    border-radius: 999px;
    background-color: #d8f3d8;
    color: #3d3d3d;
    font-size: 13px;
    line-height: 1.45;
    text-align: left;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transform: translateX(14px);
    transition: opacity 0.45s ease, transform 0.45s ease;
    will-change: opacity, transform;
    cursor: default;
}

#zpro-barrage .zp-barrage-item.zp-in {
    opacity: 1;
    transform: translateX(0);
}

#zpro-barrage .zp-barrage-item.zp-link {
    cursor: pointer;
}

#zpro-barrage .zp-barrage-item.zp-link:hover {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.16);
}

#zpro-barrage .zp-barrage-avatar {
    width: 27px;
    height: 27px;
    flex: 0 0 27px;
    border-radius: 50%;
    background: #fff;
    object-fit: cover;
    display: block;
}

#zpro-barrage .zp-barrage-user {
    flex: 0 0 auto;
    font-weight: 700;
    color: #b4282d;
    max-width: 45%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

#zpro-barrage .zp-barrage-text {
    flex: 0 1 auto;
    min-width: 0;
    max-width: 300px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

#zpro-barrage .zp-barrage-time {
    flex: 0 0 auto;
    font-size: 12px;
    color: rgba(0, 0, 0, 0.45);
    white-space: nowrap;
}

#zpro-barrage .zp-barrage-close {
    pointer-events: auto;
    position: absolute;
    top: -10px;
    right: -10px;
    width: 20px;
    height: 20px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
    font-size: 14px;
    line-height: 20px;
    text-align: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease;
}

#zpro-barrage:hover .zp-barrage-close {
    opacity: 1;
}

/* 手机端：上移避开底部固定栏，整体缩小 */
@media screen and (max-width: 768px) {
    #zpro-barrage {
        max-width: 80vw;
        gap: 7px;
    }

    #zpro-barrage.zp-bottom-right,
    #zpro-barrage.zp-bottom-left {
        bottom: 86px;
    }

    #zpro-barrage.zp-bottom-right,
    #zpro-barrage.zp-top-right {
        right: 10px;
    }

    #zpro-barrage.zp-bottom-left,
    #zpro-barrage.zp-top-left {
        left: 10px;
    }

    #zpro-barrage .zp-barrage-item {
        font-size: 12px;
        padding: 3px 10px 3px 3px;
        gap: 6px;
    }

    #zpro-barrage .zp-barrage-avatar {
        width: 23px;
        height: 23px;
        flex-basis: 23px;
    }

    #zpro-barrage .zp-barrage-text {
        max-width: 62vw;
    }

    #zpro-barrage .zp-barrage-time {
        font-size: 11px;
    }
}
