/* =========================================================
   BROWSER GAME PAGE
   ALL CLASSES ARE PREFIXED WITH bg-
   ========================================================= */

.bg-page {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    box-sizing: border-box;
}


/* =========================================================
   BREADCRUMB
   ========================================================= */

.bg-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;

    margin-bottom: 18px;

    font-size: 12px;
    opacity: .65;
}

.bg-breadcrumb a {
    text-decoration: none;
}

.bg-breadcrumb strong {
    font-weight: 600;
    opacity: .9;
}


/* =========================================================
   TOP AREA
   ========================================================= */

.bg-top {
    display: grid;

    grid-template-columns:
        190px
        minmax(0, 1fr)
        300px;

    gap: 20px;

    margin-bottom: 28px;

    align-items: start;
}


/* =========================================================
   GAME COVER
   IMPORTANT:
   DLE [xfvalue_poster] generates .xfieldimagegallery.poster
   which conflicts with global .poster CSS.
   Everything below is isolated to .bg-cover.
   ========================================================= */

.bg-cover {
    position: relative;

    width: 190px;
    height: 270px;

    min-width: 0;

    overflow: hidden;

    border-radius: 18px;

    background: #111820;

    border: 1px solid rgba(255,255,255,.08);

    box-shadow:
        0 18px 45px rgba(0,0,0,.28);

    box-sizing: border-box;
}


/* Reset DLE generated poster/gallery */

.bg-cover .xfieldimagegallery.poster {
    position: static !important;

    inset: auto !important;

    display: block !important;

    width: 100% !important;
    height: 100% !important;

    margin: 0 !important;
    padding: 0 !important;

    overflow: hidden !important;

    list-style: none !important;

    background: transparent !important;

    border: 0 !important;

    box-shadow: none !important;

    z-index: auto !important;
}


/* Remove global .poster pseudo element */

.bg-cover .xfieldimagegallery.poster::before,
.bg-cover .xfieldimagegallery.poster::after {
    content: none !important;

    display: none !important;
}


/* Gallery list */

.bg-cover .xfieldimagegallery.poster li {
    display: block !important;

    width: 100% !important;
    height: 100% !important;

    margin: 0 !important;
    padding: 0 !important;

    position: static !important;
}


/* Gallery link */

.bg-cover .xfieldimagegallery.poster a {
    display: block !important;

    width: 100% !important;
    height: 100% !important;

    position: static !important;

    margin: 0 !important;
    padding: 0 !important;

    background: transparent !important;
}


/* Actual poster image */

.bg-cover .xfieldimagegallery.poster img {
    position: static !important;

    inset: auto !important;

    display: block !important;

    width: 100% !important;
    height: 100% !important;

    max-width: none !important;
    max-height: none !important;

    margin: 0 !important;
    padding: 0 !important;

    object-fit: cover !important;
    object-position: center !important;

    border: 0 !important;

    border-radius: 0 !important;

    box-shadow: none !important;

    transform: none !important;

    z-index: auto !important;
}


/* Remove possible generated text/span */

.bg-cover .xfieldimagegallery.poster span {
    position: static !important;

    display: none !important;
}


/* =========================================================
   INTRO
   ========================================================= */

.bg-intro {
    min-width: 0;

    padding: 5px 0;
}

.bg-intro h1 {
    margin: 0;

    font-size: 31px;
    line-height: 1.15;

    font-weight: 750;
}

.bg-subtitle {
    margin-top: 6px;

    font-size: 13px;

    opacity: .55;
}


/* =========================================================
   META
   ========================================================= */

.bg-meta {
    display: flex;

    flex-wrap: wrap;

    align-items: center;

    gap: 6px;

    margin-top: 13px;
}

.bg-meta span {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    min-height: 25px;

    padding: 0 9px;

    border-radius: 5px;

    background: rgba(255,255,255,.065);

    font-size: 10px;

    line-height: 1;
}

.bg-meta .bg-free {
    background: rgba(40,190,105,.13);

    color: #39d98a;

    border: 1px solid rgba(40,190,105,.20);

    font-weight: 700;
}


/* =========================================================
   DESCRIPTION
   ========================================================= */

.bg-description {
    max-width: 720px;

    margin: 15px 0;

    font-size: 13px;

    line-height: 1.65;

    opacity: .76;
}


/* =========================================================
   ACTIONS
   ========================================================= */

.bg-actions {
    display: flex;

    flex-wrap: wrap;

    gap: 9px;

    margin-top: 15px;
}

.bg-play-button,
.bg-action-button {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    min-height: 44px;

    padding: 0 17px;

    border-radius: 7px;

    text-decoration: none;

    box-sizing: border-box;

    font-size: 11px;

    font-weight: 700;

    transition:
        transform .18s ease,
        background .18s ease,
        filter .18s ease;
}

.bg-play-button {
    background: #e50914;

    color: #fff;
}

.bg-play-button:hover {
    background: #f20d19;

    transform: translateY(-2px);
}

.bg-play-button span {
    margin-right: 7px;

    font-size: 14px;
}

.bg-action-button {
    background: rgba(255,255,255,.065);

    border: 1px solid rgba(255,255,255,.09);

    color: inherit;
}

.bg-action-button:hover {
    background: rgba(255,255,255,.11);

    transform: translateY(-2px);
}

.bg-action-button span {
    margin-right: 7px;

    font-size: 14px;
}


/* =========================================================
   QUICK INFO
   ========================================================= */

.bg-quick-info {
    display: flex;

    flex-wrap: wrap;

    gap: 0;

    margin-top: 18px;
}

.bg-quick-item {
    display: flex;

    flex-direction: column;

    min-width: 105px;

    padding-right: 20px;

    margin-right: 20px;

    border-right:
        1px solid rgba(255,255,255,.07);
}

.bg-quick-item:last-child {
    border-right: 0;
}

.bg-quick-item span {
    font-size: 9px;

    opacity: .45;
}

.bg-quick-item strong {
    margin-top: 4px;

    font-size: 10px;

    font-weight: 600;
}


/* =========================================================
   RIGHT SIDE
   ========================================================= */

.bg-side {
    min-width: 0;

    display: flex;

    flex-direction: column;

    gap: 9px;
}


/* =========================================================
   RATING
   ========================================================= */

.bg-rating-box {
    padding: 15px;

    border-radius: 9px;

    background: rgba(255,255,255,.05);

    text-align: center;

    border:
        1px solid rgba(255,255,255,.04);
}

.bg-rating {
    display: flex;

    align-items: baseline;
    justify-content: center;

    gap: 4px;
}

.bg-rating > span {
    color: #ffc400;

    font-size: 25px;
}

.bg-rating strong {
    font-size: 28px;

    font-weight: 750;
}

.bg-rating small {
    font-size: 11px;

    opacity: .5;
}

.bg-rating-label {
    margin-top: 3px;

    font-size: 9px;

    opacity: .5;
}

.bg-votes {
    margin-top: 3px;

    font-size: 9px;

    opacity: .38;
}


/* =========================================================
   GAME DETAILS
   ========================================================= */

.bg-details {
    padding: 12px 15px;

    border-radius: 9px;

    background: rgba(255,255,255,.035);

    border:
        1px solid rgba(255,255,255,.035);

    box-sizing: border-box;
}

.bg-detail-row {
    display: grid;

    grid-template-columns:
        88px
        minmax(0,1fr);

    gap: 7px;

    align-items: start;

    padding: 8px 0;

    border-bottom:
        1px solid rgba(255,255,255,.05);

    font-size: 10px;
}

.bg-detail-row:last-child {
    border-bottom: 0;
}

.bg-detail-row label {
    opacity: .48;
}

.bg-detail-row strong {
    font-weight: 500;

    line-height: 1.4;
}

.bg-green {
    color: #3ed98a !important;
}


/* =========================================================
   MAIN AREA
   ========================================================= */

.bg-middle {
    display: grid;

    grid-template-columns:
        minmax(0,1fr)
        300px;

    gap: 20px;

    align-items: start;
}

.bg-main-column {
    min-width: 0;
}

.bg-right-column {
    min-width: 0;

    display: flex;

    flex-direction: column;

    gap: 12px;
}


/* =========================================================
   SECTION
   ========================================================= */

.bg-section {
    margin-bottom: 24px;

    min-width: 0;
}

.bg-section-title {
    display: flex;

    align-items: center;
    justify-content: space-between;

    margin-bottom: 11px;
}

.bg-section-title h2 {
    margin: 0;

    font-size: 17px;

    font-weight: 700;
}

.bg-section-title a {
    font-size: 10px;

    text-decoration: none;

    opacity: .55;
}


/* =========================================================
   GAME PLAYER
   ========================================================= */

.bg-game-player {
    position: relative;

    width: 100%;

    aspect-ratio: 16 / 9;

    overflow: hidden;

    border-radius: 10px;

    background: #080d12;

    border:
        1px solid rgba(255,255,255,.07);

    box-shadow:
        0 15px 40px rgba(0,0,0,.22);
}

.bg-game-player iframe {
    display: block;

    width: 100% !important;
    height: 100% !important;

    margin: 0 !important;
    padding: 0 !important;

    border: 0 !important;

    outline: 0 !important;
}


/* =========================================================
   OVERVIEW
   ========================================================= */

.bg-overview {
    padding: 16px 17px;

    border-radius: 8px;

    background: rgba(255,255,255,.035);

    border:
        1px solid rgba(255,255,255,.04);

    font-size: 11px;

    line-height: 1.75;

    opacity: .78;
}

.bg-overview p {
    margin: 0 0 10px;
}

.bg-overview p:last-child {
    margin-bottom: 0;
}


/* =========================================================
   FEATURES
   ========================================================= */

.bg-features {
    display: grid;

    grid-template-columns:
        repeat(2,minmax(0,1fr));

    gap: 10px;
}

.bg-feature {
    display: flex;

    gap: 11px;

    padding: 14px;

    border-radius: 8px;

    background: rgba(255,255,255,.035);

    border:
        1px solid rgba(255,255,255,.045);

    box-sizing: border-box;
}

.bg-feature > span {
    display: flex;

    align-items: center;
    justify-content: center;

    flex: 0 0 28px;

    width: 28px;
    height: 28px;

    border-radius: 50%;

    background: rgba(40,205,115,.12);

    color: #39d98a;

    font-size: 13px;

    font-weight: 700;
}

.bg-feature strong {
    display: block;

    font-size: 11px;

    font-weight: 650;
}

.bg-feature p {
    margin: 5px 0 0;

    font-size: 9px;

    line-height: 1.5;

    opacity: .5;
}


/* =========================================================
   CONTROLS
   ========================================================= */

.bg-controls {
    display: grid;

    grid-template-columns:
        repeat(2,minmax(0,1fr));

    gap: 8px;
}

.bg-control-row {
    display: flex;

    align-items: center;

    gap: 12px;

    min-height: 58px;

    padding: 10px 13px;

    border-radius: 8px;

    background: rgba(255,255,255,.035);

    border:
        1px solid rgba(255,255,255,.045);

    box-sizing: border-box;
}

.bg-keys {
    display: flex;

    align-items: center;

    gap: 4px;

    min-width: 55px;
}

.bg-control-row kbd {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    min-width: 27px;

    height: 27px;

    padding: 0 6px;

    border-radius: 5px;

    background: #1b232d;

    border:
        1px solid rgba(255,255,255,.10);

    box-shadow:
        0 2px 0 rgba(255,255,255,.04);

    font-family: inherit;

    font-size: 10px;

    font-weight: 700;
}

.bg-control-row strong {
    font-size: 11px;

    font-weight: 600;
}


/* =========================================================
   RELATED GAMES
   ========================================================= */

.bg-related {
    display: grid;

    grid-template-columns:
        repeat(6,minmax(0,1fr));

    gap: 10px;
}

.bg-related > * {
    min-width: 0;
}


/* =========================================================
   SHARE
   ========================================================= */

.bg-share {
    padding: 14px 15px;

    border-radius: 9px;

    background: rgba(255,255,255,.04);

    border:
        1px solid rgba(255,255,255,.04);
}

.bg-share h2,
.bg-info-box h2,
.bg-tech h2 {
    margin: 0 0 12px;

    font-size: 15px;
}

.bg-share-buttons {
    display: flex;

    gap: 9px;

    flex-wrap: wrap;
}

.bg-share-buttons a {
    display: flex;

    align-items: center;
    justify-content: center;

    width: 35px;
    height: 35px;

    border-radius: 50%;

    background: rgba(255,255,255,.075);

    text-decoration: none;

    font-size: 14px;

    font-weight: 700;

    transition:
        transform .15s ease,
        background .15s ease;
}

.bg-share-buttons a:hover {
    transform: translateY(-2px);

    background: rgba(255,255,255,.13);
}


/* =========================================================
   GAME INFO
   ========================================================= */

.bg-info-box {
    padding: 15px;

    border-radius: 9px;

    background:
        linear-gradient(
            145deg,
            rgba(255,255,255,.055),
            rgba(255,255,255,.025)
        );

    border:
        1px solid rgba(255,255,255,.06);

    box-sizing: border-box;
}

.bg-info-row {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 10px;

    padding: 8px 0;

    border-bottom:
        1px solid rgba(255,255,255,.05);

    font-size: 10px;
}

.bg-info-row:last-of-type {
    border-bottom: 0;
}

.bg-info-row label {
    opacity: .5;
}

.bg-info-row strong {
    text-align: right;

    font-weight: 600;
}


/* =========================================================
   TECHNICAL DETAILS
   ========================================================= */

.bg-tech {
    padding: 14px 15px;

    border-radius: 9px;

    background: rgba(255,255,255,.035);

    border:
        1px solid rgba(255,255,255,.04);
}

.bg-tech-row {
    display: grid;

    grid-template-columns:
        82px
        minmax(0,1fr);

    gap: 7px;

    padding: 8px 0;

    border-bottom:
        1px solid rgba(255,255,255,.05);

    font-size: 10px;
}

.bg-tech-row:last-child {
    border-bottom: 0;
}

.bg-tech-row label {
    opacity: .45;
}

.bg-tech-row strong {
    font-weight: 500;

    line-height: 1.4;
}


/* =========================================================
   FOOTER
   ========================================================= */

.bg-footer-meta {
    display: flex;

    flex-wrap: wrap;

    gap: 18px;

    padding-top: 13px;

    border-top:
        1px solid rgba(255,255,255,.06);

    font-size: 9px;

    opacity: .42;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1100px) {

    .bg-top {
        grid-template-columns:
            160px
            minmax(0,1fr)
            260px;
    }

    .bg-cover {
        width: 160px;
        height: 230px;
    }

    .bg-middle {
        grid-template-columns:
            minmax(0,1fr)
            260px;
    }

    .bg-related {
        grid-template-columns:
            repeat(5,minmax(0,1fr));
    }

}


/* =========================================================
   SMALL LAPTOP
   ========================================================= */

@media (max-width: 900px) {

    .bg-top {
        grid-template-columns:
            150px
            minmax(0,1fr);
    }

    .bg-cover {
        width: 150px;
        height: 215px;
    }

    .bg-side {
        grid-column: 1 / -1;

        display: grid;

        grid-template-columns:
            240px
            minmax(0,1fr);

        gap: 12px;
    }

    .bg-middle {
        grid-template-columns: 1fr;
    }

    .bg-right-column {
        display: grid;

        grid-template-columns:
            240px
            minmax(0,1fr);

        gap: 12px;
    }

}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 768px) {

    .bg-page {
        width: 100%;
    }


    .bg-breadcrumb {
        margin-bottom: 12px;

        font-size: 10px;
    }


    /* TOP */

    .bg-top {
        grid-template-columns:
            105px
            minmax(0,1fr);

        gap: 13px;

        margin-bottom: 18px;
    }


    /* COVER */

    .bg-cover {
        width: 105px;
        height: 150px;

        border-radius: 16px;
    }


    /* INTRO */

    .bg-intro {
        padding: 0;
    }

    .bg-intro h1 {
        font-size: 21px;
    }

    .bg-subtitle {
        margin-top: 4px;

        font-size: 9px;
    }


    /* META */

    .bg-meta {
        gap: 4px;

        margin-top: 8px;
    }

    .bg-meta span {
        min-height: 22px;

        padding: 0 6px;

        font-size: 8px;
    }


    /* DESCRIPTION */

    .bg-description {
        grid-column: 1 / -1;

        max-width: none;

        margin: 11px 0;

        font-size: 10px;

        line-height: 1.6;
    }


    /* ACTIONS */

    .bg-actions {
        grid-column: 1 / -1;

        width: 100%;

        gap: 7px;
    }

    .bg-play-button,
    .bg-action-button {
        flex: 1;

        min-width: 0;

        min-height: 43px;

        padding: 0 8px;

        font-size: 9px;
    }


    /* QUICK INFO */

    .bg-quick-info {
        grid-column: 1 / -1;

        margin-top: 10px;
    }

    .bg-quick-item {
        min-width: 0;

        flex: 1;

        padding-right: 10px;

        margin-right: 10px;
    }

    .bg-quick-item span {
        font-size: 8px;
    }

    .bg-quick-item strong {
        font-size: 9px;
    }


    /* SIDE */

    .bg-side {
        grid-column: 1 / -1;

        display: flex;

        flex-direction: column;
    }


    .bg-rating-box {
        padding: 11px;
    }

    .bg-details {
        padding: 9px 12px;
    }


    /* MAIN */

    .bg-middle {
        grid-template-columns: 1fr;

        gap: 14px;
    }

    .bg-right-column {
        display: grid;

        grid-template-columns:
            1fr 1fr;

        gap: 10px;
    }


    /* PLAYER */

    .bg-game-player {
        border-radius: 8px;
    }


    /* FEATURES */

    .bg-features {
        grid-template-columns: 1fr;

        gap: 7px;
    }


    /* CONTROLS */

    .bg-controls {
        grid-template-columns: 1fr;

        gap: 7px;
    }


    /* RELATED */

    .bg-related {
        grid-template-columns:
            repeat(4,minmax(0,1fr));

        gap: 7px;
    }

}


/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 480px) {

    .bg-top {
        grid-template-columns:
            88px
            minmax(0,1fr);

        gap: 10px;
    }


    .bg-cover {
        width: 88px;
        height: 126px;

        border-radius: 14px;
    }


    .bg-intro h1 {
        font-size: 18px;
    }

    .bg-subtitle {
        font-size: 8px;
    }


    .bg-meta span {
        min-height: 20px;

        padding: 0 5px;

        font-size: 7px;
    }


    .bg-description {
        font-size: 9px;
    }


    .bg-actions {
        flex-direction: column;
    }

    .bg-play-button,
    .bg-action-button {
        width: 100%;

        flex: none;
    }


    .bg-quick-info {
        gap: 0;
    }

    .bg-quick-item {
        padding-right: 7px;

        margin-right: 7px;
    }


    .bg-right-column {
        grid-template-columns: 1fr;
    }


    .bg-related {
        grid-template-columns:
            repeat(3,minmax(0,1fr));
    }


    .bg-footer-meta {
        flex-direction: column;

        gap: 5px;
    }

}