.rp-mask {
    position: fixed;
    inset: 0;
    z-index: 4000;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(12, 4, 6, 0.28);
}

.rp-mask.show {
    display: flex;
}

.rp-panel {
    position: relative;
    width: 100%;
    height: 33.34vh;
    overflow: hidden;
    border-radius: 0;
    box-shadow: 0 18px 40px rgba(80, 10, 16, 0.32);
    background:
        radial-gradient(ellipse at 50% 12%, rgba(255, 196, 92, 0.32) 0%, rgba(255, 196, 92, 0) 46%),
        linear-gradient(180deg, #5a1018 0%, #2a070c 100%);
}

.rp-spark {
    position: absolute;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #ffe7a8;
    box-shadow: 0 0 6px #ffd56a;
    animation: rp-twinkle 2.4s ease-in-out infinite;
    pointer-events: none;
}

.rp-close {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 5;
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    font-size: 18px;
    line-height: 28px;
    text-align: center;
}

.rp-fall {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.rp-fall.is-grab {
    pointer-events: auto;
}

.rp-pack {
    position: absolute;
    top: -64px;
    width: 36px;
    height: 44px;
    animation: rp-drop linear infinite;
    transform-origin: center;
}

.rp-pack-body {
    position: relative;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, #ff6b5a 0%, #e23b32 42%, #b51d24 100%);
    border-radius: 6px 6px 8px 8px;
    box-shadow:
        0 6px 12px rgba(120, 10, 16, 0.35),
        inset 0 1px 0 rgba(255, 226, 160, 0.55);
}

.rp-pack-body::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    border-left: 18px solid transparent;
    border-right: 18px solid transparent;
    border-top: 16px solid #ffd98a;
}

.rp-pack-body::after {
    content: "福";
    position: absolute;
    left: 50%;
    top: 56%;
    transform: translate(-50%, -50%);
    color: #ffe7a0;
    font-size: 13px;
    font-weight: 700;
}

.rp-stage {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 3;
    width: 90%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #fff;
}

.rp-hero {
    width: 56px;
    height: 70px;
    margin: 0 auto 8px;
    animation: rp-float 2.6s ease-in-out infinite;
    filter: drop-shadow(0 8px 12px rgba(255, 196, 92, 0.28));
}

.rp-hero .rp-pack-body {
    width: 56px;
    height: 70px;
    border-radius: 8px 8px 10px 10px;
}

.rp-hero .rp-pack-body::before {
    border-left-width: 28px;
    border-right-width: 28px;
    border-top-width: 24px;
}

.rp-hero .rp-pack-body::after {
    font-size: 22px;
}

.rp-title {
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 1px;
    background: linear-gradient(180deg, #fff6d4 0%, #f6c14b 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.rp-sub {
    margin-top: 4px;
    font-size: 12px;
    color: rgba(255, 236, 210, 0.86);
}

.rp-count {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 10px;
}

.rp-count span {
    min-width: 34px;
    padding: 4px 4px;
    border-radius: 8px;
    background: linear-gradient(180deg, rgba(255, 232, 170, 0.22), rgba(255, 255, 255, 0.08));
    border: 1px solid rgba(255, 214, 130, 0.45);
    color: #ffe7a8;
    font-size: 15px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.rp-hint {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 12px;
    z-index: 3;
    text-align: center;
    color: #ffe7a8;
    font-size: 13px;
    letter-spacing: 1px;
    animation: rp-pulse 1.6s ease-in-out infinite;
}

.rp-result {
    display: none;
    position: absolute;
    inset: 0;
    z-index: 6;
    background: rgba(12, 2, 4, 0.28);
}

.rp-result.show {
    display: block;
}

.rp-result-card {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 82%;
    padding: 16px 14px 12px;
    transform: translate(-50%, -50%) scale(0.92);
    border-radius: 14px;
    background:
        radial-gradient(circle at 50% 0, rgba(255, 214, 130, 0.35), transparent 46%),
        linear-gradient(180deg, #fff8ec 0%, #fff 100%);
    box-shadow: 0 10px 24px rgba(80, 10, 16, 0.22);
    text-align: center;
    animation: rp-pop 0.45s cubic-bezier(0.2, 1.4, 0.3, 1) forwards;
}

.rp-result-tag {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 16px;
    background: linear-gradient(135deg, #e4453a, #f37021);
    color: #fff;
    font-size: 11px;
}

.rp-result-money {
    margin: 8px 0 4px;
    color: #e4453a;
    font-size: 28px;
    font-weight: 800;
    line-height: 1;
}

.rp-result-money em {
    font-style: normal;
    font-size: 14px;
    margin-right: 2px;
}

.rp-result-desc {
    color: #888;
    font-size: 11px;
}

.rp-result-ok {
    margin-top: 10px;
    width: 100%;
    height: 32px;
    border: 0;
    border-radius: 16px;
    background: linear-gradient(135deg, #e4453a 0%, #f37021 100%);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
}

@keyframes rp-drop {
    0% { transform: translate3d(0, 0, 0) rotate(-12deg); opacity: 0; }
    8% { opacity: 1; }
    100% { transform: translate3d(10px, 36vh, 0) rotate(16deg); opacity: 0.9; }
}

@keyframes rp-float {
    0%, 100% { transform: translateY(0) rotate(-3deg); }
    50% { transform: translateY(-6px) rotate(3deg); }
}

@keyframes rp-twinkle {
    0%, 100% { opacity: 0.15; transform: scale(0.7); }
    50% { opacity: 1; transform: scale(1.3); }
}

@keyframes rp-pulse {
    0%, 100% { opacity: 0.7; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.04); }
}

@keyframes rp-pop {
    to { transform: translate(-50%, -50%) scale(1); }
}
