body[data-active-theme="fbaji"],
body[data-active-theme="fbaji"] .container {
    background: #1b1b1b !important;
    color: #f4f0e8
}

body[data-active-theme="fbaji"] {
    padding-bottom: 0 !important
}

.fbaji-category-catalog {
    box-sizing: border-box;
    display: flex;
    width: 100%;
    max-width: 1180px;
    height: var(--fbaji-catalog-available-height, calc(100vh - 190px));
    min-height: 0;
    flex-direction: column;
    overflow: hidden;
    margin: 0 auto;
    padding: 0 10px 12px;
    background: #1b1b1b;
    color: #f4f0e8
}

.fbaji-catalog-category-rail {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    margin: 0 -10px 12px;
    padding: 4px 10px 10px;
    scrollbar-width: none;
    scroll-snap-type: x mandatory;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch
}

.fbaji-catalog-category-rail::-webkit-scrollbar {
    display: none
}

.fbaji-catalog-category-rail a {
	box-sizing: border-box;
	display: flex;
	flex: 0 0 auto;
	min-width: 90px;
	height: 41px;
	align-items: center;
	justify-content: center;
	gap: 7px;
	padding: 0 8px;
	border: 1px solid #6a5a35;
	border-radius: 25px;
	background: linear-gradient(145deg,#303033,#202022);
	box-shadow: inset 0 1px #ffffff12;
	color: #f0ece5;
	font-size: 13px;
	font-weight: 700;
	text-decoration: none;
	white-space: nowrap;
	scroll-snap-align: center;
	transition: background .22s,border-color .22s,color .22s,transform .22s,box-shadow .22s;
}

.fbaji-catalog-category-rail a img {
    display: block;
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    object-fit: contain
}

.fbaji-catalog-category-rail a span {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap
}

.fbaji-catalog-category-rail a.is-active {
    border-color: #ffc13b;
    background: linear-gradient(110deg, #ffd35d 0%, #ffad13 48%, #ff8d00 100%);
    box-shadow: inset 0 1px #fff8d9, 0 3px 10px #e4a51b36;
    color: #332006
}

.fbaji-catalog-category-rail a:active {
    transform: scale(.96)
}

.fbaji-catalog-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    margin: 0 0 11px;
    padding: 0 2px
}

.fbaji-catalog-heading span {
    color: #d6a539;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase
}

.fbaji-catalog-heading h1 {
    margin: 1px 0 0;
    color: #f5f0e5;
    font-size: 20px;
    line-height: 1.2
}

.fbaji-catalog-heading small {
    padding: 5px 9px;
    border: 1px solid #51452d;
    border-radius: 20px;
    background: #29261f;
    color: #d7bd81;
    font-size: 10px
}

.fbaji-catalog-search {
    box-sizing: border-box;
    display: flex;
    height: 42px;
    align-items: center;
    gap: 10px;
    margin: 0 0 11px;
    padding: 0 12px;
    border: 1px solid #9b722b;
    border-radius: 24px;
    background: #202020;
    box-shadow: inset 0 1px 5px #0008;
    color: #c99831
}

.fbaji-catalog-search>i {
    font-size: 14px
}

.fbaji-catalog-search input {
    width: 100%;
    min-width: 0;
    height: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: #f7f0e4;
    font-size: 13px
}

.fbaji-catalog-search input::placeholder {
    color: #9a958b
}

.fbaji-catalog-search input::-webkit-search-cancel-button {
    display: none
}

.fbaji-catalog-search button {
    display: grid;
    width: 25px;
    height: 25px;
    flex: none;
    place-items: center;
    border: 1px solid #ffffff30;
    border-radius: 50%;
    background: #37332b;
    color: #ffd56e;
    font-size: 19px;
    line-height: 1;
    cursor: pointer
}

.fbaji-catalog-search button[hidden] {
    display: none
}

.fbaji-catalog-body {
    display: grid;
    flex: 1;
    min-height: 0;
    grid-template-columns: 84px minmax(0, 1fr);
    gap: 7px;
    align-items: stretch;
    overflow: hidden
}

.fbaji-provider-rail {
    position: relative;
    top: auto;
    display: flex;
    height: 100%;
    max-height: none;
    min-height: 0;
    flex-direction: column;
    gap: 4px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 0 3px 4px 0;
    scrollbar-width: thin;
    scrollbar-color: #87764d transparent
}

.fbaji-provider-rail a {
    box-sizing: border-box;
    display: flex;
    min-height: 65px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    border: 1px solid transparent;
    border-radius: 9px;
    background: linear-gradient(145deg, #292824, #1c1c1c);
    color: #c9c3b7;
    text-align: center;
    text-decoration: none;
    transition: background .2s, border-color .2s, transform .2s
}

.fbaji-provider-rail a b {
    max-width: 100%;
    overflow: hidden;
    color: #e9e4d8;
    font-size: 12px;
    line-height: 1.1;
    text-overflow: ellipsis
}

.fbaji-provider-rail a img {
    display: block;
    width: 54px;
    height: 38px;
    object-fit: contain;
    filter: drop-shadow(0 1px 3px #0009)
}

.fbaji-provider-rail a img[hidden],
.fbaji-provider-rail a b[hidden] {
    display: none
}

.fbaji-provider-rail a small {
    font-size: 9px;
    line-height: 1.1
}

.fbaji-provider-rail a.is-active {
    border-color: #b88b2c;
    background: linear-gradient(145deg, #40351e, #27241e);
    box-shadow: inset 0 0 0 1px #d8a3322b;
    color: #ffc344
}

.fbaji-provider-rail a.is-active b {
    color: #ffc344
}

.fbaji-provider-rail a:active {
    transform: scale(.96)
}

.fbaji-catalog-results {
    height: 100%;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: #78643c transparent
}

.fbaji-catalog-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 8px;
    row-gap: 10px;
    align-items: start
}

.fbaji-catalog-game {
    display: flex;
    min-width: 0;
    flex-direction: column;
    overflow: hidden;
    color: #f4f0e8;
    text-align: center;
    text-decoration: none;
    opacity: 0;
    animation: fbajiCatalogIn .28s ease-out forwards;
    animation-delay: calc(min(var(--card-index, 0), 20)*12ms);
    transition: transform .18s ease, filter .18s ease
}

.fbaji-catalog-art {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 1/1;
    overflow: hidden;
    border: 1px solid #9b772b66;
    border-radius: 9px;
    background: linear-gradient(145deg, #353535, #111);
    box-shadow: 0 2px 5px #0008
}

.fbaji-catalog-art img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .28s ease, filter .28s ease
}

.fbaji-catalog-art>b {
    position: absolute;
    top: 3px;
    left: 3px;
    max-width: 70%;
    overflow: hidden;
    padding: 1px 5px;
    border-radius: 5px;
    background: linear-gradient(110deg, #ffd24e, #eb9907);
    box-shadow: 0 1px 3px #0008;
    color: #3b260a;
    font-size: 9px;
    line-height: 15px;
    text-overflow: ellipsis;
    white-space: nowrap
}

.fbaji-catalog-art>i {
    position: absolute;
    top: 4px;
    right: 4px;
    display: grid;
    width: 20px;
    height: 20px;
    place-items: center;
    border: 1px solid #ffffff66;
    border-radius: 50%;
    background: #17171788;
    color: #fff;
    font-size: 11px
}

.fbaji-catalog-game-name {
    display: block;
    height: 30px;
    overflow: hidden;
    padding-top: 4px;
    color: #f0ede6;
    font-size: 11px;
    line-height: 14px;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical
}

.fbaji-catalog-game:hover {
    filter: brightness(1.08);
    transform: translateY(-1px)
}

.fbaji-catalog-game:hover .fbaji-catalog-art {
    border-color: #d5a437
}

.fbaji-catalog-game:hover .fbaji-catalog-art img {
    transform: scale(1.04)
}

.fbaji-catalog-game:active {
    transform: scale(.97)
}

.fbaji-catalog-empty {
    padding: 34px 10px;
    border: 1px solid #423b2b;
    border-radius: 12px;
    background: #242424;
    color: #d9d3c7;
    text-align: center
}

.fbaji-catalog-empty[hidden] {
    display: none
}

.fbaji-catalog-loader {
    display: flex;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #d0c7b4;
    font-size: 11px
}

.fbaji-catalog-loader[hidden] {
    display: none
}

.fbaji-catalog-loader span {
    width: 15px;
    height: 15px;
    border: 2px solid #bd8b2d55;
    border-top-color: #ffbd32;
    border-radius: 50%;
    animation: fbajiCatalogSpin .7s linear infinite
}

@keyframes fbajiCatalogIn {
    from {
        opacity: 0;
        transform: translateY(6px)
    }

    to {
        opacity: 1;
        transform: translateY(0)
    }
}

@keyframes fbajiCatalogSpin {
    to {
        transform: rotate(360deg)
    }
}

@media(min-width:600px) {
    .fbaji-catalog-body {
        grid-template-columns: 110px minmax(0, 1fr);
        gap: 14px
    }

    .fbaji-catalog-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 14px
    }

    .fbaji-catalog-art {
        border-radius: 12px
    }

    .fbaji-catalog-game-name {
        height: 36px;
        font-size: 13px;
        line-height: 17px
    }

    .fbaji-provider-rail a {
        min-height: 74px
    }
}

@media(prefers-reduced-motion:reduce) {
    .fbaji-catalog-game {
        opacity: 1;
        animation: none;
        transition: none
    }

    .fbaji-catalog-art img,
    .fbaji-catalog-loader span {
        animation: none;
        transition: none
    }
}
