.lucky-spin-container {
    max-width: 700px;
    margin: 0 auto;
    padding: 20px
}

.frame-container {
    position: relative;
    width: 700px;
    height: 700px;
    margin: 0 auto
}

.wheel-frame {
    position: absolute;
    bottom: 185px;
    left: 35px;
    width: 90%;
    height: 90%;
    z-index: 5
}

.wheel-container {
    position: relative;
    width: 400px;
    height: 400px;
    margin: 40px auto;
    z-index: 2
}

.wheel {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    position: relative;
    overflow: hidden;
    transition: transform 8s cubic-bezier(.32, .94, .6, 1);
    box-shadow: 0 0 15px rgb(0 0 0 / .3);
    border: 5px solid #fff;
    will-change: transform
}

.wheel-item {
    position: absolute;
    width: 50%;
    height: 50%;
    transform-origin: bottom right;
    left: 0;
    top: 0;
    clip-path: polygon(100% 0, 100% 100%, 0 0);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    transform: rotate(calc(var(--index) * (-360deg / var(--total))));
    border: 1px solid rgb(255 255 255 / .5)
}

.prize-name,
.prize-value {
    position: absolute;
    width: 120px;
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    text-shadow: 1px 1px 2px rgb(0 0 0 / .7);
    transform: rotate(calc(0deg - (360deg / var(--total)) / 2))
}

.prize-name {
    position: absolute;
    width: 120px;
    text-align: center;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    text-shadow: 1px 1px 2px rgb(0 0 0 / .7);
    transform: rotate(calc(0deg - (360deg / var(--total)) / 2));
    top: 20px;
    left: 75px;
    display: flex;
    flex-direction: column;
    align-items: center
}

.prize-image {
    max-width: 50px;
    max-height: 50px;
    margin-top: 8px;
    object-fit: contain
}

.prize-value {
    top: 120px;
    left: 50px;
    font-size: 12px
}

.wheel-pointer {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 25px solid #fff0;
    border-right: 25px solid #fff0;
    border-top: 45px solid #333;
    z-index: 2;
    filter: drop-shadow(0 0 5px rgb(0 0 0 / .3))
}

.spin-button {
    position: absolute;
    bottom: -70px;
    left: 50%;
    transform: translateX(-50%);
    padding: 15px 30px;
    font-weight: 700;
    font-size: 18px;
    cursor: pointer;
    transition: background-color 0.3s
}

.spin-button:hover {
    background-color: #27ae60
}

.hidden {
    display: none
}

@media (max-width:768px) {
    .lucky-spin-container {
        padding: 10px 0;
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center
    }

    .frame-container {
        position: relative;
        width: 100%;
        height: auto;
        display: flex;
        justify-content: center;
        align-items: center;
        left: 0
    }

    .wheel-frame {
        position: absolute;
        width: 450px;
        height: 450px;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        background-size: contain
    }

    .wheel-container {
        width: 300px;
        height: 300px;
        margin: 0 auto;
        position: relative;
        left: 0;
        right: 0
    }

    .prize-name {
        font-size: 12px;
        top: 15px;
        left: 60px;
        width: 80px
    }

    .prize-image {
        max-width: 30px;
        max-height: 30px
    }

    .wheel-pointer {
        border-left: 20px solid #fff0;
        border-right: 20px solid #fff0;
        border-top: 35px solid #333
    }

    .spin-button {
        bottom: -50px;
        padding: 10px 20px;
        font-size: 14px
    }
}

@keyframes pointerBounce {

    0%,
    100% {
        transform: translateX(-50%) translateY(0)
    }

    50% {
        transform: translateX(-50%) translateY(-5px)
    }
}

.wheel-pointer {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 25px solid #fff0;
    border-right: 25px solid #fff0;
    border-top: 45px solid #333;
    z-index: 2;
    filter: drop-shadow(0 0 5px rgb(0 0 0 / .3))
}

.wheel.spinning+.wheel-pointer {
    animation: pointerBounce 0.5s ease-in-out infinite
}