/*
 * ============================================================================
 * STEAM-ACCOUNT.CSS - Steam Account Category Styles
 * ============================================================================
 * Styles scoped to the Steam Account category:
 * - Filters UI (price slider, checkboxes, filter groups)
 * - Content grid with filters layout
 * - Game card grid and card component variations
 * ============================================================================
 */

/* ============================================================================
 * CONTENT GRID WITH FILTERS
 * ============================================================================
 */
.content-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    align-items: flex-start;
    width: 100%;
    margin-top: 10px;
}

.content-grid.with-filters {
    grid-template-columns: 1fr;
}

/* Ensure single column layout on steam page */
body.steam-page .content-grid {
    grid-template-columns: 1fr;
}

/* Hide content-grid when home content is visible */
#homeContent:not(.hidden) ~ .content-grid,
.container:has(#homeContent:not(.hidden)) .content-grid {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* ============================================================================
 * FILTERS (Steam Account Specific)
 * ============================================================================
 */
.filters {
    position: sticky;
    top: 67px;
    align-self: flex-start;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    width: 260px;
    margin: 0;
    padding: 0;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
    z-index: 10;
}

.filters.hidden {
    display: none !important;
    opacity: 0;
    height: 0;
    padding: 0;
    margin: 0;
    overflow: hidden;
}

/* Hide old filters section on steam page */
body.steam-page .filters:not(.hidden) {
    display: none !important;
}

.filter-group {
    margin-bottom: 24px;
}

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

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-options label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95em;
    cursor: pointer;
    color: var(--text-light);
    font-family: 'Exo 2', sans-serif;
}

.filter-options input[type="checkbox"] {
    accent-color: var(--accent-neon);
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.filters .search-bar {
    width: 100%;
    margin-bottom: 0;
}

/* Custom checkbox styling */
.filters .filter-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-family: 'Exo 2', sans-serif;
    font-weight: 500;
    font-size: 15px;
    color: var(--text-light);
    user-select: none;
}

.filters .filter-group input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    width: var(--check-size);
    height: var(--check-size);
    border: 2px solid rgba(241,245,249,0.35);
    border-radius: 3px;
    background: transparent;
    display: grid;
    place-content: center;
    transition: border-color .2s ease, background-color .2s ease, transform .08s;
    outline: none;
}

.filters .filter-group input[type="checkbox"]:hover {
    border-color: var(--accent-neon); 
}

.filters .filter-group input[type="checkbox"]:focus-visible {
    box-shadow: 0 0 0 2px rgba(127,90,240,0.4);
    border-color: var(--accent-neon);
}

.filters .filter-group input[type="checkbox"]:checked {
    background: var(--accent-neon);
    border-color: var(--accent-neon);
}

.filters .filter-group input[type="checkbox"]:checked::after {
    content: "";
    width: 8px;
    height: 4px;
    border: 2px solid var(--primary-navy);
    border-top: 0;
    border-right: 0;
    transform: rotate(-45deg);
}

.filters .filter-group .options {
    display: grid;
    gap: 12px;
}

/* ============================================================================
 * PRICE SLIDER
 * ============================================================================
 */
.price-slider {
    position: relative;
    width: 100%;
    height: 24px;
    margin: 10px 0;
}

.price-slider input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    background: var(--secondary-dark);
    border-radius: 5px;
    outline: none;
    cursor: pointer;
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
}

.price-slider input[type="range"]:nth-child(1) {
    z-index: 2;
}

.price-slider input[type="range"]:nth-child(2) {
    z-index: 3;
    background: transparent;
}

.price-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent-neon);
    border: none;
    box-shadow: 0 0 5px rgba(255, 235, 59, 0.6);
    cursor: pointer;
    pointer-events: all;
}

.price-slider input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent-neon);
    border: none;
    box-shadow: 0 0 5px rgba(255, 235, 59, 0.6);
    cursor: pointer;
    pointer-events: all;
}

.price-slider input[type="range"]::-webkit-slider-runnable-track {
    pointer-events: none;
}

.price-slider input[type="range"]::-moz-range-track {
    pointer-events: none;
}

.price-values {
    font-size: 0.95em;
    margin-top: 8px;
    margin-bottom: 12px;
    color: var(--text-light);
}

.price-values span {
    color: var(--accent-neon);
    font-weight: bold;
}

.apply-price-btn {
    display: inline-block;
    padding: 8px 20px;
    font-size: 0.9em;
    border: none;
    border-radius: 8px;
    background-color: var(--accent-neon);
    color: var(--button-text-on-yellow);
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s, box-shadow 0.3s;
    font-family: 'Exo 2', sans-serif;
    box-shadow: 0 2px 8px rgba(255, 235, 59, 0.3);
}

.apply-price-btn:hover {
    background-color: var(--accent-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(255, 235, 59, 0.5);
}

/* ============================================================================
 * GAME LIST & CARDS
 * ============================================================================
 */
.game-list {
    display: grid;
    /* Default: 6 columns for large desktop (synchronized with Home page) */
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
    transition: opacity 0.3s ease-in-out;
    will-change: opacity; 
    opacity: 1;
    overflow: visible;
}

/* Responsive grid layout synchronized with Home page */
/* Desktop >= 1200px: 6 columns */
@media (min-width: 1200px) {
    .game-list {
        grid-template-columns: repeat(6, 1fr);
        gap: 20px;
    }
}

/* Tablet lớn (992px - 1199px): 3 columns */
@media (min-width: 992px) and (max-width: 1199px) {
    .game-list {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

/* Tablet vừa (768px - 991px): 3 columns */
@media (min-width: 768px) and (max-width: 991px) {
    .game-list {
        grid-template-columns: repeat(3, 1fr);
        gap: 18px;
    }
}

/* Mobile lớn (576px - 767px): 2 columns */
@media (min-width: 576px) and (max-width: 767px) {
    .game-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

/* Mobile nhỏ (< 576px): 2 columns */
@media (max-width: 575px) {
    .game-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}

.game-list.hidden {
    opacity: 0;
    max-height: 0;
    height: 0;
    overflow: hidden;
    pointer-events: none;
    margin: 0;
    padding: 0;
}

/* ============================================================================
 * STEAM CARD OVERRIDES (Enhanced Design Compatibility)
 * ============================================================================
 * Base card styles are defined in common.css. These are Steam-specific
 * overrides that complement the enhanced card design.
 */

/* DEPRECATED: Old .game-card styles - replaced with unified .card component */
/* Card styles are now defined in common.css */

/* ============================================================================
 * MOBILE MENU TOGGLE BUTTON
 * ============================================================================
 */
.mobile-menu-toggle {
    display: none;
    background: var(--accent-neon);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    color: var(--button-text-on-yellow);
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
    margin-right: 12px;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(255, 235, 59, 0.3);
}

/* Hide mobile menu on desktop */
@media (min-width: 1024px) {
    .mobile-sidebar-menu {
        display: none !important;
        visibility: hidden !important;
    }
    
    .mobile-menu-toggle {
        display: none !important;
    }
}

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

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

/* ============================================================================
 * MOBILE SIDEBAR MENU
 * ============================================================================
 */
.mobile-sidebar-menu {
    display: none !important;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 2000;
    pointer-events: none;
    overflow: hidden;
    visibility: hidden;
}

.mobile-sidebar-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-sidebar-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 280px;
    max-width: 85%;
    height: 100%;
    background: var(--secondary-dark);
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.5);
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    z-index: 2001;
    will-change: transform;
}

.mobile-sidebar-menu.active {
    display: block !important;
    pointer-events: all;
    visibility: visible;
}

.mobile-sidebar-menu.active .mobile-sidebar-overlay {
    opacity: 1;
}

.mobile-sidebar-menu.active .mobile-sidebar-content {
    transform: translateX(0);
}

.mobile-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 235, 59, 0.3);
    background: var(--secondary-dark);
}

.mobile-sidebar-header h3 {
    font-family: 'Oxanium', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--accent-neon);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 0 8px rgba(255, 235, 59, 0.5);
}

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

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

.mobile-sidebar-body {
    flex: 1;
    overflow-y: auto;
    padding: 12px 0;
}

.mobile-sidebar-body::-webkit-scrollbar {
    width: 6px;
}

.mobile-sidebar-body::-webkit-scrollbar-track {
    background: var(--primary-navy);
    border-radius: 3px;
}

.mobile-sidebar-body::-webkit-scrollbar-thumb {
    background: var(--accent-neon);
    border-radius: 3px;
    box-shadow: 0 0 4px rgba(255, 235, 59, 0.4);
}


/* ============================================================================
 * RESPONSIVE: STEAM ACCOUNT
 * ============================================================================
 */
@media (max-width: 1023px) {
    /* Show mobile menu toggle button */
    .mobile-menu-toggle {
        display: flex;
    }
    
    /* Show mobile sidebar menu on mobile and tablet */
    .mobile-sidebar-menu {
        display: block !important;
    }
    
    /* Adjust content grid for mobile */
    .content-grid,
    .content-grid.with-filters,
    body.steam-page .content-grid {
        grid-template-columns: 1fr;
    }
    :root {
        --check-size: 30px;
    }

    .price-values {
        font-size: 1.8em;
    }

    .price-values span {
        font-size: 0.9em;
    }

    .price-slider input[type="range"] {
        height: 15px;
        pointer-events: none;
    }

    .price-slider input[type="range"]::-webkit-slider-thumb,
    .price-slider input[type="range"]::-moz-range-thumb {
        pointer-events: all;
        position: relative;
        z-index: 2;
        width: 25px;
        height: 25px;
        box-shadow: 0 0 5px rgba(255, 235, 59, 0.6);
    }

    .price-slider input[type="range"]:nth-child(2) {
        z-index: 3;
        background: transparent;
    }

    .price-slider input[type="range"]:nth-child(1) {
        z-index: 3;
    }

    .price-slider input[type="range"] {
        height: 10px;
        background: var(--card-bg);
        border-radius: 9999px;
    }

    .price-slider input[type="range"]::-webkit-slider-runnable-track {
        height: 10px;
        background: var(--card-bg);
        border-radius: 9999px;
        box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
    }

    .price-slider input[type="range"]::-moz-range-track {
        height: 10px;
        background: var(--card-bg);
        border-radius: 9999px;
        box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
    }

    .price-slider input[type="range"]::-webkit-slider-thumb {
        width: 20px;
        height: 20px;
        margin-top: -5px;
    }

    .price-slider input[type="range"]::-moz-range-thumb {
        width: 20px;
        height: 20px;
    }

    .filters {
        position: fixed;
        top: 0;
        left: 0;
        width: 80%;
        max-width: 340px;
        height: 100%;
        background: var(--secondary-dark);
        padding: 80px 20px 20px;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 50;
        overflow-y: auto;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.4);
    }

    .filters .filter-group .filter-title {
        font-size: 2em;
    }

    .filters .filter-group label {
        font-size: 25px;
    }

    .filters.open {
        transform: translateX(0);
    }

    .filters .filter-group {
        width: 100%;
    }

    .filters .apply-price-btn {
        width: 100%;
        margin-top: 12px;
    }

    .content-grid,
    .content-grid.with-filters {
        grid-template-columns: 1fr;
    }

    /* Grid layout is now handled by responsive media queries above */

    /* Updated to use unified .card component - synchronized with Home page */
    /* Mobile lớn (576px - 767px) */
    @media (min-width: 576px) and (max-width: 767px) {
        .card .card__title {
            font-size: 0.95em;
            line-height: 1.3;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
            margin: 4px 0 8px;
        }

        .card .card__by h3 {
            font-size: 0.9em;
            display: flex;
            align-items: center;
            gap: 4px;
        }
    }
    
    /* Mobile nhỏ (< 576px) */
    @media (max-width: 575px) {
        .card .card__title {
            font-size: 0.9em;
            line-height: 1.3;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
            margin: 3px 0 6px;
        }

        .card .card__by h3 {
            font-size: 0.85em;
            display: flex;
            align-items: center;
            gap: 4px;
        }
    }
}

/* ============================================================================
 * NOTIFICATION BANNER
 * ============================================================================
 */
.notification-banner {
    display: none;
    margin-left: auto;
    padding: 12px 16px;
    background-color: #000000;
    border: 2px solid #FFD700;
    border-radius: 8px;
    color: #FFD700;
    font-family: 'Exo 2', sans-serif;
    font-size: 14px;
    line-height: 1.5;
    max-width: 500px;
    max-height: 50px;
    width: fit-content;
    flex-shrink: 0;
}

.notification-banner-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.notification-icon {
    font-size: 18px;
    color: #FFD700;
    flex-shrink: 0;
}

.notification-text {
    color: #FFD700;
    flex: 1;
}

/* Responsive styles for notification banner */
@media (max-width: 991px) {
    .filter-button-row {
        flex-wrap: wrap;
    }
    
    .notification-banner {
        width: 100%;
        max-width: 100%;
        margin-left: 0;
        margin-top: 15px;
        order: 3;
    }
}

@media (max-width: 767px) {
    .notification-banner {
        padding: 10px 14px;
        font-size: 13px;
    }
    
    .notification-icon {
        font-size: 16px;
    }
}

@media (max-width: 575px) {
    .notification-banner {
        padding: 10px 12px;
        font-size: 12px;
    }
    
    .notification-icon {
        font-size: 15px;
    }
    
    .notification-banner-content {
        gap: 10px;
    }
}

/* ============================================================================
 * LOAD MORE BUTTON
 * ============================================================================
 */
.load-more-button {
    /* Ghost Button Style - Tối giản, hiện đại */
    display: block;
    margin: 40px auto;
    padding: 14px 48px;
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 500;
    color: var(--accent-neon);
    background: transparent;
    border: 2px solid var(--accent-neon);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    opacity: 1;
    visibility: visible;
}

/* Hover State - Đổi màu nền nhẹ và viền đậm lên */
.load-more-button:hover:not(:disabled) {
    background: rgba(255, 235, 59, 0.1);
    border-color: var(--accent-light);
    color: var(--accent-light);
    box-shadow: 0 0 15px rgba(255, 235, 59, 0.3);
    transform: translateY(-2px);
}

/* Active State */
.load-more-button:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 0 10px rgba(255, 235, 59, 0.2);
}

/* Loading State - Disabled và biến mất nhẹ nhàng */
.load-more-button:disabled,
.load-more-button.loading {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.load-more-button.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid var(--accent-neon);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* End State - Fade out khi hết dữ liệu */
.load-more-button.hidden {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* Responsive adjustments */
@media (max-width: 767px) {
    .load-more-button {
        padding: 12px 36px;
        font-size: 14px;
        margin: 30px auto;
    }
}

@media (max-width: 575px) {
    .load-more-button {
        padding: 10px 32px;
        font-size: 13px;
        margin: 25px auto;
    }
}

/* ============================================================================
 * CARD ENTRANCE ANIMATION (Staggered Fade-in & Slide-up)
 * ============================================================================
 */
.game-list .card {
    /* Initial state for animation - will be overridden by JavaScript */
    will-change: opacity, transform;
}

/* Ensure smooth animation for new cards */
.game-list .card[style*="opacity: 0"] {
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

