.play-game {
    position: relative;
    /* max-width: {{ $game->width ?? '922px' }}; */
    width: 100%;
    min-height: 487px;
    padding: 0px;
    margin: 0 auto 30px;
    -webkit-overflow-scrolling: touch;
    /* Enable smooth scrolling on iOS */
}

.loader-overlay {
    position: absolute;
    inset: 0;
    background-color: #000000;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #fff;
    z-index: 10;
}

.loader-progress {
    width: 300px;
    height: 10px;
    background: #444;
    border-radius: 5px;
    overflow: hidden;
    margin-top: 10px;
}

.loader-bar {
    height: 100%;
    width: 0%;
    background-color: #AD0404;
    transition: width 0.3s ease;
}

.game-thumb-play-game {
    position: absolute;
    z-index: 2;
    width: auto;
    text-align: center;
    top: 0;
    bottom: 0;
    height: fit-content;
    margin: auto;
    left: 0;
    right: 0;
}

.game-thumb-play-game img {
    height: 180px;
    width: auto;
    border-radius: 10px;
    margin: 0 auto 30px;
}

.game-thumb-play-game h3 {
    color: white;
    font-size: 20px;
    font-weight: 500;
    margin: 0 auto 30px;
}

.side-games {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.right-sidebar .game-thumb img {
    width: 100%;
    max-width: 200px;
    object-fit: cover;
    height: 100px;
}

.right-sidebar .game-thumb {
    height: 100px;
}

.start-button button {
    background: none;
    color: white;
    font-size: 18px;
    height: auto;
    padding: 6px 30px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
}

.start-button button i {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    width: 45px;
    height: 45px;
    margin: 0 auto 10px;
    border-radius: 100%;
    color: #000;
    line-height: 45px;
}

.start-button-alt {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 4;
    text-align: center;
    display: none;
}

@media (max-width: 1200px) {
    .start-button-alt {
        display: block;
    }
    .play-game-overlay {
        background: rgba(0, 0, 0, 0.9);
    }
}

.fullscreen-inline-btn {
    background: none;
    border: none;
    font-size: 30px;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    margin-left: auto;
    margin-right: 25px;
}

.fullscreen-inline-btn:hover {
    background: #e0e0e0;
}

.portrait-btn {
    background: #212233;
    border: none;
    font-size: 14px;
    padding: 8px 16px;
    cursor: pointer;
    /* display: flex; */
    align-items: center;
    justify-content: center;
    color: #fff;
    border-radius: 8px;
    margin-right: 10px;
    font-weight: 500;
    display: none;
}

.portrait-btn:hover {
    /* background: #8a0303; */
    transform: scale(1.1);
}

@media (max-width: 1200px) {
    .portrait-btn {
        display: flex !important;
    }
}

.back-button {
    position: absolute;
    /* top: 5px; */
    left: 5px;
    /* background: #AD0404; */
    color: white;
    padding: 5px 10px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    z-index: 100;
    display: none;
}

.game-iframe-wrapper {
    min-height: 487px;
    /* height: {{ $game->height ?? '487px' }}; */
    overflow: hidden;
    -webkit-overflow-scrolling: touch;
    position: relative;
}

.game-iframe-container {
    width: 100%;
    min-height: 487px;
    -webkit-overflow-scrolling: touch;
}

#gameIframe {
    width: 100% !important;
    height: 100%;
    border: none;
    -webkit-overflow-scrolling: touch;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}


/* iOS specific styles */

@supports (-webkit-touch-callout: none) {
    /* .play-game {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100%;
        margin: 0;
        z-index: 9999;
    } */
    .game-iframe-wrapper {
        height: 100vh !important;
        min-height: 100vh;
    }
    .game-footer {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
    }
}

.game-footer {
    display: flex;
    flex-flow: row;
    -webkit-box-pack: justify;
    justify-content: space-between;
    -webkit-box-align: center;
    align-items: center;
    user-select: none;
    box-sizing: content-box;
    background: rgb(33, 34, 51);
    z-index: 3;
    width: 100%;
    height: 45px;
    color: #fff;
    position: relative;
    padding: 0 15px;
}

.com-logo {
    box-sizing: border-box;
    display: flex;
    flex-flow: wrap;
    -webkit-box-align: center;
    align-items: center;
    -webkit-box-pack: center;
    justify-content: center;
}

.com-logo img {
    width: 100PX;
    display: inline-block;
    margin-right: 10px;
}

.com-logo h1 {
    display: inline-block;
    font-size: 14px;
    font-weight: 600;
}

.col-lg-9 .ad-box-game-detail {
    text-align: center;
    /* max-width: {{ $game->width ?? '922px' }}; */
    margin: 0 auto 30px;
}

@media (max-width: 1200px) {
    .margin-top-mobile {
        margin-top: 30px;
    }
}

.game-name::after {
    content: "";
}


/* On mobile, show only first 5 words */

@media (max-width: 767px) {
    .game-name {
        display: inline-block;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
        max-width: 140px;
        /* adjust width as needed */
    }
    .portrait-game {
        margin-top: 15px;
    }
    .portrait-game-img {
        height: auto !important;
    }
}

.like-button {
    background: none;
    border: none;
    font-size: 30px;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    margin-left: auto;
    margin-right: 25px;
}

.like-button:hover {
    transform: scale(1.1);
}

.like-button i.fa-solid {
    color: #4AF0A7 !important;
}

.like-button {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 20px;
    padding: 8px 12px;
    transition: all 0.3s;
}

.like-button:hover {
    transform: scale(1.1);
}

.content-area {
    overflow: hidden;
}

.game-details-content {
    background: rgba(33, 34, 51, 0.9);
    padding: 30px;
    border-radius: 10px;
    color: #fff;
    margin: 0 auto 30px;
    /* max-width: {{ $game->width ?? '922px' }}; */
}
