/* Game Welcome Styles */


.gameWelcome .welcItemList {
    max-width: 1140px;
    margin: 0 auto;
}

/* Ensure page container has no transform after intro animation so sticky works */
.gameWelcome.anim-complete {
    transform: none !important;
}

.gameWelcome .rankgame {
    margin: 0 auto;
}

.gameWelcome .rateList {
    width: auto;
    display: flex;
    flex-direction: column;
    padding: 10px 0;
    margin: 0 auto;
}

/* Override flex for rate list on GameWelcome to allow sticky children to work reliably */
.gameWelcome .rateList.rateItemList {
    display: block;
}

/* Toast styles moved to datagames.css */

.gameWelcome .gameWelcHeroBrdr {
    border: 4px solid #FF660099;
}

.gameWelcome .rateItemHdr.rateListHdr {
    display: flex;
    align-items: center;
    margin: 0 0;
    padding: 10px 0px 20px;
    border-bottom: 1px solid #FF660033;
    width: calc(100% - 30px);
}
.gameWelcome .dashdricon {
    margin: 0 4px 0 0;
}

.gameWelcome .rateGameInfo,
.gameWelcome .utilsMeta,
.gameWelcome .rateListItems {
    width: 800px;
    margin: 0 auto;
}

/* Make the utilities/meta bar stick to the top when scrolling */
.gameWelcome #itemRanked {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 200;
}
.gameWelcome #itemRanked.stickyFixed {
    border: 2px solid #FF660099;
    top: -3px !important;
}
.inviterInfo {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 15px 15px 25px;
    flex-direction: column;
}
.modal-content .inviterInfo {
    margin: 0 0 15px;
    padding: 0 0 3px;
    border-bottom: 1px solid #737B9966;
}

.inviterAvatar,
.inviterAvatar:after {
    width: 230px;
    height: 230px;
    border-radius: 50%;
}
.inviterAvatar {
    overflow: hidden;
    position: relative;
}
.inviterAvatar:after {
    content: '';
    display: block;
    position: absolute;
    top: 0;
    box-shadow: inset -3px -3px 5px #ffffff99, inset 3px 3px 6px #0009;
}
.game-info-container .inviterAvatar,
.game-info-container .inviterAvatar:after {
    width: 160px;
    height: 160px;
}




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

.inviterDetails {
    line-height: 1;
    text-align: center;
    flex: 1;
}
.inviterText {
    margin: 0;
    font-size: 18px;
    line-height: 1.3;
} 


.gameWelcome .gameWelcTitle {
    font-size: 26px;
    line-height: 28px;
    color: var(--text-color);
    padding: 5px;
    margin: 15px 0 0;
    text-shadow: var(--textshadowlyt);
    transition: all 0.3s ease-in-out;
}


.welcTitleIcon,
.welcTitleIcon img {
    width: 320px;
    height: auto;
    border-radius: 6px;
    position: relative;
    overflow: hidden;
}
.modal-content .welcTitleIcon,
.modal-content .welcTitleIcon img {
    width: 300px;
    max-width: 300px;
    min-height: 165px;
}

.welcTitleIcon::after{
    content: '';
    display: block;
    position: absolute;
    top: 0;
    width: 100%;
    height: 100%;
    border-radius: 6px;
    box-shadow: inset 2px 2px 4px #000000EE, inset -2px -2px 4px #ffffff66;
}
.datgamTitle {
    min-height: 38px;
    font-size: 1.3em;
    line-height: 1;
    margin: 0;
    padding: 15px 0 5px;
    text-align: center;
    font-weight: 700;
    text-shadow: var(--textshadowlyt);
    transition: all 0.3s ease-in-out;
}
.modal-content .datgamTitle {
    min-height: auto;
    margin: 15px 20px;
    padding: 0;
    text-align: center;
    font-size: 1.2em;
    line-height: 1.1;
}

.gameInfo {
    display: flex;
    align-items: center;
    margin: 15px 25px;
    padding: 12px 15px;
    border-radius: 8px;
}
.gameInfoIcon {
    color: #ff6600;
    margin-right: 15px;
}
.gameInfoText {
    flex: 1;
}
.gameInfoText p {
    margin: 0;
    color: var(--darksamegrey);
    font-size: 14px;
    line-height: 1.4;
}

.inviterName {
    font-size: 26px;
    margin: 5px 0;
    display: inline-block;
}
.modal-content .inviterName {
    color: #737B99;
}

.gameWelcome .rankgame .sortbox {
    margin: 0
}

.registerInfoBox {
    display: flex;
    align-items: center;
    margin: 25px 5px;
    padding: 15px;
    border-radius: 8px;
}
.registerInfoIcon {
    color: #712bff;
    margin-right: 15px;
}
.registerInfoText {
    min-height: 48px;
    margin: 0 0 0 5px;
    padding: 0 0 0 20px;
    border-left: 1px solid #737B9999;
    text-align: left;
    box-shadow: var(--boxshadowwytlftinset);
    text-shadow: var(--textshadowlyt);
    transition: all 0.3s ease-in-out;
}
.registerInfoText p {
    margin: 0;
    color: var(--darksamegrey);
    font-size: 14px;
    line-height: 1.4;
}



.gameWelcome .welcSubmitButn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(to bottom, #6633cc, #270c5e) !important;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 15px 25px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 20px auto;
    width: 80%;
    max-width: 400px;
}


.errorMessage {
    margin: 50px auto;
    padding: 30px;
    background-color: white;
    text-align: center;
    max-width: 500px;
}

.errorMessage h2 {
    color: #ff3333;
    margin-bottom: 20px;
}

.errorMessage p {
    margin-bottom: 25px;
    color: #555;
}

.errorButton {
    background: linear-gradient(to bottom, #6633cc, #5522bb);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 12px 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

.spin {
    animation: spinner 1.5s linear infinite;
}

.picToglTxt {
    font-size: 0.5em;
    line-height: 1;
    width: max-content;
}

.gameWelcome .rateGameInfo .gameWelcDesc {
    padding: 25px;
    margin: 15px 0 25px;
    box-shadow: var(--shadinset);
    border-radius: 8px;
    font-weight: 500;
    width: calc(100% - 50px) !important;
    overflow: hidden; /* Important to hide content during transition */
    transition: all 0.5s ease-in-out;
}


.gameInstruxHdr {
    transition: padding 1s ease-in-out;
}
.gameInstruxClose {
    position: relative;
    top: -20px;
}
.gameInstruxClose.instruxOpen {
    top: 10px;
}

.rankCritLbls .textColor {
    font-size: 20px !important;
    text-align: left;
    line-height: 1.1em;
}

.rankCritLbls.rateLbls {
    padding: 0;
}

.gameWelcome .rateGameInfo .gameWelcDesc.isClosed .rankCritLbls.critClsd,
.gameWelcome .rateGameInfo .gameWelcDesc.isOpen .rankCritLbls.critOpen {
    opacity: 1;
    transition: opacity 1s ease-in-out;
}

.gameWelcome .rateGameInfo .gameWelcDesc.isOpen .rankCritLbls.critClsd,
.gameWelcome .rateGameInfo .gameWelcDesc.isClosed .rankCritLbls.critOpen {
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.rankCritLbl {
    margin: 5px 0;
}
.stepLblHldr {
    width: 85px;
    min-width: 85px;
    letter-spacing: -1px;
}
.gameStepLbl {
    font-size: 26px;
    line-height: 20px;
    color: var(--text-color);
    text-shadow: var(--textshadowlyt);
    transition: all 0.3s ease-in-out;
}
.gameStepLblsub {
    letter-spacing: 1px;
    margin: 2px -2px 0 !important;
    line-height: 1;
    text-align: right;
}
.rankGameInstrux {
    font-size: 18px;
    line-height: 21px;
    color: var(--text-color);
    padding: 4px 0 4px 20px;
    margin: 0 0 0 24px;
    border-left: 1px solid #737B9999;
    text-align: left;
    box-shadow: var(--boxshadowwytlftinset);
    text-shadow: var(--textshadowlyt);
    transition: all 0.3s ease-in-out;
}
.gameInstruxTitle {
}
.gameInstruxTitle u {
    text-shadow: var(--textshadowlyt);
    transition: all 0.3s ease-in-out;
}
.rankGameInstrux span {
    margin: 0 !important;
}
.stepDirs {
    text-shadow: none;
}

.gameCritLbl {
    font-size: 14px;
    line-height: 15px;
    margin: 0 0 2px;
    font-weight: 700;
    display: flex;
    flex-wrap: wrap;
}

.welcSubmitButn {
    width: 90%;
    font-size: 16px;
    padding: 12px 20px;
}
.picToglHldr { 
    height: 20px;
    padding: 0 5px 0 0;
}


.gameInfoText p, 
.registerInfoText p {
    font-size: 18px;
    line-height: 1.3;
}
.registerInfoText p strong {
    color: #712bff;
}

.gameInfo {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 15px 15px 25px;
}

.gameInfoText, 
.registerInfoText {
    line-height: 1;
}
.gameInfoIcon, 
.registerInfoIcon {
    margin: 0 10px 0 0;
}

.welcBeginButn {
    border: none;
    background: #00BB00;
    color: #FFF !important;
    font-weight: 700;
}
.welcBeginButn:hover {
    background: #FF6600
    ;
}
.welcBeginButn svg,
.welcBeginButn:hover svg {
    color: #FFF !important;
}

.gameWelcome .welcSubmitButn:hover {
    background: linear-gradient(to bottom, #5522bb, #441199);
    transform: translateY(-2px);
}

.gameWelcome .welcSubmitButn:disabled {
    background: #999;
    cursor: not-allowed;
    transform: none;
}

.gameWelcAd {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 30px auto 10px;
    width: calc(100% - 30px);
}
.gameWelcome .gameAd1 {
}
.gameWelcome .gameAd2 {
    margin: 30px auto 10px;
}
.gameWelcome .gameAd3 {
    margin: 40px auto 0;
}

.gameWelcome .sortbox {
    margin: 5px auto;
}


/* BEGIN GameInstructionsModal css */

.modal-overlay.game-instructions-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 15px;
    transition: opacity 0.3s ease-out;
}

/* Exit animation for the overlay */
.modal-overlay.game-instructions-modal.exiting {
    opacity: 0;
    pointer-events: none;
}

.game-instructions-modal .modal-content {
    background: #171919;
    background: linear-gradient(135deg,rgba(23, 15, 9, 1) 0%, rgba(7, 8, 20, 1) 100%);
    padding: 30px;
    border-radius: 10px;
    width: min-content;
    min-width: 480px; 
    max-height: 84vh;
    min-height: 370px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
    transition: height 0.6s ease-in-out, opacity 0.3s ease-out, transform 0.3s ease-out;
    will-change: height, opacity, transform;
}

.game-instructions-modal .modal-content.transitioning {
    overflow-y: visible;
}

.game-instructions-modal .modal-content:not(.transitioning) {
    overflow-y: auto;
}

/* Add pointer-events none during exit to prevent clicks */
.game-instructions-modal.exiting .modal-content {
    pointer-events: none;
}

/* Step content specific styles */
.step-content {
    width: 100%;
    padding: 0;
    box-sizing: border-box;
    will-change: transform, opacity, height;
}

/* During transitions, prevent layout shift */
.game-instructions-modal .steps-container {
    flex-grow: 1;
    position: relative;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    flex-direction: column;
    position: relative;
    width: 100%;
    overflow: hidden; /* Ensure content doesn't spill out during transitions */
    min-height: 250px; /* Provide a minimum height to prevent container collapse */
}

.game-instructions-modal .modalLogoImg {
    position: absolute;
    top: -19px;
    left: -15px;
    border: none;
    width: 100px;
    max-width: 100px;
    height: auto;
}

.game-instructions-modal .modal-close-button {
    position: absolute;
    top: 5px;
    right: 5px;
    background: transparent;
    border: none;
    font-size: 0.8em;
    line-height: 0.8em;
    color: #737B99;
    cursor: pointer;
    display: flex;
    align-items: center;
    z-index: 10;
}
.game-instructions-modal .modal-close-button svg {
    margin: 0 0 2px 5px;
}

.game-instructions-modal .modal-header {
    font-size: 1.2em;
    color: var(--text-color);
    text-align: center;
    line-height: 1;
    position: absolute;
    top: -12px;
    left: 10px;
}

.game-instructions-modal .progress-bar-container {
    width: calc(100% - 40px);
    background-color: #e0e0e022;
    border-radius: 6px;
    height: 12px;
    margin: 0 20px 20px;
    box-shadow: var(--shadinsetvsm);
    position: relative;
}

.game-instructions-modal .progress-bar {
    height: calc(100% - 2px);
    margin: 1px 0 0;
    background-color: #FF6600;
    border-radius: 6px;
    transition: width 0.5s ease-in-out;
}

.game-instructions-modal .progress-text {
    margin: 0 0 5px 0;
    width: 100%;
    text-align: center;
    line-height: 1;
    font-size: 1.6em;
    color: #FF6600;
    font-weight: 700;
}

.game-instructions-modal .step-title {
    font-size: 1.8em;
    font-weight: bold;
    color: var(--text-color);
    margin: 15px 0 0;
    line-height: 1;
}

.game-instructions-modal .step-main-content {
    font-size: 1.2em;
    line-height: 1;
    font-weight: 600;
    margin-bottom: 18px;
}

.game-instructions-modal .step-details {
    margin: 15px 0 25px;
}
.game-instructions-modal .step-details img {
    max-width: calc(100% - 30px);
    height: auto;
    max-height: 140px;
    border: 1px solid #737b9955;
    border-radius: 6px;
    padding: 5px;
    box-shadow: 0 0 10px #000;
}
.game-instructions-modal .step-details img.acctImg {
    max-width: 220px;
    max-height: 140px;
}

.game-instructions-modal .modal-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0 0;
    margin: 0;
    border-top: var(--topBorder);
    box-shadow: var(--topBoxShadow);
    transition: all 0.5s ease-in-out;
}

.gameButnRow .modal-nav-button,
.game-instructions-modal .modal-nav-button {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.2s ease;
}

.game-instructions-modal .back-button {
    background-color: #f0f0f0;
    color: #333;
}
.game-instructions-modal .back-button:hover {
    background-color: #e0e0e0;
}

.game-instructions-modal .next-button {
    background-color: #007bff;
    color: white;
    margin-left: auto;
}
.game-instructions-modal .next-button:hover {
    background-color: #0056b3;
}
.gameButnRow .begin-button,
.game-instructions-modal .begin-button {
    background-color: #00BB00; 
    color: white;
    justify-content: center;
}
.gameButnRow .begin-button:hover,
.game-instructions-modal .begin-button:hover {
    background-color: #1e7e34;
}


.instruxOpenButn {
    background: none;
    box-shadow: var(--shadupsm);
    border-radius: 3px;
    border: none;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 10px 20px;
    color: #737B99;
    font-size: 13px;
    transition: all 0.3s ease;
}
.instruxOpenButn:hover {
    background: #737B99;
    color: #FFF;
    cursor: pointer;
}
.instruxOpenButn svg {
    margin: 0 7px 0 0;
}
/* END GameInstructionsModal css */


@keyframes spinner {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Mobile Responsiveness */
@media (max-width: 821px) {

    .gameWelcAd {
        padding: 15px 0;
        margin: 45px auto 10px;
        width: 100%;
    }

    .gameWelcome .rateList {
        width: calc(100% - 30px);
        padding: 10px 15px;
        margin: 0 auto;   
    }
    .gameWelcHero.padd20,
    .gameWelcome .gameWelcHeroBrdr.padd20 {
        padding: 10px !important;
    }
    .gameWelcome .rateItemHdr.rateListHdr {
        padding: 10px 0px 10px;
        width: 100%;
        font-size: 0.7em;
    }
    .gameWelcome .rateItemHdr .maintitle {
        font-size: 18px;
    }
    .gameWelcome .rateItemHdr .textCenter.margryt15 {
        margin: 0 15px !important;
    }

    .gameWelcome .rateGameInfo .gameWelcDesc {
        font-size: 13px !important;
        padding: 20px 5px 10px;
        margin: 0;
        width: calc(100% - 10px) !important;
    }
    .gameWelcome .rateGameInfo .gameWelcDesc.isClosed {
        padding: 0 !important;
        margin: 15px 0 0 !important;
        width: 100% !important;
    }
    .gameWelcome .gameWelcTitle {
        font-size: 22px;
        line-height: 24px;
        padding: 10px;
        flex-direction: column;
        width: 86%;
        margin: 15px auto 0;
    }
    .gameWelcBody header.hdrPos {
        position: relative !important;
    }
    .gameWelcBody main {
        margin-top: 0px !important;
    }
    .gameWelcome .rateItemList #itemRanked.stickyFixed, 
    .datagame.gameWelcome #itemRanked.stickyFixed {
        top: -3px !important;
        left: 5px !important;
        width: calc(100% - 10px) !important;
        box-shadow: rgba(0, 0, 0, 1) 0px 0px 10px 0px !important;
        padding: 10px !important;
    }
    #ftrSubmitToastHldr.gameWelcSubmit {
        bottom: 0px;
        width: 100%; 
    }
    .gameWelcSubmit .ftrSubmitToast {
        height: 95px;
        padding: 0px 5px 30px 5px;
    }

    .gameWelcome .gameInfo {
        padding: 15px 15px 10px;
    }
    .gameWelcome .datgamTitle {
        padding: 10px 0 0;
        font-weight: 600;
        text-align: center;
    }
    .welcTitleIcon, 
    .welcTitleIcon img {
        width: 100%;
    }

    .modal-content .welcTitleIcon, 
    .modal-content .welcTitleIcon img {
        width: auto;
        max-width: 280px;
        min-height: auto;
    }
    .gameWelcome .rateGameInfo {
        margin: 5px 0 10px 2px;
        width: 100% !important;
    }
    .gameWelcome .rateItemList .utilsMeta {
        margin: 0 0 15px;
        padding: 0;
        width: 100% !important;
        border-top: none;
        box-shadow: none;
    }
    .gameWelcome .rateListItems {
        width: 100%;
        margin: 0 auto;
    }
    .gameWelcome .gameAd2 {
        margin: 0;
        padding: 10px 0 15px;
    }

    .gameButnRow {
        gap: 15px !important;
    }
    .gameButnRow button {
        box-shadow: var(--shaduptiny) !important;
        gap: 5px !important;
        padding: 5px 10px !important;
        line-height: 1.1em !important;
        font-size: 10px !important;
        font-weight: 600 !important;
    }
    .instruxOpenButn {
        max-width: 120px;
        line-height: 1em;
    }
    .gameButnRow button svg {
        min-width: 20px;
        min-height: 20px;
        max-height: 24px;
    }


    .rankCritLbls .textColor {
        font-size: 14px !important;
    }

    .rankCritLbls.rateLbls {
        padding: 0 150px 0 0;
    }
    .stepLblHldr {
        width: 65px;
        min-width: 65px;
    }
    .gameStepLbl {
        font-size: 20px;
    }
    .gameStepLblsub {
        letter-spacing: 0px;
        margin: 0 !important;
    }
    .rankCritLbls.critClsd {
        margin: 0 !important;
    }
    .rankGameInstrux {
        font-size: 16px;
        line-height: 18px;
        padding: 4px 0 4px 10px;
        margin: 0 0 0 11px;
    }
    .gameInstruxClose {
        top: -15px;
    }
    .gameInstruxClose.instruxOpen {
        top: 5px;
        right: 5px;
    }
    .inviterInfo {
        margin: 0;
        padding: 15px 0 8px;
        flex-direction: column;
    }

    .inviterAvatar,
    .inviterAvatar:after {
        width: 100px;
        height: 100px;
    } 

    .modal-overlay.game-instructions-modal {
        top: 10px;
        padding: 5px;
    }
    .modal-content .inviterInfo {
        margin: 0 10px 10px;
    }

    .modal-content .inviterAvatar, 
    .modal-content .inviterAvatar:after {
        width: 120px;
        height: 120px;
    }
    .modal-content .inviterAvatar {
        margin: 5px 0 0;
    }
    
    .inviterName {
        font-size: 20px;
    }
    .inviterText {
        font-size: 11px;
    }
    .modal-content .inviterText {
        font-size: 14px !important;
        padding: 0;
    }




    .gameWelcome .sortbox {
        margin: 0;
        overflow: auto;
        padding: 10px 10px 0;
        border-radius: 10px;
    }
    .gameWelcome .welcRanked .rankedSpot {
        width: calc(100% - 10px) !important;
        min-width: auto !important;
        height: auto;
        padding: 0 !important;
    }

    .gameWelcome button.welcSubmitButn {
        padding: 10px 7px 10px 20px;
        font-size: 12px;
    }

    .gameWelcHeroInfo.flexRow {
        flex-direction: column !important;
        align-items: center !important;
        justify-content: start !important;
    }
    .gameWelcHeroInfo .wide50 {
        width: 100% !important;
        max-width: 100% !important;
    }



    /* BEGIN GameInstructionsModal css */
    .game-instructions-modal .modal-content {
        padding: 20px 0 15px;
        margin: 20px 10px 0;
        min-width: auto;
        width: 100%;
        min-height: 350px;
        max-height: 95vh;
    }
    .game-instructions-modal .modal-header {
        
    }
    .game-instructions-modal .modalLogoImg {
        top: -12px;
        left: 10px;
        width: 80px;
        max-width: 80px;
        height: auto;
    }
    .game-instructions-modal .modal-content .datgamTitle {
        margin: 5px 10px;
    }
    .game-instructions-modal .step-title {
        margin: 15px 0 0;
    }
    .game-instructions-modal .step-details {
        margin: 20px 0;
    }
    .game-instructions-modal .step-main-content{
        font-size: 1.1em;
    }
    .game-instructions-modal .step-details {
        font-size: 0.9em;
    }
    .game-instructions-modal .modal-nav-button {
        padding: 6px 10px;
        font-size: 0.75em;
        font-weight: 600;
    }
    .game-instructions-modal .modal-navigation {
        padding: 15px 0 0;
        margin: 0 10px;
    }
    /* END GameInstructionsModal css */



    /* Toast styles moved to datagames-mobile.css */




}    
/* iPhone 6 and older device compatibility */
@media (max-width: 370px) {

    .modal-content .inviterAvatar, 
    .modal-content .inviterAvatar:after {
        width: 100px;
        height: 100px;
    }
    .modal-content .welcTitleIcon, 
    .modal-content .welcTitleIcon img {
        width: auto;
        max-width: 180px;
        min-height: auto;
    }
    .gameStepLbl {
        font-size: 18px;
    }
    .fontSel2 .rateListItem .votebutn, 
    .fontSel2 .sortitem .votebutn {
        padding: 2px 0px 3px !important;
        font-size: 12px !important;
        margin: 0 3px !important;
    }
    .fontSel2 .votebutn.n3, 
    .fontSel2 .votebutn.n2, 
    .fontSel2 .votebutn.n1 {
        font-size: 12px !important;
        line-height: 12px !important;
        padding: 2px 0 3px !important;
    }
    .fontSel2 .rateListItem .rateitemname .namebox, 
    .fontSel2 .sortitem .rateitemname .namebox {
        font-size: 10px !important;
    }



    
}