/* popup.css - 红包弹窗样式 */
.redpacket-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0.3s, opacity 0.3s ease;
}

.redpacket-overlay.active {
    visibility: visible;
    opacity: 1;
}

.redpacket-container {
    position: relative;
    width: 90%;
    max-width: 500px;
    transform: scale(0.92);
    transition: transform 0.35s ease;
}

.redpacket-overlay.active .redpacket-container {
    transform: scale(1);
}

.redpacket-image {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 16px;
    box-shadow: 0 20px 35px rgba(0, 0, 0, 0.3);
    cursor: pointer;
}

.redpacket-close {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 38px;
    height: 38px;
    background: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    color: #bd0e2d;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
    border: 2px solid #fff;
}

.redpacket-close:hover {
    background: #bd0e2d;
    color: white;
}

@media (max-width: 640px) {
    .redpacket-container {
        max-width: 85%;
    }
    .redpacket-close {
        width: 34px;
        height: 34px;
        font-size: 22px;
        top: -12px;
        right: -12px;
    }
}

body.redpacket-modal-open {
    overflow: hidden !important;
}