.reward {
    padding: 5px 0;
    position: relative; /* 相对定位 */
}

.reward .reward-notice {
    font-size: 14px;
    line-height: 14px;
    margin: 15px auto;
    text-align: center;
}

.reward .reward-button {
    background-color: #d22d3f;
    border-radius: 50%;
    line-height: 70px;
    position: relative;
    display: block;
    width: 70px;
    margin: 0 auto;
    padding: 0;
    text-align: center;
    vertical-align: middle;
    color: #fff !important;
}

.reward .reward-code {
    position: absolute;
    top: -220px;
    left: 50%;
    display: none;
    width: 350px;
    height: 220px;
    transform: translateX(-50%); /* 居中 */
    padding: 15px;
    border: 1px solid #e6e6e6;
    background: #fff;
    box-shadow: 0 1px 1px 1px #efefef;
    z-index: 1000;
    box-sizing: border-box;
}

.reward .reward-button:hover .reward-code {
    display: block;
}

.reward .reward-code span {
    display: inline-block;
    width: 150px;
    height: 150px;
    box-sizing: border-box;
}

.reward .reward-code span.alipay-code {
    float: left;
}

.reward .reward-code span.alipay-code a {
    padding: 0;
}

.reward .reward-code span.wechat-code {
    float: right;
}

.reward .reward-code img {
    display: inline-block;
    float: left;
    width: 100%;
    height: 100%;
    margin: 0 auto;
    border: 0;
    object-fit: cover;
}

.reward .reward-code b {
    font-size: 16px;
    line-height: 29px;
    display: block;
    margin: 0;
    text-align: center;
    color: #666;
    clear: both;
    padding-top: 10px;
}

.reward .reward-code b.notice {
    line-height: 2rem;
    margin-top: -1rem;
    color: #999;
}

.reward .reward-code:after,
.reward .reward-code:before {
    position: absolute;
    content: '';
    border: 10px solid transparent;
}

.reward .reward-code:after {
    bottom: -19px;
    left: 50%;
    margin-left: -10px;
    border-top-color: #fff;
}

.reward .reward-code:before {
    bottom: -20px;
    left: 50%;
    margin-left: -10px;
    border-top-color: #e6e6e6;
}

/* 手机端适配优化 */
@media (max-width: 768px) {
    .reward .reward-code {
        position: absolute;
        top: -220px;
        left: 50%;
        width: calc(100vw - 40px);
        max-width: 350px;
        height: auto;
        min-height: 220px;
        transform: translateX(-50%);
        padding: 10px;
        box-sizing: border-box;
    }
    
    .reward .reward-code span {
        width: calc(50% - 8px);
        height: auto;
        min-height: 140px;
        margin: 0 4px;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .reward .reward-code img {
        width: 100%;
        height: auto;
        max-height: 160px;
        object-fit: contain;
        margin-bottom: 5px;
    }
    
    .reward .reward-code b {
        font-size: 18px;
        line-height: 1.4;
        margin: 0;
        padding: 0;
        text-align: center;
        color: #666;
    }
    
    .reward .reward-code:after {
