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

.container {
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: black;
}

.background {
    position: relative;
    width: 100%;
    max-width: 550px;
    height: 100vh;
    overflow: hidden;
}

.background img {
    height: 100%;
    width: 100%;
    object-fit: cover;
}

.main-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    max-width: 550px;
    height: 100vh;
    overflow: hidden;
}

.logo {
    position: absolute;
    top: 5%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo img {
    width: 100%;
    max-width: 200px;
    height: auto;
    object-fit: contain;
}

.effect {
    position: absolute;
    top: 45%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    max-width: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.effect img {
    width: 100%;
    height: auto;
    object-fit: contain;
    transform-origin: center center;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform-style: preserve-3d;
    -webkit-transform-style: preserve-3d;
}

.text {
    position: absolute;
    top: 17%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.text img {
    width: 100%;
    max-width: 350px;
    height: auto;
    object-fit: contain;
}

.frame {
    position: absolute;
    top: 47%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.frame img {
    width: 100%;
    max-width: 450px;
    height: auto;
    object-fit: contain;
    cursor: pointer;
}

.spin {
    position: absolute;
    top: 46%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.spin img {
    width: 100%;
    max-width: 320px;
    height: auto;
    object-fit: contain;
    transform-origin: 50% 50%;
    cursor: pointer;
    pointer-events: auto;
}

.playButton {
    position: absolute;
    top: 80%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.playButton img {
    width: 100%;
    max-width: 400px;
    height: auto;
    object-fit: contain;
    cursor: pointer;
}

.modelphone {
    position: absolute;
    top: 84%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modelphone img {
    width: 100%;
    max-width: 550px;
    height: auto;
    object-fit: contain;
}

.najamodel {
    position: absolute;
    top: 85%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 40;
}

.najamodel img {
    width: 100%;
    max-width: 300px;
    height: auto;
    object-fit: contain;
}

/* Popout Styles - Win Popout */
.popout {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    overflow: hidden;
    z-index: 9999;

  
  
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.popout-logo {
    position: absolute;
    top: 10%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.popout-logo img {
    width: 30%;
    max-width: 250px;
    height: auto;
    object-fit: contain;
}

.popout-content {
    position: relative;
    width: 100%;
    max-width: 550px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 20px;
}

.popout-text {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    position: relative;
    margin-bottom: 20px;
}

.popout-text img {
    width: 100%;
    max-width: 450px;
    height: auto;
    object-fit: contain;
    animation: scaleIn 0.4s ease-out;
}

@keyframes scaleIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.popout-model {
    position: absolute;
    bottom: -60%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.popout-model img {
    width: 100%;
    max-width: 550px;
    height: auto;
    object-fit: contain;
}

.coins {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.coins img {
    width: 100%;
    max-width: 500px;
    height: auto;
    object-fit: contain;
}

.popout-button {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: row;
    gap: 20px;
    margin-top: 20px;
    z-index: 99999;
}

.popout-button img {
    width: 100%;
    max-width: 330px;
    height: auto;
    object-fit: contain;
    border-radius: 35px;
    cursor: pointer;
    transition: transform 0.2s ease, filter 0.2s ease;
    animation: slideUp 0.5s ease-out 0.2s both;
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.popout-button img:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}

/* Popout Styles - Lose/Try Again Popout */
.popout-tryagain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    overflow: hidden;
    z-index: 9999;
    cursor: pointer;
    animation: fadeIn 0.3s ease-in-out;
}

.popout-logo-tryagain {
    position: absolute;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.popout-logo-tryagain img {
    width: 100%;
    max-width: 250px;
    height: auto;
    object-fit: contain;
}

.popout-content-tryagain {
    position: relative;
    width: 100%;
    max-width: 550px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 20px;
}

.popout-content-tryagain img {
    width: 100%;
    max-width: 480px;
    height: auto;
    object-fit: contain;
}

.texttry {
    position: absolute;
    top: 20%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.popout-text-tryagain {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.popout-text-tryagain img {
    width: 100%;
    max-width: 480px;
    height: auto;
    object-fit: contain;
    cursor: pointer;
}

.popout-model-tryagain {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 20px;
}

.popout-model-tryagain img {
    width: 100%;
    max-width: 450px;
    height: auto;
    object-fit: contain;
    animation: scaleIn 0.4s ease-out;
}

.popout-button-tryagain {
    position: relative;
    width: 100%;
    max-width: 480px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
    z-index: 99999;
}

.popout-button-tryagain img {
    width: 100%;
    max-width: 480px;
    height: auto;
    object-fit: contain;
    border-radius: 35px;
    cursor: pointer;
    transition: transform 0.2s ease, filter 0.2s ease;
    animation: slideUp 0.5s ease-out 0.2s both;
}

.popout-button-tryagain img:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}

/* ============================================
   RESPONSIVE BREAKPOINTS
   ============================================ */

/* Tablet & Small Laptop (max-width: 768px) */
@media (max-width: 768px) {
    .logo img {
        max-width: 160px;
    }

    .text img {
        max-width: 330px;
    }

    .frame {
        top: 50%;
    }

    .spin {
        top: 50%;
    }

    .spin img {
        max-width: 340px;
    }

    .effect {
        top: 48%;
    }

    .effect img {
        max-width: 40px;
    }

    .modelphone {
        top: 79%;
    }

    .modelphone img {
        max-width: 500px;
    }

    .popout-content {
        padding: 15px;
    }

    .popout-text {
        width: 100%;
    }

    .popout-text img {
        max-width: 400px;
    }

    .popout-button {
        gap: 15px;
    }

    .popout-button img {
        max-width: 250px;
    }

    .popout-content-tryagain {
        padding: 15px;
    }

    .popout-model-tryagain img {
        max-width: 400px;
    }

    .popout-button-tryagain {
        max-width: 420px;
    }

    .popout-button-tryagain img {
        max-width: 420px;
    }

    .playButton img {
        max-width: 450px;
    }
}

/* Mobile Large (max-width: 440px) */
@media (max-width: 440px) {
    .text {
        top: 15%;
        width: 90%;
    }

    .text img {
        max-width: 250px;
    }

    .frame {
        top: 45%;
        width: 100%;
    }

    .spin {
        top: 45%;
    }

    .spin img {
        max-width: 300px;
    }

    .effect {
        top: 43%;
    }

    .effect img {
        max-width: 40px;
    }

    .popout-content {
        padding: 10px;
    }

    .popout-text img {
        max-width: 350px;
    }

    .popout-button {
        gap: 10px;
    }

    .popout-button img {
        max-width: 240px;
    }

    .popout-content-tryagain {
        padding: 10px;
    }

    .popout-model-tryagain img {
        max-width: 380px;
    }

    .popout-button-tryagain {
        max-width: 380px;
    }

    .popout-button-tryagain img {
        max-width: 380px;
    }

    .playButton img {
        max-width: 400px;
        min-width: 350px;
    }
}

/* Mobile Medium (max-width: 428px) - iPhone 12 Pro Max */
@media (max-width: 428px) {
    .text {
        width: 70%;
    }

    .text img {
        max-width: 250px;
    }

    .modelphone {
        top: 82%;
    }

    .najamodel {
        top: 88%;
    }

    .najamodel img {
        max-width: 250px;
    }

    .frame {
        top: 45.5%;
        width: 99%;
    }

    .spin {
        top: 45%;
    }

    .spin img {
        max-width: 280px;
    }

    .effect {
        top: 43%;
    }

    .effect img {
        max-width: 40px;
    }

    .popout-content {
        padding: 10px;
    }

    .popout-text img {
        max-width: 350px;
    }

    .popout-button img {
        max-width: 250px;
    }

    .popout-content-tryagain {
        padding: 10px;
    }

    .popout-model-tryagain img {
        max-width: 380px;
    }

    .popout-button-tryagain {
        max-width: 380px;
    }

    .popout-button-tryagain img {
        max-width: 380px;
    }

    .playButton img {
        max-width: 500px;
    }
}


/* Mobile Small (max-width: 390px) - iPhone 12/13 */
@media (max-width: 390px) {
    .text {
        width: 63%;
        top: 14%;
    }

    .text img {
        max-width: 200px;
    }

    .frame {
        top: 45.5%;
        width: 92%;
    }

    .spin {
        top: 45%;
    }

    .spin img {
        max-width: 250px;
    }

    .modelphone {
        top: 81.5%;
    }

    .najamodel {
        width: 73%;
    }

    .popout-content {
        padding: 10px;
    }

    .popout-text img {
        max-width: 320px;
    }

    .popout-button {
        gap: 10px;
    }

    .popout-button img {
        max-width: 250px;
    }

    .popout-content-tryagain {
        padding: 10px;
    }

    .popout-model-tryagain img {
        max-width: 350px;
    }

    .popout-button-tryagain {
        max-width: 350px;
    }

    .popout-button-tryagain img {
        max-width: 350px;
    }

    .playButton img {
        max-width: 400px;
        min-width: 350px;
    }
}
@media (max-width: 400px) {
    .text {
        width: 63%;
        top: 14%;
    }

    .text img {
        max-width: 200px;
    }

    .frame {
        top: 45.5%;
        width: 92%;
    }

    .spin {
        top: 45%;
    }

    .spin img {
        max-width: 250px;
    }

    .modelphone {
        top: 81.5%;
    }

    .najamodel {
        width: 73%;
    }

    .popout-content {
        padding: 10px;
    }

    .popout-text img {
        max-width: 350px;
    }

    .popout-button {
        gap: 10px;
    }

    .popout-button img {
        max-width:220px;
    }

    .popout-content-tryagain {
        padding: 10px;
    }

    .popout-model-tryagain img {
        max-width: 350px;
    }

    .popout-button-tryagain {
        max-width: 350px;
    }

    .popout-button-tryagain img {
        max-width: 350px;
    }

    .playButton img {
        max-width: 400px;
        min-width: 350px;
    }
}

/* Mobile Extra Small (max-width: 360px) */
@media (max-width: 360px) {
    .modelphone {
        top: 81.5%;
    }
    .najamodel {
        top: 90%;
        width: 100%;
    }

    .najamodel img {
        max-width: 250px;
    }

    .popout-content {
        padding: 8px;
    }

    .popout-text img {
        max-width: 300px;
    }

    .popout-button {
        gap: 8px;
    }

    .popout-button img {
        max-width: 220px;
    }

    .popout-content-tryagain {
        padding: 8px;
    }

    .popout-model-tryagain img {
        max-width: 320px;
    }

    .popout-button-tryagain {
        max-width: 320px;
    }

    .popout-button-tryagain img {
        max-width: 320px;
    }

    .playButton img {
        max-width: 400px;
        min-width: 350px;
    }
}
