/*
 * ============================================================================
 * COMMON.CSS - Global Base Styles
 * ============================================================================
 * This file contains shared styles used across all categories:
 * - CSS custom properties (theme variables)
 * - Reset/normalize
 * - Typography
 * - Global layout utilities
 * - Shared components (navbar, buttons, forms, popup, scroll-to-top)
 * ============================================================================
 */

/* ============================================================================
 * CSS CUSTOM PROPERTIES (Theme Variables)
 * ============================================================================
 */
:root {
    /* Core backgrounds: deep black with subtle gradients */
    --primary-navy: #000000;        /* page background (deep black) */
    --secondary-dark: #0a0a0a;      /* panels and filter containers */
    --card-bg: #1a1a1a;             /* cards and dropdown surfaces */
    --gradient-bg: linear-gradient(135deg, #000000 0%, #0a0a0a 100%);

    /* Accent colours: cyberpunk yellow */
    --accent-neon: #FFEB3B;         /* primary highlight (links, sliders, borders) - cyberpunk yellow */
    --accent-light: #FFF176;        /* lighter variant for hover states and subtle glow */
    --accent-dark: #FDD835;         /* slightly darker yellow for pressed states */

    /* Typography: crisp off‑white on dark backgrounds */
    --text-light: #f0f0f0;          /* main copy colour */
    --text-muted: #888888;          /* muted descriptions and placeholders */
    --font-body: 'Exo 2', sans-serif;
    --font-heading: 'Oxanium', sans-serif;

    /* Button text on yellow backgrounds */
    --button-text-on-yellow: #000000; /* black text for contrast on yellow */

    /* Filter checkbox size */
    --check-size: 18px;

    /* Shared card image height (keeps overlay + image in sync) */
    --card-image-height: 260px;
    /* Shared card image border height (used by overlay to avoid gaps) */
    --card-image-border: 3px;
}

/* ============================================================================
 * RESET / NORMALIZE
 * ============================================================================
 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
    background-color: #000000; /* Deep black - fallback color before CSS loads */
    background: var(--gradient-bg);
    min-height: 100%;
    /* Prevent extra scrolling on mobile */
    overflow-x: hidden;
    position: relative;
}

body {
    font-family: var(--font-body);
    background-color: #000000; /* Deep black - fallback color before CSS loads */
    background: var(--gradient-bg);
    color: var(--text-light);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased; 
    -moz-osx-font-smoothing: grayscale; 
    overflow-x: hidden;
    min-height: 100vh;
    /* Prevent extra scrolling on mobile */
    position: relative;
}

/* ============================================================================
 * GLOBAL CUSTOM SCROLLBAR
 * ============================================================================
 */
/* WebKit browsers (Chrome, Safari, Edge) */
*::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

*::-webkit-scrollbar-track {
    background: var(--secondary-dark);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

*::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, 
        rgba(255, 235, 59, 0.7) 0%, 
        rgba(255, 235, 59, 0.5) 50%,
        rgba(255, 235, 59, 0.7) 100%);
    border-radius: 10px;
    border: 1px solid rgba(255, 235, 59, 0.3);
    box-shadow: 
        0 0 8px rgba(255, 235, 59, 0.4),
        inset 0 0 4px rgba(255, 235, 59, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 40px;
}

*::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, 
        rgba(255, 235, 59, 0.9) 0%, 
        rgba(255, 235, 59, 0.7) 50%,
        rgba(255, 235, 59, 0.9) 100%);
    border-color: rgba(255, 235, 59, 0.5);
    box-shadow: 
        0 0 12px rgba(255, 235, 59, 0.6),
        inset 0 0 6px rgba(255, 235, 59, 0.3);
    transform: scaleX(1.1);
}

*::-webkit-scrollbar-thumb:active {
    background: linear-gradient(180deg, 
        var(--accent-neon) 0%, 
        rgba(255, 235, 59, 0.9) 50%,
        var(--accent-neon) 100%);
    border-color: var(--accent-neon);
    box-shadow: 
        0 0 16px rgba(255, 235, 59, 0.8),
        inset 0 0 8px rgba(255, 235, 59, 0.4);
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 235, 59, 0.7) var(--secondary-dark);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ============================================================================
 * GLOBAL LAYOUT UTILITIES
 * ============================================================================
 */
.container {
    width: 100%; 
    margin: 0 auto;
    padding: 20px;
}

/* Full-width layout when home is active */
.container:has(#homeContent:not(.hidden)) {
    padding-left: 0;
    padding-right: 0;
    padding-top: 0;
}

.container.home-active {
    padding-left: 0;
    padding-right: 0;
    padding-top: 0;
}

header {
    padding: 0px 0;
    text-align: center;
    box-shadow: none;
    position: relative;
    overflow: hidden;
}

.header-container {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    max-width: 1240px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    color: var(--text-light); 
}

.logo {
    width: 60px;
    height: auto;
    position: static;
    margin-right: 20px;
    transition: transform 0.3s ease;
    will-change: transform;
    display: flex;
    align-items: center;
}

.logo-link {
    display: flex;
    align-items: center;
    line-height: 0;
    margin-left: 20px;
}

.logo-link:hover .logo {
    transform: scale(1.05);
}

.header-content {
    text-align: center;
    width: 100%;
}

/* ============================================================================
 * NAVBAR (Global Navigation)
 * ============================================================================
 */
.navbar {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0;
    flex-wrap: nowrap;
    padding: 15px 20px;
    min-height: 60px;
}

/* Master header wrapper (fixed like YouTube) */
#master-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1200;
    background: #0f0f0f;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

#master-header .navbar {
    position: relative;
    width: 100%;
    margin: 0;
    background: #0f0f0f;
    border-bottom: 1px solid rgba(255, 235, 59, 0.18);
    box-shadow: none;
    z-index: 2;
}

.nav-buttons {
    display: flex;
    align-items: center;
    gap: 30px;
    text-decoration: none;
    height: 100%;
}

.nav-divider {
    flex: 0 0 auto;
    width: 1px;
    height: 32px;
    background: rgba(255, 235, 59, 0.2);
    margin: 0 24px;
    align-self: center;
    box-shadow: 0 0 4px rgba(255, 235, 59, 0.3);
}

/* ============================================================================
 * DESKTOP SEARCH BAR
 * ============================================================================
 */
.search-container {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--card-bg);
    border: 1px solid rgba(255, 235, 59, 0.2);
    border-radius: 9999px;
    padding: 3px 6px 3px 16px;
    margin-left: auto;
    height: fit-content;
    min-width: 280px;
    max-width: 400px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    z-index: 100;
}

.search-container:focus-within {
    border-color: #FFD700;
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.4);
}

.search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-light);
    font-size: 0.9em;
    font-family: var(--font-body);
    padding: 8px 4px;
    min-width: 0;
}

.search-input::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

.search-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin-left: 8px;
    border-radius: 50%;
    background: var(--accent-neon);
    color: var(--button-text-on-yellow);
    font-size: 1.2em;
    cursor: pointer;
    border: none;
    padding: 0;
    transition: background 0.3s ease, transform 0.3s ease;
    box-shadow: 0 2px 8px rgba(255, 235, 59, 0.3);
}

.search-icon-btn:hover {
    background: var(--accent-light);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(255, 235, 59, 0.5);
}

.search-icon-btn:active {
    transform: scale(0.95);
}

/* Live Search Results Container (Hidden by default - for future implementation) */
.live-search-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--card-bg);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    max-height: 500px;
    overflow-y: auto;
    z-index: 1000;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: none;
}

.live-search-results.active {
    display: block;
}

.live-search-result-item {
    display: flex;
    gap: 12px;
    padding: 10px 12px;
    align-items: center;
    border-bottom: 1px solid rgba(255, 235, 59, 0.08);
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.live-search-result-item:hover {
    background: rgba(255, 235, 59, 0.05);
    transform: translateY(-1px);
}

.live-search-result-thumb {
    width: 64px;
    height: 64px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
    background: #111;
    border: 1px solid rgba(255, 235, 59, 0.18);
}

.live-search-result-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.live-search-result-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.live-search-result-type {
    font-family: var(--font-body);
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.live-search-result-name {
    font-size: 0.95em;
    color: var(--text-light);
    font-weight: 600;
    margin: 0;
}

.live-search-result-price {
    font-size: 0.9em;
    color: var(--accent-neon);
    margin: 0;
}

.live-search-show-more {
    text-align: center;
    padding: 10px;
    color: var(--accent-neon);
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease;
}

.live-search-show-more:hover {
    background: rgba(255, 235, 59, 0.08);
}

/* Hide search container on mobile/tablet - use mobile header search icon instead */
@media screen and (max-width: 1023px) {
    .search-container {
        display: none !important;
    }
}

/* Legacy nav-search styles (kept for backward compatibility) */
.nav-search {
    display: flex;
    align-items: center;
    background: var(--card-bg);
    border: 1px solid rgba(255, 235, 59, 0.2);
    border-radius: 9999px;
    padding: 3px 6px 3px 16px;
    margin-left: auto;
    height: fit-content;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.nav-search:focus-within {
    border-color: var(--accent-neon);
    box-shadow: 0 0 8px rgba(255, 235, 59, 0.3);
}

.nav-search input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-light);
    font-size: 0.9em;
    min-width: 160px;
    padding: 8px 4px;
}

.nav-search .search-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin-left: 8px;
    border-radius: 50%;
    background: var(--accent-neon);
    color: var(--button-text-on-yellow);
    font-size: 1.2em;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
    box-shadow: 0 2px 8px rgba(255, 235, 59, 0.3);
}

.nav-search .search-icon:hover {
    background: var(--accent-light);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(255, 235, 59, 0.5);
}

.social-icons {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-left: 24px;
    height: 100%;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 1.3em;
    text-decoration: none;
    transition: color 0.3s ease;
}

.social-icons a:hover {
    color: var(--accent-neon);
}

.nav-buttons .nav-button {
    background: transparent;
    border: none;
    color: var(--text-light);
    font-size: 15px;
    padding: 8px 12px;
    cursor: pointer;
    position: relative;
    white-space: nowrap;
    transition: color 0.25s ease, transform 0.25s ease;
    font-family: var(--font-heading);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    display: flex;
    align-items: center;
    height: fit-content;
}

.nav-buttons .nav-button::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -4px;
    height: 2px;
    background: var(--accent-neon);
    width: 0;
    margin: 0 auto;
    transition: width 0.28s ease;
    border-radius: 2px;
}

.nav-buttons .nav-button:hover {
    color: var(--accent-neon);
    transform: translateY(-1px);
}

.nav-buttons .nav-button:hover::after {
    width: 100%;
}

.nav-buttons .nav-button.active {
    color: var(--accent-neon);
    text-shadow: 0 0 8px rgba(255, 235, 59, .6);
}

.nav-buttons .nav-button.active::after {
    width: 100%;
}

/* ============================================================================
 * NAVBAR DROPDOWN MENU (Desktop)
 * ============================================================================
 */
.nav-dropdown {
    position: relative;
    display: inline-block;
    height: fit-content;
}

.nav-dropdown-button {
    background: transparent;
    border: none;
    color: var(--text-light);
    font-size: 16px;
    padding: 8px 12px;
    cursor: pointer;
    position: relative;
    white-space: nowrap;
    transition: color 0.25s ease, transform 0.25s ease;
    font-family: var(--font-heading);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    height: fit-content;
}

.nav-dropdown-button::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -4px;
    height: 2px;
    background: var(--accent-neon);
    width: 0;
    margin: 0 auto;
    transition: width 0.28s ease;
    border-radius: 2px;
}

.nav-dropdown-button:hover {
    color: var(--accent-neon);
    transform: translateY(-1px);
}

.nav-dropdown-button:hover::after {
    width: 100%;
}

.nav-dropdown-button i {
    font-size: 0.85em;
    transition: transform 0.3s ease;
}

.nav-dropdown.active .nav-dropdown-button i {
    transform: rotate(180deg);
}

.nav-dropdown-button.active {
    color: var(--accent-neon);
    text-shadow: 0 0 8px rgba(255, 235, 59, .6);
}

.nav-dropdown-button.active::after {
    width: 100%;
}

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    min-width: 200px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
    z-index: 1000;
    overflow: hidden;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.nav-dropdown.active .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: var(--text-light);
    text-decoration: none;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.25s ease;
    border-left: 3px solid transparent;
    position: relative;
    overflow: hidden;
}

.nav-dropdown-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    background: rgba(255, 235, 59, 0.1);
    transition: width 0.3s ease;
}

.nav-dropdown-item:hover::before,
.nav-dropdown-item.active::before {
    width: 100%;
}

.nav-dropdown-item:hover,
.nav-dropdown-item.active {
    color: var(--accent-neon);
    border-left-color: var(--accent-neon);
    background: rgba(255, 235, 59, 0.05);
    padding-left: 20px;
}

.nav-dropdown-item i {
    margin-right: 10px;
    font-size: 1.1em;
    width: 20px;
    text-align: center;
}

/* Sticky navbar enhancements */
.container > .navbar {
    position: relative;
    top: auto;
    z-index: 2;
    padding-top: 15px;
    padding-bottom: 15px;
    border-top: none;
    box-shadow: none;
    border-left: none;
    border-right: none;
    border-bottom: 1px solid rgba(255, 235, 59, 0.2);
    border-radius: 0;
    background: transparent;
    backdrop-filter: none;
    margin-left: 0;
    margin-right: 0;
    margin-top: 0;
    width: 100%;
    transition: padding 0.35s ease, background-color 0.35s ease, border-bottom-color 0.35s ease, box-shadow 0.35s ease;
    display: flex;
    align-items: center;
    min-height: 60px;
}

.container.home-active > .navbar {
    margin-left: 0;
    margin-right: 0;
    margin-top: 0;
    width: 100%;
}

.container > .navbar.shrink {
    padding-top: 12px;
    padding-bottom: 12px;
    background: rgba(0, 0, 0, 0.98);
    border-bottom-color: rgba(255, 235, 59, 0.3);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
    min-height: 50px;
}

.container > .navbar .nav-button {
    font-size: 20px;
    font-family: var(--font-heading);
    font-weight: 700;
    transition: font-size 0.35s ease;
}

.container > .navbar.shrink .nav-button {
    font-size: 16px;
}

/* ============================================================================
 * SOCIAL LINKS
 * ============================================================================
 */
.social-links {
    margin-top: -20px;
}

.social-links a {   
    color: var(--text-light); 
    margin: 0 30px;
    text-decoration: none;
    font-size: 1.1em;
    transition: color 0.3s;
}

.social-links a:hover {
    color: var(--accent-neon);
}

.social-links a i {
    margin-right: 8px;
    font-size: 1.2em;
    vertical-align: middle;
    transition: color 0.3s;
}

.social-links a:hover i {
    color: var(--accent-neon);
}

/* ============================================================================
 * BUTTONS & FORMS (Shared Components)
 * ============================================================================
 */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-button {
    padding: 12px 20px;
    font-size: 1em;
    background-color: var(--card-bg); 
    color: var(--text-light); 
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: background-color 0.3s, transform 0.2s, box-shadow 0.3s;
    touch-action: manipulation; 
    will-change: background-color, transform, box-shadow; 
}

.dropdown-button:hover {
    background-color: var(--accent-neon);
    color: var(--button-text-on-yellow);
    transform: translateY(-2px) scale(1.02); 
    box-shadow: 0 4px 10px rgba(255, 235, 59, 0.4); 
}

.dropdown-content {
    display: none; 
    position: absolute;
    background-color: var(--secondary-dark);
    min-width: 180px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
    border-radius: 8px;
    top: calc(100% + 10px); 
    left: 0;
    z-index: 9999; 
    opacity: 0; 
    transform: translateY(-10px) scaleY(0.9); 
    transform-origin: top;
    transition: opacity 0.3s ease-out, transform 0.3s ease-out; 
    padding: 5px;
    will-change: opacity, transform; 
}

.dropdown.active .dropdown-content {
    display: block; 
    opacity: 1; 
    transform: translateY(0) scaleY(1); 
}

.dropdown-content button {
    width: 100%;
    text-align: left;
    padding: 12px 16px;
    background: none;
    color: var(--text-light);
    border: none;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s, color 0.3s; 
    border-radius: 6px;
    margin: 2px 0; 
    touch-action: manipulation; 
}

.dropdown-content button:hover {
    background-color: var(--accent-neon);
    color: var(--button-text-on-yellow);
}

.search-bar {
    width: 100%;
    max-width: 400px;
    position: relative;
    margin-bottom: 20px;
}

.search-bar input {
    width: 100%;
    padding: 12px 20px;
    font-size: 1em;
    background-color: var(--card-bg);
    color: var(--text-light);
    border: none;
    border-radius: 8px;
    outline: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    font-family: var(--font-body);
    padding-right: 40px; 
}

.search-bar input::placeholder {
    color: var(--text-light);
    opacity: 0.7;
}

.search-bar input:focus,
.search-bar input:hover {
    background-color: var(--secondary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(255, 235, 59, 0.4);
    border: 1px solid var(--accent-neon);
}

.search-bar .search-icon { 
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.2em;
    pointer-events: none; 
}

/* ============================================================================
 * POPUP (Global Modal Component)
 * ============================================================================
 */
.popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.popup-content {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    position: relative;
    text-align: center;
    color: var(--text-light);
    transform: scale(0.5) translateY(50px);
    opacity: 0;
    box-shadow: none;
    will-change: transform, opacity, box-shadow; 
}

.popup-content.show {
    animation: emergeAndFloat 1.2s ease-out forwards, float 2.5s ease-in-out infinite alternate;
}

.popup-content.hide {
    animation: fadeAndSink 0.6s ease-in forwards;
}

@keyframes emergeAndFloat {
    0% {
        transform: scale(0.5) translateY(50px);
        opacity: 0;
        box-shadow: 0 0 0 rgba(255, 235, 59, 0);
    }
    50% {
        transform: scale(1.1) translateY(-10px);
        opacity: 0.8;
        box-shadow: 0 15px 40px rgba(255, 235, 59, 0.6);
    }
    100% {
        transform: scale(1) translateY(0);
        opacity: 1;
        box-shadow: 0 8px 20px rgba(255, 235, 59, 0.4);
    }
}

@keyframes float {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(-5px);
    }
}

@keyframes fadeAndSink {
    0% {
        transform: scale(1) translateY(0);
        opacity: 1;
        box-shadow: 0 8px 20px rgba(255, 235, 59, 0.4);
    }
    100% {
        transform: scale(0.5) translateY(50px);
        opacity: 0;
        box-shadow: 0 0 0 rgba(255, 235, 59, 0);
    }
}

.popup-content h2 {
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
    color: var(--accent-neon);
}

.popup-content p {
    font-size: 1em;
    line-height: 1.5;
}

.popup-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 1.5em;
    color: var(--text-light);
    cursor: pointer;
    transition: color 0.3s;
}

.popup-close:hover {
    color: var(--accent-neon);
}

/* ============================================================================
 * SCROLL TO TOP BUTTON
 * ============================================================================
 */
.scroll-to-top {
    position: fixed;
    bottom: 90px;
    right: 20px;
    background: var(--accent-neon);
    color: var(--button-text-on-yellow);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(255, 235, 59, 0.4);
    z-index: 1000;
    will-change: opacity, transform; 
}

.scroll-to-top.show {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    background: var(--accent-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(255, 235, 59, 0.6);
}

/* ============================================================================
 * CONTACT/SUPPORT CHAT WIDGET
 * ============================================================================
 * Always visible on all pages - not affected by container visibility
 */
.contact-support-widget {
    position: fixed !important;
    bottom: 20px !important;
    right: 20px !important;
    z-index: 10001 !important;
    display: flex !important;
    flex-direction: row;
    align-items: center;
    gap: 15px;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

/* Ensure contact widget is always visible regardless of container state */
.container:has(#homeContent.hidden) .contact-support-widget,
.container:has(#homeContent:not(.hidden)) .contact-support-widget,
body .contact-support-widget {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.contact-toggle-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--accent-neon);
    color: var(--button-text-on-yellow);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    box-shadow: 0 4px 15px rgba(255, 235, 59, 0.5);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 2;
}

.contact-toggle-btn:hover {
    background: var(--accent-light);
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(255, 235, 59, 0.6);
}

.contact-toggle-btn.active {
    background: var(--accent-dark);
}

.contact-toggle-btn.active i {
    animation: rotateClose 0.3s ease-in-out;
}

@keyframes rotateClose {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(90deg);
    }
}

.contact-social-icons {
    display: flex;
    flex-direction: row;
    gap: 12px;
    opacity: 0;
    visibility: hidden;
    transform: translateX(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.contact-social-icons.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
    pointer-events: auto;
}

.contact-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.3em;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    position: relative;
}

.contact-icon:hover {
    transform: translateX(-5px) scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.facebook-icon {
    background: #1877f2;
}

.facebook-icon:hover {
    background: #166fe5;
    box-shadow: 0 6px 20px rgba(24, 119, 242, 0.5);
}

.zalo-icon {
    background: #0068ff;
}

.zalo-icon:hover {
    background: #0052cc;
    box-shadow: 0 6px 20px rgba(0, 104, 255, 0.5);
}

/* Responsive adjustments */
@media screen and (max-width: 1023px) {
    .contact-support-widget {
        bottom: 20px;
        right: 15px;
    }
    
    .contact-toggle-btn {
        width: 56px;
        height: 56px;
        font-size: 1.4em;
    }
    
    .contact-icon {
        width: 48px;
        height: 48px;
        font-size: 1.2em;
    }
    
    .scroll-to-top {
        bottom: 90px;
        right: 15px;
    }
}

@media screen and (max-width: 480px) {
    .contact-support-widget {
        bottom: 15px;
        right: 15px;
    }
    
    .contact-toggle-btn {
        width: 52px;
        height: 52px;
        font-size: 1.3em;
    }
    
    .contact-icon {
        width: 44px;
        height: 44px;
        font-size: 1.1em;
    }
    
    .contact-social-icons {
        gap: 10px;
    }
    
    .scroll-to-top {
        bottom: 85px;
        right: 15px;
        width: 45px;
        height: 45px;
        font-size: 1.3em;
    }
}

/* ============================================================================
 * UPDATING MESSAGE (Shared Component)
 * ============================================================================
 */
.updating-message {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 40px auto;
    padding: 13px 30px;
    background: var(--secondary-dark);
    color: var(--accent-neon);
    font-family: var(--font-heading);
    font-size: 1.5em;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 15px;
    border: 5px solid var(--accent-neon);
    box-shadow: 0 6px 15px rgba(255, 235, 59, 0.4);
    text-shadow: 0 0 8px rgba(255, 235, 59, 0.6);
    max-width: 400px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    will-change: transform, box-shadow;
}

.updating-message:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(255, 235, 59, 0.6);
}

/* Hide updating message on home page */
#homeContent:not(.hidden) ~ .updating-message,
.container:has(#homeContent:not(.hidden)) .updating-message {
    display: none !important;
    visibility: hidden !important;
}

/* ============================================================================
 * MOBILE HEADER (Top Bar)
 * ============================================================================
 * Mobile-only sticky header with menu button, logo, and search icon.
 * Only visible on screens with max-width: 768px.
 */
.mobile-header {
    display: none;
    position: relative;
    top: auto;
    left: 0;
    right: 0;
    width: 100%;
    height: 60px;
    background: #000000;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 235, 59, 0.2);
    z-index: 2;
    padding: 0 12px;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.mobile-header.scrolled {
    background: rgba(0, 0, 0, 0.98);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    border-bottom-color: rgba(255, 235, 59, 0.3);
}

/* Menu drawer button (left) */
.mobile-header-menu-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--text-light);
    font-size: 1.5em;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.mobile-header-menu-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 235, 59, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
}

.mobile-header-menu-btn:active::before {
    width: 100px;
    height: 100px;
}

.mobile-header-menu-btn:active {
    transform: scale(0.95);
}

.mobile-header-menu-btn i {
    position: relative;
    z-index: 1;
    transition: color 0.3s ease;
}

.mobile-header-menu-btn:hover {
    color: var(--accent-neon);
    background: rgba(255, 235, 59, 0.1);
}

/* Logo (center) */
.mobile-header-logo {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.mobile-header-logo img {
    max-height: 40px;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.mobile-header-logo:hover img {
    transform: scale(1.05);
}

/* Search icon button (right) */
.mobile-header-search-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--text-light);
    font-size: 1.4em;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.mobile-header-search-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 235, 59, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
}

.mobile-header-search-btn:active::before {
    width: 100px;
    height: 100px;
}

.mobile-header-search-btn:active {
    transform: scale(0.95);
}

.mobile-header-search-btn i {
    position: relative;
    z-index: 1;
    transition: color 0.3s ease;
}

.mobile-header-search-btn:hover {
    color: var(--accent-neon);
    background: rgba(255, 235, 59, 0.1);
}

/* Show mobile header on mobile and tablet screens */
@media screen and (max-width: 1023px) {
    .mobile-header {
        display: flex;
    }
}

/* ============================================================================
 * MOBILE MENU DRAWER
 * ============================================================================
 * Slide-out menu drawer that appears from the left when menu button is clicked
 */
 .mobile-menu-drawer {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;          /* Giữ dòng này */
    width: 75%;
    /* XÓA 2 dòng height này vì đã có top: 0 và bottom: 0 */
    /* height: 100vh; */
    /* height: 100dvh; */
    /* min-height: 100vh; */
    background: var(--secondary-dark);
    z-index: 10001;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.5);
    overflow-y: auto;
    overflow-x: hidden;
    touch-action: pan-y;
    margin: 0;           /* Thêm để đảm bảo không có margin */
    padding: 0;          /* Thêm để đảm bảo không có padding ngoài */
}

.mobile-menu-drawer.open {
    transform: translateX(0);
}

/* Lock body scroll when menu drawer is open */
body.menu-drawer-open {
    overflow: hidden !important;
    position: fixed;
    width: 100%;
    height: 100%;
}

.mobile-menu-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 8px;
}

.mobile-menu-drawer-header .drawer-logo {
    display: flex;
    align-items: center;
}

.mobile-menu-drawer-header .drawer-logo img {
    max-height: 32px;
    width: auto;
}

.mobile-menu-drawer-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--text-light);
    font-size: 1.3em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mobile-menu-drawer-close:hover {
    background: rgba(255, 235, 59, 0.1);
    color: var(--accent-neon);
    transform: rotate(90deg);
}

.mobile-menu-drawer-body {
    padding: 10px 0;
}

.mobile-menu-drawer-item {
    display: flex;
    align-items: center;
    padding: 14px 18px;
    color: var(--text-light);
    text-decoration: none;
    font-size: 1.1em;
    font-family: var(--font-heading);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    position: relative;
    overflow: hidden;
}

.mobile-menu-drawer-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    background: rgba(255, 235, 59, 0.1);
    transition: width 0.3s ease;
}

.mobile-menu-drawer-item:hover::before,
.mobile-menu-drawer-item.active::before {
    width: 100%;
}

.mobile-menu-drawer-item:hover,
.mobile-menu-drawer-item.active {
    color: var(--accent-neon);
    border-left-color: var(--accent-neon);
    background: rgba(255, 235, 59, 0.05);
    padding-left: 24px;
}

.mobile-menu-drawer-item i {
    margin-right: 16px;
    font-size: 1.1em;
    width: 20px;
    text-align: center;
}

/* ============================================================================
 * MOBILE DRAWER DROPDOWN MENU
 * ============================================================================
 */
.mobile-menu-drawer-dropdown {
    position: relative;
}

.mobile-menu-drawer-dropdown-button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    color: var(--text-light);
    text-decoration: none;
    font-size: 1.1em;
    font-family: var(--font-heading);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    background: none;
    border-top: none;
    border-right: none;
    border-bottom: none;
    width: 100%;
    text-align: left;
}

.mobile-menu-drawer-dropdown-button::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    background: rgba(255, 235, 59, 0.1);
    transition: width 0.3s ease;
}

.mobile-menu-drawer-dropdown-button:hover::before,
.mobile-menu-drawer-dropdown.active .mobile-menu-drawer-dropdown-button::before {
    width: 100%;
}

.mobile-menu-drawer-dropdown-button:hover,
.mobile-menu-drawer-dropdown.active .mobile-menu-drawer-dropdown-button {
    color: var(--accent-neon);
    border-left-color: var(--accent-neon);
    background: rgba(255, 235, 59, 0.05);
    padding-left: 24px;
}

.mobile-menu-drawer-dropdown-button i:first-child {
    margin-right: 16px;
    font-size: 1.1em;
    width: 20px;
    text-align: center;
}

.mobile-menu-drawer-dropdown-button i:last-child {
    margin-left: auto;
    font-size: 0.9em;
    transition: transform 0.3s ease;
}

.mobile-menu-drawer-dropdown.active .mobile-menu-drawer-dropdown-button i:last-child {
    transform: rotate(180deg);
}

.mobile-menu-drawer-dropdown-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    background: rgba(0, 0, 0, 0.2);
}

.mobile-menu-drawer-dropdown.active .mobile-menu-drawer-dropdown-menu {
    max-height: 400px;
    opacity: 1;
}

.mobile-menu-drawer-dropdown-item {
    display: flex;
    align-items: center;
    padding: 12px 18px 12px 48px;
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.95em;
    font-family: var(--font-heading);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    position: relative;
    overflow: hidden;
}

.mobile-menu-drawer-dropdown-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    background: rgba(255, 235, 59, 0.1);
    transition: width 0.3s ease;
}

.mobile-menu-drawer-dropdown-item:hover::before,
.mobile-menu-drawer-dropdown-item.active::before {
    width: 100%;
}

.mobile-menu-drawer-dropdown-item:hover,
.mobile-menu-drawer-dropdown-item.active {
    color: var(--accent-neon);
    border-left-color: var(--accent-neon);
    background: rgba(255, 235, 59, 0.05);
    padding-left: 52px;
}

.mobile-menu-drawer-dropdown-item i {
    margin-right: 14px;
    font-size: 1em;
    width: 18px;
    text-align: center;
}

/* Menu drawer overlay */
/* Menu drawer overlay */
/* Menu drawer overlay */
.mobile-menu-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    min-height: 100svh;  /* Small viewport - tốt nhất cho mobile */
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    pointer-events: none;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.mobile-menu-drawer-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Hide menu drawer on desktop */
@media screen and (min-width: 1024px) {
    .mobile-menu-drawer,
    .mobile-menu-drawer-overlay {
        display: none !important;
    }
}

/* ============================================================================
 * MOBILE NAVIGATION & CONTROLS
 * ============================================================================
 */
.mobile-controls {
    display: none;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
    padding: 0 20px;
}

.filter-toggle {
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: var(--card-bg);
    color: var(--text-light);
    font-size: 1.2em;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
}

.filter-toggle:hover {
    background: var(--accent-neon);
    color: var(--button-text-on-yellow);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(255, 235, 59, 0.4);
}

.mobile-search {
    flex: 1;
    display: flex;
    align-items: center;
    background: var(--card-bg);
    border: 1px solid rgba(255, 235, 59, 0.2);
    border-radius: 9999px;
    padding: 3px 6px 3px 16px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.mobile-search:focus-within {
    border-color: var(--accent-neon);
    box-shadow: 0 0 8px rgba(255, 235, 59, 0.3);
}

.mobile-search input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-light);
    font-size: 0.9em;
    padding: 8px 4px;
}

.mobile-search-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent-neon);
    color: var(--button-text-on-yellow);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
    font-size: 1.2em;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
    box-shadow: 0 2px 8px rgba(255, 235, 59, 0.3);
}

.mobile-search-icon:hover {
    background: var(--accent-light);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(255, 235, 59, 0.5);
}

.menu-overlay,
.filter-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9998;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.menu-overlay.active,
.filter-overlay.active {
    display: block;
    opacity: 1;
    pointer-events: auto;
}

/* Hide mobile controls on screens wider than 1023px */
@media (min-width: 1024px) {
    #mobileControls {
        display: none !important;
    }
}

/* ============================================================================
 * RESPONSIVE TYPOGRAPHY & SCALING
 * ============================================================================
 */
@media screen and (max-width: 1440px) {
    html {
        min-height: 100vh;
        height: 100%;
        background: var(--gradient-bg);
    }
    body {
        transform: scale(0.9);
        transform-origin: top left;
        width: calc(100% / 0.9);
        min-height: calc(100vh / 0.9);
        background: var(--gradient-bg);
    }
}

@media screen and (max-width: 1366px) {
    html {
        min-height: 100vh;
        height: 100%;
        background: var(--gradient-bg);
    }
    body {
        transform: scale(0.85);
        transform-origin: top left;
        width: calc(100% / 0.85);
        min-height: calc(100vh / 0.85);
        background: var(--gradient-bg);
    }
}

@media screen and (max-width: 1280px) {
    html {
        min-height: 100vh;
        height: 100%;
        background: var(--gradient-bg);
    }
    body {
        transform: scale(0.8);
        transform-origin: top left;
        width: calc(100% / 0.8);
        min-height: calc(100vh / 0.8);
        background: var(--gradient-bg);
    }
}

@media screen and (max-width: 1152px) {
    html {
        min-height: 100vh;
        height: 100%;
        background: var(--gradient-bg);
    }
    body {
        transform: scale(0.75);
        transform-origin: top left;
        width: calc(100% / 0.75);
        min-height: calc(100vh / 0.75);
        background: var(--gradient-bg);
    }
}

@media screen and (max-width: 1024px) {
    html {
        min-height: 100vh;
        height: 100%;
        background: var(--gradient-bg);
    }
    body {
        transform: scale(0.7);
        transform-origin: top left;
        width: calc(100% / 0.7);
        min-height: calc(100vh / 0.7);
        background: var(--gradient-bg);
    }
}

@media screen and (max-width: 900px) {
    html {
        min-height: 100vh;
        height: 100%;
        background: var(--gradient-bg);
    }
    body {
        transform: scale(0.65);
        transform-origin: top left;
        width: calc(100% / 0.65);
        min-height: calc(100vh / 0.65);
        background: var(--gradient-bg);
    }
}

@media screen and (max-width: 1023px) {
    body {
        /* Remove transform scale on mobile/tablet to prevent extra scrolling */
        transform: none;
        transform-origin: unset;
        width: 100%;
        font-size: 15px;
        /* Prevent extra vertical scrolling */
        overflow-y: auto;
        overflow-x: hidden;
        max-height: 100vh;
        max-height: 100dvh; /* Dynamic viewport height for mobile */
    }
    
    html {
        /* Prevent html from exceeding viewport */
        overflow-x: hidden;
        max-height: 100vh;
        max-height: 100dvh;
    }

    .header-container {
        flex-direction: column;
        align-items: center;
        padding-top: 80px; 
    }

    .logo {
        width: 100px;
        top: 15px;
        left: 15px;
    }

    .social-links {
        margin-top: 10px; 
    }

    .social-links a .fa-facebook-f {
        color: #3a6ad3;
    }

    .social-links a .fa-discord {
        color: #5865F2;
    }

    .social-links a:hover i {
        color: var(--accent-neon); 
    }

    .header-content h1 {
        font-size: 2.5em;
    }

    .search-bar {
        max-width: 100%;
    }

    /* Mobile and tablet navbar adjustments - Hide navbar completely on mobile and tablet */
    .container > .navbar {
        display: none !important;
    }

    .container.home-active > .navbar {
        display: none !important;
    }

    .container > .navbar.shrink {
        display: none !important;
    }

    .navbar {
        display: none !important;
    }

    .nav-buttons {
        position: fixed;
        top: 0;
        left: 0;
        width: 75%;
        max-width: 300px;
        height: 100vh;
        height: 100dvh; /* Dynamic viewport height for mobile */
        max-height: 100vh;
        max-height: 100dvh;
        font-size: 1.4em;
        background: var(--secondary-dark);
        flex-direction: column;
        align-items: flex-start;
        padding: 80px 20px 20px;
        gap: 40px;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 10001;
        overflow-y: auto;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.4);
        pointer-events: auto;
    }

    .nav-buttons.open {
        transform: translateX(0);
    }

    .nav-buttons .nav-button {
        width: 100%;
        text-align: left;
        font-size: 1.1em;
        padding: 12px 16px;
        pointer-events: auto;
        position: relative;
        z-index: 10002;
    }

    .navbar .nav-button {
        padding: 10px 12px;
    }
}

@media screen and (max-width: 640px) {
    body {
        /* Remove transform scale on mobile to prevent extra scrolling */
        transform: none;
        transform-origin: unset;
        width: 100%;
        /* Prevent extra vertical scrolling */
        overflow-y: auto;
        overflow-x: hidden;
        max-height: 100vh;
        max-height: 100dvh;
    }
}

/* ============================================================================
 * FILTER BUTTON ROW AND MODAL
 * ============================================================================
 */

/* Filter Button Row Container */
.filter-button-row {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    padding-top: 15px;
    padding-bottom: 15px;
}

/* Filter Pill Button */
.filter-pill-button {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: var(--accent-neon);
    border: none;
    border-radius: 9999px;
    color: var(--button-text-on-yellow);
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(255, 235, 59, 0.3);
}

.filter-pill-button:hover {
    background: var(--accent-light);
    box-shadow: 0 4px 12px rgba(255, 235, 59, 0.5);
    transform: translateY(-1px);
}

.filter-pill-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(255, 235, 59, 0.3);
}

.filter-pill-button i {
    font-size: 14px;
}

.filter-pill-button span {
    font-weight: 500;
}

/* Breadcrumb Text */
.breadcrumb-text {
    color: #9aa3b4;
    font-size: 14px;
    font-weight: 400;
    font-family: var(--font-body);
}

/* Hide filter button on Tiện Ích (Utilities) pages - applied via JavaScript */
.filter-pill-button.hidden,
.filter-pill-button[style*="display: none"] {
    display: none !important;
}

/* Filter Modal Overlay */
.filter-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    backdrop-filter: blur(4px);
}

.filter-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Filter Modal Container */
.filter-modal {
    position: relative;
    background: var(--card-bg);
    border-radius: 12px;
    width: 800px;
    max-width: 90vw;
    max-height: 80vh;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    overflow: hidden;
}

.filter-modal-overlay.active .filter-modal {
    transform: scale(1);
}

/* Filter Modal Close Button */
.filter-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--text-light);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
}

.filter-modal-close:hover {
    background: rgba(255, 235, 59, 0.2);
    color: var(--accent-neon);
    transform: rotate(90deg);
    box-shadow: 0 0 8px rgba(255, 235, 59, 0.3);
}

.filter-modal-close:active {
    transform: rotate(90deg) scale(0.95);
}

/* Filter Modal Content */
.filter-modal-content {
    padding: 40px;
    overflow-y: auto;
    flex: 1;
}

/* Custom Scrollbar for Filter Modal */
.filter-modal-content::-webkit-scrollbar {
    width: 10px;
}

.filter-modal-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    margin: 8px 0;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.filter-modal-content::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, 
        rgba(255, 235, 59, 0.7) 0%, 
        rgba(255, 235, 59, 0.5) 50%,
        rgba(255, 235, 59, 0.7) 100%);
    border-radius: 10px;
    border: 1px solid rgba(255, 235, 59, 0.3);
    box-shadow: 
        0 0 8px rgba(255, 235, 59, 0.4),
        inset 0 0 4px rgba(255, 235, 59, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 40px;
}

.filter-modal-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, 
        rgba(255, 235, 59, 0.9) 0%, 
        rgba(255, 235, 59, 0.7) 50%,
        rgba(255, 235, 59, 0.9) 100%);
    border-color: rgba(255, 235, 59, 0.5);
    box-shadow: 
        0 0 12px rgba(255, 235, 59, 0.6),
        inset 0 0 6px rgba(255, 235, 59, 0.3);
    transform: scaleX(1.1);
}

.filter-modal-content::-webkit-scrollbar-thumb:active {
    background: linear-gradient(180deg, 
        var(--accent-neon) 0%, 
        rgba(255, 235, 59, 0.9) 50%,
        var(--accent-neon) 100%);
    border-color: var(--accent-neon);
    box-shadow: 
        0 0 16px rgba(255, 235, 59, 0.8),
        inset 0 0 8px rgba(255, 235, 59, 0.4);
}

/* Firefox scrollbar */
.filter-modal-content {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 235, 59, 0.7) rgba(255, 255, 255, 0.03);
}

/* Filter Modal Genre Group */
.filter-modal-genre-group {
    margin-bottom: 30px;
}

.filter-modal-title {
    font-family: 'Oxanium', sans-serif;
    font-size: 1.3em;
    font-weight: 700;
    color: var(--accent-neon);
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 0 8px rgba(255, 235, 59, 0.5);
}

.filter-modal-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 30px;
}

.filter-modal-option-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 14px;
    color: var(--text-light);
    font-family: 'Exo 2', sans-serif;
    font-weight: 500;
    position: relative;
    overflow: hidden;
    min-height: 100px;
}

.filter-modal-option-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 235, 59, 0.1) 0%, rgba(255, 235, 59, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 12px;
}

.filter-modal-option-btn:hover {
    background: rgba(255, 235, 59, 0.08);
    border-color: rgba(255, 235, 59, 0.4);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 235, 59, 0.15);
}

.filter-modal-option-btn:hover::before {
    opacity: 1;
}

.filter-modal-option-btn i {
    font-size: 28px;
    color: var(--text-light);
    transition: all 0.3s ease;
    z-index: 1;
    position: relative;
}

.filter-modal-option-btn span {
    font-size: 13px;
    text-align: center;
    line-height: 1.3;
    z-index: 1;
    position: relative;
    transition: all 0.3s ease;
}

/* Selected state */
.filter-modal-option-btn.selected {
    background: rgba(255, 235, 59, 0.15);
    border-color: var(--accent-neon);
    color: var(--accent-neon);
}

.filter-modal-option-btn.selected i {
    color: var(--accent-neon);
    transform: scale(1.1);
}

.filter-modal-option-btn.selected span {
    color: var(--accent-neon);
    font-weight: 600;
}

/* Glow effect when selected/applied */
.filter-modal-option-btn.glow-active {
    animation: filterGlow 2s ease-in-out infinite;
    box-shadow: 0 0 20px rgba(255, 235, 59, 0.4),
                0 0 40px rgba(255, 235, 59, 0.2),
                0 0 60px rgba(255, 235, 59, 0.1);
}

.filter-modal-option-btn.glow-active.selected {
    box-shadow: 0 0 25px rgba(255, 235, 59, 0.5),
                0 0 50px rgba(255, 235, 59, 0.3),
                0 0 75px rgba(255, 235, 59, 0.15),
                inset 0 0 20px rgba(255, 235, 59, 0.1);
}

@keyframes filterGlow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(255, 235, 59, 0.4),
                    0 0 40px rgba(255, 235, 59, 0.2),
                    0 0 60px rgba(255, 235, 59, 0.1);
    }
    50% {
        box-shadow: 0 0 30px rgba(255, 235, 59, 0.6),
                    0 0 60px rgba(255, 235, 59, 0.3),
                    0 0 90px rgba(255, 235, 59, 0.15);
    }
}

.filter-modal-option-btn.glow-active.selected {
    animation: filterGlowSelected 2s ease-in-out infinite;
}

@keyframes filterGlowSelected {
    0%, 100% {
        box-shadow: 0 0 25px rgba(255, 235, 59, 0.5),
                    0 0 50px rgba(255, 235, 59, 0.3),
                    0 0 75px rgba(255, 235, 59, 0.15),
                    inset 0 0 20px rgba(255, 235, 59, 0.1);
    }
    50% {
        box-shadow: 0 0 35px rgba(255, 235, 59, 0.7),
                    0 0 70px rgba(255, 235, 59, 0.4),
                    0 0 100px rgba(255, 235, 59, 0.2),
                    inset 0 0 30px rgba(255, 235, 59, 0.15);
    }
}

.filter-modal-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.filter-modal-apply-btn,
.filter-modal-reset-btn {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-modal-apply-btn {
    background: linear-gradient(135deg, var(--accent-neon), #ffd700);
    color: var(--primary-navy);
    box-shadow: 0 4px 15px rgba(255, 235, 59, 0.3);
}

.filter-modal-apply-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 235, 59, 0.4);
}

.filter-modal-reset-btn {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.filter-modal-reset-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Responsive for filter modal options */
@media screen and (max-width: 1023px) {
    .filter-modal-options {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 12px;
    }
    
    .filter-modal-option-btn {
        padding: 16px 12px;
        min-height: 90px;
    }
    
    .filter-modal-option-btn i {
        font-size: 24px;
    }
    
    .filter-modal-option-btn span {
        font-size: 12px;
    }
    
    .filter-modal-actions {
        flex-direction: column;
    }
    
    .filter-modal-apply-btn,
    .filter-modal-reset-btn {
        width: 100%;
    }
}

/* Responsive: Tablet and Mobile */
@media screen and (max-width: 1024px) {
    .filter-modal {
        width: 90vw;
        max-height: 85vh;
    }
    
    .filter-modal-content {
        padding: 32px 24px;
    }
}

@media screen and (max-width: 1023px) {
    .filter-button-row {
        padding: 15px 20px;
        gap: 15px;
        flex-wrap: wrap;
    }
    
    .filter-pill-button {
        padding: 10px 20px;
        font-size: 13px;
    }
    
    .breadcrumb-text {
        font-size: 13px;
    }
    
    .filter-modal {
        width: 95vw;
        max-height: 90vh;
        border-radius: 8px;
    }
    
    .filter-modal-content {
        padding: 24px 20px;
    }
    
    .filter-modal-close {
        top: 12px;
        right: 12px;
        width: 32px;
        height: 32px;
        font-size: 16px;
    }
}

@media screen and (max-width: 480px) {
    .filter-button-row {
        padding: 12px 15px;
        gap: 12px;
    }
    
    .filter-pill-button {
        padding: 8px 16px;
        font-size: 12px;
        gap: 8px;
    }
    
    .filter-pill-button i {
        font-size: 12px;
    }
    
    .breadcrumb-text {
        font-size: 12px;
    }
    
    .filter-modal {
        width: 100vw;
        max-height: 100vh;
        border-radius: 0;
        height: 100vh;
    }
    
    .filter-modal-content {
        padding: 20px 16px;
    }
    
    .filter-modal-options {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .filter-modal-option-btn {
        padding: 14px 10px;
        min-height: 85px;
    }
    
    .filter-modal-option-btn i {
        font-size: 22px;
    }
    
    .filter-modal-option-btn span {
        font-size: 11px;
    }
    
    .filter-modal-title {
        font-size: 1.1em;
        margin-bottom: 16px;
    }
}

/* ============================================================================
 * GAME & SERVICE CARDS (Enhanced Design)
 * ============================================================================
 */

/* ============================================================================
 * GAME LIST & SERVICE LIST GRID
 * ============================================================================
 */
.game-list, .service-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 24px;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
    will-change: opacity, transform;
    opacity: 1;
    visibility: visible;
    overflow: visible;
    background-color: var(--primary-navy);
    background: var(--gradient-bg);
    position: relative;
    min-height: 200px;
}

.game-list.hidden, .service-list.hidden {
    opacity: 0;
    visibility: hidden;
    max-height: 0;
    height: 0;
    overflow: hidden;
    pointer-events: none;
    margin: 0;
    padding: 0;
    transition: opacity 0.2s ease-in-out, visibility 0.2s ease-in-out, height 0.3s ease-in-out;
}

/* ============================================================================
 * CARD CONTAINER (Base Styles)
 * ============================================================================
 */
.game-card, .service-card {
    background-color: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    will-change: transform, box-shadow;
    transform-style: preserve-3d;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid rgba(255, 235, 59, 0.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    animation: cardFadeIn 0.6s ease-out backwards;
}

.game-card:nth-child(1) { animation-delay: 0.05s; }
.game-card:nth-child(2) { animation-delay: 0.1s; }
.game-card:nth-child(3) { animation-delay: 0.15s; }
.game-card:nth-child(4) { animation-delay: 0.2s; }
.game-card:nth-child(5) { animation-delay: 0.25s; }
.game-card:nth-child(6) { animation-delay: 0.3s; }
.game-card:nth-child(n+7) { animation-delay: 0.35s; }

.service-card:nth-child(1) { animation-delay: 0.05s; }
.service-card:nth-child(2) { animation-delay: 0.1s; }
.service-card:nth-child(3) { animation-delay: 0.15s; }
.service-card:nth-child(4) { animation-delay: 0.2s; }
.service-card:nth-child(5) { animation-delay: 0.25s; }
.service-card:nth-child(6) { animation-delay: 0.3s; }
.service-card:nth-child(n+7) { animation-delay: 0.35s; }

@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.game-card:hover, .service-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 12px 32px rgba(255, 235, 59, 0.4), 0 0 0 1px rgba(255, 235, 59, 0.2);
    border-color: rgba(255, 235, 59, 0.4);
}

/* ============================================================================
 * CARD IMAGE WRAPPER & IMAGE
 * ============================================================================
 */
.game-card img, .service-card img {
    width: 100%;
    height: var(--card-image-height);
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    background-color: var(--card-bg);
    will-change: transform;
    display: block;
    position: relative; /* allow overlay to anchor directly on the image */
    z-index: 1;
    overflow: hidden;
}

.game-card img::after, .service-card img::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(255, 235, 59, 0) 0%,
        rgba(255, 235, 59, 0.05) 50%,
        rgba(0, 0, 0, 0.7) 100%
    );
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 2;
    pointer-events: none;
    border-radius: 16px 16px 0 0;
}

.game-card:hover img::after, .service-card:hover img::after {
    opacity: 1;
}

.game-card:hover img, .service-card:hover img {
    transform: scale(1.1);
}

/* Image overlay gradient on hover */
.game-card::before, .service-card::before {
    content: none; /* disable old overlay to avoid misalignment */
}

/* ============================================================================
 * CARD BADGES (Hot, Account Type)
 * ============================================================================
 */
.game-card .card-badge,
.service-card .card-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: var(--font-heading);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.game-card .card-badge.hot,
.service-card .card-badge.hot {
    background: linear-gradient(135deg, #ff6b6b, #ee5a6f);
    color: #ffffff;
    animation: pulse 2s ease-in-out infinite;
}

/* Bestseller badge (isHot) */
.game-card .card-badge.bestseller,
.service-card .card-badge.bestseller {
    background: linear-gradient(135deg, #ff4d4f, #ff6b6b);
    color: #fff;
    border: 1px solid rgba(255, 107, 107, 0.6);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(255, 107, 107, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 4px 12px rgba(255, 107, 107, 0.6);
    }
}

/* ============================================================================
 * CARD CONTENT
 * ============================================================================
 */
.game-card .content, .service-card .content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 18px;
    text-align: left;
    position: relative;
    z-index: 3;
}

/* ============================================================================
 * CARD TITLE
 * ============================================================================
 */
.game-card h3, .service-card h3 {
    margin: 0 0 10px 0;
    font-size: 1.4em;
    color: var(--text-light);
    font-family: var(--font-heading);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 0 8px rgba(255, 235, 59, 0.3);
    line-height: 1.3;
    transition: color 0.3s ease;
}

.game-card:hover h3, .service-card:hover h3 {
    color: var(--accent-neon);
    text-shadow: 0 0 12px rgba(255, 235, 59, 0.5);
}

/* ============================================================================
 * CARD GENRES (Tag Style)
 * ============================================================================
 */
.game-card .genres, .service-card .genres {
    position: static;
    background: none;
    opacity: 1;
    transform: none;
    pointer-events: auto;
    padding: 0;
    margin: 0 0 12px 0;
    font-size: 0.9rem;
    color: var(--text-muted);
    text-align: left;
    line-height: 1.6;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* Genre tags styling */
.game-card .genres span,
.service-card .genres span {
    display: inline-block;
    padding: 4px 10px;
    background: rgba(255, 235, 59, 0.1);
    border: 1px solid rgba(255, 235, 59, 0.2);
    border-radius: 12px;
    font-size: 0.85rem;
    color: var(--accent-neon);
    transition: all 0.3s ease;
    font-weight: 500;
    font-family: var(--font-body);
    white-space: nowrap;
}

.game-card:hover .genres span,
.service-card:hover .genres span {
    background: rgba(255, 235, 59, 0.15);
    border-color: rgba(255, 235, 59, 0.4);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(255, 235, 59, 0.2);
}

/* Fallback for genres without span tags (plain text) - legacy support */
.game-card .genres:not(:has(span)),
.service-card .genres:not(:has(span)) {
    display: block;
    font-size: 0.85em;
}

/* Support for browsers without :has() */
@supports not selector(:has(*)) {
    .game-card .genres,
    .service-card .genres {
        display: block;
        font-size: 0.85em;
    }
    
    .game-card .genres span,
    .service-card .genres span {
        display: inline-block;
        margin-right: 6px;
        margin-bottom: 4px;
    }
}

/* ============================================================================
 * CARD DESCRIPTION
 * ============================================================================
 */
.game-card .short-description,
.game-card .description {
    display: none;
}

.service-card .description {
    font-size: 0.9em;
    color: var(--text-muted);
    margin-bottom: 12px;
    line-height: 1.5;
    flex: 1;
}

.service-card .short-description {
    font-size: 0.85em;
    color: var(--text-muted);
    margin-bottom: 8px;
    line-height: 1.4;
}

/* ============================================================================
 * CARD PRICE (Gradient Effect)
 * ============================================================================
 */
.game-card .price, .service-card .price {
    color: var(--accent-neon);
    font-weight: 700;
    font-size: 1.8em;
    margin: auto 0 0 0;
    text-align: left;
    text-shadow: 0 0 10px rgba(255, 235, 59, 0.6);
    background: linear-gradient(135deg, var(--accent-neon), var(--accent-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: all 0.3s ease;
    display: flex;
    align-items: baseline;
    gap: 4px;
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.game-card:hover .price, .service-card:hover .price {
    transform: scale(1.05);
    filter: drop-shadow(0 0 8px rgba(255, 235, 59, 0.8));
}

.game-card .price .currency,
.service-card .price .currency {
    font-size: 0.9em;
    opacity: 1;
    background: none;
    -webkit-text-fill-color: var(--accent-neon);
    color: var(--accent-neon);
}

/* Fallback for browsers that don't support background-clip */
@supports not (-webkit-background-clip: text) {
    .game-card .price, .service-card .price {
        background: none;
        -webkit-background-clip: unset;
        -webkit-text-fill-color: unset;
        background-clip: unset;
        color: var(--accent-neon);
    }
}

/* ============================================================================
 * RESPONSIVE: CARDS
 * ============================================================================
 */
@media screen and (max-width: 1024px) {
    .game-list, .service-list {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
        gap: 20px;
    }
}

@media screen and (max-width: 1023px) {
    :root {
        --card-image-height: 240px;
    }

    .game-list, .service-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .game-card, .service-card {
        border-radius: 12px;
    }

    .game-card h3, .service-card h3 {
        font-size: 1.2em;
        line-height: 1.3;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .game-card .content, .service-card .content {
        padding: 14px;
    }

    .game-card .price, .service-card .price {
        font-size: 1.6em;
    }

    .game-card .card-badge,
    .service-card .card-badge {
        top: 8px;
        right: 8px;
        padding: 4px 10px;
        font-size: 0.7em;
    }

    .game-card:hover, .service-card:hover {
        transform: translateY(-6px) scale(1.01);
    }
}

@media screen and (max-width: 480px) {
    :root {
        --card-image-height: 220px;
    }

    .game-list, .service-list {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .game-card h3, .service-card h3 {
        font-size: 1.1em;
    }

    .game-card .price, .service-card .price {
        font-size: 1.5em;
    }
}

/* ============================================================================
 * FOOTER SECTION - Shared Footer Styles
 * ============================================================================
 */
.footer-section {
    background: var(--secondary-dark);
    position: relative;
    padding: 48px 0 0;
    margin-top: 60px;
}

.footer-cta {
    border-bottom: 1px solid rgba(255, 235, 59, 0.2);
    padding: 0 60px 30px;
}

.footer-cta-row {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
}

.single-cta i {
    color: var(--accent-neon);
    font-size: 30px;
    margin-right: 20px;
    text-shadow: 0 0 8px rgba(255, 235, 59, 0.5);
    filter: drop-shadow(0 0 4px rgba(255, 235, 59, 0.4));
}

.single-cta {
    display: flex;
    align-items: center;
    min-width: 220px;
}

.cta-text h4 {
    color: var(--text-light);
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 2px;
}

.cta-text span {
    color: var(--text-muted);
    font-size: 15px;
}

.footer-content {
    padding: 30px 60px 30px;
}

.footer-columns {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
}

.footer-widget {
    flex: 1 1 260px;
    color: var(--text-muted);
}

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

.footer-text p {
    margin: 10px 0;
    font-size: 14px;
    line-height: 28px;
    color: var(--text-muted);
}

.footer-social-icon span {
    color: var(--text-light);
    display: block;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
}

.footer-social-icon a {
    color: var(--text-light);
    font-size: 16px;
    margin-right: 15px;
    transition: color 0.3s;
}

.footer-social-icon a:hover {
    color: var(--accent-neon);
    text-shadow: 0 0 8px rgba(255, 235, 59, 0.5);
}

.footer-social-icon i {
    height: 40px;
    width: 40px;
    text-align: center;
    line-height: 38px;
    border-radius: 50%;
}

.facebook-bg {
    background: #3b5998;
}

.twitter-bg {
    background: #55acee;
}

.google-bg {
    background: #dd4b39;
}

.discord-bg {
    background: #5865F2;
}

.tiktok-bg {
    background: #000000;
}

.footer-widget-heading h3 {
    color: var(--text-light);
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    position: relative;
}

.footer-widget-heading h3::before {
    content: "";
    position: absolute;
    left: 0;
    bottom: -15px;
    height: 2px;
    width: 50px;
    background: var(--accent-neon);
    box-shadow: 0 0 8px rgba(255, 235, 59, 0.5);
}

.footer-widget2 ul {
    list-style: none;
    padding-left: 0;
}

.footer-widget2 ul li {
    padding-bottom: 6px;
}

.footer-widget2 ul li a {
    color: var(--text-muted);
    text-transform: capitalize;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-widget2 ul li a:hover {
    color: var(--accent-neon);
    text-shadow: 0 0 6px rgba(255, 235, 59, 0.4);
}

.subscribe-form {
    position: relative;
    overflow: hidden;
}

.subscribe-form input {
    width: 100%;
    padding: 14px 28px;
    background: var(--card-bg);
    border: 1px solid rgba(255, 235, 59, 0.2);
    color: var(--text-light);
    transition: border-color 0.3s;
}

.subscribe-form input:focus {
    outline: none;
    border-color: var(--accent-neon);
    box-shadow: 0 0 8px rgba(255, 235, 59, 0.3);
}

.subscribe-form button {
    position: absolute;
    right: 0;
    background: var(--accent-neon);
    color: #000000;
    padding: 13px 20px;
    border: 1px solid var(--accent-neon);
    top: 0;
    cursor: pointer;
    transition: background-color 0.3s, box-shadow 0.3s;
    box-shadow: 0 2px 8px rgba(255, 235, 59, 0.3);
}

.subscribe-form button:hover {
    background: var(--accent-light);
    border-color: var(--accent-light);
    box-shadow: 0 4px 12px rgba(255, 235, 59, 0.5);
}

.subscribe-form button i {
    color: #000000;
    font-size: 22px;
    transform: rotate(-6deg);
}

.footer-dmca-badge {
    margin-top: 16px;
    display: flex;
    align-items: center;
}

.footer-dmca-badge img {
    height: 60px;
    width: auto;
    image-rendering: -webkit-optimize-contrast;
}

.copyright-area {
    background: var(--primary-navy);
    padding: 25px 0;
    text-align: center;
}

.copyright-text p {
    margin: 0;
    font-size: 14px;
    color: var(--text-muted);
}

.copyright-text p i {
    margin-right: 6px;
    font-size: 13px;
    color: var(--text-muted);
}

.copyright-text p a {
    color: var(--accent-neon);
    text-decoration: none;
    transition: color 0.3s;
}

.copyright-text p a:hover {
    color: var(--accent-light);
}

/* Footer Responsive Styles */
@media (max-width: 1200px) {
    .footer-columns {
        flex-direction: column;
    }
    
    .footer-cta-row {
        flex-direction: column;
    }
}

@media (max-width: 1023px) {
    .footer-section {
        position: relative;
        overflow-x: hidden;
    }
    
    .footer-cta {
        padding: 0 20px 30px;
    }
    
    .footer-content {
        padding: 30px 20px 30px;
    }
}

.search-page {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 120px 20px 80px;
}

.search-page-hero {
    position: relative;
    background: linear-gradient(135deg, rgba(255, 235, 59, 0.12), rgba(255, 235, 59, 0.03));
    border: 1px solid rgba(255, 235, 59, 0.15);
    border-radius: 20px;
    padding: 28px;
    overflow: hidden;
    margin-bottom: 32px;
}

.search-page-hero__glow {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 20%, rgba(255, 235, 59, 0.2), transparent 40%),
                radial-gradient(circle at 80% 0%, rgba(255, 235, 59, 0.16), transparent 45%);
    filter: blur(18px);
    pointer-events: none;
}

.search-page-hero__content {
    position: relative;
    z-index: 1;
}

.search-page-hero__eyebrow {
    letter-spacing: 4px;
    font-size: 0.85em;
    color: var(--accent-neon);
    margin-bottom: 6px;
}

.search-page-hero__title {
    font-size: 2.2em;
    margin: 0 0 6px;
}

.search-page-hero__subtitle {
    color: var(--text-muted);
    margin: 0;
}

.search-page-results__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.search-page-results__query {
    color: var(--text-muted);
    font-size: 0.95em;
    margin: 0;
}

.search-page-message {
    padding: 14px 16px;
    background: rgba(255, 235, 59, 0.06);
    border: 1px dashed rgba(255, 235, 59, 0.25);
    border-radius: 12px;
    color: var(--text-light);
    margin-bottom: 18px;
    display: none;
}

.search-page-bar {
    width: 100%;
    margin: 0 auto 24px;
    max-width: 880px;
}

.search-page-bar__inner {
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.95), rgba(12, 12, 12, 0.95));
    border: 1px solid rgba(255, 235, 59, 0.2);
    border-radius: 14px;
    padding: 10px 12px 10px 14px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    flex-wrap: wrap;
}

/* Container cho icon và input - đảm bảo chúng luôn cùng hàng */
.search-page-bar__input-group {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.search-page-bar__icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(255, 235, 59, 0.08);
    color: var(--accent-neon);
    font-size: 1.1em;
    flex-shrink: 0;
    box-shadow: inset 0 0 0 1px rgba(255, 235, 59, 0.15);
    min-width: 40px;
    flex-basis: auto;
}

.search-page-bar__input {
    flex: 1 1 auto;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-light);
    font-size: 1em;
    padding: 10px 6px;
    min-width: 120px;
    flex-basis: 0;
}

.search-page-bar__input::placeholder {
    color: var(--text-muted);
    opacity: 0.75;
}

.search-page-bar__btn {
    padding: 10px 16px;
    background: var(--accent-neon);
    color: var(--button-text-on-yellow);
    border: none;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(255, 235, 59, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    flex-shrink: 0;
    white-space: nowrap;
}

.search-page-bar__btn:hover {
    background: var(--accent-light);
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(255, 235, 59, 0.45);
}

.search-page-bar__btn:active {
    transform: translateY(0);
}

@media screen and (max-width: 768px) {
    .search-page-bar__inner {
        gap: 10px;
        padding: 8px 10px 8px 12px;
    }

    .search-page-bar__input-group {
        flex: 1 1 auto;
        min-width: 0;
        gap: 10px;
    }

    .search-page-bar__icon {
        width: 40px;
        height: 40px;
        min-width: 40px;
        flex-shrink: 0;
    }

    .search-page-bar__input {
        min-width: 100px;
        flex: 1;
    }

    .search-page-bar__btn {
        width: 100%;
        flex-basis: 100%;
        order: 3;
        min-width: 100%;
    }
}

/* ============================================================================
 * PRODUCT CARD COMPONENT (Unified Card Design)
 * ============================================================================
 * Card styles extracted from home-style.css for reuse across all pages.
 * These styles provide the standard card design with rounded corners, hover effects,
 * and consistent layout used on Home, Steam, and Digital Services pages.
 * ============================================================================
 */

/* Base card container */
.card {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0, 1);
    background-color: var(--card-bg);
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 13px 10px -7px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 235, 59, 0.1);
    cursor: pointer;
}

.card:hover {
    box-shadow: 0 30px 18px -8px rgba(255, 235, 59, 0.3);
    transform: scale(1.1);
    border-color: var(--accent-neon);
}

/* Card image container (base layer) */
.card__img {
    visibility: hidden;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    width: 100%;
    height: 235px;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

/* Card hover overlay info */
.card__info-hover {
    position: absolute;
    padding: 16px;
    width: 100%;
    opacity: 0;
    top: 0;
    z-index: 3;
}

/* Card image hover layer */
.card__img--hover {
    transition: 0.2s all ease-out;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    width: 100%;
    position: absolute;
    height: 235px;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    top: 0;
    z-index: 1;
}

/* Card info container */
.card__info {
    z-index: 2;
    background-color: var(--card-bg);
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    padding: 16px 24px 24px 24px;
    position: relative;
}

/* Card type label */
.card__type {
    font-family: var(--font-body);
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2px;
    display: block;
    margin-bottom: 4px;
}

/* Card category/genres */
.card__category {
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 2px;
    font-weight: 500;
    color: var(--text-muted);
    display: block;
    margin-bottom: 5px;
}

/* Card title */
.card__title {
    margin: 5px 0 10px;
    color: var(--text-light);
    font-family: var(--font-heading);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 1.1em;
    line-height: 1.3;
}

/* Card price container */
.card__by {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-light);
}

.card__by h3 {
    color: var(--accent-neon);
    text-shadow: 0 0 8px rgba(255, 235, 59, 0.5);
    margin: 0;
    font-size: 1.3em;
    font-weight: 700;
}

/* Hover effects */
.card:hover .card__img--hover {
    height: 100%;
    opacity: 0.3;
}

.card:hover .card__info {
    background-color: transparent;
    position: relative;
}

.card:hover .card__info-hover {
    opacity: 1;
}

/* Responsive adjustments for cards - synchronized with Home page */
/* Desktop lớn (>= 1600px) - 6 cột */
@media (min-width: 1600px) {
    .card__img,
    .card__img--hover {
        height: 200px;
    }
    
    .card__info {
        padding: 14px 16px 18px 16px;
    }
    
    .card__title {
        font-size: 0.95em;
    }
}

/* Desktop vừa (1400px - 1599px) - 6 cột */
@media (min-width: 1400px) and (max-width: 1599px) {
    .card__img,
    .card__img--hover {
        height: 190px;
    }
    
    .card__info {
        padding: 12px 14px 16px 14px;
    }
    
    .card__title {
        font-size: 0.9em;
    }
}

/* Desktop nhỏ (1200px - 1399px) - 6 cột */
@media (min-width: 1200px) and (max-width: 1399px) {
    .card__img,
    .card__img--hover {
        height: 180px;
    }
    
    .card__info {
        padding: 12px 12px 14px 12px;
    }
    
    .card__title {
        font-size: 0.85em;
        margin: 4px 0 6px;
    }
    
    .card__category {
        font-size: 11px;
    }
    
    .card__type {
        font-size: 10px;
    }
}

/* Tablet lớn (992px - 1199px) - 3 cột */
@media (min-width: 992px) and (max-width: 1199px) {
    .card__img,
    .card__img--hover {
        height: 220px;
    }
    
    .card__info {
        padding: 14px 18px 20px 18px;
    }
    
    .card__title {
        font-size: 1.05em;
    }
}

/* Tablet vừa (768px - 991px) - 3 cột */
@media (min-width: 768px) and (max-width: 991px) {
    .card__img,
    .card__img--hover {
        height: 210px;
    }
    
    .card__info {
        padding: 14px 16px 18px 16px;
    }
    
    .card__title {
        font-size: 1em;
    }
    
    .card__category {
        font-size: 12px;
    }
    
    .card__type {
        font-size: 10px;
    }
    
    .card:hover {
        transform: scale(1.03);
    }
}

/* Mobile lớn (576px - 767px) - 2 cột */
@media (min-width: 576px) and (max-width: 767px) {
    .card:hover {
        transform: scale(1.03);
    }
    
    .card__img,
    .card__img--hover {
        height: 200px;
    }
    
    .card__info {
        padding: 12px 14px 16px 14px;
    }
    
    .card__title {
        font-size: 0.95em;
        margin: 4px 0 8px;
    }
    
    .card__category {
        font-size: 11px;
    }
    
    .card__type {
        font-size: 9px;
    }
    
    .card__by h3 {
        font-size: 0.9em;
    }
}

/* Mobile nhỏ (< 576px) - 2 cột */
@media (max-width: 575px) {
    .card:hover {
        transform: scale(1.03);
    }
    
    .card__img,
    .card__img--hover {
        height: 180px;
    }
    
    .card__info {
        padding: 10px 12px 14px 12px;
    }
    
    .card__title {
        font-size: 0.9em;
        margin: 3px 0 6px;
    }
    
    .card__category {
        font-size: 10px;
        letter-spacing: 1px;
    }
    
    .card__type {
        font-size: 9px;
        letter-spacing: 1px;
    }
    
    .card__by h3 {
        font-size: 0.85em;
    }
}

