*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
.container{
    width: 100%;
    height: 100vh;
    background-color: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}
.background{
    position: relative;
    width: 500px;
    min-width: 500px;
    max-width: 500px;
    height: 100vh;
    background-color: #000;
    overflow: hidden;
}
.background img{
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.main-content{
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    overflow: hidden;
}
.logo{
    position: absolute;
    top: 5%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    max-width: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
}
.logo img{
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.text{
    position: absolute;
    top: 14%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    max-width: 350px;
    display: flex;
    justify-content: center;
    align-items: center;
}
.text img{
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.prizetext{
    position: absolute;
    top: 22%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    max-width: 300px;
    display: flex;
    animation: zoomInOut 2s ease-in-out infinite;
}
.prizetext img{
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@keyframes zoomInOut {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.1);
    }
}
.spin{
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    max-width: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
}
.spin{
    transform-origin: center center;
}
.spin img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 2.5s cubic-bezier(0.17, 0.67, 0.12, 0.99);
    transform-origin: center center;
    transform: rotate(0deg);
}
.pointer{
    position: absolute;
    top: 48.5%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    max-width: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
}
.pointer img{
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.character{
    position: absolute;
    top: 84.5%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    max-width: 240px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}
.character img{
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.bgbutton{
    position: absolute;
    bottom: 5%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    max-width: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
}
.bgbutton img{
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.buttuns{
    position: absolute;
    bottom: 6.5%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    max-width: 250px;

    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}
.buttuns img{
    width: 100%;
    max-width: 40px;
    height: 100%;
    object-fit: cover;
}
.playButton{
    position: absolute;
    bottom: 0%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    max-width: 100px;
    display: flex;
}
.playButton{
    cursor: pointer;
    transition: transform 0.2s;
}
/* .playButton:hover{
    transform: translate(-50%, -50%) scale(1.05);
}
.playButton:active{
    transform: translate(-50%, -50%) scale(0.95);
} */
.playButton img{
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Popup Win Styles */
.popout-win {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
    pointer-events: none;
}

.popout-win.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Hide main content elements when popup is showing */
body.popup-active .main-content .text,
body.popup-active .main-content .prizetext,
body.popup-active .main-content .spin,
body.popup-active .main-content .pointer,
body.popup-active .main-content .character,
body.popup-active .main-content .bgbutton,
body.popup-active .main-content .buttuns,
body.popup-active .main-content .playButton {
    display: none !important;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

.popout-win .image-win {
    position: absolute;
    top: 30%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    max-width: 400px;
    z-index: 10000;
    pointer-events: none;
}

.popout-win .image-win img {
    width: 100%;
    height: auto;
    object-fit: contain;
    pointer-events: none;
}

.popout-win .telgrramButton {
    position: absolute;
    bottom: 30%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    max-width: 350px;
    z-index: 10001;
    cursor: pointer;
    transition: transform 0.2s;
    pointer-events: auto;
}

.popout-win .telgrramButton:hover {
    transform: translate(-50%, -50%) scale(1.05);
}

.popout-win .telgrramButton:active {
    transform: translate(-50%, -50%) scale(0.95);
}

.popout-win .telgrramButton img {
    width: 100%;
    height: auto;
    object-fit: contain;
    pointer-events: auto;
    animation: zoomInOutButton 2s ease-in-out infinite;
}

@keyframes zoomInOutButton {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.popout-win .characterImage {
    position: absolute;
    top:75%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    max-width: 500px;
    z-index: 10000;
    pointer-events: none;
}

.popout-win .characterImage img {
    width: 100%;
    height: auto;
    object-fit: contain;
    pointer-events: none;
}

/* Ensure layout stays the same on mobile */
@media screen and (max-width: 768px) {
    .background {
        width: 500px;
        min-width: 500px;
        max-width: 500px;
    }
    .character{
        max-width: 200px;
    }
    /* Prevent any scaling or layout shifts */
    * {
        -webkit-tap-highlight-color: transparent;
    }
    
    /* Maintain exact same layout */
    .main-content,
    .logo,
    .text,
    .prizetext,
    .spin,
    .pointer,
    .bgbutton,
    .buttuns,
    .playButton {
        position: absolute;
    }
    
    /* Popup mobile styles */
    .popout-win .image-win {
        max-width: 90%;
    }
    
    .popout-win .telgrramButton {
        top: 60%;
        max-width: 60%;
    }
    
    .popout-win .characterImage {
        top: 80%;
        max-width: 100%;
    }
}