﻿/* ==========================================
   FLOATING ELEMENTS CONTAINER
   ========================================== */

.cny-floating-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

/* ==========================================
   YUANBAO DROP ANIMATION
   ========================================== */

.cny-yuanbao {
    position: absolute;
    top: -60px;
    width: 50px;
    height: 35px;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 30%, #FFD700 60%, #FFA500 100%);
    border-radius: 0% 0% 50% 50% / 0% 0% 50% 50%;
    box-shadow: 0 6px 12px rgba(255, 215, 0, 0.6), inset 0 -3px 8px rgba(0, 0, 0, 0.15), inset 0 2px 6px rgba(255, 255, 255, 0.4);
    animation: dropYuanbao linear forwards;
    pointer-events: none;
    z-index: 9999;
}

    .cny-yuanbao::before {
        content: '';
        position: absolute;
        top: -8px;
        left: 0;
        right: 0;
        height: 12px;
        background: linear-gradient(180deg, #FFA500 0%, #FFD700 100%);
        border-radius: 50% 50% 0% 0% / 100% 100% 0% 0%;
        box-shadow: inset 0 1px 3px rgba(255, 255, 255, 0.5);
    }

    .cny-yuanbao::after {
        content: '宝';
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        color: #8B0000;
        font-size: 13px;
        font-weight: bold;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    }

.cny-yuanbao-rain {
    position: absolute;
    top: -60px;
    width: 45px;
    height: 32px;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 30%, #FFD700 60%, #FFA500 100%);
    border-radius: 0% 0% 50% 50% / 0% 0% 50% 50%;
    box-shadow: 0 6px 12px rgba(255, 215, 0, 0.6), inset 0 -3px 8px rgba(0, 0, 0, 0.15), inset 0 2px 6px rgba(255, 255, 255, 0.4);
    animation: dropYuanbaoRain 6s linear forwards;
    cursor: pointer;
    z-index: 9999;
}

    .cny-yuanbao-rain::before {
        content: '';
        position: absolute;
        top: -8px;
        left: 0;
        right: 0;
        height: 12px;
        background: linear-gradient(180deg, #FFA500 0%, #FFD700 100%);
        border-radius: 50% 50% 0% 0% / 100% 100% 0% 0%;
        box-shadow: inset 0 1px 3px rgba(255, 255, 255, 0.5);
    }

    .cny-yuanbao-rain::after {
        content: '宝';
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        color: #8B0000;
        font-size: 12px;
        font-weight: bold;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    }

@keyframes dropYuanbao {
    0% {
        top: -60px;
        transform: rotate(0deg);
        opacity: 1;
    }

    100% {
        top: 100vh;
        transform: rotate(360deg);
        opacity: 0.8;
    }
}

@keyframes dropYuanbaoRain {
    0% {
        top: -60px;
        transform: rotate(0deg);
        opacity: 1;
    }

    100% {
        top: 100vh;
        transform: rotate(720deg);
        opacity: 0.6;
    }
}

/* Mobile - reduce yuanbao on smaller screens */
@media (max-width: 768px) {
    .cny-yuanbao,
    .cny-yuanbao-rain {
        width: 40px;
        height: 28px;
    }

        .cny-yuanbao::after,
        .cny-yuanbao-rain::after {
            font-size: 11px;
        }
}
