/* Скрытый текст для доступности */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}




/* Хлебные крошки */
.allgames-breadcrumb {
    display: flex;
    align-items: center;
    padding: 20px 0 10px;
    font-size: 14px;
    color: #666;
}

.allgames-breadcrumb a {
    color: #666;
    text-decoration: none;
}

.allgames-breadcrumb a:hover,
.allgames-breadcrumb a:focus {
    color: #000;
    text-decoration: underline;
}

.allgames-breadcrumb-separator {
    margin: 0 8px;
}

.allgames-breadcrumb-current {
    color: #000;
    font-weight: 500;
}

/* Заголовок страницы */
.allgames-header {
    margin-bottom: 30px;
}

.allgames-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #000;
}

.allgames-subtitle {
    font-size: 16px;
    color: #666;
    margin-bottom: 20px;
}

/* Элементы управления */
.allgames-controls {
    display: flex;
    justify-content: flex-start; /* Изменено с space-between на flex-start */
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.allgames-search-form {
    flex: 1;
    min-width: 300px;
}

.allgames-search-wrapper {
    display: flex;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.3s;
}

.allgames-search-wrapper:focus-within {
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(8, 27, 245, 0.1);
}

.allgames-search-input {
    flex: 1;
    padding: 12px 16px;
    border: none;
    outline: none;
    font-size: 16px;
    background: transparent;
}

.allgames-search-input::placeholder {
    color: #999;
}



.allgames-search-btn:hover,
.allgames-search-btn:focus {
    background: #333;
    outline: none;
}

/* Сортировка */
.allgames-sort-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.allgames-sort-btn {
    padding: 8px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    text-decoration: none;
    color: #666;
    font-weight: 500;
    transition: all 0.3s;
    background: #fff;
}

.allgames-sort-btn:hover,
.allgames-sort-btn:focus,
.allgames-sort-btn.allgames-sort-active {
    background: #007bff;
    color: #fff;
    border-color: #007bff;
    outline: none;
}

/* СЕТКА ИГР - ИСПРАВЛЕННЫЙ РАЗМЕР */
.allgames-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr); /* По умолчанию 6 для планшета/десктопа */
    gap: 20px;
    margin-bottom: 40px;
}

/* Десктоп - 12 колонок */
@media (min-width: 1200px) {
    .allgames-grid {
        grid-template-columns: repeat(10, 1fr);
        gap: 20px;
    }
}

/* Планшет - 6 колонок (значение по умолчанию) */
@media (min-width: 768px) and (max-width: 1199px) {
    .allgames-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 15px;
    }
}

/* Телефон - 4 колонки */
@media (max-width: 767px) {
    .allgames-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 12px;
    }
}

/* Очень маленький телефон - 2 колонки */
@media (max-width: 360px) {
    .allgames-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}

.allgames-card {
    text-align: center;
}



.allgames-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: inherit;
    gap: 8px;
    padding: 10px;
}



.allgames-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.allgames-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.allgames-name {
    font-size: 12px;
    font-weight: 600;
    color: #000;
    line-height: 1.3;
    text-align: center;
    word-break: break-word;
    margin: 0;
}

/* Адаптивные размеры иконок */
@media (min-width: 1200px) {
    .allgames-icon {
        width: 70px;
        height: 70px;
    }
    
    .allgames-name {
        font-size: 13px;
    }
}


@media (max-width: 1190px) {
    .allgames-grid {
        grid-template-columns: repeat(10, 1fr);
        gap: 15px;
    }
}

@media (max-width: 850px) {
    .allgames-grid {
        grid-template-columns: repeat(7, 1fr);
        gap: 15px;
    }
}

@media (max-width: 700px) {
    .allgames-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 10px;
    }
}

@media (max-width: 600px) {
    .allgames-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
    }
}


@media (max-width: 767px) {

    .allgames-icon {
        width: 60px;
        height: 60px;
    }
    
    .allgames-name {
        font-size: 11px;
    }
    
    .allgames-link {
        gap: 6px;
        padding: 0px;
    }
}

@media (max-width: 360px) {
    .allgames-icon {
        width: 45px;
        height: 45px;
    }
    
    .allgames-name {
        font-size: 10px;
    }
}

/* Состояние "не найдено" */
.allgames-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
}

.allgames-empty-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.allgames-empty h3 {
    font-size: 24px;
    margin-bottom: 10px;
    color: #000;
}

.allgames-empty p {
    font-size: 16px;
    color: #666;
    margin-bottom: 20px;
}

.allgames-btn-primary {
    display: inline-block;
    padding: 10px 20px;
    background: #000;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: background 0.3s;
    border: none;
    cursor: pointer;
}

.allgames-btn-primary:hover,
.allgames-btn-primary:focus {
    background: #333;
    outline: none;
}

/* Пагинация */
.allgames-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    padding: 30px 0;
}

.allgames-pagination-btn {
    padding: 10px 20px;
    background: #000;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: background 0.3s;
}

.allgames-pagination-btn:hover,
.allgames-pagination-btn:focus {
    background: #333;
    color: #fff;
    outline: none;
}

.allgames-pagination-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.allgames-pagination-info {
    font-size: 14px;
    color: #666;
}

/* Адаптивность остальных элементов */
@media (max-width: 768px) {
    .allgames-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .allgames-search-form {
        min-width: auto;
    }
    
    .allgames-title {
        font-size: 20px;
    }
    
    .allgames-subtitle {
        font-size: 14px;
    }
    
    .allgames-sort-controls {
        justify-content: flex-start; 
    }
    
    .allgames-pagination {
        flex-direction: column;
        gap: 15px;
    }
    .allgames-header {
        padding: 0px 8px;
    }
    .allgames-breadcrumb {
        font-size: 12px;
        padding: 15px 8px 8px;
    }
}

@media (max-width: 480px) {
    .allgames-title {
        font-size: 20px;
    }
    
    .allgames-subtitle {
        font-size: 13px;
    }
    
    
    
    .allgames-search-input {
        padding: 10px 14px;
        font-size: 15px;
    }
    
    .allgames-search-btn {
        padding: 10px 14px;
    }
    
    .allgames-sort-controls {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .allgames-sort-btn {
        padding: 6px 12px;
        font-size: 14px;
    }
}

/* Touch-улучшения */
@media (hover: none) {
    .allgames-card:hover {
        /* Убрал стили */
    }
}

/* Улучшения для высокой контрастности */
@media (prefers-contrast: high) {
    .allgames-card {
        border: 2px solid #000;
    }
    
    .allgames-sort-btn {
        border: 2px solid #000;
    }
}

/* Уменьшение движения для пользователей с предпочтениями */
@media (prefers-reduced-motion: reduce) {
    .allgames-sort-btn,
    .allgames-search-btn,
    .allgames-pagination-btn,
    .allgames-btn-primary {
        transition: none;
    }
}

.allgames-search-form {
    flex: 1;
    min-width: 300px;
    position: relative;
}

.allgames-search-wrapper {
    display: flex;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.3s;
    position: relative;
}

.allgames-search-wrapper:focus-within {
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(8, 27, 245, 0.1);
}

.allgames-search-input {
    flex: 1;
    padding: 12px 16px 12px 44px; /* Увеличил левый отступ для иконки */
    border: none;
    outline: none;
    font-size: 16px;
    background: transparent;
    width: 100%;
}

.allgames-search-input::placeholder {
    color: #999;
}

/* Стили для иконки поиска */
.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: #999;
    z-index: 1;
    pointer-events: none;
}

/* Убираем кнопку поиска, если она есть */
.allgames-search-btn {
    display: none;
}