:root {
    --main-color: #ff5c21;
    --title-game-color: #555;
    --title-p-color: #222;
    --border-color: #eee;
}

body, html {
    color: var(--title-p-color);
    background: white;
}

h1 {
    font-size: 22px;
}

h2  {
    font-size: 18px;
    font-weight: 500 !important;
}

h3 {
    font-size: 16px;
}

h4 {
    font-size: 14px;
}

a, h3 {
    text-decoration: none;
    color: var(--title-game-color);
}

.logo {
    width: 100%;
    height: 35px;
    display: block;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.container {
    max-width: 991px;
    margin: 0 auto;
}

p, .bi-search::before, .btn-close-icon, .content-text {
    color: var(--title-game-color);
}

li::marker {
    color: var(--title-p-color);
}

.header-space {
    margin-top: 54px;
}

/* Header */
#header-desktop {
    top: 0;
    z-index: 9999;
    width: 100%;
    position: fixed;
    background-color: rgba(248, 249, 250);
    padding: 0.5rem 0;
}

#search-mobile {
    display: none;
}

#header-mobile-search {
    top: 0;
    z-index: 999;
    width: 100%;
    position: fixed;
    background-color: #111;
    border-color: rgba(255, 255, 255, 0.1);
    transition: transform 0.35s ease, opacity 0.35s ease;
}

.btn-group {
    border: 1px solid rgba(0, 0, 0, 0.15);
}

.btn-category {
    border-radius: 5px;
    border: none;
    background-color: transparent;
    color: var(--title-game-color);
    font-size: 24px;
    padding: 0 10px;
}

.bi-list::before {
    font-size: 30px;
}

i.bi.bi-arrow-right-short {
    color: var(--title-game-color);
}

.form-search-desktop {
    flex: 20 1 auto;
}

.content-category-thumb {
    aspect-ratio: 1;
    background-position: center;
    width: 40px;
    height: 40px;
    background-size: cover;
    background-repeat: no-repeat;
}

.content-category {
    padding: 8px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.bi-caret-right-fill {
    font-size: 12px;
}

.btn-search {

}

/* Main */
.title-category {
    color: #222;
    text-transform: capitalize;
}

.view-more-btn {
    transition: all 0.25s;
}

.card-thumb {
    background-color: var(--main-color);
    overflow: hidden;
    border-radius: 12px;
    background-position: center;
    display: block;
    background-size: cover;
    background-repeat: no-repeat;
    width: 100%;
    aspect-ratio: 1;
}

.card-name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 14px;
    color: var(--title-game-color);
    text-align: center;
    margin-top: 8px;
    font-weight: 500;
}

.view-more-btn:hover {
    color: var(--main-color);
}

.content-game-thumb:hover .card-name, .hover-a:hover {
    color: var(--main-color);
    transition: all 0.25s;
}

.content-games, .content-about{
    border-bottom: 2px solid var(--border-color);
}

.content-games:last-child {
    border-bottom: unset;
}

.content-p {
    border: 1px solid var(--border-color);
}

.game-img {
    object-fit: cover;
    border-radius: 1rem;
}

.title-h1 {
    font-size: 2rem;
    color: var(--title-game-color);
}

/* Play */
.breadcrumb-custom {
    font-size: 14px;
    flex-wrap: wrap;
}

.breadcrumb-custom i {
    font-size: 14px;
    color: #999;
    transform: translateY(1px);
}

.breadcrumb-custom .current, .instruction-text {
    color: var(--title-game-color);
}

.page-header-breadcrumb {
    border-bottom: 1px solid var(--border-color);
}

.name-game-play {
    font-size: 2rem;
    color: black
}

.tag-game {
    background: linear-gradient(135deg, #ff8a34, #ff5c21);
    color: white;
    font-weight: 600;
    padding: .3rem 1rem;
    border-radius: 999px;
}

/* Footer */
#footer {

}

/* Canvas */
.offcanvas {
    visibility: hidden;
    opacity: 0;
    transform: translateX(-100%);
    transition: visibility 0s linear 0.25s, opacity 0.25s ease, transform 0.35s ease;
}

.offcanvas.show {
    visibility: visible;
    opacity: 1;
    transform: translateX(0);
    transition-delay: 0s; /* show ngay */
}

.btn-close-icon {
    padding: 12px;
    border: none;
    background-color: #fff;
}

/* Pagination */
a.page-link {
    color: var(--title-game-color);
    font-weight: 500;
    padding: 5px 15px;
    border: none;
    background: var(--border-color);
}

a.page-link:hover {
    color: white;
    border: 1px solid var(--main-text-color);
    background: var(--main-color);
}

.active>.page-link {
    background: var(--main-color);
    border: 1px solid var(--main-text-color);
}

.next-btn i, .prev-btn i {
    font-size: 14px;
}

a.next-btn, a.prev-btn {
    border-radius: unset;
    padding: 5px 15px;
    background: var(--border-color);
}

a.next-btn:hover, a.prev-btn:hover {
    color: white;
    background: var(--main-color);
}

.page-item:first-child .page-link, .page-item:last-child .page-link {
    border-radius: unset;
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
}

.content-game-thumb {
    display: block;
    text-decoration: none;
}


/* About */
.content-about {
    h1 {
        font-weight: 700;
        color: var(--title-p-color);
    }
    h3 {
        font-weight: 500;
    }
}

li {
    color: var(--title-p-color);
}

#footer{
    border-top: 2px solid var(--border-color);
}

@media (max-width: 992px) {

}

@media (max-width: 768px) {
    .content-game-thumb {
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
    }

    .custom-pagination-wrapper {
        gap: 0.25rem !important;
        flex-wrap: wrap;
    }

    /* Ẩn bớt số trang trên mobile */
    .custom-pagination li.page-item:not(.active):nth-child(n+3):nth-last-child(n+3) {
        display: none;
    }

    /* Thu nhỏ nút */
    .custom-pagination .page-link,
    .custom-pagination-wrapper a {
        padding: 4px 12px;
        font-size: 0.875rem;
    }

}

@media (max-width: 540px) {
    #search-desktop {
        display: none;
    }
}
