/* ========== МОБИЛЬНЫЕ ИСПРАВЛЕНИЯ ========== */

    
    /* 2. ФОРМА АВТОРИЗАЦИИ - центрирование кнопки "Зарегистрироваться" */
    .block > div:last-child {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        width: 100% !important;
    }
    
    /* Конкретно блок с текстом "Нет аккаунта?" */
    .block > div:last-child > div:last-child {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        width: 100% !important;
        margin: 0 auto !important;
        padding: 0 !important;
    }
    
    /* Кнопка "Зарегистрироваться" - центрирование */
    .block a[href="/register"],
    .block button[data-target="#registration"],
    .block [data-toggle="modal"],
    .block .btn-outline-primary {
        display: inline-block !important;
        margin: 8px auto 0 auto !important;
        text-align: center !important;
        width: auto !important;
        min-width: 160px !important;
        padding: 6px 12px !important;
        font-size: 13px !important;
        text-decoration: underline !important;
        color: #C58C89 !important;
        background: none !important;
        border: none !important;
        cursor: pointer !important;
        font-weight: bold !important;
    }
    
    /* Обертка для текста и кнопки */
    .block > div > div:last-child {
        width: 100% !important;
        text-align: center !important;
        justify-content: center !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
    }
    
    /* 3. МОДАЛЬНОЕ ОКНО АВТОРИЗАЦИИ - исправление огромной таблички */
    .modal.show .modal-dialog {
        margin: 20px auto !important;
        max-width: 95% !important;
        width: auto !important;
    }
    
    .modal-content {
        max-height: 85vh !important;
        overflow-y: auto !important;
        border-radius: 12px !important;
    }
    
    .modal-header {
        position: sticky !important;
        top: 0 !important;
        background: inherit !important;
        z-index: 10 !important;
        padding: 15px 20px !important;
        border-bottom: 2px solid #70A79F !important;
    }
    
    .modal-header .close {
        font-size: 28px !important;
        padding: 0 !important;
        margin: -10px -15px -10px auto !important;
        width: 40px !important;
        height: 40px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        background: rgba(197, 140, 137, 0.1) !important;
        border-radius: 50% !important;
    }
    
    .modal-header .close span {
        line-height: 1 !important;
        font-weight: bold !important;
        color: #C58C89 !important;
    }
    
    .modal-body {
        padding: 20px !important;
        max-height: calc(85vh - 70px) !important;
        overflow-y: auto !important;
    }
    
    
    /* 6. УВЕДОМЛЕНИЕ О БЛОКИРОВКЕ ПРАВОГО КЛИКА */
    .context-menu-notification {
        top: 70px !important;
        right: 10px !important;
        max-width: 160px !important;
        padding: 7px 10px !important;
        font-size: 10px !important;
    }
    
    .context-menu-cooldown {
        top: 8px !important;
        right: 8px !important;
        font-size: 11px !important;
    }
}

/* ОЧЕНЬ МАЛЕНЬКИЕ ЭКРАНЫ (до 480px) */
@media (max-width: 480px) {
    /* Имя в чате - еще компактнее */
    .chat-message .username,
    .chat-message strong,
    .chat-message b,
    .chat-username {
        max-width: 140px !important;
        font-size: 13px !important;
    }
    
    /* Кнопка "Зарегистрироваться" на очень маленьких экранах */
    .block a[href="/register"],
    .block button[data-target="#registration"],
    .block [data-toggle="modal"],
    .block .btn-outline-primary {
        min-width: 140px !important;
        font-size: 12px !important;
        padding: 5px 10px !important;
    }
    
    /* Модальное окно */
    .modal.show .modal-dialog {
        margin: 10px auto !important;
        max-width: 98% !important;
    }
    
    .modal-header {
        padding: 12px 15px !important;
    }
    
    .modal-header .close {
        width: 35px !important;
        height: 35px !important;
        font-size: 24px !important;
    }
    
    /* Виджет VK - меньшая высота */
    #vk_groups iframe {
        height: 180px !important;
    }
    
    /* Уведомление о блокировке правого клика */
    .context-menu-notification {
        max-width: 140px !important;
        padding: 6px 8px !important;
        font-size: 9px !important;
    }
}


/* Принудительное отображение слайдера */
.head_block {
    animation: fadeIn 0.5s ease-in !important;
    opacity: 1 !important;
    visibility: visible !important;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Отключаем любые задержки */
.head_block,
.head_block * {
    animation-delay: 0s !important;
    transition-delay: 0s !important;
}