*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.container{
    width: 100%;
    height: 100svh;
    background-color: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}
.background{
    position: relative;
    top: 0;
    left: 0;
    width: min(550px, 100vw);
    height: 100svh;
}
.background img{
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.main-content{
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(550px, 100vw);
    height: 100svh;
    overflow: hidden;
}

.title{
    position: absolute;
    top: 20%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    max-width: 420px;
}
.title img{
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.title1{
    position: absolute;
    top: 7%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    max-width: 300px;
}
.title1 img{
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.coin{
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
}
.coin img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    animation: zoomInOut 2s ease-in-out infinite alternate;
}

/* Zoom In/Out Animation */
@keyframes zoomInOut {
    0% {
        transform: scale(1);
    }
    100% {
        transform: scale(1.1);
    }
}
.frame{
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    max-width: 450px;
}
.frame img{
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.wheels{
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    max-width: 310px;
    transform-origin: center center;
    transition: transform 5s cubic-bezier(0.23, 1, 0.32, 1);
}
.wheels img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
}
.middle{
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    max-width: 80px;
}
.middle img{
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.pointer{
    position: absolute;
    top: 21.5%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    max-width: 50px;
}
.pointer img{
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.buttons{
    position: absolute;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    max-width: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 50px;
    z-index: 1002;
    cursor: pointer;
    bottom: 6%;
    top: auto;
    transform: translateX(-50%);
}
.buttons img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    animation: smoothZoom 1.5s ease-in-out infinite;
    cursor: pointer;

}

/* Smooth Infinite Zoom Animation */
@keyframes smoothZoom {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* Popup Modal Styles */
.popup-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    inset: 0;
    padding: 16px;
    background: rgba(0,0,0,0.35);
    display: none;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-in-out;

}

.popup-content {
    position: relative;
    width: min(520px, calc(100vw - 32px));
    height: auto;
    animation: popupSlideIn 0.5s ease-out;
}

.popup-image {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 15px;
}


/* Popup Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes popupSlideIn {
    from {
        transform: scale(0.5) translateY(-50px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .title1 { top: 8%; max-width: 260px; }
    .title { top: 20%; max-width: 420px; width: 92%; }

    /* Keep the wheel visually centered like the reference screenshot */
    .frame { top: 52%; width: 92%; max-width: 430px; }
    .wheels { top: 52%; width: 92%; max-width: 340px; }
    .middle { top: 52%; width: 92%; max-width: 78px; }

    /* Button anchored to bottom is the key for consistent mobile look */
    .buttons { width: 92%; max-width: 360px; gap: 18px; bottom: 5%; }

    .popup-image { border-radius: 10px; }
}
@media (max-width: 440px) {
    .title1 { top: 7%; max-width: 230px; }
    .title { top: 19%; width: 96%; max-width: 420px; }

    .frame { top: 53%; width: 96%; max-width: 380px; }
    .wheels { top: 53%; width: 90%; max-width: 260px; }
    .middle { top: 53%; width: 96%; max-width: 70px; }

    .buttons { width: 96%; max-width: 320px; bottom: 4%; }
    .popup-image { border-radius: 8px; }
}

@media (max-width: 428px) {
    .title1 { top: 7%; max-width: 230px; }
    .title { top: 19%; width: 96%; max-width: 300px; }

    .frame { top: 53%; width: 96%; max-width: 380px; }
    .wheels { top: 53%; width: 96%; max-width: 260px; }
    .middle { top: 53%; width: 96%; max-width: 70px; }

    .buttons { width: 96%; max-width: 280px; bottom: 4%; }
    .popup-image { border-radius: 8px; }
}
@media (max-width: 360px) {
    .title1 { top: 7%; max-width: 230px; }
    .title { top: 19%; width: 96%; max-width: 300px; }

    .frame { top: 53%; width: 96%; max-width: 380px; }
    .wheels { top: 53%; width: 96%; max-width: 240px; }
    .middle { top: 53%; width: 96%; max-width: 70px; }

    .buttons { width: 96%; max-width: 270px; bottom: 4%; }
    .popup-image { border-radius: 8px; }
}