:root {
    --primary-bg: #f0f4f9;
    --secondary-bg: #ffffff;
    --header-bg: #8c82ff;
    --header-gradient: linear-gradient(135deg, #7451eb 0%, #3a75e3 100%);
    --nav-bg: #e6e9f0;
    --nav-btn-bg: #ffffff;
    --nav-btn-hover-bg: #d9dce1;
    --nav-btn-active-bg: #f9f9f9;
    --text-color: #2c2f35;
    --light-text-color: #5c6270;
    --border-color: #e0e0e0;
    --search-bg: #e6e9f0;
    --search-placeholder: #5c6270;
    --search-icon: #5c6270;
    --card-bg: #ffffff;
    --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --card-hover-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    --border-radius-sm: 8px;
    --border-radius-md: 16px;
    --border-radius-lg: 24px;
}


.mona-sans {
    font-family: "Mona Sans", sans-serif;
    font-optical-sizing: auto;
    font-weight: 600;
    font-style: normal;
    font-variation-settings:
        "wdth" 100;
}


.dm-sans {
    font-family: "DM Sans", sans-serif;
    font-optical-sizing: auto;
    font-weight: 600;
    font-style: normal;
}

.manrope {
    font-family: "Manrope", sans-serif;
    font-optical-sizing: auto;
    font-weight: 500;
    font-style: normal;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Manrope', 'Mona Sans', 'DM Sans', sans-serif;
    font-weight: 500;
}

body {
    background-color: var(--primary-bg);
    color: var(--text-color);
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    padding-bottom: 0;
    background-color: var(--header-bg);
    background: linear-gradient(135deg, #7451eb 0%, #3a75e3 100%);
    background-color: var(--header-gradient);
    /* background: #833AB4; */
    /* background: linear-gradient(90deg, rgba(131, 58, 180, 1) 0%, rgba(29, 96, 253, 1) 31%, rgba(0, 145, 255, 1) 64%, rgba(252, 112, 69, 1) 100%); */

    color: var(--secondary-bg);
    /* position: sticky; */
    top: 0;
    z-index: 1000;
}

.header .logo {
    display: flex;
    align-items: center;
    font-size: 16px;
    font-weight: 700;
}

.header .logo img {
    width: 40px;
    height: 40px;
    margin-right: 8px;
    border-radius: var(--border-radius-sm);
    box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px;

}

.header .logo a {
    text-decoration: none;
    color: inherit;
}

.header .logo span {
    color: #ffffff;
}

.search-container {
    flex-grow: 1;
    max-width: 600px;
    margin: 0 24px;
    display: none;
    position: relative;
}

.search-container #search-bar {
    width: 100%;
    padding: 12px 50px 12px 20px;
    border: none;
    border-radius: 50px;
    background-color: var(--nav-bg);
    /* font-size: 16px; */
    color: var(--text-color);
    border: 2px solid #023e83;
    box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px;
}

.search-container #search-bar:focus {
    outline: none;
    border-color: #005ecb;
    box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px;
}

.search-container #search-bar::placeholder {
    color: var(--search-placeholder);
}

.search-container .search-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
}

.search-container .search-btn svg {
    color: var(--search-icon);
}

.user-actions {
    display: flex;
    align-items: center;
}

.user-actions button {
    background: var(--nav-bg);
    background: #334393;
    border: none;
    padding: 7px;
    border-radius: 50%;
    cursor: pointer;
    margin-left: 8px;
}

.user-actions button svg {
    color: var(--light-text-color);
    color: #ffffff;
}

.search-mobile-btn {
    display: block;
}

.navbar {
    display: flex;
    justify-content: space-evenly;
    /* background-color: var(--header-bg); */
    background: var(--header-gradient);
    /* background: #833AB4; */
    /* background: linear-gradient(90deg, rgba(131, 58, 180, 1) 0%, rgba(29, 96, 253, 1) 31%, rgba(0, 145, 255, 1) 64%, rgba(252, 112, 69, 1) 100%); */
    padding: 16px 16px;
    padding-right: 0;
    padding-left: 0;
    /* top: 0; */
    /* top: 60px; */
    /* Position below the header */
    z-index: 999;
}

.nav-links {
    display: flex;
    gap: 8px;
    padding-left: 8px;
    padding-right: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    white-space: nowrap;
}

.nav-links::-webkit-scrollbar {
    display: none;
}

.nav-item {
    background-color: var(--nav-btn-bg);
    background-color: #334393;
    color: var(--light-text-color);
    color: #ffffff;
    border: none;
    padding: 10px 16px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
    flex-shrink: 0;
    box-shadow: rgba(0, 0, 0, 0.993) 2px 1px 5px;
    box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px;
}

.nav-item.active {
    background-color: var(--nav-btn-active-bg);
    background-color: #ffffff;
    color: var(--text-color);
    color: #334393;
    font-weight: 700;
}

.nav-item:hover:not(.active) {
    /* background-color: var(--nav-btn-hover-bg); */
    background-color: #3d4faa;
}

.main-content {
    padding: 0;
}

.highlight-games-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 12px;
    margin-bottom: 32px;
}

.highlight-game {
    border-radius: var(--border-radius-md);
    overflow: hidden;
    cursor: pointer;
    box-shadow: var(--card-shadow);
}

.highlight-game img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    display: block;
}

.game-category-section {
    margin-bottom: 32px;
    padding: 16px;
    padding-top: 0;
}

.category-title {
    font-size: 24px;
    font-weight: 700;
    margin-top: 16px;
    margin-bottom: 16px;

}

.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
}



/* Search Results Modal */
.search-results-modal {
    display: none;
    /* Hidden by default */
    position: fixed;
    /* Stay in place */
    z-index: 1001;
    /* Sit on top */
    left: 0;
    top: 0;
    width: 100%;
    /* Full width */
    height: 100%;
    /* Full height */
    overflow: auto;
    /* Enable scroll if needed */
    background-color: rgba(0, 0, 0, 0.4);
    /* Black w/ opacity */
    justify-content: center;
    align-items: flex-start;
    /* Align to top */
    padding-top: 50px;
    /* Space from the top */
}

.search-modal-content {
    background-color: var(--primary-bg);
    margin: auto;
    padding: 20px;
    border-radius: var(--border-radius-lg);
    width: 90%;
    max-width: 800px;
    box-shadow: var(--card-hover-shadow);
    position: relative;
}

.search-modal-content .close-btn {
    color: var(--light-text-color);
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    top: 10px;
    right: 20px;
    cursor: pointer;
    background: none;
    border: none;
}

.search-modal-content .close-btn:hover,
.search-modal-content .close-btn:focus {
    color: var(--text-color);
    text-decoration: none;
    cursor: pointer;
}

@media (min-width:1180px) {
    .header {
        justify-content: space-around;
        padding: 16px 48px;
    }

    .navbar {
        padding: 16px 18rem;
    }
}

/* Responsive Design */
@media (min-width: 768px) {
    .header {
        padding: 16px 48px;
        padding: 16px 64px;
        padding-top: 32px;
        /* padding-left: 72px; */
        /* padding-right: 72px; */
    }

    .search-container {
        display: block;
    }

    .search-mobile-btn {
        display: none;
    }

    .navbar {
        /* padding: 16px 122px; */
        /* padding: 16px 14rem; */
    }

    .main-content {
        padding: 32px 48px;
    }

    .game-category-section {
        padding: 0;
    }

    .game-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}


/* Container */
.single-game-container {
    max-width: 900px;
    margin: 2rem auto;
    border-radius: 10px;
    font-family: 'Manrope', sans-serif;
    color: #333;
}




/* Responsive adjustments */
@media (max-width: 768px) {
    .category-title {
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .category-title {
        font-size: 1.2rem;
    }
}



/* Meta info container */
.single-game-meta {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
    font-size: 1rem;
}

.single-game-meta p {
    margin: 0;
}

/* Meta links */
.single-game-meta a.nav-item {
    text-decoration: none;
    background: #0077ff;
    color: #fff;
    padding: 0.3rem 0.8rem;
    border-radius: 5px;
    margin-left: 0.3rem;
    transition: background-color 0.3s ease;
}

.single-game-meta a.nav-item:hover {
    background: #005ecb;
}

/* Content */
.single-game-content {
    font-size: 1.125rem;
    line-height: 1.6;
    color: #444;
    max-width: 720px;
    margin: 0 auto 3rem auto;
    padding: 0 1rem;
}

/* Related Games section */
.related-games {
    max-width: 900px;
    margin: 0 auto 3rem auto;
    padding: 1rem;
}

@media (max-width: 768px) {
    .related-games {
        padding: 0;
    }
}

.related-games h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-align: center;
    color: #222;
}

/* Related game card grid */
.related-games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.5rem;
}

@media screen and (max-width: 768px) {
    .related-games-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    .related-games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1.5rem;
}
    
}



/* Single related game card */
.related-game-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
    text-align: center;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.related-game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.related-game-card img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-bottom: 1px solid #eee;
}

.related-game-card h3 {
    margin: 0.7rem 0 0.7rem 0;
    font-size: 1.1rem;
    color: #0077ff;
    font-weight: 600;
}

.related-game-card a {
    display: block;
    padding: 0.5rem 1rem 1rem 1rem;
    color: inherit;
    text-decoration: none;
}

.related-game-card a:hover {
    text-decoration: underline;
}