.redpacket-mask {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, .7);
    z-index: 1499;
    display: none
}

.prize-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    padding: 30px 40px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, .2);
    z-index: 100;
    text-align: center
}

.prize-modal #prize-info {
    font-size: 18px;
    color: #333;
    margin-bottom: 20px;
    line-height: 1.5
}

.prize-modal #closePrizeModal {
    padding: 8px 24px;
    background-color: #ff0d00;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color .2s ease
}

.prize-modal #closePrizeModal:hover {
    background-color: #e00b00
}

.close-redpacket {
    position: absolute;
    background-size: contain;
    top: 125px;
    right: 70px;
    width: 28px;
    height: 28px;
    cursor: pointer
}

.close-redpacket:hover {
    color: #fdd
}

.redpacket-open {
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 1500;
    transform: translate(-50%, -50%);
    background: url("../red/red_bga.png") no-repeat center;
    background-size: contain;
    width: 569px;
    height: 563px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 76px;
    background-position-x: -5px;
}

.redpacket-title {
    font-size: 22px;
    color: #fff;
    font-weight: 600;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, .2);
    margin: 56px 0 4px 0;
}

.redpacket-content {
    text-align: center;
    width: 100%;
    line-height: 16px;
}

.redpacket-content p:first-child {
    font-size: 20px;
    color: #3f3f3f;
    margin: 0 0 10px 0
}

.amount-wrap {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 8px
}

.amount-num {
    font-size: 40px;
    color: #ffffff;
    font-weight: 700;
    line-height: 1;
}

.amount-unit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    color: #000000;
    font-weight: 600;
    width: 36px;
    height: 36px;
    background-color: #f2d039;
    border-radius: 50%;
    line-height: 1;
    align-self: flex-end;
    margin-bottom: 2px;
}

.redpacket-info {
    color: #fff;
    font-size: 14px;
    text-align: center;
    width: 65%;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .2);
    margin-bottom: 4px
}

.redpacket-info p {
    line-height: 18px;
    margin-bottom: 4px;
    margin-top: 0
}

@keyframes breath {
    0% {
        transform: scale(1)
    }

    50% {
        transform: scale(1.1)
    }

    100% {
        transform: scale(1)
    }
}

.redpacket-btna {
    width: 94px;
    height: 94px;
    background: url(../red/red_btna.png) no-repeat center;
    cursor: pointer;
    background-size: contain;
    transform-origin: center center;
    animation: breath 1.5s linear infinite;
    transition: all .3s ease
}
.redpacket-btns {
    width: 160px;
    height: 98px;
    background: url(../red/red_btns.png) no-repeat center;
    cursor: pointer;
    background-size: contain;
    transform-origin: center center;
    animation: breath 1.5s linear infinite;
    transition: all .3s ease
}

.redpacket-ok {
    width: 160px;
    height: 98px;
    background: url(../red/red_ok.png) no-repeat center;
    cursor: pointer;
    background-size: contain;
    transform-origin: center center;
    animation: breath 1.5s linear infinite;
    transition: all .3s ease
}

.redpacket-btn:hover {
    animation: none;
    transform: scale(1.1)
}

.redpacket-btn:active {
    transform: scale(.95)
}

.redpacket-countdown {
    font-size: 16px;
    color: #fff;
    font-weight: 600;
    text-align: center;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .2)
}

.redpacket-content p:first {
    cursor: pointer
}

.redpacket-content p:first[title] {
    text-decoration: underline dotted #ff0d00
}

@keyframes flash {
    0% {
        opacity: 1
    }

    50% {
        opacity: .5
    }

    100% {
        opacity: 1
    }
}

.user-name-toggle {
    text-decoration: underline dotted #ff0d00;
    transition: color .3s ease
}

.prize-modal,
.redpacket-mask {
    display: none
}

.redpacket-open.run-animation {
    animation-name: redpacketMoveToFloat;
    animation-duration: 2s;
    animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    animation-fill-mode: forwards;
    will-change: transform, opacity
}

.redpacket-open.restore-animation {
    animation-name: redpacketRestore;
    animation-duration: 1.5s;
    animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    animation-fill-mode: forwards;
    will-change: transform, opacity
}

.redpacket-open.restore-animation,
.redpacket-open.run-animation {
    animation-duration: var(--animation-duration, 2s);
    animation-fill-mode: forwards
}

#redpacketFloatIcon {
    background-color: #3b3b3b26;
    color: #fff;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    width: var(--service-icon-size);
    height: var(--service-icon-size);
    border-radius: 50%;
    transition: all .3s ease
}

#redpacketFloatIcon.show {
    display: flex !important;
    animation: breath 1.5s linear infinite
}

#redpacketFloatIcon:hover {
    background-color: #f30;
    transform: scale(1.05)
}

.red_ico {
    width: 40px;
    height: 40px;
    background: url(../red/red_ico.png) no-repeat center;
    background-size: contain
}
.redpacket-infos {
    color: #fff;
    font-size: 14px;
    margin-top: 10px;
}