﻿.lottery-modal {
    display: none;
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.75);
    z-index: 999999;
    align-items: center;
    justify-content: center;
}

.lottery-container {
    width: 90%;
    max-width: 380px;
    background: linear-gradient(#ff6a00, #ff4444);
    border-radius: 20px;
    padding: 25px 20px;
    position: relative;
    box-shadow: 0 0 20px rgba(0,0,0,0.3);
    z-index: 1000000;
}

.lottery-title {
    text-align: center;
    color: #fff;
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 20px;
    letter-spacing: 1px;
}

.lottery-end {
    text-align: left;
    color: #fff;
    font-size: 9px;
    font-weight: bold;
    margin-top: 25px;
    letter-spacing: 1px;
}


.close-lottery {
    position: absolute;
    right: -10px;
    top: -10px;
    width: 36px;
    height: 36px;
    background: #fff;
    color: #ff4444;
    border-radius: 50%;
    text-align: center;
    line-height: 36px;
    font-size: 20px;
    cursor: pointer;
    z-index: 10;
}

#redPacketRain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10000005 !important;
    display: none;
}

.red-packet {
    position: absolute;
    width: 36px;
    height: 46px;
    background: #e64340;
    border-radius: 4px;
    color: #fff;
    text-align: center;
    line-height: 46px;
    font-size: 14px;
    animation: fall linear infinite;
}

@keyframes fall {
    0% {
        transform: translateY(-80px) rotate(0deg);
        opacity: 1;
    }

    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

/* ========================= 【绝对完美扇形】6等分 无缺口 无边不齐 ========================= */
.lottery-wrap {
    width: 320px;
    height: 320px;
    margin: 0 auto;
    position: relative;
    z-index: 1000001;
}

.lottery-border {
    width: 100%;
    height: 100%;
    background: #fff;
    border-radius: 50%;
    padding: 10px;
    box-shadow: 0 0 0 4px #ffc896;
}

.lottery-bg {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    position: relative;
    overflow: hidden;
}

.lottery-wheel {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    transition: transform 4s cubic-bezier(0.17,0.67,0.12,0.99);
    position: relative;
}

.lottery-item {
    position: absolute;
    width: 50%;
    height: 50%;
    left: 50%;
    top: 0;
    transform-origin: left bottom;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    font-size: 13px;
    color: #c0392b;
    font-weight: bold;
    overflow: hidden;
}

    .lottery-item:nth-child(1) {
        transform: rotate(0deg);
    }

    .lottery-item:nth-child(2) {
        transform: rotate(60deg);
    }

    .lottery-item:nth-child(3) {
        transform: rotate(120deg);
    }

    .lottery-item:nth-child(4) {
        transform: rotate(180deg);
    }

    .lottery-item:nth-child(5) {
        transform: rotate(240deg);
    }

    .lottery-item:nth-child(6) {
        transform: rotate(300deg);
    }

.item-odd {
    background: #ffb780;
}

.item-even {
    background: #fff5e6;
}

.prize-icon {
    width: 32px;
    height: 32px;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-redpacket {
    background: #e64340;
    border-radius: 5px;
    color: #fff;
    font-size: 14px;
}

.icon-coin {
    background: #ffd700;
    border-radius: 50%;
    color: #b8860b;
    font-size: 14px;
}

.icon-scroll {
    background: #ff6a00;
    border-radius: 5px;
    color: #fff;
    font-size: 14px;
}

.icon-ticket {
    background: #2ecc71;
    border-radius: 5px;
    color: #fff;
    font-size: 14px;
}

.lottery-pointer {
    position: absolute;
    left: 50%;
    top: 15px;
    transform: translateX(-50%);
    z-index: 10;
    width: 0;
    height: 0;
    border-left: 18px solid transparent;
    border-right: 18px solid transparent;
    border-top: 35px solid #e64340;
}

.lottery-btn {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%,-50%);
    width: 100px;
    height: 100px;
    background: radial-gradient(#ff6a00,#e64340);
    border-radius: 50%;
    color: #fff;
    text-align: center;
    z-index: 5;
    cursor: pointer;
    box-shadow: 0 3px 15px rgba(230,67,64,0.5);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

    .lottery-btn.disabled {
        background: #999 !important;
        cursor: not-allowed;
    }

    .lottery-btn .text1 {
        font-size: 22px;
        font-weight: bold;
    }

    .lottery-btn .text2 {
        font-size: 14px;
        margin-top: 5px;
    }

/* 中奖红包弹窗 */
.redpacket-modal {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 10000000 !important;
    display: none;
    align-items: center;
    justify-content: center;
}

.rp-box {
    width: 320px;
    background: linear-gradient(to bottom, #ff4444, #ff6a00);
    border-radius: 16px;
    padding: 0 20px 30px;
    position: relative;
}

.rp-close {
    position: absolute;
    left: 50%;
    bottom: -40px;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #666;
    cursor: pointer;
}

.rp-card {
    background: linear-gradient(to bottom, #fff9e6, #fff5cc);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    position: relative;
    top: -20px;
}

.rp-top-title {
    background: linear-gradient(to right, #ff4444, #ff6a00);
    color: #fff;
    font-size: 20px;
    font-weight: bold;
    padding: 12px 0;
    border-radius: 8px 8px 0 0;
    margin: -20px -20px 20px;
    white-space: nowrap;
    overflow: visible;
    letter-spacing: 2px;
}

.rp-amount {
    font-size: 60px;
    color: #ff4444;
    font-weight: bold;
}

.rp-unit {
    font-size: 24px;
    color: #ff4444;
}

.rp-subtitle {
    color: #ff4444;
    font-size: 18px;
    margin-bottom: 20px;
}

.rp-desc {
    color: #333;
    font-size: 16px;
    margin-bottom: 30px;
}

.rp-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(to bottom, #ffd780, #ffb740);
    color: #ff4444;
    border: none;
    border-radius: 25px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
}
