/* 红包墙容器 */
.packet-wall {
    flex: 1;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 30px;
    border: 1px solid rgba(244, 208, 63, 0.1);
    position: relative;
    overflow: hidden;
    perspective: 1000px;
}

/* 红包单体样式 */
.packet-item {
    position: absolute;
    width: 160px;
    height: 210px;
    transform-style: preserve-3d;
    /* 统一使用 transition 控制所有状态变化，1.5s 平滑过渡 */
    transition: transform 1.5s cubic-bezier(0.34, 1.56, 0.64, 1), filter 1s ease, opacity 1s ease;
    will-change: transform;
    cursor: default;
    user-select: none;
    z-index: 10;
    left: 0;
    top: 0;
    transform-origin: center center;
}

/* 结果窗面 */
.packet-face {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    overflow: hidden;
    background: #cf2d2d; /* 基础底色 */
    background-image: 
        url('../../assets/watermark_fu.svg'),
        linear-gradient(180deg, #e74c3c 0%, #c0392b 100%);
    background-repeat: no-repeat, no-repeat;
    background-position: center, center;
    background-size: 80%, cover;
    background-blend-mode: overlay;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 10px;
    color: #ffd700;
    border: none; /* 去掉黄色边框 */
}

.packet-face::before {
    content: '';
    width: 100%;
    height: 20px; /* 减小顶部占位高度，让内容上移 */
    margin-bottom: 0;
}

.packet-amount {
    font-size: 42px;
    font-weight: bold;
    font-family: "Microsoft YaHei", sans-serif;
    margin-bottom: 5px; /* 减小间距 */
    color: #f4d03f;
    display: flex;
    align-items: baseline;
    margin-top: 0; /* 移除 margin-top，配合 before 的高度减小实现上移 */
}

.packet-amount::before {
    content: '¥';
    font-size: 20px;
    margin-right: 4px;
    font-weight: bold;
}

.packet-name {
    font-size: 16px;
    font-weight: bold;
    color: #fff;
    background: linear-gradient(90deg, transparent, rgba(244, 208, 63, 0.3), transparent);
    padding: 4px 20px;
    border-top: 1px solid rgba(244, 208, 63, 0.5);
    border-bottom: 1px solid rgba(244, 208, 63, 0.5);
    margin-bottom: 5px; /* 减小间距，使其上移 */
}

.packet-tips {
    margin-top: 10px; /* 从 margin-top: auto 改为固定值，使其紧跟在姓名下方 */
    font-size: 12px;
    color: #f4d03f;
    font-weight: bold;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* 底部云纹装饰 */
.packet-face::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 30px;
    background: url('../../assets/bottom_decor.svg') no-repeat bottom center;
    background-size: cover;
    opacity: 0.6;
    pointer-events: none;
}

/* 动画状态 */
.packet-hero {
    z-index: 9999 !important;
    filter: drop-shadow(0 0 30px rgba(255, 215, 0, 0.6));
}

.packet-settled {
    z-index: 100;
}

.packet-blur {
    z-index: 1;
    filter: blur(2px) grayscale(0.3) brightness(0.8);
    opacity: 0.7;
}


.packet-blur {
    z-index: 1;
    filter: blur(2px) grayscale(0.3) brightness(0.8);
    opacity: 0.7;
}

/* 粒子特效 */
.particle {
    position: absolute;
    width: 8px;
    height: 8px;
    background: #ffd700;
    border-radius: 50%;
    pointer-events: none;
    animation: particleFly 1s ease-out forwards;
}

@keyframes particleFly {
    0% { transform: translate(0, 0) scale(1); opacity: 1; }
    100% { transform: translate(var(--tx), var(--ty)) scale(0); opacity: 0; }
}
