body {
    background-color: #313338;
    font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
    color: #F2F3F5;
    margin: 0;
    padding-top: 82px;
}

.game-list {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.game-list__container {
    flex: 1;
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 28px 40px 60px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ── PAGE HEADER ─────────────────────────────────────────── */
.page-header {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.page-path {
    display: flex;
    align-items: center;
    gap: 6px;
}

.page-path__link {
    font-size: 12px;
    color: #80848E;
    text-decoration: none;
}
.page-path__link:hover { color: #B5BAC1; }

.page-path__separator { color: #80848E; font-size: 12px; }

.page-path__current {
    font-size: 12px;
    color: #B5BAC1;
}

.page-title {
    font-size: 20px;
    font-weight: 700;
    color: #F2F3F5;
}

/* ── Active filters ──────────────────────────────────────── */
.active-filters {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 28px;
}

.active-filter {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px 3px 10px;
    background: rgba(88,101,242,0.12);
    border: 1px solid rgba(88,101,242,0.3);
    border-radius: 4px;
    font-size: 11px;
    font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
    white-space: nowrap;
}

.active-filter__label {
    color: #80848E;
    font-weight: 500;
}

.active-filter__value {
    color: #B5BAC1;
    font-weight: 600;
}

.active-filter__remove {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: #4E5058;
    cursor: pointer;
    padding: 1px;
    margin-left: 2px;
    transition: color 0.15s;
}

.active-filter__remove:hover { color: #F2F3F5; }

.active-filter--reset {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.1);
    color: #80848E;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
    padding: 3px 10px;
    border-radius: 4px;
    transition: border-color 0.15s, color 0.15s;
}

.active-filter--reset:hover {
    border-color: rgba(255,255,255,0.22);
    color: #B5BAC1;
}

/* ── COUNT ───────────────────────────────────────────────── */
.count-info-text { font-size: 12px; color: #80848E; }
.count-info-count { color: #B5BAC1; font-weight: 600; }

/* ── LAYOUT ──────────────────────────────────────────────── */
.wrapper__result {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

/* ── FILTERS SIDEBAR ─────────────────────────────────────── */
.filters-section__toggle { display: none; }

.filters-section__wrapper { flex-shrink: 0; }

.filters-section {
    background: #2B2D31;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 6px;
    padding: 16px;
    width: 220px;
    position: sticky;
    top: 60px;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #383A40 transparent;
}

.filters-section::-webkit-scrollbar { width: 3px; }
.filters-section::-webkit-scrollbar-track { background: transparent; }
.filters-section::-webkit-scrollbar-thumb { background: #383A40; border-radius: 2px; }

.filters-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.filters-grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filter-label {
    font-size: 11px;
    font-weight: 700;
    color: #80848E;
    text-transform: uppercase;
    letter-spacing: .08em;
}

/* ── SEARCH INPUT ────────────────────────────────────────── */
.search-input-wrapper { position: relative; }

.filter-input {
    width: 100%;
    padding: 6px 10px;
    background: #1E1F22;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 4px;
    color: #F2F3F5;
    font-size: 12px;
    font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
    outline: none;
    transition: border-color 0.15s;
    box-sizing: border-box;
}
.filter-input:focus { border-color: #5865F2; }
.filter-input::placeholder { color: #80848E; }

/* Remove number spinners */
.filter-input[type="number"] { -moz-appearance: textfield; }
.filter-input[type="number"]::-webkit-outer-spin-button,
.filter-input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; appearance: none; margin: 0; }

.search-input { padding-right: 28px; }

.search-clear-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #80848E;
    cursor: pointer;
    padding: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s;
}
.search-clear-btn:hover { color: #F2F3F5; }

/* ── GENRE DROPDOWN ──────────────────────────────────────── */
.genre-dropdown { width: 100%; position: relative; }

.genre-dropdown__toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 6px 10px;
    background: #1E1F22;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 4px;
    color: #F2F3F5;
    font-size: 12px;
    font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
    cursor: pointer;
    transition: border-color 0.15s;
    gap: 6px;
    text-align: left;
}
.genre-dropdown__toggle:focus { outline: none; border-color: #5865F2; }
.genre-dropdown__toggle[aria-expanded="true"] { border-color: #5865F2; }
.genre-dropdown__toggle[aria-expanded="true"] .genre-dropdown__arrow { transform: rotate(180deg); }

.genre-dropdown__selected-text { flex: 1; }

.genre-dropdown__arrow {
    flex-shrink: 0;
    color: #80848E;
    transition: transform 0.15s;
}

.genre-dropdown__menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0; right: 0;
    z-index: 100;
    background: #2B2D31;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 4px;
    padding: 4px;
    display: none;
    flex-direction: column;
    gap: 1px;
    max-height: 240px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #383A40 transparent;
    box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}
.genre-dropdown__menu::-webkit-scrollbar { width: 3px; }
.genre-dropdown__menu::-webkit-scrollbar-thumb { background: #383A40; border-radius: 2px; }

.genre-dropdown__menu.genre-dropdown__menu--open { display: flex; }

.genre-dropdown__item {
    display: flex;
    align-items: center;
    padding: 6px 8px;
    border-radius: 3px;
    cursor: pointer;
    transition: background 0.1s;
    color: #B5BAC1;
    font-size: 12px;
    font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
}
.genre-dropdown__item:hover { background: rgba(255,255,255,0.06); color: #F2F3F5; }
.genre-dropdown__item--selected { background: rgba(88,101,242,0.15); color: #fff; }
.genre-dropdown__item--selected:hover { background: rgba(88,101,242,0.25); }

.genre-dropdown__item-label { flex: 1; }

/* ── PRICE SLIDER ────────────────────────────────────────── */
.price-slider-container {
    position: relative;
    height: 16px;
    display: flex;
    align-items: center;
    width: 100%;
    margin: 12px 0 4px;
}

.slider-track {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    height: 4px;
    background: rgba(255,255,255,0.12);
    border-radius: 4px;
    width: 100%;
    z-index: 1;
}

.slider-track::before {
    content: '';
    position: absolute;
    height: 4px;
    background: #5865F2;
    border-radius: 4px;
    z-index: 2;
    left: var(--slider-min-percent, 0%);
    right: calc(100% - var(--slider-max-percent, 100%));
}

input[type="range"] {
    position: absolute;
    width: 100%;
    height: 16px;
    background: transparent;
    pointer-events: none;
    -webkit-appearance: none;
    appearance: none;
    z-index: 3;
    margin: 0;
    top: 50%;
    transform: translateY(-50%);
}

input[type="range"]::-webkit-slider-thumb {
    pointer-events: all;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #5865F2;
    border: 2px solid #F2F3F5;
    cursor: grab;
    -webkit-appearance: none;
    transition: background 0.15s;
}
input[type="range"]::-webkit-slider-thumb:hover { background: #4752C4; }

input[type="range"]::-moz-range-thumb {
    pointer-events: all;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #5865F2;
    border: 2px solid #F2F3F5;
    cursor: grab;
}

.thumb-tooltip {
    position: absolute;
    bottom: calc(100% + 6px);
    transform: translateX(-50%);
    background: #1E1F22;
    color: #B5BAC1;
    padding: 2px 6px;
    border-radius: 3px;
    border: 1px solid rgba(255,255,255,0.08);
    font-size: 11px;
    white-space: nowrap;
    z-index: 4;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s, visibility 0.15s;
}
.thumb-tooltip.thumb-tooltip--visible { opacity: 1; visibility: visible; }
.thumb-tooltip span { color: #F2F3F5; }

/* ── FILTER RANGE (year) ─────────────────────────────────── */
.filter-range {
    display: flex;
    align-items: center;
    gap: 6px;
}
.filter-range .filter-input { flex: 1; min-width: 0; }
.filter-separator { color: #80848E; font-size: 12px; flex-shrink: 0; }

/* ── FILTER SHEET ELEMENTS (hidden on desktop) ───────────── */
.filter-sheet__backdrop {
    display: none;
}

.filter-sheet__header {
    display: none;
}

.filters-section__toggle-inner {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filters-section__toggle-count {
    background: #5865F2;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 10px;
    line-height: 1.4;
}

.filters-section__toggle-arrow {
    color: #80848E;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.filters-section__toggle[aria-expanded="true"] .filters-section__toggle-arrow {
    transform: rotate(180deg);
}

/* ── FILTER BUTTONS ──────────────────────────────────────── */
.filter-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-btn {
    flex: 1;
    padding: 7px 12px;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
}

.filter-btn--primary {
    background: #5865F2;
    color: #fff;
}
.filter-btn--primary:hover { background: #4752C4; }

.filter-btn--reset {
    background: rgba(255,255,255,0.06);
    color: #B5BAC1;
    border: 1px solid rgba(255,255,255,0.08);
}
.filter-btn--reset:hover { background: rgba(255,255,255,0.1); color: #F2F3F5; }

/* ── RESULTS ─────────────────────────────────────────────── */
.results-section {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.games-grid .game-card {
    width: 100%;
    flex: unset;
    scroll-snap-align: unset;
}

/* ── LOADING INDICATOR ───────────────────────────────────── */
.loading-indicator {
    display: flex;
    justify-content: center;
    padding: 20px;
}

.loading-spinner {
    width: 24px;
    height: 24px;
    border: 2px solid rgba(255,255,255,0.1);
    border-top-color: #5865F2;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

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

/* ── NO RESULTS ──────────────────────────────────────────── */
.no-results {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 80px 24px;
    background: #2B2D31;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px;
}

.no-results__icon-wrap {
    width: 76px;
    height: 76px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(88, 101, 242, 0.1);
    border: 1px solid rgba(88, 101, 242, 0.2);
    border-radius: 18px;
    margin-bottom: 20px;
    color: #5865F2;
}

.no-results__svg {
    color: #5865F2;
    flex-shrink: 0;
}

.no-results__title {
    font-size: 16px;
    font-weight: 700;
    color: #F2F3F5;
    margin: 0 0 8px;
    font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
}

.no-results__description {
    font-size: 13px;
    color: #80848E;
    margin: 0 0 24px;
    line-height: 1.6;
}

.no-results__reset {
    display: inline-block;
    padding: 8px 20px;
    background: transparent;
    border: 1px solid rgba(88, 101, 242, 0.5);
    border-radius: 6px;
    color: #5865F2;
    font-size: 13px;
    font-weight: 600;
    font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.no-results__reset:hover {
    background: rgba(88, 101, 242, 0.12);
    border-color: #5865F2;
    color: #fff;
}

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 1200px) {
    .games-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 948px) {
    .wrapper__result { flex-direction: column; }
    .filters-section__wrapper { width: 100%; }

    /* Backdrop */
    .filter-sheet__backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.55);
        backdrop-filter: blur(3px);
        -webkit-backdrop-filter: blur(3px);
        z-index: 199;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.25s ease;
    }
    .filter-sheet__backdrop--visible {
        opacity: 1;
        pointer-events: auto;
    }

    /* Toggle button */
    .filters-section__toggle {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding: 11px 14px;
        background: #2B2D31;
        border: 1px solid rgba(255,255,255,0.08);
        border-radius: 8px;
        color: #B5BAC1;
        cursor: pointer;
        font-size: 13px;
        font-weight: 600;
        font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
        transition: border-color 0.15s, background 0.15s;
    }
    .filters-section__toggle:hover {
        border-color: rgba(255,255,255,0.16);
        background: #303237;
    }
    .filters-section__toggle[aria-expanded="true"] {
        border-color: rgba(88,101,242,0.5);
    }

    /* Bottom sheet */
    .filters-section {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        top: auto;
        z-index: 200;
        width: 100%;
        max-height: 88vh;
        overflow-y: auto;
        overflow-x: hidden;
        background: #2B2D31;
        border: 1px solid rgba(255,255,255,0.08);
        border-bottom: none;
        border-radius: 16px 16px 0 0;
        padding: 0;
        transform: translateY(110%);
        visibility: hidden;
        transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1),
                    visibility 0s linear 0.32s;
        box-shadow: 0 -8px 48px rgba(0,0,0,0.5);
        scrollbar-width: thin;
        scrollbar-color: #383A40 transparent;
    }
    .filters-section--open {
        transform: translateY(0);
        visibility: visible;
        transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1),
                    visibility 0s linear 0s;
    }

    /* Sheet header */
    .filter-sheet__header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 20px 16px 14px;
        position: sticky;
        top: 0;
        background: #2B2D31;
        z-index: 1;
        border-bottom: 1px solid rgba(255,255,255,0.06);
    }
    .filter-sheet__handle {
        position: absolute;
        top: 8px;
        left: 50%;
        transform: translateX(-50%);
        width: 36px;
        height: 4px;
        background: rgba(255,255,255,0.18);
        border-radius: 2px;
    }
    .filter-sheet__title {
        font-size: 15px;
        font-weight: 700;
        color: #F2F3F5;
        font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
    }
    .filter-sheet__close {
        width: 28px;
        height: 28px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(255,255,255,0.06);
        border: 1px solid rgba(255,255,255,0.08);
        border-radius: 50%;
        color: #80848E;
        cursor: pointer;
        transition: background 0.15s, color 0.15s;
    }
    .filter-sheet__close:hover {
        background: rgba(255,255,255,0.1);
        color: #F2F3F5;
    }

    /* Form padding inside sheet */
    .filters-section .filters-form { padding: 16px; }
    .filters-section .filter-buttons { padding: 0 16px 24px; }

    .filters-grid { display: grid; grid-template-columns: repeat(2, 1fr); }
    .filter-group--last { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
    .game-list__container { padding: 20px 16px 40px; }
    .games-grid { grid-template-columns: repeat(2, 1fr); }
    .filters-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .games-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 360px) {
    .games-grid { grid-template-columns: 1fr; }
}
