/* ================= BASE ================= */
:root {
    --bg: rgb(10, 13, 15);
    --card: #0f162e;
    --primary: rgb(197, 32, 33);
    --text: #e3e3e3;
    --gray: #6e7a8a;
    --white: #fff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', sans-serif;
}

/* ===== HEADER ===== */
.header-games {
    text-align: center;
    padding: 30px 10px;
}

.logo {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 15px;
    color: #fff;
}

.search-container {
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
}

#searchInput {
    width: 100%;
    padding: 12px 18px;
    border-radius: 30px;
    border: none;
    background: #101a3b;
    color: #fff;
    font-size: 15px;
}

/* ===== FILTER TABS ===== */
.filters {
    width: 100%;
    max-width: 1100px;
    margin: 30px auto 10px auto;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

.filter-tabs button {
    padding: 8px 16px;
    background: #0f162e;
    color: var(--gray);
    border: 1px solid transparent;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: 0.3s ease;
}

.filter-tabs button.active,
.filter-tabs button:hover {
    color: #fff;
    border-color: var(--primary);
    background: #131c43;
}

/* ===== CARD GRID ===== */
.games-container {
    width: 100%;
    max-width: 1200px;
    margin: 40px auto;
    display: grid;
    grid-template-columns: repeat(4, 276px);
    justify-content: space-between;
    gap: 30px 0;
    padding: 0 16px;   /* thêm padding mobile */
}

/* ===== CARD ===== */
.game-card {
    width: 276px;
    height: 414px;
    background: #0f162e;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    transition: .3s ease;
}

.game-card:hover .platform-icons svg {
    background: #ff004c;
    transition: .3s ease;
}

.game-thumb {
    width: 100%;
    height: 100%;
}

.game-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.game-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, .5);
}

.game-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 18px;
    background: linear-gradient(to top,
            rgba(0, 0, 0, .75),
            rgba(0, 0, 0, .4),
            transparent);
    backdrop-filter: blur(6px);
}

.game-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 10px;
    letter-spacing: .3px;
}

.btn-view {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    font-size: 12px;
    color: #fff;
    text-decoration: none;
    /* bỏ gạch chân */
    transition: .25s ease;
}

.btn-view:hover {
    background: #ff004c;
    border-color: #ff004c;
}

/* ========= PLATFORM ICONS ========= */


.platform-icons {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    gap: 8px;
    z-index: 2;
}

.platform-badge {
    width: 36px;
    height: 36px;
    background: rgba(0, 0, 0, .55);
    backdrop-filter: blur(6px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.platform-badge svg {
    width: 18px;
    height: 18px;
    fill: #fff;
}

/* ===== LOAD MORE ===== */
/* WRAPPER */
.load-more-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 60px 0 80px;
}

/* BUTTON BASE */
#loadMoreBtn {
    position: relative;
    padding: 16px 48px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .8px;
    text-transform: uppercase;
    cursor: pointer;

    border-radius: 10px;
    border: 1px solid transparent;

    color: #fff;

    background:
        linear-gradient(#111, #111) padding-box,
        linear-gradient(135deg, #ff003c, #ff2d2d) border-box;

    transition: all .35s ease;
}

/* TEXT */
#loadMoreBtn span {
    position: relative;
    z-index: 2;
}



/* HOVER */
#loadMoreBtn:hover {
    background:
        linear-gradient(#1a1a1a, #1a1a1a) padding-box,
        linear-gradient(135deg, #ff003c, #ff2d2d) border-box;

    transform: translateY(-3px);
    box-shadow: 0 0 25px rgba(255, 0, 60, .35);
}

#loadMoreBtn:hover::before {
    opacity: 1;
}

/* ACTIVE */
#loadMoreBtn:active {
    transform: translateY(0);
}

/* ===== RESPONSIVE ===== */
/* Tablet */
@media(max-width:1200px) {
    .games-container {
        grid-template-columns: repeat(3, 276px);
    }
}

/* Small Tablet */
@media(max-width:992px) {
    .games-container {
        grid-template-columns: repeat(2, 276px);
    }
}

/* Mobile */
@media(max-width:600px){

    .games-container{
        grid-template-columns: 1fr;
        justify-items: center; /* 👈 ĐẶT Ở ĐÂY */
    }

    .game-card{
        width: 100%;
        max-width: 340px;
        height: auto;
        aspect-ratio: 276/414;
    }
}
/* ================= FILTER LAYOUT ================= */

.filters {
    width: 100%;
    max-width: 1100px;
    margin: 20px auto 30px auto;
    padding: 0 10px;
}

.filters-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

/* LEFT GROUP */
.filter-left {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* RIGHT GROUP */
.filter-right {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* BUTTON BASE */
.filter-type,
.filter-platform {
    padding: 8px 16px;
    background: #111a38;
    color: #7c8aa5;
    border: 1px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all .25s ease;
}

/* PLATFORM ICON STYLE */
/* PLATFORM BUTTON */
.filter-platform {
    width: 40px;
    height: 40px;
    background: #0f162e;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all .25s ease;
    padding: 0;
}

/* SVG nhỏ hơn + sáng hơn */
.filter-platform svg {
    width: 16px;
    /* nhỏ lại */
    height: 16px;
    fill: #cfd8ff;
    /* sáng hơn */
    opacity: .9;
    transition: .25s ease;
}

/* Hover */
.filter-platform:hover {
    border-color: #ff004c;
    box-shadow: 0 0 10px rgba(255, 0, 76, .35);
}

.filter-platform:hover svg {
    fill: #ffffff;
    opacity: 1;
}

/* Active */
.filter-platform.active {
    border-color: #ff004c;
    background: #1a2248;
    box-shadow: 0 0 14px rgba(255, 0, 76, .5);
}

.filter-platform.active svg {
    fill: #ffffff;
}

/* HOVER */
.filter-type:hover,
.filter-platform:hover {
    color: #fff;
    border-color: #ff004c;
    background: #131c43;
}

/* ACTIVE */
.filter-type.active,
.filter-platform.active {
    background: #1a2248;
    border-color: #ff004c;
    color: #fff;
    box-shadow: 0 0 12px rgba(255, 0, 76, .4);
}

/* MOBILE */
@media(max-width:768px) {

    .filters-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .filter-left {
        display: none;
    }

    #searchInput {
        max-width: 100%;
    }
}