body{
    margin: 0;
}

.mb-0{
    margin-bottom: 0;
}

*, ::after, ::before {
    box-sizing: border-box;
}

.text-center{
    text-align: center;
}

#game-loading-screen{
    position: absolute;
    width: 100%;
    height: 100%;
    background: #000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    z-index: 2;
    padding: 0;
    min-height: 450px;
}

#game-loading-screen img{
    margin: auto;
    max-width: 300px;
    width: 100%;
    margin-bottom: 90px;
    transform-origin: center center;
    /* animation: logoPulse 1.6s ease-in-out infinite; */
}

/* Loading bar */
#game-loading-screen .loading-bar{
    width: min(100%, 420px);
    height: 12px;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    border: none;
}

#game-loading-screen .loading-bar .fill{
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    height: 100%;
    width: 0%;
    background: #EDAE23;
    border-radius: inherit;
    transition: width 0.2s ease;
}


#game-start-overlay{
    position: absolute;
    width: 100%;
    height: 100%;
    align-items: center;
    display: flex;
    justify-content: center;
    z-index: 3;
    margin-top: 3vw;
}

/* #game-start-overlay.overlay-type-2 img{
    max-width: 500px;
    width: 30vw;
} */


#game-start-overlay.overlay-type-1 img{
    max-width: 90%;
    max-height: 90%;
    cursor: pointer;
}
#game-start-overlay.overlay-type-2 img{
    max-width: min(1000px, 80%);
    max-height: 75vh;
    cursor: pointer;
}

#game-start-overlay.overlay-type-3 img{
    max-width: min(1000px, 70%);
    max-height: 75vh;
    cursor: pointer;
    position: relative;
    top: -10vh;
}

#game-start-overlay.overlay-type-1,
#game-start-overlay.overlay-type-2{
    margin-top: 0;
}

/* Story line mobile: hide on desktop, show only on mobile when present */
#game-start-overlay .story-line-mobile-container {
    display: none;
}

#game-start-overlay.overlay-type-1 .story-line-mobile-container{
    .story-line-headings,.story-line-footer{
        width: min(450px, 70%)!important;
    }
}


#game-start-overlay .story-line-mobile-container .story-line-title{
    width: min(450px, 85%) !important;
    max-height: 15vh;
    object-fit: contain;
    margin-bottom: 15px;
}



@media screen and (max-width:768px){
    #game-container{
        background-color: #777777;
    }

    #game-bg-video{
        display: none;
    }

    .story-line-container{
        max-width: 90%;
    }
 
    .story-line-images.img-no-3 > div{
        padding-left: 5px;
        padding-right: 5px;
    }

    /* #game-start-overlay.overlay-type-2 img{
        width: 60vw;
    } */

    #game-start-overlay.overlay-type-1{
        /* align-items: baseline; */
        margin:auto;
        /* height: auto; */
    }

    /* #game-start-overlay.overlay-type-1 img{
        max-width: 100%;
        max-height: 100%;   
    } */

    /* When story line mobile exists: hide normal overlay image, show story line */
    #game-start-overlay.has-story-line-mobile > img {
        display: none;
    }
    #game-start-overlay.has-story-line-mobile .story-line-mobile-container {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 100%;
        max-width: 100%;
        height: 90vh;
        max-height: 90vh;
        overflow: hidden;
        padding: 8px 0;
        gap: 8px;
    }
    #game-start-overlay.has-story-line-mobile .story-line-mobile-container .story-line-headings,
    #game-start-overlay.has-story-line-mobile .story-line-mobile-container .story-line-footer {
        flex: 0 0 auto;
        max-height: 9vh;
        width: min(370px, 70%) !important;
        object-fit: contain;
    }
    #game-start-overlay.has-story-line-mobile .story-line-mobile-container .story-line-title {
        max-height: 17vh;
        flex: 0 0 auto;
    }

    /* Story line slider: one image at a time, scales with viewheight */
    .story-line-slider {
        position: relative;
        flex: 1 1 0;
        width: 100%;
        max-width: min(390px, 70%);
        overflow: hidden;
        display: flex;
        flex-direction: column;
        max-height: 51vh;
        margin-top: 15px;
        margin-bottom: 15px;
    }
    .story-line-slider-track {  
        display: flex;
        flex: 1 1 0;
        min-height: 0;
        height: 100%;
        transition: transform 0.3s ease-out;
        will-change: transform;
        touch-action: none;
        user-select: none;
        -webkit-user-select: none;
    }
    /* Each slide = 100% of .story-line-slider width (track is N*100%, so 100%/N per slide) */
    .story-line-slider-track .story-line-slide {
        flex: 0 0 calc(100% / var(--slide-count, 1));
        min-width: 0;
        height: 100%;
        box-sizing: border-box;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .story-line-slide img {
        display: block;
        width: 100% !important;
        max-height: 100% !important;
        height: auto;
        object-fit: contain;
        -webkit-user-drag: none;
        user-drag: none;
        pointer-events: none;
        max-width: 100% !important;
        padding-left: 5px;
        padding-right: 5px;
    }
}

/* Game Rules Modal */
#game-rules-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}

#game-rules-modal .game-rules-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
}

#game-rules-modal .game-rules-content {
    position: relative;
    background-color: #000;
    border: 2px solid #333;
    border-radius: 8px;
    width: 80%;
    max-width: 1100px;
    max-height: 90vh;
    padding: 20px;
    overflow-y: auto;
    z-index: 10001;
    border-radius: 30px;
    box-shadow: 0px 0px 16px #757575;
    overflow: hidden;
    padding-bottom: 60px;
}

#game-rules-modal .game-rules-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 30px;
    height: 30px;
    z-index: 10002;
    transition: opacity 0.3s, transform 0.2s;
}

#game-rules-modal .game-rules-close:hover {
    opacity: 0.8;
    transform: scale(1.1);
}

#game-rules-modal .game-rules-title {
    margin: 0 0 30px 0;
}

#game-rules-modal .game-rules-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #333;
    padding-bottom: 10px;
}

#game-rules-modal .game-rules-tab {
    background: transparent;
    border: none;
    color: #999;
    font-family: 'Anton', sans-serif;
    font-size: 20px;
    font-weight: bold;
    letter-spacing: 2px;
    padding: 10px 20px;
    cursor: pointer;
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
    margin-bottom: -13px;
}

#game-rules-modal .game-rules-tab:hover {
    color: #FBA033;
}

#game-rules-modal .game-rules-tab.active {
    color: #FBA033;
    border-bottom-color: #FBA033;
}

#game-rules-modal .game-rules-text {
    min-height: 200px;
    max-height: 60vh;
    overflow-y: auto;
    margin-top: 0;
    padding-right: 15px;
}

#game-rules-modal .game-rules-text img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
    margin: 5px 0;
}

#game-rules-modal .paylines-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    padding: 10px;
}

#game-rules-modal .paylines-container img {
    width: 100%;
    height: auto;
    border-radius: 5px;
}

#game-rules-modal .game-rules-arrows {
    position: absolute;
    bottom: 15px;
    right: 15px;
    display: flex;
    gap: 15px;
    align-items: center;
    z-index: 10002;
}

#game-rules-modal .game-rules-build-version {
    position: absolute;
    bottom: 6px;
    left: 12px;
    font-size: 10px;
    color: #555;
    font-family: monospace;
    pointer-events: none;
    user-select: text;
    z-index: 10002;
}

#game-rules-modal .game-rules-arrow {
    width: 30px;
    height: 30px;
    cursor: pointer;
    opacity: 1;
    transition: opacity 0.3s, transform 0.2s;
    object-fit: contain;
}

#game-rules-modal .game-rules-arrow:hover:not(.disabled) {
    transform: scale(1.1);
    opacity: 0.9;
}

#game-rules-modal .game-rules-arrow.active {
    opacity: 1;
}

#game-rules-modal .game-rules-arrow.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

body.popupvisible #game-container{
    filter: blur(10px);
}

#paylines{
    max-width: 1000px;
    margin: auto;
    padding: 0 0px;
    display: flex;
    flex-wrap: wrap;

    .img-container{
        width: 20%;
        padding-left: 10px;
        padding-right: 10px;
        text-align: center;

        span{
            font-size: 19px;
            font-weight: 600;
        }
    }
}
/* Game rules modal content area – typography and layout */
#game-rules-content {
    font-family: Arial, sans-serif;
    font-size: 14px;
    color: #FFFFFF;
    line-height: 1.7;
    text-align: left;
}

#game-rules-content.text-center {
    text-align: center;
}

#game-rules-content p, 
#game-rules-content ul {
    margin-top: 0;
}

#symbol-payouts{
    display: flex;
    flex-wrap: wrap;


    .symbol-item {
        display: flex;
        width: auto;
        margin-left: auto;
        margin-right: auto;
        margin-bottom: 20px;
        padding-left: 15px;
        padding-right: 15px;

        .img-container {
            width: 140px;   

            img{ margin:0}
        }

        ul{
            padding-left: 0;
            margin-top: 20px;
            list-style: none;
            margin-bottom: auto;
            
            li{
                white-space: nowrap;
            }
        }
    }
}


@media screen and (max-width: 1024px){
    /* #symbol-payouts .symbol-item{
        width: 33.33%;
    } */
}


@media screen and (max-width:768px){


    #game-rules-modal{
        .game-rules-close{
            top: 10px;
            right: 10px;
            width: 25px;
            height: 25px;
        }

        .game-rules-content{
            padding: 15px;
            width: 90%;
            border-radius: 15px;
            padding-bottom: 60px;
        }

        .game-rules-arrow{
            width: 30px;
            height: 30px;
        }

        .game-rules-arrows{
            gap: 10px;
        }

        .game-rules-tab{
            font-size: 14px;
        }
    }

    #game-rules-content{
        font-size: 12px;
    }

    #paylines {
        .img-container{
            width: 33.33%;
    
            span{
                font-size: 13px;
                font-weight: 600;
            }
        }
    }
    
    .ppg-top-right-alert--pos-top-center{
        width: 90%;
    }
    
}

@media screen and (max-width:640px){
    #symbol-payouts {
        .symbol-item {
            /* width: 50%; */

            ul {
                li {
                    white-space: nowrap;
                }
            }
        }
    }
}

@media screen and (max-width:500px){
    #paylines {
        .img-container{
            width: 50%;

            span{
                font-size: 13px;
                font-weight: 600;
            }
        }
    }

    #game-rules-modal .game-rules-tab{
        font-size: 14px;
    }

    #game-rules-content {
        font-size: 11px;
    }
}

@media screen and (max-width:400px){
    #game-rules-modal .game-rules-tab {
        font-size: 11px;
    }
}

/* SweetAlert2 dark theme */
.swal2-container.swal2-backdrop-show {
    background-color: rgba(25, 25, 26, 0.75) !important;
}
.swal2-popup {
    background: #19191a !important;
    color: #e1e1e1 !important;
    border-radius: 15px;
}
.swal2-title {
    color: #e1e1e1 !important;
}
.swal2-html-container {
    color: #e1e1e1 !important;
}
.swal2-styled.swal2-confirm {
    background-color: #7066e0 !important;
    color: #fff !important;
}
.swal2-styled.swal2-cancel {
    background-color: #6e7881 !important;
    color: #fff !important;
}
.swal2-styled.swal2-deny {
    background-color: #dc3741 !important;
    color: #fff !important;
}
.swal2-close {
    color: #ccc !important;
}
.swal2-close:hover {
    color: #f27474 !important;
}
.swal2-input,
.swal2-textarea,
.swal2-file {
    background-color: #323234 !important;
    border-color: #6e6e70 !important;
    color: #e1e1e1 !important;
}
.swal2-validation-message {
    background-color: #323234 !important;
    color: #e1e1e1 !important;
}
.swal2-footer {
    border-top-color: #555 !important;
    color: #bebebe !important;
}
.swal2-toast.swal2-popup {
    background: #19191a !important;
}

/* PPG top-right alert (see PPGGames.showTopRightAlert) – position via --pos-* modifier */
.ppg-top-right-alert {
    position: fixed;
    z-index: 99999;
    max-width: 320px;
    padding: 15px 70px 15px 16px;
    border-radius: 5px;
    color: #fff;
    font-size: 0.8em;
    font-family: system-ui, -apple-system, sans-serif;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transition: opacity 0.25s ease;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    box-shadow: 0px 2px 10px #d6d6d633;
}
.ppg-top-right-alert--pos-top-right { top: 16px; right: 16px; }
.ppg-top-right-alert--pos-top-left { top: 16px; left: 16px; }
.ppg-top-right-alert--pos-top-center { top: 16px; left: 50%; transform: translateX(-50%); }
.ppg-top-right-alert--pos-bottom-right { bottom: 16px; right: 16px; }
.ppg-top-right-alert--pos-bottom-left { bottom: 16px; left: 16px; }
.ppg-top-right-alert--pos-bottom-center { bottom: 16px; left: 50%; transform: translateX(-50%); }
.ppg-top-right-alert--pos-center { top: 50%; left: 50%; transform: translate(-50%, -50%); }
.ppg-top-right-alert__icon {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    font-size: 1.3em;
    font-weight: bold;
    line-height: 1;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
}
.ppg-top-right-alert__icon--info { background: rgba(255, 255, 255, 0.3); }
.ppg-top-right-alert__icon--success { background: rgba(255, 255, 255, 0.3); }
.ppg-top-right-alert__icon--warning { background: rgba(255, 255, 255, 0.3); }
.ppg-top-right-alert__icon--error { background: rgba(255, 255, 255, 0.3); }
.ppg-top-right-alert__message {
    flex: 1;
    min-width: 0;
    font-weight: 600;
}
.ppg-top-right-alert__close {
    flex-shrink: 0;
    background: transparent;
    border: none;
    color: #ff000f;
    font-size: 19px;
    line-height: 1;
    padding: 0;
    cursor: pointer;
    opacity: 0.85;
    position: absolute;
    right: 10px;
}
.ppg-top-right-alert__close:hover {
    opacity: 1;
}
.ppg-top-right-alert--visible {
    opacity: 1;
}
.ppg-top-right-alert--info {
    background-color: #121415;
    border: 1px solid #3b3b3b;
}
.ppg-top-right-alert--success {
    background-color: #4caf50;
    border: 1px solid #388e3c;
}
.ppg-top-right-alert--warning {
    background-color: #ff9800;
    border: 1px solid #f57c00;
}
.ppg-top-right-alert--error {
    background-color: #f44336;
    border: 1px solid #d32f2f;
}

@media screen and (max-width: 768px){
    #game-container{
        background-repeat: no-repeat!important;
        background-position: center!important;
        background-size: cover!important;
    }
}

/* Bet selector modal (HTML overlay; preset ladder) */
#bet-selector-modal {
    position: fixed;
    inset: 0;
    z-index: 1060;
    display: none;
    align-items: center;
    justify-content: center;
    font-family: 'Anton', sans-serif;
}

#bet-selector-modal.is-open {
    display: flex;
}

#bet-selector-modal .bet-selector-backdrop {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.8);
}

#bet-selector-modal .bet-selector-content {
    position: relative;
    background-color: #000;
    border: 2px solid #333;
    border-radius: 24px;
    width: 420px;
    height: 720px;
    max-height: calc(100vh - 30px);
    max-width: 80vw;
    box-shadow: 0px 0px 16px #757575;
    z-index: 1060;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    font-size: 14px;
}

#bet-selector-modal .bet-selector-header {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: clamp(8px, 2vh, 18px) clamp(12px, 4vw, 28px);
    border-bottom: 2px solid #333;
}

#bet-selector-modal .bet-selector-title {
    color: var(--bet-selector-accent, #FBA033);
    font-family: 'Anton', sans-serif;
    font-size: clamp(18px, 3vh, 28px);
    letter-spacing: 2px;
    margin: 0;
    line-height: 1;
}

#bet-selector-modal .bet-selector-close {
    background: transparent;
    border: none;
    color: #fff;
    font-size: clamp(20px, 3vh, 30px);
    line-height: 1;
    cursor: pointer;
    padding: 0 6px;
    transition: opacity 0.2s, transform 0.2s;
}

#bet-selector-modal .bet-selector-close:hover {
    opacity: 0.85;
    transform: scale(1.1);
}

#bet-selector-modal .bet-selector-list {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    margin: 0;
    list-style: none;
    padding: 6px 5px;
    overflow: hidden;
}

#bet-selector-modal .bet-selector-list li {
    flex: 1 1 0;
    min-height: 0;
    display: flex;
    margin: 2px 0;
}

#bet-selector-modal .bet-selector-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-height: 0;
    background: transparent;
    border: 1px solid #333;
    border-radius: 8px;
    color: #fff;
    font-family: 'Anton', sans-serif;
    font-size: clamp(12px, 2vh, 18px);
    letter-spacing: 1px;
    padding: 2px 15px;
    line-height: 1;
    cursor: pointer;
    text-align: center;
    transition: border-color 0.2s, color 0.2s, background-color 0.2s;
}

#bet-selector-modal .bet-selector-item:hover {
    border-color: var(--bet-selector-accent, #FBA033);
    color: var(--bet-selector-accent, #FBA033);
}

#bet-selector-modal .bet-selector-item.is-selected {
    background: var(--bet-selector-accent, #FBA033);
    border-color: var(--bet-selector-accent, #FBA033);
    color: var(--bet-selector-accent-text, #000);
}