﻿* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Shabnam', sans-serif !important;
}
body {
    background-color: #f0f2f5;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    font-family: 'Shabnam', sans-serif !important;
}

.content-wrapper {
    background-color: #f9fafb;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 88px);
    width: 100vw;
/*    max-width : 450px;*/
    position: relative;
    background-image: url(../back.jpeg);
    background-size: auto;
    background-position : center
       
}

.container {
    text-align: center;
    padding: 2rem;
}

h1 {
    color: #1a1a1a;
    margin-bottom: 2rem;
}

.wheel-container {
    position: relative;
    width: 350px;
    height: 350px;
    margin: 0 auto 2rem;
}

#wheel {
    transition: transform 3s cubic-bezier(0.17, 0.67, 0.12, 0.99);
}

.wheel-pointer {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-top: 40px solid #ff4444;
    z-index: 2;
}

.spin-button {
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.2rem;
    border-radius: 5px;
    cursor: pointer;
}

.spin-button:hover {
}

.spin-button:disabled {
    cursor: not-allowed;
}



.confetti {
    position: absolute;
    background-color: #f00;
    opacity: 0.8;
    animation: fall linear forwards;
    z-index: 1000;
    transform-origin: center;
}

@keyframes fall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.8;
    }
    80% {
        opacity: 0.8;
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}


.wheel-container {
    position: relative;
    width: 350px;
    height: 565px;
    margin: 0 auto;
}

.wheel-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 350px;
    height: 565px;
    z-index: 3;
    background-image: url(/bag-cleared.png);
    background-size: contain;
    background-repeat: no-repeat;
}

    .wheel-background img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

.wheel-of-fortune {
    --_items: 12;
    all: unset;
    aspect-ratio: 1 / 1;
    container-type: inline-size;
    direction: ltr;
    display: grid;
    place-content: center start;
    clip-path: inset(0 0 0 0 round 50%);
    width: 295px;
    height: 295px;
    position: absolute;
    z-index: 2;
    top: 313px;
    left: 175px;
    transform: translate(-50%, -50%);
    transform-origin: center center;
}

.wheel-of-fortune::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: linear-gradient(145deg, #ff0000, #cc0000);
    border-radius: 50%;
    border: 1px solid #f7f04a;
    box-shadow: 
        inset -5px -5px 10px rgba(0,0,0,0.3),
        inset 5px 5px 10px rgba(255,255,255,0.2),
        0 0 10px rgba(0,0,0,0.3);
    z-index: 4;
}

    .wheel-of-fortune li {
        align-content: center;
        display: grid;
        font-size: clamp(7px, 5cqi, 15px);
        grid-area: 1 / -1;
        list-style: none;
        padding-left: 1ch;
        transform-origin: center right;
        width: 50cqi;
        height: calc((2 * pi * 50cqi) / var(--_items));
        clip-path: polygon(0% -2%, 100% 50%, 0% 102%);
        color: #ffffff;
        font-weight: bold;
        /* text-shadow: 
            -1px -1px 0 #000,
            1px -1px 0 #000,
            -1px 1px 0 #000,
            1px 1px 0 #000,
            0 0 4px rgba(0,0,0,0.8); */
        mix-blend-mode: difference;
        padding-right: 40px;
        padding-left: 10px;
        overflow: hidden;
        text-overflow: ellipsis;
        position: relative;
        background: linear-gradient(45deg, 
            rgba(255, 255, 255, 0.1),
            rgba(255, 255, 255, 0.2)
        );
        border: 1px solid rgba(255, 255, 255, 0.3);
        box-shadow: 
            inset 0 0 20px rgba(255, 255, 255, 0.2),
            0 0 10px rgba(0, 0, 0, 0.1);
        backdrop-filter: blur(2px);
        transition: all 0.3s ease;
    }

    .wheel-of-fortune li::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(
            135deg,
            rgba(255, 255, 255, 0.2) 0%,
            rgba(255, 255, 255, 0) 50%,
            rgba(255, 255, 255, 0.2) 100%
        );
        pointer-events: none;
    }

    .wheel-of-fortune li:hover {
        transform: scale(1.02);
        box-shadow: 
            inset 0 0 30px rgba(255, 255, 255, 0.3),
            0 0 15px rgba(0, 0, 0, 0.2);
    }

.wheel-pointer {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-top: 40px solid #ffd700;
    filter: drop-shadow(0 0 5px rgba(0,0,0,0.3));
    z-index: 3;
}

.spin-button {
    padding: 10px 20px;
    font-size: 18px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: absolute;
    bottom: 12px;
    left: 20px;
    background-image: url(/btnbag.png);
    height: 90px;
    width: 350px;
    z-index: 5;
    background-color: transparent;
    background-size: contain;
    background-repeat: no-repeat;
}

    .spin-button:hover {
        transform: scale(1.05);
    }
.result {
    margin-top: 20px;
    font-size: 24px;
    font-weight: bold;
    color: #333;
    padding: 5px;
    margin: 10px;
    border-radius: 20px;
    background-color: white;
    max-width: calc(100vw - 40px)
}

.wheel-result-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.backpack-container {
    position: relative;
    width: 350px;
    height: 600px;
    margin: auto;
}

.backpack {
    width: 100%;
    height: auto;
    display: block;
}

.bubble {
    position: absolute;
    background: white;
    padding: 10px 15px;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    animation: fadeIn 1s ease-out forwards, gentlePulse 2s ease-in-out infinite;
    opacity: 0;
    transform: scale(0.7);
    width: 123px;
    height: 123px;
    align-items: center;
    display: flex;
    z-index: 10;
    text-align: center;
    justify-content: center;
}
    /* استایل برای فلش‌ها */
    .bubble::after {
        content: '';
        position: absolute;
        width: 20px;
        height: 20px;
        background: white;
        transform: rotate(45deg);
        z-index: -1;
    }

/* تنظیم موقعیت فلش برای هر حباب */
.b1::after {
    bottom: -1px;
    left: 75%;
    margin-left: -10px;
    transform: rotate(99deg);
}

.b2::after {
    bottom: 4px;
    left: 16%;
    margin-left: -9px;
    transform: rotate(355deg);
    width: 25px;
    height: 25px;
}

.b3::after {
    left: -8px;
    top: 50%;
    margin-top: -10px;
}

.b4::after {
    left: 7px;
    top: 17%;
    margin-top: -10px;
    transform: rotate(90deg);
}

.b5::after {
    top: 15px;
    left: 88%;
    margin-left: -10px;
    transform: rotate(96deg);
}

.b6::after {
    right: -8px;
    top: 50%;
    margin-top: -10px;
}

/* مکان تقریبی حباب‌ها */
.b1 {
    top: 81px;
    left: 41px;
    width: 90px;
    animation-delay: 0.3s, 1.3s;
    height: 90px;
    line-height: 1.1;
    font-size: 12pt;
    font-weight: 600;
}

.b2 {
    top: 95px;
    right: 19px;
    animation-delay: 0.6s, 1.6s;
    width: 110px;
    height: 110px;
    font-size: 10pt;
    font-weight: 600;
    line-height: normal;
}

.b3 {
    top: 222px;
    right: -6px;
    animation-delay: 0.9s, 1.9s;
    width: 90px;
    height: 90px;
    line-height: 1;
    font-size: 11pt;
    font-weight: 600;
}

.b4 {
    bottom: 141px;
    right: 0px;
    animation-delay: 1.2s, 2.2s;
    width: 115px;
    height: 115px;
    font-size: 13pt;
    font-weight: 600;
    line-height: 1.2;
}

.b5 {
    bottom: 145px;
    left: 27px;
    animation-delay: 1.5s, 2.5s;
    width: 120px;
    height: 120px;
    font-weight: 900;
    font-size: 12pt;
}

.b6 {
    top: 223px;
    left: 26px;
    animation-delay: 1.8s, 2.8s;
    width: 100px;
    height: 100px;
    font-size: 11pt;
    line-height: normal;
    font-weight: 600;
}

/* انیمیشن نمایشی */
@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: scale(0.7) translateY(10px);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}


/* انیمیشن پالس ملایم */
@keyframes gentlePulse {
    0%, 100% {
        /*        transform: scale(1);*/
        opacity: 1;
        color: black
    }

    50% {
/*        transform: scale(1.03);*/
        opacity: 0.90;
        color:#01260f
    }
}

/* تنظیم تاخیرهای انیمیشن برای هر حباب */
.b1 {
    animation-delay: 0.3s, 1.3s; /* تاخیر برای fadeIn و سپس gentlePulse */
}

.b2 {
    animation-delay: 0.6s, 1.6s;
}

.b3 {
    animation-delay: 0.9s, 1.9s;
}

.b4 {
    animation-delay: 1.2s, 2.2s;
}

.b5 {
    animation-delay: 1.5s, 2.5s;
}

.b6 {
    animation-delay: 1.8s, 2.8s;
}

/* تنظیم تاخیرهای انیمیشن برای هر حباب */
.b1 {
    animation-delay: 0.3s, 1.3s; /* تاخیر برای fadeIn و سپس gentlePulse */
}

.b2 {
    animation-delay: 0.6s, 1.6s;
}

.b3 {
    animation-delay: 0.9s, 1.9s;
}

.b4 {
    animation-delay: 1.2s, 2.2s;
}

.b5 {
    animation-delay: 1.5s, 2.5s;
}

.b6 {
    animation-delay: 1.8s, 2.8s;
}
/* انیمیشن شناور شدن */
/*@keyframes float {
    0%, 100% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(-10px) scale(1.02);
    }
}*/