/* Медиазапросы для адаптивного дизайна */

/* Общие стили для всех устройств */
@media (max-width: 1500px) {   
    .promo-text,
    .logo-text,
    .rotating-words {
        line-height: 50px;
        font-size: 2.5rem;
        height: 50px;
    }

    .header {
        height: 100px;
    }
    .sidebar,
    .main-content {
        margin-top: 110px;
    }
}

@media (max-width: 1320px) {
    .container {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .promo-text,
    .logo-text,
    .rotating-words {
        line-height: 30px;
        font-size: 1.5rem;
        height: 30px;
    }

    .header {
        height: 90px;
    }
    .sidebar,
    .main-content {
        margin-top: 100px;
    }
    h1 {
        font-size: 1rem !important;
    }
}

/* Планшеты и небольшие экраны */
@media (max-width: 1100px) {
    .promo-text,
    .rotating-words {
        display: none;
    }
}

/* Мобильные устройства */
@media (max-width: 800px) {         
    .main-content {
        margin-left: 50px;
    }
    
    /* Кнопки в шапке */
    .header-buttons {
        gap: 10px;
        padding-right: 10px;
    }
    
    .icon-button span {
        display: none;
    }
    
    .icon-button {
        padding: 6px;
        border-radius: 50%;
    }
    
    /* Контейнеры */
    .container {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 600px) {        
    .logo-text {
        display: none;
    }
    h1 {
        margin-left: 20px;
    }
}

/* Очень маленькие экраны */
@media (max-width: 500px) {
    .container {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    /* Модальное окно */
    .modal-content {
        width: 90%;
        padding: 15px;
    }
    
    /* Плитки */
    .tile, .game-tile {
        min-width: 150px;
    }
}

/* Высокопиксельные экраны */
@media (-webkit-min-device-pixel-ratio: 2), 
       (min-resolution: 192dpi) {
    /* Улучшаем качество изображений */
    .game-image {
        background-size: contain;
    }
    
    /* Увеличиваем четкость текста */
    body {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

@media (max-height: 900px) {
    #games-filters[style*="display: none"] + #last-selection {
        display: none !important;
    }
}

@media (max-height: 550px) {
    #last-selection {
        display: none !important;
    }
}