/* Shared responsive rules loaded only at <= 1400px. */

/* Breakpoints */
@media (max-width: 1400px) {
    .container{
        width: min(100%, calc(100% - 52px));
    }

    .games-grid,
.related-games-grid{
        grid-template-columns: repeat(10, minmax(0, 1fr));
        gap: 8px;
    }
}

@media (max-width: 1200px) {
    .container{
        width: min(100%, calc(100% - 34px));
    }

    .games-grid,
.related-games-grid{
        grid-template-columns: repeat(8, minmax(0, 1fr));
        gap: 8px;
    }

    .category-grid{
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .single-game-top-shell{
        max-width: 1120px;
    }

}

@media (max-width: 992px) {
    .container{
        width: min(100%, calc(100% - 26px));
    }

    .games-grid,
.related-games-grid{
        grid-template-columns: repeat(6, minmax(0, 1fr));
        gap: 9px;
    }

    .home-games-grid > .game-tile:nth-child(7),
.home-games-grid > .game-tile:nth-child(19),
.home-games-grid > .game-tile:nth-child(34),
.home-games-grid > .game-tile:nth-child(47){
        grid-column: span 2;
        grid-row: span 2;
    }

    .category-grid{
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .about-panel h2{
        font-size: 28px;
    }

    .single-game-top-shell{
        max-width: 100%;
    }

}

@media (max-width: 768px) {
    .single-game-inline-toast{
        top: var(--gsc-message-stack-top, 76px);
        max-width: min(calc(100vw - 22px), 360px);
        padding: 11px 15px;
        font-size: 12px;
    }

    .container{
        width: min(100%, calc(100% - 18px));
    }

    .top-shell{
        position: sticky;
        top: 0;
        z-index: 2147481000;
        padding: 12px 8px 6px;
        background: transparent;
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
        transform: translateZ(0);
        backface-visibility: hidden;
    }

    body.admin-bar .top-shell{
        top: 46px;
    }

    .site-message-stack{
        top: var(--gsc-message-stack-top, 76px);
        width: min(calc(100vw - 18px), 420px);
        gap: 7px;
    }

    .site-header{
        width: min(100%, calc(100% - 2px));
        padding: 12px 14px;
        border-radius: 22px;
    }

    .header-top{
        grid-template-columns: 42px 1fr 42px;
        gap: 10px;
    }

    .header-left{
        width: 42px;
        justify-content: flex-start;
    }

    .header-right{
        width: 42px;
        justify-content: flex-end;
    }

    .site-logo{
        justify-self: center;
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .site-logo img{
        width: auto;
        max-width: 275px;
        height: auto;
        max-height: 62px;
    }

    .menu-toggle,
    .search-toggle{
        width: 42px;
        height: 42px;
        border-radius: 12px;
    }

    .desktop-only-tool{
        display: none !important;
    }


    .header-dropdown{
        width: min(340px, calc(100vw - 20px));
    }

    .mobile-only-block{
        display: block;
    }

    .header-panel-menu{
        padding: 14px;
    }

    .header-panel-menu,
.header-panel-search,
.header-panel-account{
        max-height: min(74vh, 560px);
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        contain: layout paint;
    }

    .header-dropdown,
.search-dropdown,
.account-dropdown{
        will-change: auto;
    }

    .games-grid,
.related-games-grid{
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 10px;
    }

    .home-games-grid > .game-tile:nth-child(7),
.home-games-grid > .game-tile:nth-child(19),
.home-games-grid > .game-tile:nth-child(34),
.home-games-grid > .game-tile:nth-child(47){
        grid-column: span 1;
        grid-row: span 1;
        border-radius: 16px;
    }

    .game-tile{
        border-radius: 16px;
    }

    .game-tile-rating-badge{
        display: none;
    }

    .game-tile-rating-star{
        font-size: 12px;
    }

    .game-tile-rating-value{
        font-size: 10px;
    }

    .game-tile-meta{
        left: 8px;
        right: 8px;
        bottom: 8px;
        opacity: 0;
        transform: translateY(8px);
        min-height: calc(100% - 16px);
    }

    .game-tile::after{
        opacity: 0.92;
        background: linear-gradient(
            180deg,
            rgba(18, 12, 28, 0.00) 0%,
            rgba(18, 12, 28, 0.02) 42%,
            rgba(18, 12, 28, 0.10) 66%,
            rgba(18, 12, 28, 0.28) 84%,
            rgba(18, 12, 28, 0.44) 100%
        );
    }

    .game-tile-title{
        font-size: 11px;
        line-height: 1.24;
    }

    .category-grid{
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .category-card{
        min-height: 88px;
        border-radius: 18px;
        gap: 10px;
        padding: 12px 14px;
    }

    .category-icon{
        width: 64px;
        height: 64px;
        min-width: 64px;
    }

    .category-name{
        font-size: 14px;
    }

    .about-panel{
        padding: 22px 18px;
        border-radius: 20px;
    }

    .about-panel h2{
        font-size: 24px;
    }

    .about-panel p{
        font-size: 15px;
        line-height: 1.75;
    }

    .footer-inner{
        flex-direction: column;
        padding: 18px;
    }

    .footer-logo img{
        max-width: 225px;
    }

    .single-game-page.container{
        width: min(100%, calc(100% - 14px));
    }

    .single-game-top-shell{
        padding: 14px 14px 18px;
        border-radius: 20px;
    }

    .single-game-header-main{
        flex-direction: row !important;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
    }

    .single-game-header-tools{
        width: auto !important;
        margin-left: auto;
        justify-content: flex-end;
    }

    .single-game-title{
        font-size: 22px;
        letter-spacing: -0.01em;
        flex: 1;
    }

    .single-game-meta-chip{
        min-height: 32px;
        padding: 0 12px;
        font-size: 12px;
    }

    .single-game-player-shell{
        border-radius: 18px;
        width: 100%;
    }

    .single-game-rating-box{
        min-height: 40px;
        padding: 0 12px;
        gap: 10px;
        border-radius: 12px;
    }

    .single-game-rating-star{
        font-size: 17px;
    }

    .single-game-rating-text{
        font-size: 12px;
    }

    .single-game-rating-text strong{
        font-size: 14px;
    }

    .single-game-share-wrap{
        display: inline-flex;
        position: relative;
    }

    .single-game-share-menu{
        right: 0;
        left: auto;
        transform: none;
        min-width: 228px;
        max-width: min(260px, calc(100vw - 28px));
    }

    .single-game-share-menu a,
.single-game-share-copy{
        min-height: 48px;
        font-size: 14px;
    }

    .single-game-description-box,
.single-game-content{
        font-size: 15px;
        line-height: 1.8;
    }

    .pagination .page-numbers{
        min-width: 38px;
        height: 38px;
        font-size: 13px;
    }
}

@media (max-width: 430px) {
    .header-top{
        grid-template-columns: 42px minmax(0, 1fr);
        gap: 10px;
    }

    .header-right{
        display: none;
    }

    .site-logo{
        grid-column: 2;
        justify-self: start;
        width: auto;
        max-width: 100%;
        overflow: visible;
    }

    .site-logo img{
        width: auto;
        max-width: 275px;
        max-height: 62px;
    }
}
